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

from spaceone.api.inventory.v1 import price_pb2 as spaceone_dot_api_dot_inventory_dot_v1_dot_price__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.get = channel.unary_unary(
                '/spaceone.api.inventory.v1.Price/get',
                request_serializer=spaceone_dot_api_dot_inventory_dot_v1_dot_price__pb2.GetPriceRequest.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_inventory_dot_v1_dot_price__pb2.ProductInfo.FromString,
                )
        self.get_alternative = channel.unary_unary(
                '/spaceone.api.inventory.v1.Price/get_alternative',
                request_serializer=spaceone_dot_api_dot_inventory_dot_v1_dot_price__pb2.GetPriceAltRequest.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_inventory_dot_v1_dot_price__pb2.AltPriceInfo.FromString,
                )
        self.create = channel.unary_unary(
                '/spaceone.api.inventory.v1.Price/create',
                request_serializer=spaceone_dot_api_dot_inventory_dot_v1_dot_price__pb2.CreatePriceInfoRequest.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_inventory_dot_v1_dot_price__pb2.CreateResult.FromString,
                )
        self.get_sp_info = channel.unary_unary(
                '/spaceone.api.inventory.v1.Price/get_sp_info',
                request_serializer=spaceone_dot_api_dot_inventory_dot_v1_dot_price__pb2.GetSavingsRequest.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_inventory_dot_v1_dot_price__pb2.SavingsResult.FromString,
                )


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

    def get(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 get_alternative(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 get_sp_info(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_PriceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'get': grpc.unary_unary_rpc_method_handler(
                    servicer.get,
                    request_deserializer=spaceone_dot_api_dot_inventory_dot_v1_dot_price__pb2.GetPriceRequest.FromString,
                    response_serializer=spaceone_dot_api_dot_inventory_dot_v1_dot_price__pb2.ProductInfo.SerializeToString,
            ),
            'get_alternative': grpc.unary_unary_rpc_method_handler(
                    servicer.get_alternative,
                    request_deserializer=spaceone_dot_api_dot_inventory_dot_v1_dot_price__pb2.GetPriceAltRequest.FromString,
                    response_serializer=spaceone_dot_api_dot_inventory_dot_v1_dot_price__pb2.AltPriceInfo.SerializeToString,
            ),
            'create': grpc.unary_unary_rpc_method_handler(
                    servicer.create,
                    request_deserializer=spaceone_dot_api_dot_inventory_dot_v1_dot_price__pb2.CreatePriceInfoRequest.FromString,
                    response_serializer=spaceone_dot_api_dot_inventory_dot_v1_dot_price__pb2.CreateResult.SerializeToString,
            ),
            'get_sp_info': grpc.unary_unary_rpc_method_handler(
                    servicer.get_sp_info,
                    request_deserializer=spaceone_dot_api_dot_inventory_dot_v1_dot_price__pb2.GetSavingsRequest.FromString,
                    response_serializer=spaceone_dot_api_dot_inventory_dot_v1_dot_price__pb2.SavingsResult.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'spaceone.api.inventory.v1.Price', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def get(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, '/spaceone.api.inventory.v1.Price/get',
            spaceone_dot_api_dot_inventory_dot_v1_dot_price__pb2.GetPriceRequest.SerializeToString,
            spaceone_dot_api_dot_inventory_dot_v1_dot_price__pb2.ProductInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def get_alternative(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, '/spaceone.api.inventory.v1.Price/get_alternative',
            spaceone_dot_api_dot_inventory_dot_v1_dot_price__pb2.GetPriceAltRequest.SerializeToString,
            spaceone_dot_api_dot_inventory_dot_v1_dot_price__pb2.AltPriceInfo.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, '/spaceone.api.inventory.v1.Price/create',
            spaceone_dot_api_dot_inventory_dot_v1_dot_price__pb2.CreatePriceInfoRequest.SerializeToString,
            spaceone_dot_api_dot_inventory_dot_v1_dot_price__pb2.CreateResult.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def get_sp_info(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, '/spaceone.api.inventory.v1.Price/get_sp_info',
            spaceone_dot_api_dot_inventory_dot_v1_dot_price__pb2.GetSavingsRequest.SerializeToString,
            spaceone_dot_api_dot_inventory_dot_v1_dot_price__pb2.SavingsResult.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
