# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
import warnings

from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from yandex.cloud.cloudregistry.v1 import lifecycle_policy_pb2 as yandex_dot_cloud_dot_cloudregistry_dot_v1_dot_lifecycle__policy__pb2
from yandex.cloud.cloudregistry.v1 import lifecycle_policy_service_pb2 as yandex_dot_cloud_dot_cloudregistry_dot_v1_dot_lifecycle__policy__service__pb2
from yandex.cloud.operation import operation_pb2 as yandex_dot_cloud_dot_operation_dot_operation__pb2

GRPC_GENERATED_VERSION = '1.70.0'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower
    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    raise RuntimeError(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + f' but the generated code in yandex/cloud/cloudregistry/v1/lifecycle_policy_service_pb2_grpc.py depends on'
        + f' grpcio>={GRPC_GENERATED_VERSION}.'
        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
    )


class LifecyclePolicyServiceStub(object):
    """A set of methods for managing LifecyclePolicy resources.
    """

    def __init__(self, channel):
        """Constructor.

        Args:
            channel: A grpc.Channel.
        """
        self.Create = channel.unary_unary(
                '/yandex.cloud.cloudregistry.v1.LifecyclePolicyService/Create',
                request_serializer=yandex_dot_cloud_dot_cloudregistry_dot_v1_dot_lifecycle__policy__service__pb2.CreateLifecyclePolicyRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                _registered_method=True)
        self.Update = channel.unary_unary(
                '/yandex.cloud.cloudregistry.v1.LifecyclePolicyService/Update',
                request_serializer=yandex_dot_cloud_dot_cloudregistry_dot_v1_dot_lifecycle__policy__service__pb2.UpdateLifecyclePolicyRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                _registered_method=True)
        self.Delete = channel.unary_unary(
                '/yandex.cloud.cloudregistry.v1.LifecyclePolicyService/Delete',
                request_serializer=yandex_dot_cloud_dot_cloudregistry_dot_v1_dot_lifecycle__policy__service__pb2.DeleteLifecyclePolicyRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                _registered_method=True)
        self.Get = channel.unary_unary(
                '/yandex.cloud.cloudregistry.v1.LifecyclePolicyService/Get',
                request_serializer=yandex_dot_cloud_dot_cloudregistry_dot_v1_dot_lifecycle__policy__service__pb2.GetLifecyclePolicyRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_cloudregistry_dot_v1_dot_lifecycle__policy__pb2.LifecyclePolicy.FromString,
                _registered_method=True)
        self.List = channel.unary_unary(
                '/yandex.cloud.cloudregistry.v1.LifecyclePolicyService/List',
                request_serializer=yandex_dot_cloud_dot_cloudregistry_dot_v1_dot_lifecycle__policy__service__pb2.ListLifecyclePolicyRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_cloudregistry_dot_v1_dot_lifecycle__policy__service__pb2.ListLifecyclePolicyResponse.FromString,
                _registered_method=True)
        self.ChangeState = channel.unary_unary(
                '/yandex.cloud.cloudregistry.v1.LifecyclePolicyService/ChangeState',
                request_serializer=yandex_dot_cloud_dot_cloudregistry_dot_v1_dot_lifecycle__policy__service__pb2.ChangeLifecyclePolicyStateRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)


class LifecyclePolicyServiceServicer(object):
    """A set of methods for managing LifecyclePolicy resources.
    """

    def Create(self, request, context):
        """Creates a lifecycle policy in the specified registry.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Update(self, request, context):
        """Updates the specified lifecycle policy.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Delete(self, request, context):
        """Deletes the specified lifecycle policy.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Get(self, request, context):
        """Returns the specified lifecycle policy.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def List(self, request, context):
        """Retrieves the list of lifecycle policies in the specified registry.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ChangeState(self, request, context):
        """Changes the state of the specified lifecycle policy.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_LifecyclePolicyServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Create': grpc.unary_unary_rpc_method_handler(
                    servicer.Create,
                    request_deserializer=yandex_dot_cloud_dot_cloudregistry_dot_v1_dot_lifecycle__policy__service__pb2.CreateLifecyclePolicyRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'Update': grpc.unary_unary_rpc_method_handler(
                    servicer.Update,
                    request_deserializer=yandex_dot_cloud_dot_cloudregistry_dot_v1_dot_lifecycle__policy__service__pb2.UpdateLifecyclePolicyRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'Delete': grpc.unary_unary_rpc_method_handler(
                    servicer.Delete,
                    request_deserializer=yandex_dot_cloud_dot_cloudregistry_dot_v1_dot_lifecycle__policy__service__pb2.DeleteLifecyclePolicyRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'Get': grpc.unary_unary_rpc_method_handler(
                    servicer.Get,
                    request_deserializer=yandex_dot_cloud_dot_cloudregistry_dot_v1_dot_lifecycle__policy__service__pb2.GetLifecyclePolicyRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_cloudregistry_dot_v1_dot_lifecycle__policy__pb2.LifecyclePolicy.SerializeToString,
            ),
            'List': grpc.unary_unary_rpc_method_handler(
                    servicer.List,
                    request_deserializer=yandex_dot_cloud_dot_cloudregistry_dot_v1_dot_lifecycle__policy__service__pb2.ListLifecyclePolicyRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_cloudregistry_dot_v1_dot_lifecycle__policy__service__pb2.ListLifecyclePolicyResponse.SerializeToString,
            ),
            'ChangeState': grpc.unary_unary_rpc_method_handler(
                    servicer.ChangeState,
                    request_deserializer=yandex_dot_cloud_dot_cloudregistry_dot_v1_dot_lifecycle__policy__service__pb2.ChangeLifecyclePolicyStateRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'yandex.cloud.cloudregistry.v1.LifecyclePolicyService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('yandex.cloud.cloudregistry.v1.LifecyclePolicyService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class LifecyclePolicyService(object):
    """A set of methods for managing LifecyclePolicy resources.
    """

    @staticmethod
    def Create(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/yandex.cloud.cloudregistry.v1.LifecyclePolicyService/Create',
            yandex_dot_cloud_dot_cloudregistry_dot_v1_dot_lifecycle__policy__service__pb2.CreateLifecyclePolicyRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Update(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/yandex.cloud.cloudregistry.v1.LifecyclePolicyService/Update',
            yandex_dot_cloud_dot_cloudregistry_dot_v1_dot_lifecycle__policy__service__pb2.UpdateLifecyclePolicyRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Delete(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/yandex.cloud.cloudregistry.v1.LifecyclePolicyService/Delete',
            yandex_dot_cloud_dot_cloudregistry_dot_v1_dot_lifecycle__policy__service__pb2.DeleteLifecyclePolicyRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Get(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/yandex.cloud.cloudregistry.v1.LifecyclePolicyService/Get',
            yandex_dot_cloud_dot_cloudregistry_dot_v1_dot_lifecycle__policy__service__pb2.GetLifecyclePolicyRequest.SerializeToString,
            yandex_dot_cloud_dot_cloudregistry_dot_v1_dot_lifecycle__policy__pb2.LifecyclePolicy.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def List(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/yandex.cloud.cloudregistry.v1.LifecyclePolicyService/List',
            yandex_dot_cloud_dot_cloudregistry_dot_v1_dot_lifecycle__policy__service__pb2.ListLifecyclePolicyRequest.SerializeToString,
            yandex_dot_cloud_dot_cloudregistry_dot_v1_dot_lifecycle__policy__service__pb2.ListLifecyclePolicyResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ChangeState(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/yandex.cloud.cloudregistry.v1.LifecyclePolicyService/ChangeState',
            yandex_dot_cloud_dot_cloudregistry_dot_v1_dot_lifecycle__policy__service__pb2.ChangeLifecyclePolicyStateRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
