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

from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
from spaceone.api.cost_analysis.v1 import budget_usage_pb2 as spaceone_dot_api_dot_cost__analysis_dot_v1_dot_budget__usage__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.list = channel.unary_unary(
                '/spaceone.api.cost_analysis.v1.BudgetUsage/list',
                request_serializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_budget__usage__pb2.BudgetUsageQuery.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_budget__usage__pb2.BudgetUsagesInfo.FromString,
                )
        self.stat = channel.unary_unary(
                '/spaceone.api.cost_analysis.v1.BudgetUsage/stat',
                request_serializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_budget__usage__pb2.BudgetUsageStatQuery.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_struct__pb2.Struct.FromString,
                )


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

    def list(self, request, context):
        """
        desc: Gets a list of all BudgetUsages. You can use a query to get a filtered list of BudgetUsages.
        request_example: >-
        {
        "query": {}
        }
        response_example: >-
        {
        "results": [
        {
        "budget_id": "budget-abb377eb9e8b",
        "name": "Cloudforet-Budget3",
        "date": "2022-01",
        "usd_cost": 7671.164,
        "limit": 10000.0,
        "domain_id": "domain-58010aa2e451",
        "updated_at": "2022-07-19T04:26:08.099Z"
        },
        {
        "budget_id": "budget-abb377eb9e8b",
        "name": "Cloudforet-Budget3",
        "date": "2022-02",
        "usd_cost": 5931.771,
        "limit": 11000.0,
        "domain_id": "domain-58010aa2e451",
        "updated_at": "2022-07-19T04:26:08.105Z"
        }
        ],
        "total_count": 12
        }
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def stat(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_BudgetUsageServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'list': grpc.unary_unary_rpc_method_handler(
                    servicer.list,
                    request_deserializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_budget__usage__pb2.BudgetUsageQuery.FromString,
                    response_serializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_budget__usage__pb2.BudgetUsagesInfo.SerializeToString,
            ),
            'stat': grpc.unary_unary_rpc_method_handler(
                    servicer.stat,
                    request_deserializer=spaceone_dot_api_dot_cost__analysis_dot_v1_dot_budget__usage__pb2.BudgetUsageStatQuery.FromString,
                    response_serializer=google_dot_protobuf_dot_struct__pb2.Struct.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'spaceone.api.cost_analysis.v1.BudgetUsage', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def list(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.cost_analysis.v1.BudgetUsage/list',
            spaceone_dot_api_dot_cost__analysis_dot_v1_dot_budget__usage__pb2.BudgetUsageQuery.SerializeToString,
            spaceone_dot_api_dot_cost__analysis_dot_v1_dot_budget__usage__pb2.BudgetUsagesInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def stat(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.cost_analysis.v1.BudgetUsage/stat',
            spaceone_dot_api_dot_cost__analysis_dot_v1_dot_budget__usage__pb2.BudgetUsageStatQuery.SerializeToString,
            google_dot_protobuf_dot_struct__pb2.Struct.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
