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

from core.usage.v1beta import usage_pb2 as core_dot_usage_dot_v1beta_dot_usage__pb2


class UsageServiceStub(object):
    """UsageService responds to incoming usage requests.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Liveness = channel.unary_unary(
                '/core.usage.v1beta.UsageService/Liveness',
                request_serializer=core_dot_usage_dot_v1beta_dot_usage__pb2.LivenessRequest.SerializeToString,
                response_deserializer=core_dot_usage_dot_v1beta_dot_usage__pb2.LivenessResponse.FromString,
                )
        self.Readiness = channel.unary_unary(
                '/core.usage.v1beta.UsageService/Readiness',
                request_serializer=core_dot_usage_dot_v1beta_dot_usage__pb2.ReadinessRequest.SerializeToString,
                response_deserializer=core_dot_usage_dot_v1beta_dot_usage__pb2.ReadinessResponse.FromString,
                )
        self.CreateSession = channel.unary_unary(
                '/core.usage.v1beta.UsageService/CreateSession',
                request_serializer=core_dot_usage_dot_v1beta_dot_usage__pb2.CreateSessionRequest.SerializeToString,
                response_deserializer=core_dot_usage_dot_v1beta_dot_usage__pb2.CreateSessionResponse.FromString,
                )
        self.SendSessionReport = channel.unary_unary(
                '/core.usage.v1beta.UsageService/SendSessionReport',
                request_serializer=core_dot_usage_dot_v1beta_dot_usage__pb2.SendSessionReportRequest.SerializeToString,
                response_deserializer=core_dot_usage_dot_v1beta_dot_usage__pb2.SendSessionReportResponse.FromString,
                )


class UsageServiceServicer(object):
    """UsageService responds to incoming usage requests.
    """

    def Liveness(self, request, context):
        """Liveness method receives a LivenessRequest message and returns a
        LivenessResponse message.
        See https://github.com/grpc/grpc/blob/master/doc/health-checking.md
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Readiness(self, request, context):
        """Readiness method receives a ReadinessRequest message and returns a
        ReadinessResponse message.
        See https://github.com/grpc/grpc/blob/master/doc/health-checking.md
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CreateSession(self, request, context):
        """CreateSession method receives a CreateSessionRequest message and returns
        a CreateSessionResponse message.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SendSessionReport(self, request, context):
        """SendSessionReport method receives a SendSessionReportRequest message and
        returns a SendSessionReportResponse message.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_UsageServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Liveness': grpc.unary_unary_rpc_method_handler(
                    servicer.Liveness,
                    request_deserializer=core_dot_usage_dot_v1beta_dot_usage__pb2.LivenessRequest.FromString,
                    response_serializer=core_dot_usage_dot_v1beta_dot_usage__pb2.LivenessResponse.SerializeToString,
            ),
            'Readiness': grpc.unary_unary_rpc_method_handler(
                    servicer.Readiness,
                    request_deserializer=core_dot_usage_dot_v1beta_dot_usage__pb2.ReadinessRequest.FromString,
                    response_serializer=core_dot_usage_dot_v1beta_dot_usage__pb2.ReadinessResponse.SerializeToString,
            ),
            'CreateSession': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateSession,
                    request_deserializer=core_dot_usage_dot_v1beta_dot_usage__pb2.CreateSessionRequest.FromString,
                    response_serializer=core_dot_usage_dot_v1beta_dot_usage__pb2.CreateSessionResponse.SerializeToString,
            ),
            'SendSessionReport': grpc.unary_unary_rpc_method_handler(
                    servicer.SendSessionReport,
                    request_deserializer=core_dot_usage_dot_v1beta_dot_usage__pb2.SendSessionReportRequest.FromString,
                    response_serializer=core_dot_usage_dot_v1beta_dot_usage__pb2.SendSessionReportResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'core.usage.v1beta.UsageService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class UsageService(object):
    """UsageService responds to incoming usage requests.
    """

    @staticmethod
    def Liveness(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, '/core.usage.v1beta.UsageService/Liveness',
            core_dot_usage_dot_v1beta_dot_usage__pb2.LivenessRequest.SerializeToString,
            core_dot_usage_dot_v1beta_dot_usage__pb2.LivenessResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Readiness(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, '/core.usage.v1beta.UsageService/Readiness',
            core_dot_usage_dot_v1beta_dot_usage__pb2.ReadinessRequest.SerializeToString,
            core_dot_usage_dot_v1beta_dot_usage__pb2.ReadinessResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CreateSession(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, '/core.usage.v1beta.UsageService/CreateSession',
            core_dot_usage_dot_v1beta_dot_usage__pb2.CreateSessionRequest.SerializeToString,
            core_dot_usage_dot_v1beta_dot_usage__pb2.CreateSessionResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SendSessionReport(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, '/core.usage.v1beta.UsageService/SendSessionReport',
            core_dot_usage_dot_v1beta_dot_usage__pb2.SendSessionReportRequest.SerializeToString,
            core_dot_usage_dot_v1beta_dot_usage__pb2.SendSessionReportResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
