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

from nebius.api.nebius.billing.v1alpha1 import calculator_service_pb2 as nebius_dot_billing_dot_v1alpha1_dot_calculator__service__pb2


class CalculatorServiceStub(object):
    """Calculator service for estimating resource costs.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Estimate = channel.unary_unary(
                '/nebius.billing.v1alpha1.CalculatorService/Estimate',
                request_serializer=nebius_dot_billing_dot_v1alpha1_dot_calculator__service__pb2.EstimateRequest.SerializeToString,
                response_deserializer=nebius_dot_billing_dot_v1alpha1_dot_calculator__service__pb2.EstimateResponse.FromString,
                )
        self.EstimateBatch = channel.unary_unary(
                '/nebius.billing.v1alpha1.CalculatorService/EstimateBatch',
                request_serializer=nebius_dot_billing_dot_v1alpha1_dot_calculator__service__pb2.EstimateBatchRequest.SerializeToString,
                response_deserializer=nebius_dot_billing_dot_v1alpha1_dot_calculator__service__pb2.EstimateBatchResponse.FromString,
                )


class CalculatorServiceServicer(object):
    """Calculator service for estimating resource costs.
    """

    def Estimate(self, request, context):
        """Estimates prices for a single resource.
        Returns both hourly and monthly cost estimates for the specified resource configuration.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def EstimateBatch(self, request, context):
        """Estimates prices for multiple resources.
        Returns aggregated hourly and monthly cost estimates for all specified resources.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_CalculatorServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Estimate': grpc.unary_unary_rpc_method_handler(
                    servicer.Estimate,
                    request_deserializer=nebius_dot_billing_dot_v1alpha1_dot_calculator__service__pb2.EstimateRequest.FromString,
                    response_serializer=nebius_dot_billing_dot_v1alpha1_dot_calculator__service__pb2.EstimateResponse.SerializeToString,
            ),
            'EstimateBatch': grpc.unary_unary_rpc_method_handler(
                    servicer.EstimateBatch,
                    request_deserializer=nebius_dot_billing_dot_v1alpha1_dot_calculator__service__pb2.EstimateBatchRequest.FromString,
                    response_serializer=nebius_dot_billing_dot_v1alpha1_dot_calculator__service__pb2.EstimateBatchResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'nebius.billing.v1alpha1.CalculatorService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class CalculatorService(object):
    """Calculator service for estimating resource costs.
    """

    @staticmethod
    def Estimate(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, '/nebius.billing.v1alpha1.CalculatorService/Estimate',
            nebius_dot_billing_dot_v1alpha1_dot_calculator__service__pb2.EstimateRequest.SerializeToString,
            nebius_dot_billing_dot_v1alpha1_dot_calculator__service__pb2.EstimateResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def EstimateBatch(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, '/nebius.billing.v1alpha1.CalculatorService/EstimateBatch',
            nebius_dot_billing_dot_v1alpha1_dot_calculator__service__pb2.EstimateBatchRequest.SerializeToString,
            nebius_dot_billing_dot_v1alpha1_dot_calculator__service__pb2.EstimateBatchResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
