# 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 domains.v1 import domains_pb2 as domains_dot_v1_dot_domains__pb2

GRPC_GENERATED_VERSION = '1.78.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},'
        + ' but the generated code in domains/v1/domains_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 DomainServiceStub(object):
    """DomainService handles custom domain management
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.ListDomains = channel.unary_unary(
                '/domains.v1.DomainService/ListDomains',
                request_serializer=domains_dot_v1_dot_domains__pb2.ListDomainsRequest.SerializeToString,
                response_deserializer=domains_dot_v1_dot_domains__pb2.ListDomainsResponse.FromString,
                _registered_method=True)
        self.CreateDomain = channel.unary_unary(
                '/domains.v1.DomainService/CreateDomain',
                request_serializer=domains_dot_v1_dot_domains__pb2.CreateDomainRequest.SerializeToString,
                response_deserializer=domains_dot_v1_dot_domains__pb2.CreateDomainResponse.FromString,
                _registered_method=True)
        self.GetDomain = channel.unary_unary(
                '/domains.v1.DomainService/GetDomain',
                request_serializer=domains_dot_v1_dot_domains__pb2.GetDomainRequest.SerializeToString,
                response_deserializer=domains_dot_v1_dot_domains__pb2.Domain.FromString,
                _registered_method=True)
        self.VerifyDomain = channel.unary_unary(
                '/domains.v1.DomainService/VerifyDomain',
                request_serializer=domains_dot_v1_dot_domains__pb2.VerifyDomainRequest.SerializeToString,
                response_deserializer=domains_dot_v1_dot_domains__pb2.Domain.FromString,
                _registered_method=True)
        self.DeleteDomain = channel.unary_unary(
                '/domains.v1.DomainService/DeleteDomain',
                request_serializer=domains_dot_v1_dot_domains__pb2.DeleteDomainRequest.SerializeToString,
                response_deserializer=domains_dot_v1_dot_domains__pb2.DeleteDomainResponse.FromString,
                _registered_method=True)


class DomainServiceServicer(object):
    """DomainService handles custom domain management
    """

    def ListDomains(self, request, context):
        """List all custom domains
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CreateDomain(self, request, context):
        """Add a new custom domain
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetDomain(self, request, context):
        """Get a specific domain
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def VerifyDomain(self, request, context):
        """Verify a domain
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteDomain(self, request, context):
        """Delete a domain
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_DomainServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ListDomains': grpc.unary_unary_rpc_method_handler(
                    servicer.ListDomains,
                    request_deserializer=domains_dot_v1_dot_domains__pb2.ListDomainsRequest.FromString,
                    response_serializer=domains_dot_v1_dot_domains__pb2.ListDomainsResponse.SerializeToString,
            ),
            'CreateDomain': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateDomain,
                    request_deserializer=domains_dot_v1_dot_domains__pb2.CreateDomainRequest.FromString,
                    response_serializer=domains_dot_v1_dot_domains__pb2.CreateDomainResponse.SerializeToString,
            ),
            'GetDomain': grpc.unary_unary_rpc_method_handler(
                    servicer.GetDomain,
                    request_deserializer=domains_dot_v1_dot_domains__pb2.GetDomainRequest.FromString,
                    response_serializer=domains_dot_v1_dot_domains__pb2.Domain.SerializeToString,
            ),
            'VerifyDomain': grpc.unary_unary_rpc_method_handler(
                    servicer.VerifyDomain,
                    request_deserializer=domains_dot_v1_dot_domains__pb2.VerifyDomainRequest.FromString,
                    response_serializer=domains_dot_v1_dot_domains__pb2.Domain.SerializeToString,
            ),
            'DeleteDomain': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteDomain,
                    request_deserializer=domains_dot_v1_dot_domains__pb2.DeleteDomainRequest.FromString,
                    response_serializer=domains_dot_v1_dot_domains__pb2.DeleteDomainResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'domains.v1.DomainService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('domains.v1.DomainService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class DomainService(object):
    """DomainService handles custom domain management
    """

    @staticmethod
    def ListDomains(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,
            '/domains.v1.DomainService/ListDomains',
            domains_dot_v1_dot_domains__pb2.ListDomainsRequest.SerializeToString,
            domains_dot_v1_dot_domains__pb2.ListDomainsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CreateDomain(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,
            '/domains.v1.DomainService/CreateDomain',
            domains_dot_v1_dot_domains__pb2.CreateDomainRequest.SerializeToString,
            domains_dot_v1_dot_domains__pb2.CreateDomainResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetDomain(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,
            '/domains.v1.DomainService/GetDomain',
            domains_dot_v1_dot_domains__pb2.GetDomainRequest.SerializeToString,
            domains_dot_v1_dot_domains__pb2.Domain.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def VerifyDomain(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,
            '/domains.v1.DomainService/VerifyDomain',
            domains_dot_v1_dot_domains__pb2.VerifyDomainRequest.SerializeToString,
            domains_dot_v1_dot_domains__pb2.Domain.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeleteDomain(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,
            '/domains.v1.DomainService/DeleteDomain',
            domains_dot_v1_dot_domains__pb2.DeleteDomainRequest.SerializeToString,
            domains_dot_v1_dot_domains__pb2.DeleteDomainResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
