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

import grpc

from chalk._gen.chalk.server.v1 import billing_pb2 as chalk_dot_server_dot_v1_dot_billing__pb2
from chalk._gen.chalk.server.v1 import pod_request_pb2 as chalk_dot_server_dot_v1_dot_pod__request__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetNodesAndPodsUI = channel.unary_unary(
            "/chalk.server.v1.BillingService/GetNodesAndPodsUI",
            request_serializer=chalk_dot_server_dot_v1_dot_billing__pb2.GetNodesAndPodsUIRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_billing__pb2.GetNodesAndPodsUIResponse.FromString,
        )
        self.GetNodesAndPods = channel.unary_unary(
            "/chalk.server.v1.BillingService/GetNodesAndPods",
            request_serializer=chalk_dot_server_dot_v1_dot_billing__pb2.GetNodesAndPodsRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_billing__pb2.GetNodesAndPodsResponse.FromString,
        )
        self.GetUsageChart = channel.unary_unary(
            "/chalk.server.v1.BillingService/GetUsageChart",
            request_serializer=chalk_dot_server_dot_v1_dot_billing__pb2.GetUsageChartRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_billing__pb2.GetUsageChartResponse.FromString,
        )
        self.GetUtilizationRates = channel.unary_unary(
            "/chalk.server.v1.BillingService/GetUtilizationRates",
            request_serializer=chalk_dot_server_dot_v1_dot_billing__pb2.GetUtilizationRatesRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_billing__pb2.GetUtilizationRatesResponse.FromString,
        )
        self.GetPodRequestCharts = channel.unary_unary(
            "/chalk.server.v1.BillingService/GetPodRequestCharts",
            request_serializer=chalk_dot_server_dot_v1_dot_pod__request__pb2.GetPodRequestChartsRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_pod__request__pb2.GetPodRequestChartsResponse.FromString,
        )
        self.SyncUtilization = channel.unary_unary(
            "/chalk.server.v1.BillingService/SyncUtilization",
            request_serializer=chalk_dot_server_dot_v1_dot_billing__pb2.SyncUtilizationRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_billing__pb2.SyncUtilizationResponse.FromString,
        )


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

    def GetNodesAndPodsUI(self, request, context):
        """GetNodesAndPodsUI returns the nodes and pods for the team by default,
        not just a single environment. To limit the scope, add filters to
        the request object.
        Use this endpoint going forward; GetNodesAndPods should be deprecated because
        it reuses PubSub types that are dangerous to update and are not intended for UI use.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def GetNodesAndPods(self, request, context):
        """GetNodesAndPods returns the nodes and pods for the team by default,
        not just a single environment. To limit the scope, add filters to
        the request object.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def GetUsageChart(self, request, context):
        """GetUsageChart shows the Chalk credit usage between a provided start and
        end period. The usage can be grouped by UsageChartPeriod for daily or
        monthly usage, and by UsageChartGrouping for instance type or cluster usage.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def GetUtilizationRates(self, request, context):
        """GetUtilizationRates returns the current utilization rates for all
        instance types.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def GetPodRequestCharts(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 SyncUtilization(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_BillingServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "GetNodesAndPodsUI": grpc.unary_unary_rpc_method_handler(
            servicer.GetNodesAndPodsUI,
            request_deserializer=chalk_dot_server_dot_v1_dot_billing__pb2.GetNodesAndPodsUIRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_billing__pb2.GetNodesAndPodsUIResponse.SerializeToString,
        ),
        "GetNodesAndPods": grpc.unary_unary_rpc_method_handler(
            servicer.GetNodesAndPods,
            request_deserializer=chalk_dot_server_dot_v1_dot_billing__pb2.GetNodesAndPodsRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_billing__pb2.GetNodesAndPodsResponse.SerializeToString,
        ),
        "GetUsageChart": grpc.unary_unary_rpc_method_handler(
            servicer.GetUsageChart,
            request_deserializer=chalk_dot_server_dot_v1_dot_billing__pb2.GetUsageChartRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_billing__pb2.GetUsageChartResponse.SerializeToString,
        ),
        "GetUtilizationRates": grpc.unary_unary_rpc_method_handler(
            servicer.GetUtilizationRates,
            request_deserializer=chalk_dot_server_dot_v1_dot_billing__pb2.GetUtilizationRatesRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_billing__pb2.GetUtilizationRatesResponse.SerializeToString,
        ),
        "GetPodRequestCharts": grpc.unary_unary_rpc_method_handler(
            servicer.GetPodRequestCharts,
            request_deserializer=chalk_dot_server_dot_v1_dot_pod__request__pb2.GetPodRequestChartsRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_pod__request__pb2.GetPodRequestChartsResponse.SerializeToString,
        ),
        "SyncUtilization": grpc.unary_unary_rpc_method_handler(
            servicer.SyncUtilization,
            request_deserializer=chalk_dot_server_dot_v1_dot_billing__pb2.SyncUtilizationRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_billing__pb2.SyncUtilizationResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler("chalk.server.v1.BillingService", rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def GetNodesAndPodsUI(
        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,
            "/chalk.server.v1.BillingService/GetNodesAndPodsUI",
            chalk_dot_server_dot_v1_dot_billing__pb2.GetNodesAndPodsUIRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_billing__pb2.GetNodesAndPodsUIResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetNodesAndPods(
        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,
            "/chalk.server.v1.BillingService/GetNodesAndPods",
            chalk_dot_server_dot_v1_dot_billing__pb2.GetNodesAndPodsRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_billing__pb2.GetNodesAndPodsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetUsageChart(
        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,
            "/chalk.server.v1.BillingService/GetUsageChart",
            chalk_dot_server_dot_v1_dot_billing__pb2.GetUsageChartRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_billing__pb2.GetUsageChartResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetUtilizationRates(
        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,
            "/chalk.server.v1.BillingService/GetUtilizationRates",
            chalk_dot_server_dot_v1_dot_billing__pb2.GetUtilizationRatesRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_billing__pb2.GetUtilizationRatesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetPodRequestCharts(
        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,
            "/chalk.server.v1.BillingService/GetPodRequestCharts",
            chalk_dot_server_dot_v1_dot_pod__request__pb2.GetPodRequestChartsRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_pod__request__pb2.GetPodRequestChartsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def SyncUtilization(
        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,
            "/chalk.server.v1.BillingService/SyncUtilization",
            chalk_dot_server_dot_v1_dot_billing__pb2.SyncUtilizationRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_billing__pb2.SyncUtilizationResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )
