# 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 . import Shared_pb2 as Shared__pb2

GRPC_GENERATED_VERSION = '1.75.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 Shared_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 ShardResourceStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetShardResourcesByMicroservice = channel.unary_unary(
                '/ShardProto.ShardResource/GetShardResourcesByMicroservice',
                request_serializer=Shared__pb2.GetUserRequest.SerializeToString,
                response_deserializer=Shared__pb2.ShardResponse.FromString,
                _registered_method=True)
        self.GetShardLegacy = channel.unary_unary(
                '/ShardProto.ShardResource/GetShardLegacy',
                request_serializer=Shared__pb2.SetKeyPortal.SerializeToString,
                response_deserializer=Shared__pb2.ShardResponse.FromString,
                _registered_method=True)
        self.GetShardSqlSecurity = channel.unary_unary(
                '/ShardProto.ShardResource/GetShardSqlSecurity',
                request_serializer=Shared__pb2.EmptyRequest.SerializeToString,
                response_deserializer=Shared__pb2.ShardResponse.FromString,
                _registered_method=True)
        self.GetShardResourcesByTenant = channel.unary_unary(
                '/ShardProto.ShardResource/GetShardResourcesByTenant',
                request_serializer=Shared__pb2.GetTenantRequest.SerializeToString,
                response_deserializer=Shared__pb2.ShardResponse.FromString,
                _registered_method=True)


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

    def GetShardResourcesByMicroservice(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 GetShardLegacy(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 GetShardSqlSecurity(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 GetShardResourcesByTenant(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_ShardResourceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetShardResourcesByMicroservice': grpc.unary_unary_rpc_method_handler(
                    servicer.GetShardResourcesByMicroservice,
                    request_deserializer=Shared__pb2.GetUserRequest.FromString,
                    response_serializer=Shared__pb2.ShardResponse.SerializeToString,
            ),
            'GetShardLegacy': grpc.unary_unary_rpc_method_handler(
                    servicer.GetShardLegacy,
                    request_deserializer=Shared__pb2.SetKeyPortal.FromString,
                    response_serializer=Shared__pb2.ShardResponse.SerializeToString,
            ),
            'GetShardSqlSecurity': grpc.unary_unary_rpc_method_handler(
                    servicer.GetShardSqlSecurity,
                    request_deserializer=Shared__pb2.EmptyRequest.FromString,
                    response_serializer=Shared__pb2.ShardResponse.SerializeToString,
            ),
            'GetShardResourcesByTenant': grpc.unary_unary_rpc_method_handler(
                    servicer.GetShardResourcesByTenant,
                    request_deserializer=Shared__pb2.GetTenantRequest.FromString,
                    response_serializer=Shared__pb2.ShardResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'ShardProto.ShardResource', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('ShardProto.ShardResource', rpc_method_handlers)


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

    @staticmethod
    def GetShardResourcesByMicroservice(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,
            '/ShardProto.ShardResource/GetShardResourcesByMicroservice',
            Shared__pb2.GetUserRequest.SerializeToString,
            Shared__pb2.ShardResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetShardLegacy(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,
            '/ShardProto.ShardResource/GetShardLegacy',
            Shared__pb2.SetKeyPortal.SerializeToString,
            Shared__pb2.ShardResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetShardSqlSecurity(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,
            '/ShardProto.ShardResource/GetShardSqlSecurity',
            Shared__pb2.EmptyRequest.SerializeToString,
            Shared__pb2.ShardResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetShardResourcesByTenant(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,
            '/ShardProto.ShardResource/GetShardResourcesByTenant',
            Shared__pb2.GetTenantRequest.SerializeToString,
            Shared__pb2.ShardResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
