# 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 packs_grpc_pb2 as packs__grpc__pb2

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

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

        Args:
            channel: A grpc.Channel.
        """
        self.IsPackExist = channel.unary_unary(
                '/packs_grpc.v1.Packs/IsPackExist',
                request_serializer=packs__grpc__pb2.IsPackExistReq.SerializeToString,
                response_deserializer=packs__grpc__pb2.IsPackExistResp.FromString,
                _registered_method=True)
        self.GetTotalCardsInPack = channel.unary_unary(
                '/packs_grpc.v1.Packs/GetTotalCardsInPack',
                request_serializer=packs__grpc__pb2.GetTotalCardsInPackReq.SerializeToString,
                response_deserializer=packs__grpc__pb2.GetTotalCardsInPackResp.FromString,
                _registered_method=True)
        self.UpdateTotalCardsInPack = channel.unary_unary(
                '/packs_grpc.v1.Packs/UpdateTotalCardsInPack',
                request_serializer=packs__grpc__pb2.UpdateTotalCardsInPackReq.SerializeToString,
                response_deserializer=packs__grpc__pb2.UpdateTotalCardsInPackResp.FromString,
                _registered_method=True)


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

    def IsPackExist(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 GetTotalCardsInPack(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 UpdateTotalCardsInPack(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_PacksServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'IsPackExist': grpc.unary_unary_rpc_method_handler(
                    servicer.IsPackExist,
                    request_deserializer=packs__grpc__pb2.IsPackExistReq.FromString,
                    response_serializer=packs__grpc__pb2.IsPackExistResp.SerializeToString,
            ),
            'GetTotalCardsInPack': grpc.unary_unary_rpc_method_handler(
                    servicer.GetTotalCardsInPack,
                    request_deserializer=packs__grpc__pb2.GetTotalCardsInPackReq.FromString,
                    response_serializer=packs__grpc__pb2.GetTotalCardsInPackResp.SerializeToString,
            ),
            'UpdateTotalCardsInPack': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateTotalCardsInPack,
                    request_deserializer=packs__grpc__pb2.UpdateTotalCardsInPackReq.FromString,
                    response_serializer=packs__grpc__pb2.UpdateTotalCardsInPackResp.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'packs_grpc.v1.Packs', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('packs_grpc.v1.Packs', rpc_method_handlers)


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

    @staticmethod
    def IsPackExist(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,
            '/packs_grpc.v1.Packs/IsPackExist',
            packs__grpc__pb2.IsPackExistReq.SerializeToString,
            packs__grpc__pb2.IsPackExistResp.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetTotalCardsInPack(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,
            '/packs_grpc.v1.Packs/GetTotalCardsInPack',
            packs__grpc__pb2.GetTotalCardsInPackReq.SerializeToString,
            packs__grpc__pb2.GetTotalCardsInPackResp.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def UpdateTotalCardsInPack(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,
            '/packs_grpc.v1.Packs/UpdateTotalCardsInPack',
            packs__grpc__pb2.UpdateTotalCardsInPackReq.SerializeToString,
            packs__grpc__pb2.UpdateTotalCardsInPackResp.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
