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

from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from spounge.polykey.v2 import metrics_pb2 as polykey_dot_v2_dot_metrics__pb2
from spounge.polykey.v2 import service_pb2 as polykey_dot_v2_dot_service__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetKey = channel.unary_unary(
                '/polykey.v2.PolykeyService/GetKey',
                request_serializer=polykey_dot_v2_dot_service__pb2.GetKeyRequest.SerializeToString,
                response_deserializer=polykey_dot_v2_dot_service__pb2.GetKeyResponse.FromString,
                _registered_method=True)
        self.ListKeys = channel.unary_unary(
                '/polykey.v2.PolykeyService/ListKeys',
                request_serializer=polykey_dot_v2_dot_service__pb2.ListKeysRequest.SerializeToString,
                response_deserializer=polykey_dot_v2_dot_service__pb2.ListKeysResponse.FromString,
                _registered_method=True)
        self.CreateKey = channel.unary_unary(
                '/polykey.v2.PolykeyService/CreateKey',
                request_serializer=polykey_dot_v2_dot_service__pb2.CreateKeyRequest.SerializeToString,
                response_deserializer=polykey_dot_v2_dot_service__pb2.CreateKeyResponse.FromString,
                _registered_method=True)
        self.RotateKey = channel.unary_unary(
                '/polykey.v2.PolykeyService/RotateKey',
                request_serializer=polykey_dot_v2_dot_service__pb2.RotateKeyRequest.SerializeToString,
                response_deserializer=polykey_dot_v2_dot_service__pb2.RotateKeyResponse.FromString,
                _registered_method=True)
        self.RevokeKey = channel.unary_unary(
                '/polykey.v2.PolykeyService/RevokeKey',
                request_serializer=polykey_dot_v2_dot_service__pb2.RevokeKeyRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)
        self.UpdateKeyMetadata = channel.unary_unary(
                '/polykey.v2.PolykeyService/UpdateKeyMetadata',
                request_serializer=polykey_dot_v2_dot_service__pb2.UpdateKeyMetadataRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)
        self.GetKeyMetadata = channel.unary_unary(
                '/polykey.v2.PolykeyService/GetKeyMetadata',
                request_serializer=polykey_dot_v2_dot_service__pb2.GetKeyMetadataRequest.SerializeToString,
                response_deserializer=polykey_dot_v2_dot_service__pb2.GetKeyMetadataResponse.FromString,
                _registered_method=True)
        self.HealthCheck = channel.unary_unary(
                '/polykey.v2.PolykeyService/HealthCheck',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=polykey_dot_v2_dot_metrics__pb2.HealthCheckResponse.FromString,
                _registered_method=True)


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

    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 ListKeys(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 CreateKey(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 RotateKey(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 RevokeKey(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 UpdateKeyMetadata(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 GetKeyMetadata(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 HealthCheck(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_PolykeyServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetKey': grpc.unary_unary_rpc_method_handler(
                    servicer.GetKey,
                    request_deserializer=polykey_dot_v2_dot_service__pb2.GetKeyRequest.FromString,
                    response_serializer=polykey_dot_v2_dot_service__pb2.GetKeyResponse.SerializeToString,
            ),
            'ListKeys': grpc.unary_unary_rpc_method_handler(
                    servicer.ListKeys,
                    request_deserializer=polykey_dot_v2_dot_service__pb2.ListKeysRequest.FromString,
                    response_serializer=polykey_dot_v2_dot_service__pb2.ListKeysResponse.SerializeToString,
            ),
            'CreateKey': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateKey,
                    request_deserializer=polykey_dot_v2_dot_service__pb2.CreateKeyRequest.FromString,
                    response_serializer=polykey_dot_v2_dot_service__pb2.CreateKeyResponse.SerializeToString,
            ),
            'RotateKey': grpc.unary_unary_rpc_method_handler(
                    servicer.RotateKey,
                    request_deserializer=polykey_dot_v2_dot_service__pb2.RotateKeyRequest.FromString,
                    response_serializer=polykey_dot_v2_dot_service__pb2.RotateKeyResponse.SerializeToString,
            ),
            'RevokeKey': grpc.unary_unary_rpc_method_handler(
                    servicer.RevokeKey,
                    request_deserializer=polykey_dot_v2_dot_service__pb2.RevokeKeyRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'UpdateKeyMetadata': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateKeyMetadata,
                    request_deserializer=polykey_dot_v2_dot_service__pb2.UpdateKeyMetadataRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'GetKeyMetadata': grpc.unary_unary_rpc_method_handler(
                    servicer.GetKeyMetadata,
                    request_deserializer=polykey_dot_v2_dot_service__pb2.GetKeyMetadataRequest.FromString,
                    response_serializer=polykey_dot_v2_dot_service__pb2.GetKeyMetadataResponse.SerializeToString,
            ),
            'HealthCheck': grpc.unary_unary_rpc_method_handler(
                    servicer.HealthCheck,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=polykey_dot_v2_dot_metrics__pb2.HealthCheckResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'polykey.v2.PolykeyService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('polykey.v2.PolykeyService', rpc_method_handlers)


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

    @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,
            '/polykey.v2.PolykeyService/GetKey',
            polykey_dot_v2_dot_service__pb2.GetKeyRequest.SerializeToString,
            polykey_dot_v2_dot_service__pb2.GetKeyResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListKeys(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,
            '/polykey.v2.PolykeyService/ListKeys',
            polykey_dot_v2_dot_service__pb2.ListKeysRequest.SerializeToString,
            polykey_dot_v2_dot_service__pb2.ListKeysResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CreateKey(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,
            '/polykey.v2.PolykeyService/CreateKey',
            polykey_dot_v2_dot_service__pb2.CreateKeyRequest.SerializeToString,
            polykey_dot_v2_dot_service__pb2.CreateKeyResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RotateKey(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,
            '/polykey.v2.PolykeyService/RotateKey',
            polykey_dot_v2_dot_service__pb2.RotateKeyRequest.SerializeToString,
            polykey_dot_v2_dot_service__pb2.RotateKeyResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RevokeKey(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,
            '/polykey.v2.PolykeyService/RevokeKey',
            polykey_dot_v2_dot_service__pb2.RevokeKeyRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def UpdateKeyMetadata(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,
            '/polykey.v2.PolykeyService/UpdateKeyMetadata',
            polykey_dot_v2_dot_service__pb2.UpdateKeyMetadataRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetKeyMetadata(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,
            '/polykey.v2.PolykeyService/GetKeyMetadata',
            polykey_dot_v2_dot_service__pb2.GetKeyMetadataRequest.SerializeToString,
            polykey_dot_v2_dot_service__pb2.GetKeyMetadataResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def HealthCheck(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,
            '/polykey.v2.PolykeyService/HealthCheck',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            polykey_dot_v2_dot_metrics__pb2.HealthCheckResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
