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

from strmprivacy.api.usage.v1 import usage_v1_pb2 as strmprivacy_dot_api_dot_usage_dot_v1_dot_usage__v1__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetStreamEventUsage = channel.unary_unary(
                '/strmprivacy.api.usage.v1.UsageService/GetStreamEventUsage',
                request_serializer=strmprivacy_dot_api_dot_usage_dot_v1_dot_usage__v1__pb2.GetStreamEventUsageRequest.SerializeToString,
                response_deserializer=strmprivacy_dot_api_dot_usage_dot_v1_dot_usage__v1__pb2.GetStreamEventUsageResponse.FromString,
                )
        self.StoreUsageEvent = channel.unary_unary(
                '/strmprivacy.api.usage.v1.UsageService/StoreUsageEvent',
                request_serializer=strmprivacy_dot_api_dot_usage_dot_v1_dot_usage__v1__pb2.StoreUsageEventRequest.SerializeToString,
                response_deserializer=strmprivacy_dot_api_dot_usage_dot_v1_dot_usage__v1__pb2.StoreUsageEventResponse.FromString,
                )


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

    def GetStreamEventUsage(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 StoreUsageEvent(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_UsageServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetStreamEventUsage': grpc.unary_unary_rpc_method_handler(
                    servicer.GetStreamEventUsage,
                    request_deserializer=strmprivacy_dot_api_dot_usage_dot_v1_dot_usage__v1__pb2.GetStreamEventUsageRequest.FromString,
                    response_serializer=strmprivacy_dot_api_dot_usage_dot_v1_dot_usage__v1__pb2.GetStreamEventUsageResponse.SerializeToString,
            ),
            'StoreUsageEvent': grpc.unary_unary_rpc_method_handler(
                    servicer.StoreUsageEvent,
                    request_deserializer=strmprivacy_dot_api_dot_usage_dot_v1_dot_usage__v1__pb2.StoreUsageEventRequest.FromString,
                    response_serializer=strmprivacy_dot_api_dot_usage_dot_v1_dot_usage__v1__pb2.StoreUsageEventResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'strmprivacy.api.usage.v1.UsageService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def GetStreamEventUsage(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, '/strmprivacy.api.usage.v1.UsageService/GetStreamEventUsage',
            strmprivacy_dot_api_dot_usage_dot_v1_dot_usage__v1__pb2.GetStreamEventUsageRequest.SerializeToString,
            strmprivacy_dot_api_dot_usage_dot_v1_dot_usage__v1__pb2.GetStreamEventUsageResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def StoreUsageEvent(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, '/strmprivacy.api.usage.v1.UsageService/StoreUsageEvent',
            strmprivacy_dot_api_dot_usage_dot_v1_dot_usage__v1__pb2.StoreUsageEventRequest.SerializeToString,
            strmprivacy_dot_api_dot_usage_dot_v1_dot_usage__v1__pb2.StoreUsageEventResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
