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

# Generation command:
# python3 -m grpc_tools.protoc -I api-interface-definitions/protos
# --python_out=./statsig/grpc/generated --pyi_out=./statsig/grpc/generated --grpc_python_out=./statsig/grpc/generated
# api-interface-definitions/protos/statsig_forward_proxy.proto

# Edit the import path:
# FROM -> import statsig_forward_proxy_pb2 as statsig__forward__proxy__pb2
# TO -> from . import statsig_forward_proxy_pb2 as statsig__forward__proxy__pb2

"""Client and server classes corresponding to protobuf-defined services."""
import grpc

from . import statsig_forward_proxy_pb2 as statsig__forward__proxy__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.getConfigSpec = channel.unary_unary(
                '/statsig_forward_proxy.StatsigForwardProxy/getConfigSpec',
                request_serializer=statsig__forward__proxy__pb2.ConfigSpecRequest.SerializeToString,
                response_deserializer=statsig__forward__proxy__pb2.ConfigSpecResponse.FromString,
                )
        self.StreamConfigSpec = channel.unary_stream(
                '/statsig_forward_proxy.StatsigForwardProxy/StreamConfigSpec',
                request_serializer=statsig__forward__proxy__pb2.ConfigSpecRequest.SerializeToString,
                response_deserializer=statsig__forward__proxy__pb2.ConfigSpecResponse.FromString,
                )


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

    def getConfigSpec(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 StreamConfigSpec(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_StatsigForwardProxyServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'getConfigSpec': grpc.unary_unary_rpc_method_handler(
                    servicer.getConfigSpec,
                    request_deserializer=statsig__forward__proxy__pb2.ConfigSpecRequest.FromString,
                    response_serializer=statsig__forward__proxy__pb2.ConfigSpecResponse.SerializeToString,
            ),
            'StreamConfigSpec': grpc.unary_stream_rpc_method_handler(
                    servicer.StreamConfigSpec,
                    request_deserializer=statsig__forward__proxy__pb2.ConfigSpecRequest.FromString,
                    response_serializer=statsig__forward__proxy__pb2.ConfigSpecResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'statsig_forward_proxy.StatsigForwardProxy', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def getConfigSpec(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, '/statsig_forward_proxy.StatsigForwardProxy/getConfigSpec',
            statsig__forward__proxy__pb2.ConfigSpecRequest.SerializeToString,
            statsig__forward__proxy__pb2.ConfigSpecResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def StreamConfigSpec(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_stream(request, target, '/statsig_forward_proxy.StatsigForwardProxy/StreamConfigSpec',
            statsig__forward__proxy__pb2.ConfigSpecRequest.SerializeToString,
            statsig__forward__proxy__pb2.ConfigSpecResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
