# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

from google.cloud.billing_budgets_v1beta1.proto import (
    budget_model_pb2 as google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__model__pb2,
)
from google.cloud.billing_budgets_v1beta1.proto import (
    budget_service_pb2 as google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__service__pb2,
)
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2


class BudgetServiceStub(object):
    """BudgetService stores Cloud Billing budgets, which define a
  budget plan and rules to execute as we track spend against that plan.
  """

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

    Args:
      channel: A grpc.Channel.
    """
        self.CreateBudget = channel.unary_unary(
            "/google.cloud.billing.budgets.v1beta1.BudgetService/CreateBudget",
            request_serializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__service__pb2.CreateBudgetRequest.SerializeToString,
            response_deserializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__model__pb2.Budget.FromString,
        )
        self.UpdateBudget = channel.unary_unary(
            "/google.cloud.billing.budgets.v1beta1.BudgetService/UpdateBudget",
            request_serializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__service__pb2.UpdateBudgetRequest.SerializeToString,
            response_deserializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__model__pb2.Budget.FromString,
        )
        self.GetBudget = channel.unary_unary(
            "/google.cloud.billing.budgets.v1beta1.BudgetService/GetBudget",
            request_serializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__service__pb2.GetBudgetRequest.SerializeToString,
            response_deserializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__model__pb2.Budget.FromString,
        )
        self.ListBudgets = channel.unary_unary(
            "/google.cloud.billing.budgets.v1beta1.BudgetService/ListBudgets",
            request_serializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__service__pb2.ListBudgetsRequest.SerializeToString,
            response_deserializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__service__pb2.ListBudgetsResponse.FromString,
        )
        self.DeleteBudget = channel.unary_unary(
            "/google.cloud.billing.budgets.v1beta1.BudgetService/DeleteBudget",
            request_serializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__service__pb2.DeleteBudgetRequest.SerializeToString,
            response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
        )


class BudgetServiceServicer(object):
    """BudgetService stores Cloud Billing budgets, which define a
  budget plan and rules to execute as we track spend against that plan.
  """

    def CreateBudget(self, request, context):
        """Creates a new budget. See
    <a href="https://cloud.google.com/billing/quotas">Quotas and limits</a>
    for more information on the limits of the number of budgets you can create.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def UpdateBudget(self, request, context):
        """Updates a budget and returns the updated budget.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def GetBudget(self, request, context):
        """Returns a budget.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def ListBudgets(self, request, context):
        """Returns a list of budgets for a billing account.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def DeleteBudget(self, request, context):
        """Deletes a budget. Returns successfully if already deleted.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")


def add_BudgetServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "CreateBudget": grpc.unary_unary_rpc_method_handler(
            servicer.CreateBudget,
            request_deserializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__service__pb2.CreateBudgetRequest.FromString,
            response_serializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__model__pb2.Budget.SerializeToString,
        ),
        "UpdateBudget": grpc.unary_unary_rpc_method_handler(
            servicer.UpdateBudget,
            request_deserializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__service__pb2.UpdateBudgetRequest.FromString,
            response_serializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__model__pb2.Budget.SerializeToString,
        ),
        "GetBudget": grpc.unary_unary_rpc_method_handler(
            servicer.GetBudget,
            request_deserializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__service__pb2.GetBudgetRequest.FromString,
            response_serializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__model__pb2.Budget.SerializeToString,
        ),
        "ListBudgets": grpc.unary_unary_rpc_method_handler(
            servicer.ListBudgets,
            request_deserializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__service__pb2.ListBudgetsRequest.FromString,
            response_serializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__service__pb2.ListBudgetsResponse.SerializeToString,
        ),
        "DeleteBudget": grpc.unary_unary_rpc_method_handler(
            servicer.DeleteBudget,
            request_deserializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__service__pb2.DeleteBudgetRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "google.cloud.billing.budgets.v1beta1.BudgetService", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))
