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

from . import integration_kms_pb2 as admin_dot_v1_dot_integration__kms__pb2


class KmsServiceStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateKeyRegistration = channel.unary_unary(
                '/admin.v1.KmsService/CreateKeyRegistration',
                request_serializer=admin_dot_v1_dot_integration__kms__pb2.CreateKeyRegistrationRequest.SerializeToString,
                response_deserializer=admin_dot_v1_dot_integration__kms__pb2.CreateKeyRegistrationResponse.FromString,
                _registered_method=True)
        self.GetKeys = channel.unary_unary(
                '/admin.v1.KmsService/GetKeys',
                request_serializer=admin_dot_v1_dot_integration__kms__pb2.GetKeysRequest.SerializeToString,
                response_deserializer=admin_dot_v1_dot_integration__kms__pb2.GetKeysResponse.FromString,
                _registered_method=True)
        self.GetKey = channel.unary_unary(
                '/admin.v1.KmsService/GetKey',
                request_serializer=admin_dot_v1_dot_integration__kms__pb2.GetKeyRequest.SerializeToString,
                response_deserializer=admin_dot_v1_dot_integration__kms__pb2.GetKeyResponse.FromString,
                _registered_method=True)
        self.DeactivateFieldEncryptionKey = channel.unary_unary(
                '/admin.v1.KmsService/DeactivateFieldEncryptionKey',
                request_serializer=admin_dot_v1_dot_integration__kms__pb2.DeactivateFieldEncryptionKeyRequest.SerializeToString,
                response_deserializer=admin_dot_v1_dot_integration__kms__pb2.DeactivateFieldEncryptionKeyResponse.FromString,
                _registered_method=True)


class KmsServiceServicer(object):
    """Missing associated documentation comment in .proto file."""

    def CreateKeyRegistration(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetKeys(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetKey(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeactivateFieldEncryptionKey(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_KmsServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateKeyRegistration': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateKeyRegistration,
                    request_deserializer=admin_dot_v1_dot_integration__kms__pb2.CreateKeyRegistrationRequest.FromString,
                    response_serializer=admin_dot_v1_dot_integration__kms__pb2.CreateKeyRegistrationResponse.SerializeToString,
            ),
            'GetKeys': grpc.unary_unary_rpc_method_handler(
                    servicer.GetKeys,
                    request_deserializer=admin_dot_v1_dot_integration__kms__pb2.GetKeysRequest.FromString,
                    response_serializer=admin_dot_v1_dot_integration__kms__pb2.GetKeysResponse.SerializeToString,
            ),
            'GetKey': grpc.unary_unary_rpc_method_handler(
                    servicer.GetKey,
                    request_deserializer=admin_dot_v1_dot_integration__kms__pb2.GetKeyRequest.FromString,
                    response_serializer=admin_dot_v1_dot_integration__kms__pb2.GetKeyResponse.SerializeToString,
            ),
            'DeactivateFieldEncryptionKey': grpc.unary_unary_rpc_method_handler(
                    servicer.DeactivateFieldEncryptionKey,
                    request_deserializer=admin_dot_v1_dot_integration__kms__pb2.DeactivateFieldEncryptionKeyRequest.FromString,
                    response_serializer=admin_dot_v1_dot_integration__kms__pb2.DeactivateFieldEncryptionKeyResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'admin.v1.KmsService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('admin.v1.KmsService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class KmsService(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def CreateKeyRegistration(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,
            '/admin.v1.KmsService/CreateKeyRegistration',
            admin_dot_v1_dot_integration__kms__pb2.CreateKeyRegistrationRequest.SerializeToString,
            admin_dot_v1_dot_integration__kms__pb2.CreateKeyRegistrationResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetKeys(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,
            '/admin.v1.KmsService/GetKeys',
            admin_dot_v1_dot_integration__kms__pb2.GetKeysRequest.SerializeToString,
            admin_dot_v1_dot_integration__kms__pb2.GetKeysResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetKey(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,
            '/admin.v1.KmsService/GetKey',
            admin_dot_v1_dot_integration__kms__pb2.GetKeyRequest.SerializeToString,
            admin_dot_v1_dot_integration__kms__pb2.GetKeyResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeactivateFieldEncryptionKey(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,
            '/admin.v1.KmsService/DeactivateFieldEncryptionKey',
            admin_dot_v1_dot_integration__kms__pb2.DeactivateFieldEncryptionKeyRequest.SerializeToString,
            admin_dot_v1_dot_integration__kms__pb2.DeactivateFieldEncryptionKeyResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
