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

from yandex.cloud.access import access_pb2 as yandex_dot_cloud_dot_access_dot_access__pb2
from yandex.cloud.kms.v1.asymmetricsignature import asymmetric_signature_key_pb2 as yandex_dot_cloud_dot_kms_dot_v1_dot_asymmetricsignature_dot_asymmetric__signature__key__pb2
from yandex.cloud.kms.v1.asymmetricsignature import asymmetric_signature_key_service_pb2 as yandex_dot_cloud_dot_kms_dot_v1_dot_asymmetricsignature_dot_asymmetric__signature__key__service__pb2
from yandex.cloud.operation import operation_pb2 as yandex_dot_cloud_dot_operation_dot_operation__pb2


class AsymmetricSignatureKeyServiceStub(object):
    """Set of methods for managing asymmetric signature keys.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Create = channel.unary_unary(
                '/yandex.cloud.kms.v1.asymmetricsignature.AsymmetricSignatureKeyService/Create',
                request_serializer=yandex_dot_cloud_dot_kms_dot_v1_dot_asymmetricsignature_dot_asymmetric__signature__key__service__pb2.CreateAsymmetricSignatureKeyRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                )
        self.Get = channel.unary_unary(
                '/yandex.cloud.kms.v1.asymmetricsignature.AsymmetricSignatureKeyService/Get',
                request_serializer=yandex_dot_cloud_dot_kms_dot_v1_dot_asymmetricsignature_dot_asymmetric__signature__key__service__pb2.GetAsymmetricSignatureKeyRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_kms_dot_v1_dot_asymmetricsignature_dot_asymmetric__signature__key__pb2.AsymmetricSignatureKey.FromString,
                )
        self.List = channel.unary_unary(
                '/yandex.cloud.kms.v1.asymmetricsignature.AsymmetricSignatureKeyService/List',
                request_serializer=yandex_dot_cloud_dot_kms_dot_v1_dot_asymmetricsignature_dot_asymmetric__signature__key__service__pb2.ListAsymmetricSignatureKeysRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_kms_dot_v1_dot_asymmetricsignature_dot_asymmetric__signature__key__service__pb2.ListAsymmetricSignatureKeysResponse.FromString,
                )
        self.Update = channel.unary_unary(
                '/yandex.cloud.kms.v1.asymmetricsignature.AsymmetricSignatureKeyService/Update',
                request_serializer=yandex_dot_cloud_dot_kms_dot_v1_dot_asymmetricsignature_dot_asymmetric__signature__key__service__pb2.UpdateAsymmetricSignatureKeyRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                )
        self.Delete = channel.unary_unary(
                '/yandex.cloud.kms.v1.asymmetricsignature.AsymmetricSignatureKeyService/Delete',
                request_serializer=yandex_dot_cloud_dot_kms_dot_v1_dot_asymmetricsignature_dot_asymmetric__signature__key__service__pb2.DeleteAsymmetricSignatureKeyRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                )
        self.ListOperations = channel.unary_unary(
                '/yandex.cloud.kms.v1.asymmetricsignature.AsymmetricSignatureKeyService/ListOperations',
                request_serializer=yandex_dot_cloud_dot_kms_dot_v1_dot_asymmetricsignature_dot_asymmetric__signature__key__service__pb2.ListAsymmetricSignatureKeyOperationsRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_kms_dot_v1_dot_asymmetricsignature_dot_asymmetric__signature__key__service__pb2.ListAsymmetricSignatureKeyOperationsResponse.FromString,
                )
        self.ListAccessBindings = channel.unary_unary(
                '/yandex.cloud.kms.v1.asymmetricsignature.AsymmetricSignatureKeyService/ListAccessBindings',
                request_serializer=yandex_dot_cloud_dot_access_dot_access__pb2.ListAccessBindingsRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_access_dot_access__pb2.ListAccessBindingsResponse.FromString,
                )
        self.SetAccessBindings = channel.unary_unary(
                '/yandex.cloud.kms.v1.asymmetricsignature.AsymmetricSignatureKeyService/SetAccessBindings',
                request_serializer=yandex_dot_cloud_dot_access_dot_access__pb2.SetAccessBindingsRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                )
        self.UpdateAccessBindings = channel.unary_unary(
                '/yandex.cloud.kms.v1.asymmetricsignature.AsymmetricSignatureKeyService/UpdateAccessBindings',
                request_serializer=yandex_dot_cloud_dot_access_dot_access__pb2.UpdateAccessBindingsRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                )


class AsymmetricSignatureKeyServiceServicer(object):
    """Set of methods for managing asymmetric signature keys.
    """

    def Create(self, request, context):
        """control plane
        Creates an asymmetric KMS key in the specified folder.
        """
        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 asymmetric KMS key.

        To get the list of available asymmetric KMS keys, make a [SymmetricKeyService.List] request.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def List(self, request, context):
        """Returns the list of asymmetric KMS keys in the specified folder.
        """
        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 asymmetric KMS key.
        """
        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 asymmetric KMS key. This action also automatically schedules
        the destruction of all of the key's versions in 72 hours.

        The key and its versions appear absent in [AsymmetricSignatureKeyService.Get] and [AsymmetricSignatureKeyService.List]
        requests, but can be restored within 72 hours with a request to tech support.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListOperations(self, request, context):
        """Lists operations for the specified asymmetric KMS key.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListAccessBindings(self, request, context):
        """Lists existing access bindings for the specified key.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetAccessBindings(self, request, context):
        """Sets access bindings for the key.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateAccessBindings(self, request, context):
        """Updates access bindings for the specified key.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_AsymmetricSignatureKeyServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Create': grpc.unary_unary_rpc_method_handler(
                    servicer.Create,
                    request_deserializer=yandex_dot_cloud_dot_kms_dot_v1_dot_asymmetricsignature_dot_asymmetric__signature__key__service__pb2.CreateAsymmetricSignatureKeyRequest.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_kms_dot_v1_dot_asymmetricsignature_dot_asymmetric__signature__key__service__pb2.GetAsymmetricSignatureKeyRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_kms_dot_v1_dot_asymmetricsignature_dot_asymmetric__signature__key__pb2.AsymmetricSignatureKey.SerializeToString,
            ),
            'List': grpc.unary_unary_rpc_method_handler(
                    servicer.List,
                    request_deserializer=yandex_dot_cloud_dot_kms_dot_v1_dot_asymmetricsignature_dot_asymmetric__signature__key__service__pb2.ListAsymmetricSignatureKeysRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_kms_dot_v1_dot_asymmetricsignature_dot_asymmetric__signature__key__service__pb2.ListAsymmetricSignatureKeysResponse.SerializeToString,
            ),
            'Update': grpc.unary_unary_rpc_method_handler(
                    servicer.Update,
                    request_deserializer=yandex_dot_cloud_dot_kms_dot_v1_dot_asymmetricsignature_dot_asymmetric__signature__key__service__pb2.UpdateAsymmetricSignatureKeyRequest.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_kms_dot_v1_dot_asymmetricsignature_dot_asymmetric__signature__key__service__pb2.DeleteAsymmetricSignatureKeyRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'ListOperations': grpc.unary_unary_rpc_method_handler(
                    servicer.ListOperations,
                    request_deserializer=yandex_dot_cloud_dot_kms_dot_v1_dot_asymmetricsignature_dot_asymmetric__signature__key__service__pb2.ListAsymmetricSignatureKeyOperationsRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_kms_dot_v1_dot_asymmetricsignature_dot_asymmetric__signature__key__service__pb2.ListAsymmetricSignatureKeyOperationsResponse.SerializeToString,
            ),
            'ListAccessBindings': grpc.unary_unary_rpc_method_handler(
                    servicer.ListAccessBindings,
                    request_deserializer=yandex_dot_cloud_dot_access_dot_access__pb2.ListAccessBindingsRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_access_dot_access__pb2.ListAccessBindingsResponse.SerializeToString,
            ),
            'SetAccessBindings': grpc.unary_unary_rpc_method_handler(
                    servicer.SetAccessBindings,
                    request_deserializer=yandex_dot_cloud_dot_access_dot_access__pb2.SetAccessBindingsRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'UpdateAccessBindings': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateAccessBindings,
                    request_deserializer=yandex_dot_cloud_dot_access_dot_access__pb2.UpdateAccessBindingsRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'yandex.cloud.kms.v1.asymmetricsignature.AsymmetricSignatureKeyService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class AsymmetricSignatureKeyService(object):
    """Set of methods for managing asymmetric signature keys.
    """

    @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.kms.v1.asymmetricsignature.AsymmetricSignatureKeyService/Create',
            yandex_dot_cloud_dot_kms_dot_v1_dot_asymmetricsignature_dot_asymmetric__signature__key__service__pb2.CreateAsymmetricSignatureKeyRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @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.kms.v1.asymmetricsignature.AsymmetricSignatureKeyService/Get',
            yandex_dot_cloud_dot_kms_dot_v1_dot_asymmetricsignature_dot_asymmetric__signature__key__service__pb2.GetAsymmetricSignatureKeyRequest.SerializeToString,
            yandex_dot_cloud_dot_kms_dot_v1_dot_asymmetricsignature_dot_asymmetric__signature__key__pb2.AsymmetricSignatureKey.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @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.kms.v1.asymmetricsignature.AsymmetricSignatureKeyService/List',
            yandex_dot_cloud_dot_kms_dot_v1_dot_asymmetricsignature_dot_asymmetric__signature__key__service__pb2.ListAsymmetricSignatureKeysRequest.SerializeToString,
            yandex_dot_cloud_dot_kms_dot_v1_dot_asymmetricsignature_dot_asymmetric__signature__key__service__pb2.ListAsymmetricSignatureKeysResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @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.kms.v1.asymmetricsignature.AsymmetricSignatureKeyService/Update',
            yandex_dot_cloud_dot_kms_dot_v1_dot_asymmetricsignature_dot_asymmetric__signature__key__service__pb2.UpdateAsymmetricSignatureKeyRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @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.kms.v1.asymmetricsignature.AsymmetricSignatureKeyService/Delete',
            yandex_dot_cloud_dot_kms_dot_v1_dot_asymmetricsignature_dot_asymmetric__signature__key__service__pb2.DeleteAsymmetricSignatureKeyRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListOperations(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.kms.v1.asymmetricsignature.AsymmetricSignatureKeyService/ListOperations',
            yandex_dot_cloud_dot_kms_dot_v1_dot_asymmetricsignature_dot_asymmetric__signature__key__service__pb2.ListAsymmetricSignatureKeyOperationsRequest.SerializeToString,
            yandex_dot_cloud_dot_kms_dot_v1_dot_asymmetricsignature_dot_asymmetric__signature__key__service__pb2.ListAsymmetricSignatureKeyOperationsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListAccessBindings(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.kms.v1.asymmetricsignature.AsymmetricSignatureKeyService/ListAccessBindings',
            yandex_dot_cloud_dot_access_dot_access__pb2.ListAccessBindingsRequest.SerializeToString,
            yandex_dot_cloud_dot_access_dot_access__pb2.ListAccessBindingsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetAccessBindings(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.kms.v1.asymmetricsignature.AsymmetricSignatureKeyService/SetAccessBindings',
            yandex_dot_cloud_dot_access_dot_access__pb2.SetAccessBindingsRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateAccessBindings(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.kms.v1.asymmetricsignature.AsymmetricSignatureKeyService/UpdateAccessBindings',
            yandex_dot_cloud_dot_access_dot_access__pb2.UpdateAccessBindingsRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
