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

from openfeature.schemas.protobuf.schema.v1 import schema_pb2 as openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2

GRPC_GENERATED_VERSION = '1.70.0'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower
    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    raise RuntimeError(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + f' but the generated code in openfeature/schemas/protobuf/schema/v1/schema_pb2_grpc.py depends on'
        + f' grpcio>={GRPC_GENERATED_VERSION}.'
        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
    )


class ServiceStub(object):
    """Service defines the exposed rpcs of flagd
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.ResolveAll = channel.unary_unary(
                '/schema.v1.Service/ResolveAll',
                request_serializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveAllRequest.SerializeToString,
                response_deserializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveAllResponse.FromString,
                _registered_method=True)
        self.ResolveBoolean = channel.unary_unary(
                '/schema.v1.Service/ResolveBoolean',
                request_serializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveBooleanRequest.SerializeToString,
                response_deserializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveBooleanResponse.FromString,
                _registered_method=True)
        self.ResolveString = channel.unary_unary(
                '/schema.v1.Service/ResolveString',
                request_serializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveStringRequest.SerializeToString,
                response_deserializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveStringResponse.FromString,
                _registered_method=True)
        self.ResolveFloat = channel.unary_unary(
                '/schema.v1.Service/ResolveFloat',
                request_serializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveFloatRequest.SerializeToString,
                response_deserializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveFloatResponse.FromString,
                _registered_method=True)
        self.ResolveInt = channel.unary_unary(
                '/schema.v1.Service/ResolveInt',
                request_serializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveIntRequest.SerializeToString,
                response_deserializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveIntResponse.FromString,
                _registered_method=True)
        self.ResolveObject = channel.unary_unary(
                '/schema.v1.Service/ResolveObject',
                request_serializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveObjectRequest.SerializeToString,
                response_deserializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveObjectResponse.FromString,
                _registered_method=True)
        self.EventStream = channel.unary_stream(
                '/schema.v1.Service/EventStream',
                request_serializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.EventStreamRequest.SerializeToString,
                response_deserializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.EventStreamResponse.FromString,
                _registered_method=True)


class ServiceServicer(object):
    """Service defines the exposed rpcs of flagd
    """

    def ResolveAll(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 ResolveBoolean(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 ResolveString(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 ResolveFloat(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 ResolveInt(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 ResolveObject(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 EventStream(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_ServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ResolveAll': grpc.unary_unary_rpc_method_handler(
                    servicer.ResolveAll,
                    request_deserializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveAllRequest.FromString,
                    response_serializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveAllResponse.SerializeToString,
            ),
            'ResolveBoolean': grpc.unary_unary_rpc_method_handler(
                    servicer.ResolveBoolean,
                    request_deserializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveBooleanRequest.FromString,
                    response_serializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveBooleanResponse.SerializeToString,
            ),
            'ResolveString': grpc.unary_unary_rpc_method_handler(
                    servicer.ResolveString,
                    request_deserializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveStringRequest.FromString,
                    response_serializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveStringResponse.SerializeToString,
            ),
            'ResolveFloat': grpc.unary_unary_rpc_method_handler(
                    servicer.ResolveFloat,
                    request_deserializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveFloatRequest.FromString,
                    response_serializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveFloatResponse.SerializeToString,
            ),
            'ResolveInt': grpc.unary_unary_rpc_method_handler(
                    servicer.ResolveInt,
                    request_deserializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveIntRequest.FromString,
                    response_serializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveIntResponse.SerializeToString,
            ),
            'ResolveObject': grpc.unary_unary_rpc_method_handler(
                    servicer.ResolveObject,
                    request_deserializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveObjectRequest.FromString,
                    response_serializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveObjectResponse.SerializeToString,
            ),
            'EventStream': grpc.unary_stream_rpc_method_handler(
                    servicer.EventStream,
                    request_deserializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.EventStreamRequest.FromString,
                    response_serializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.EventStreamResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'schema.v1.Service', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('schema.v1.Service', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class Service(object):
    """Service defines the exposed rpcs of flagd
    """

    @staticmethod
    def ResolveAll(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,
            '/schema.v1.Service/ResolveAll',
            openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveAllRequest.SerializeToString,
            openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveAllResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ResolveBoolean(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,
            '/schema.v1.Service/ResolveBoolean',
            openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveBooleanRequest.SerializeToString,
            openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveBooleanResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ResolveString(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,
            '/schema.v1.Service/ResolveString',
            openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveStringRequest.SerializeToString,
            openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveStringResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ResolveFloat(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,
            '/schema.v1.Service/ResolveFloat',
            openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveFloatRequest.SerializeToString,
            openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveFloatResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ResolveInt(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,
            '/schema.v1.Service/ResolveInt',
            openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveIntRequest.SerializeToString,
            openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveIntResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ResolveObject(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,
            '/schema.v1.Service/ResolveObject',
            openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveObjectRequest.SerializeToString,
            openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveObjectResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def EventStream(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,
            '/schema.v1.Service/EventStream',
            openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.EventStreamRequest.SerializeToString,
            openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.EventStreamResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
