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

from api.v1 import customer_pb2 as api_dot_v1_dot_customer__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateCustomer = channel.unary_unary(
            "/api.v1.CustomerService/CreateCustomer",
            request_serializer=api_dot_v1_dot_customer__pb2.CreateCustomerRequest.SerializeToString,
            response_deserializer=api_dot_v1_dot_customer__pb2.CreateCustomerResponse.FromString,
            _registered_method=True,
        )
        self.GetCustomer = channel.unary_unary(
            "/api.v1.CustomerService/GetCustomer",
            request_serializer=api_dot_v1_dot_customer__pb2.GetCustomerRequest.SerializeToString,
            response_deserializer=api_dot_v1_dot_customer__pb2.GetCustomerResponse.FromString,
            _registered_method=True,
        )
        self.UpdateCustomer = channel.unary_unary(
            "/api.v1.CustomerService/UpdateCustomer",
            request_serializer=api_dot_v1_dot_customer__pb2.UpdateCustomerRequest.SerializeToString,
            response_deserializer=api_dot_v1_dot_customer__pb2.UpdateCustomerResponse.FromString,
            _registered_method=True,
        )
        self.DeleteCustomer = channel.unary_unary(
            "/api.v1.CustomerService/DeleteCustomer",
            request_serializer=api_dot_v1_dot_customer__pb2.DeleteCustomerRequest.SerializeToString,
            response_deserializer=api_dot_v1_dot_customer__pb2.DeleteCustomerResponse.FromString,
            _registered_method=True,
        )
        self.GetContract = channel.unary_unary(
            "/api.v1.CustomerService/GetContract",
            request_serializer=api_dot_v1_dot_customer__pb2.GetContractRequest.SerializeToString,
            response_deserializer=api_dot_v1_dot_customer__pb2.GetContractResponse.FromString,
            _registered_method=True,
        )


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

    def CreateCustomer(self, request, context):
        """Create a new customer on Jamm.
        The response will contain the Jamm's customer ID, which can be used to
        make a purchase calls.

        Jammに新しいCustomerを作成します。
        APIコールが成功するとJammはCustomer IDを返します。このIDは決済を行うために必要です。
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def GetCustomer(self, request, context):
        """GetCustomer retrieves a Jamm customer.

        Customerを取得します。
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def UpdateCustomer(self, request, context):
        """Update a customer.

        Customerを更新します。
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def DeleteCustomer(self, request, context):
        """Delete a customer.

        Customerを削除します。
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def GetContract(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_CustomerServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "CreateCustomer": grpc.unary_unary_rpc_method_handler(
            servicer.CreateCustomer,
            request_deserializer=api_dot_v1_dot_customer__pb2.CreateCustomerRequest.FromString,
            response_serializer=api_dot_v1_dot_customer__pb2.CreateCustomerResponse.SerializeToString,
        ),
        "GetCustomer": grpc.unary_unary_rpc_method_handler(
            servicer.GetCustomer,
            request_deserializer=api_dot_v1_dot_customer__pb2.GetCustomerRequest.FromString,
            response_serializer=api_dot_v1_dot_customer__pb2.GetCustomerResponse.SerializeToString,
        ),
        "UpdateCustomer": grpc.unary_unary_rpc_method_handler(
            servicer.UpdateCustomer,
            request_deserializer=api_dot_v1_dot_customer__pb2.UpdateCustomerRequest.FromString,
            response_serializer=api_dot_v1_dot_customer__pb2.UpdateCustomerResponse.SerializeToString,
        ),
        "DeleteCustomer": grpc.unary_unary_rpc_method_handler(
            servicer.DeleteCustomer,
            request_deserializer=api_dot_v1_dot_customer__pb2.DeleteCustomerRequest.FromString,
            response_serializer=api_dot_v1_dot_customer__pb2.DeleteCustomerResponse.SerializeToString,
        ),
        "GetContract": grpc.unary_unary_rpc_method_handler(
            servicer.GetContract,
            request_deserializer=api_dot_v1_dot_customer__pb2.GetContractRequest.FromString,
            response_serializer=api_dot_v1_dot_customer__pb2.GetContractResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "api.v1.CustomerService", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers("api.v1.CustomerService", rpc_method_handlers)


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

    @staticmethod
    def CreateCustomer(
        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,
            "/api.v1.CustomerService/CreateCustomer",
            api_dot_v1_dot_customer__pb2.CreateCustomerRequest.SerializeToString,
            api_dot_v1_dot_customer__pb2.CreateCustomerResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def GetCustomer(
        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,
            "/api.v1.CustomerService/GetCustomer",
            api_dot_v1_dot_customer__pb2.GetCustomerRequest.SerializeToString,
            api_dot_v1_dot_customer__pb2.GetCustomerResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def UpdateCustomer(
        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,
            "/api.v1.CustomerService/UpdateCustomer",
            api_dot_v1_dot_customer__pb2.UpdateCustomerRequest.SerializeToString,
            api_dot_v1_dot_customer__pb2.UpdateCustomerResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def DeleteCustomer(
        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,
            "/api.v1.CustomerService/DeleteCustomer",
            api_dot_v1_dot_customer__pb2.DeleteCustomerRequest.SerializeToString,
            api_dot_v1_dot_customer__pb2.DeleteCustomerResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def GetContract(
        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,
            "/api.v1.CustomerService/GetContract",
            api_dot_v1_dot_customer__pb2.GetContractRequest.SerializeToString,
            api_dot_v1_dot_customer__pb2.GetContractResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )
