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

import grpc

from senren.feature_store.v1 import registry_pb2 as senren_dot_feature__store_dot_v1_dot_registry__pb2

GRPC_GENERATED_VERSION = "1.66.1"
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 senren/feature_store/v1/registry_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 RegistryServiceStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.Plan = channel.unary_unary(
            "/senren.feature_store.v1.RegistryService/Plan",
            request_serializer=senren_dot_feature__store_dot_v1_dot_registry__pb2.PlanRequest.SerializeToString,
            response_deserializer=senren_dot_feature__store_dot_v1_dot_registry__pb2.PlanResponse.FromString,
            _registered_method=True,
        )
        self.Apply = channel.unary_unary(
            "/senren.feature_store.v1.RegistryService/Apply",
            request_serializer=senren_dot_feature__store_dot_v1_dot_registry__pb2.ApplyRequest.SerializeToString,
            response_deserializer=senren_dot_feature__store_dot_v1_dot_registry__pb2.ApplyResponse.FromString,
            _registered_method=True,
        )
        self.Destroy = channel.unary_unary(
            "/senren.feature_store.v1.RegistryService/Destroy",
            request_serializer=senren_dot_feature__store_dot_v1_dot_registry__pb2.DestroyRequest.SerializeToString,
            response_deserializer=senren_dot_feature__store_dot_v1_dot_registry__pb2.DestroyResponse.FromString,
            _registered_method=True,
        )
        self.GetState = channel.unary_unary(
            "/senren.feature_store.v1.RegistryService/GetState",
            request_serializer=senren_dot_feature__store_dot_v1_dot_registry__pb2.GetStateRequest.SerializeToString,
            response_deserializer=senren_dot_feature__store_dot_v1_dot_registry__pb2.GetStateResponse.FromString,
            _registered_method=True,
        )
        self.RegisterMaterializationRun = channel.unary_unary(
            "/senren.feature_store.v1.RegistryService/RegisterMaterializationRun",
            request_serializer=senren_dot_feature__store_dot_v1_dot_registry__pb2.RegisterMaterializationRunRequest.SerializeToString,
            response_deserializer=senren_dot_feature__store_dot_v1_dot_registry__pb2.RegisterMaterializationRunResponse.FromString,
            _registered_method=True,
        )
        self.RegisterMaterializationEvent = channel.unary_unary(
            "/senren.feature_store.v1.RegistryService/RegisterMaterializationEvent",
            request_serializer=senren_dot_feature__store_dot_v1_dot_registry__pb2.RegisterMaterializationEventRequest.SerializeToString,
            response_deserializer=senren_dot_feature__store_dot_v1_dot_registry__pb2.RegisterMaterializationEventResponse.FromString,
            _registered_method=True,
        )


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

    def Plan(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 Apply(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 Destroy(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 GetState(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 RegisterMaterializationRun(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 RegisterMaterializationEvent(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_RegistryServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "Plan": grpc.unary_unary_rpc_method_handler(
            servicer.Plan,
            request_deserializer=senren_dot_feature__store_dot_v1_dot_registry__pb2.PlanRequest.FromString,
            response_serializer=senren_dot_feature__store_dot_v1_dot_registry__pb2.PlanResponse.SerializeToString,
        ),
        "Apply": grpc.unary_unary_rpc_method_handler(
            servicer.Apply,
            request_deserializer=senren_dot_feature__store_dot_v1_dot_registry__pb2.ApplyRequest.FromString,
            response_serializer=senren_dot_feature__store_dot_v1_dot_registry__pb2.ApplyResponse.SerializeToString,
        ),
        "Destroy": grpc.unary_unary_rpc_method_handler(
            servicer.Destroy,
            request_deserializer=senren_dot_feature__store_dot_v1_dot_registry__pb2.DestroyRequest.FromString,
            response_serializer=senren_dot_feature__store_dot_v1_dot_registry__pb2.DestroyResponse.SerializeToString,
        ),
        "GetState": grpc.unary_unary_rpc_method_handler(
            servicer.GetState,
            request_deserializer=senren_dot_feature__store_dot_v1_dot_registry__pb2.GetStateRequest.FromString,
            response_serializer=senren_dot_feature__store_dot_v1_dot_registry__pb2.GetStateResponse.SerializeToString,
        ),
        "RegisterMaterializationRun": grpc.unary_unary_rpc_method_handler(
            servicer.RegisterMaterializationRun,
            request_deserializer=senren_dot_feature__store_dot_v1_dot_registry__pb2.RegisterMaterializationRunRequest.FromString,
            response_serializer=senren_dot_feature__store_dot_v1_dot_registry__pb2.RegisterMaterializationRunResponse.SerializeToString,
        ),
        "RegisterMaterializationEvent": grpc.unary_unary_rpc_method_handler(
            servicer.RegisterMaterializationEvent,
            request_deserializer=senren_dot_feature__store_dot_v1_dot_registry__pb2.RegisterMaterializationEventRequest.FromString,
            response_serializer=senren_dot_feature__store_dot_v1_dot_registry__pb2.RegisterMaterializationEventResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "senren.feature_store.v1.RegistryService", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers("senren.feature_store.v1.RegistryService", rpc_method_handlers)


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

    @staticmethod
    def Plan(
        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,
            "/senren.feature_store.v1.RegistryService/Plan",
            senren_dot_feature__store_dot_v1_dot_registry__pb2.PlanRequest.SerializeToString,
            senren_dot_feature__store_dot_v1_dot_registry__pb2.PlanResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def Apply(
        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,
            "/senren.feature_store.v1.RegistryService/Apply",
            senren_dot_feature__store_dot_v1_dot_registry__pb2.ApplyRequest.SerializeToString,
            senren_dot_feature__store_dot_v1_dot_registry__pb2.ApplyResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def Destroy(
        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,
            "/senren.feature_store.v1.RegistryService/Destroy",
            senren_dot_feature__store_dot_v1_dot_registry__pb2.DestroyRequest.SerializeToString,
            senren_dot_feature__store_dot_v1_dot_registry__pb2.DestroyResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def GetState(
        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,
            "/senren.feature_store.v1.RegistryService/GetState",
            senren_dot_feature__store_dot_v1_dot_registry__pb2.GetStateRequest.SerializeToString,
            senren_dot_feature__store_dot_v1_dot_registry__pb2.GetStateResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def RegisterMaterializationRun(
        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,
            "/senren.feature_store.v1.RegistryService/RegisterMaterializationRun",
            senren_dot_feature__store_dot_v1_dot_registry__pb2.RegisterMaterializationRunRequest.SerializeToString,
            senren_dot_feature__store_dot_v1_dot_registry__pb2.RegisterMaterializationRunResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def RegisterMaterializationEvent(
        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,
            "/senren.feature_store.v1.RegistryService/RegisterMaterializationEvent",
            senren_dot_feature__store_dot_v1_dot_registry__pb2.RegisterMaterializationEventRequest.SerializeToString,
            senren_dot_feature__store_dot_v1_dot_registry__pb2.RegisterMaterializationEventResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )
