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

import grpc

from . import core_pb2 as core_dot_grpc_dot_core__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.channel = channel
        self.ready()

    def ready(self):
        if self.channel is not None:
            self.AddItem = self.channel.unary_unary(
                "/config.core.BasketController/AddItem",
                request_serializer=core_dot_grpc_dot_core__pb2.AddItemRequest.SerializeToString,
                response_deserializer=core_dot_grpc_dot_core__pb2.AddItemResponse.FromString,
            )
            self.ApplyDiscount = self.channel.unary_unary(
                "/config.core.BasketController/ApplyDiscount",
                request_serializer=core_dot_grpc_dot_core__pb2.BasketApplyDiscountRequest.SerializeToString,
                response_deserializer=core_dot_grpc_dot_core__pb2.BasketApplyDiscountResponse.FromString,
            )
            self.AssignOwner = self.channel.unary_unary(
                "/config.core.BasketController/AssignOwner",
                request_serializer=core_dot_grpc_dot_core__pb2.BasketAssignOwnerRequest.SerializeToString,
                response_deserializer=core_dot_grpc_dot_core__pb2.BasketAssignOwnerResponse.FromString,
            )
            self.Create = self.channel.unary_unary(
                "/config.core.BasketController/Create",
                request_serializer=core_dot_grpc_dot_core__pb2.BasketRequest.SerializeToString,
                response_deserializer=core_dot_grpc_dot_core__pb2.BasketResponse.FromString,
            )
            self.RemoveItem = self.channel.unary_unary(
                "/config.core.BasketController/RemoveItem",
                request_serializer=core_dot_grpc_dot_core__pb2.RemoveItemRequest.SerializeToString,
                response_deserializer=core_dot_grpc_dot_core__pb2.RemoveItemResponse.FromString,
            )
            self.Retrieve = self.channel.unary_unary(
                "/config.core.BasketController/Retrieve",
                request_serializer=core_dot_grpc_dot_core__pb2.BasketRetrieveRequest.SerializeToString,
                response_deserializer=core_dot_grpc_dot_core__pb2.BasketResponse.FromString,
            )


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

    def AddItem(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 ApplyDiscount(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 AssignOwner(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 Create(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 RemoveItem(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 Retrieve(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_BasketControllerServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "AddItem": grpc.unary_unary_rpc_method_handler(
            servicer.AddItem,
            request_deserializer=core_dot_grpc_dot_core__pb2.AddItemRequest.FromString,
            response_serializer=core_dot_grpc_dot_core__pb2.AddItemResponse.SerializeToString,
        ),
        "ApplyDiscount": grpc.unary_unary_rpc_method_handler(
            servicer.ApplyDiscount,
            request_deserializer=core_dot_grpc_dot_core__pb2.BasketApplyDiscountRequest.FromString,
            response_serializer=core_dot_grpc_dot_core__pb2.BasketApplyDiscountResponse.SerializeToString,
        ),
        "AssignOwner": grpc.unary_unary_rpc_method_handler(
            servicer.AssignOwner,
            request_deserializer=core_dot_grpc_dot_core__pb2.BasketAssignOwnerRequest.FromString,
            response_serializer=core_dot_grpc_dot_core__pb2.BasketAssignOwnerResponse.SerializeToString,
        ),
        "Create": grpc.unary_unary_rpc_method_handler(
            servicer.Create,
            request_deserializer=core_dot_grpc_dot_core__pb2.BasketRequest.FromString,
            response_serializer=core_dot_grpc_dot_core__pb2.BasketResponse.SerializeToString,
        ),
        "RemoveItem": grpc.unary_unary_rpc_method_handler(
            servicer.RemoveItem,
            request_deserializer=core_dot_grpc_dot_core__pb2.RemoveItemRequest.FromString,
            response_serializer=core_dot_grpc_dot_core__pb2.RemoveItemResponse.SerializeToString,
        ),
        "Retrieve": grpc.unary_unary_rpc_method_handler(
            servicer.Retrieve,
            request_deserializer=core_dot_grpc_dot_core__pb2.BasketRetrieveRequest.FromString,
            response_serializer=core_dot_grpc_dot_core__pb2.BasketResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "config.core.BasketController", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def AddItem(
        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,
            "/config.core.BasketController/AddItem",
            core_dot_grpc_dot_core__pb2.AddItemRequest.SerializeToString,
            core_dot_grpc_dot_core__pb2.AddItemResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def ApplyDiscount(
        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,
            "/config.core.BasketController/ApplyDiscount",
            core_dot_grpc_dot_core__pb2.BasketApplyDiscountRequest.SerializeToString,
            core_dot_grpc_dot_core__pb2.BasketApplyDiscountResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def AssignOwner(
        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,
            "/config.core.BasketController/AssignOwner",
            core_dot_grpc_dot_core__pb2.BasketAssignOwnerRequest.SerializeToString,
            core_dot_grpc_dot_core__pb2.BasketAssignOwnerResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def Create(
        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,
            "/config.core.BasketController/Create",
            core_dot_grpc_dot_core__pb2.BasketRequest.SerializeToString,
            core_dot_grpc_dot_core__pb2.BasketResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def RemoveItem(
        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,
            "/config.core.BasketController/RemoveItem",
            core_dot_grpc_dot_core__pb2.RemoveItemRequest.SerializeToString,
            core_dot_grpc_dot_core__pb2.RemoveItemResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def Retrieve(
        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,
            "/config.core.BasketController/Retrieve",
            core_dot_grpc_dot_core__pb2.BasketRetrieveRequest.SerializeToString,
            core_dot_grpc_dot_core__pb2.BasketResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.channel = channel
        self.ready()

    def ready(self):
        if self.channel is not None:
            self.End = self.channel.unary_unary(
                "/config.core.TradeController/End",
                request_serializer=core_dot_grpc_dot_core__pb2.EndTradeRequest.SerializeToString,
                response_deserializer=core_dot_grpc_dot_core__pb2.EndTradeResponse.FromString,
            )
            self.Start = self.channel.unary_unary(
                "/config.core.TradeController/Start",
                request_serializer=core_dot_grpc_dot_core__pb2.StartTradeRequest.SerializeToString,
                response_deserializer=core_dot_grpc_dot_core__pb2.StartTradeResponse.FromString,
            )


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

    def End(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 Start(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_TradeControllerServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "End": grpc.unary_unary_rpc_method_handler(
            servicer.End,
            request_deserializer=core_dot_grpc_dot_core__pb2.EndTradeRequest.FromString,
            response_serializer=core_dot_grpc_dot_core__pb2.EndTradeResponse.SerializeToString,
        ),
        "Start": grpc.unary_unary_rpc_method_handler(
            servicer.Start,
            request_deserializer=core_dot_grpc_dot_core__pb2.StartTradeRequest.FromString,
            response_serializer=core_dot_grpc_dot_core__pb2.StartTradeResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "config.core.TradeController", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def End(
        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,
            "/config.core.TradeController/End",
            core_dot_grpc_dot_core__pb2.EndTradeRequest.SerializeToString,
            core_dot_grpc_dot_core__pb2.EndTradeResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def Start(
        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,
            "/config.core.TradeController/Start",
            core_dot_grpc_dot_core__pb2.StartTradeRequest.SerializeToString,
            core_dot_grpc_dot_core__pb2.StartTradeResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )
