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

from h2o_secure_store.gen.ai.h2o.securestore.v1 import secret_version_service_pb2 as ai_dot_h2o_dot_securestore_dot_v1_dot_secret__version__service__pb2


class SecretVersionServiceStub(object):
    """SecretVersionService manages SecretVersion resources.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateSecretVersion = channel.unary_unary(
                '/ai.h2o.securestore.v1.SecretVersionService/CreateSecretVersion',
                request_serializer=ai_dot_h2o_dot_securestore_dot_v1_dot_secret__version__service__pb2.CreateSecretVersionRequest.SerializeToString,
                response_deserializer=ai_dot_h2o_dot_securestore_dot_v1_dot_secret__version__service__pb2.CreateSecretVersionResponse.FromString,
                _registered_method=True)
        self.GetSecretVersion = channel.unary_unary(
                '/ai.h2o.securestore.v1.SecretVersionService/GetSecretVersion',
                request_serializer=ai_dot_h2o_dot_securestore_dot_v1_dot_secret__version__service__pb2.GetSecretVersionRequest.SerializeToString,
                response_deserializer=ai_dot_h2o_dot_securestore_dot_v1_dot_secret__version__service__pb2.GetSecretVersionResponse.FromString,
                _registered_method=True)
        self.ListSecretVersions = channel.unary_unary(
                '/ai.h2o.securestore.v1.SecretVersionService/ListSecretVersions',
                request_serializer=ai_dot_h2o_dot_securestore_dot_v1_dot_secret__version__service__pb2.ListSecretVersionsRequest.SerializeToString,
                response_deserializer=ai_dot_h2o_dot_securestore_dot_v1_dot_secret__version__service__pb2.ListSecretVersionsResponse.FromString,
                _registered_method=True)
        self.RevealSecretVersionValue = channel.unary_unary(
                '/ai.h2o.securestore.v1.SecretVersionService/RevealSecretVersionValue',
                request_serializer=ai_dot_h2o_dot_securestore_dot_v1_dot_secret__version__service__pb2.RevealSecretVersionValueRequest.SerializeToString,
                response_deserializer=ai_dot_h2o_dot_securestore_dot_v1_dot_secret__version__service__pb2.RevealSecretVersionValueResponse.FromString,
                _registered_method=True)


class SecretVersionServiceServicer(object):
    """SecretVersionService manages SecretVersion resources.
    """

    def CreateSecretVersion(self, request, context):
        """Creates a new SecretVersion containing secret data.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetSecretVersion(self, request, context):
        """Gets metadata for a SecretVersion.
        "workspaces/*/secrets/*/versions/latest" is an alias for the most recently created SecretVersion.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListSecretVersions(self, request, context):
        """Lists SecretVersions. This call does not return secret data.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RevealSecretVersionValue(self, request, context):
        """Reveals the value of a SecretVersion. This call returns the secret data.
        "workspaces/*/secrets/*/versions/latest" is an alias for the most recently created SecretVersion.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_SecretVersionServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateSecretVersion': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateSecretVersion,
                    request_deserializer=ai_dot_h2o_dot_securestore_dot_v1_dot_secret__version__service__pb2.CreateSecretVersionRequest.FromString,
                    response_serializer=ai_dot_h2o_dot_securestore_dot_v1_dot_secret__version__service__pb2.CreateSecretVersionResponse.SerializeToString,
            ),
            'GetSecretVersion': grpc.unary_unary_rpc_method_handler(
                    servicer.GetSecretVersion,
                    request_deserializer=ai_dot_h2o_dot_securestore_dot_v1_dot_secret__version__service__pb2.GetSecretVersionRequest.FromString,
                    response_serializer=ai_dot_h2o_dot_securestore_dot_v1_dot_secret__version__service__pb2.GetSecretVersionResponse.SerializeToString,
            ),
            'ListSecretVersions': grpc.unary_unary_rpc_method_handler(
                    servicer.ListSecretVersions,
                    request_deserializer=ai_dot_h2o_dot_securestore_dot_v1_dot_secret__version__service__pb2.ListSecretVersionsRequest.FromString,
                    response_serializer=ai_dot_h2o_dot_securestore_dot_v1_dot_secret__version__service__pb2.ListSecretVersionsResponse.SerializeToString,
            ),
            'RevealSecretVersionValue': grpc.unary_unary_rpc_method_handler(
                    servicer.RevealSecretVersionValue,
                    request_deserializer=ai_dot_h2o_dot_securestore_dot_v1_dot_secret__version__service__pb2.RevealSecretVersionValueRequest.FromString,
                    response_serializer=ai_dot_h2o_dot_securestore_dot_v1_dot_secret__version__service__pb2.RevealSecretVersionValueResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'ai.h2o.securestore.v1.SecretVersionService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class SecretVersionService(object):
    """SecretVersionService manages SecretVersion resources.
    """

    @staticmethod
    def CreateSecretVersion(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,
            '/ai.h2o.securestore.v1.SecretVersionService/CreateSecretVersion',
            ai_dot_h2o_dot_securestore_dot_v1_dot_secret__version__service__pb2.CreateSecretVersionRequest.SerializeToString,
            ai_dot_h2o_dot_securestore_dot_v1_dot_secret__version__service__pb2.CreateSecretVersionResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetSecretVersion(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,
            '/ai.h2o.securestore.v1.SecretVersionService/GetSecretVersion',
            ai_dot_h2o_dot_securestore_dot_v1_dot_secret__version__service__pb2.GetSecretVersionRequest.SerializeToString,
            ai_dot_h2o_dot_securestore_dot_v1_dot_secret__version__service__pb2.GetSecretVersionResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListSecretVersions(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,
            '/ai.h2o.securestore.v1.SecretVersionService/ListSecretVersions',
            ai_dot_h2o_dot_securestore_dot_v1_dot_secret__version__service__pb2.ListSecretVersionsRequest.SerializeToString,
            ai_dot_h2o_dot_securestore_dot_v1_dot_secret__version__service__pb2.ListSecretVersionsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RevealSecretVersionValue(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,
            '/ai.h2o.securestore.v1.SecretVersionService/RevealSecretVersionValue',
            ai_dot_h2o_dot_securestore_dot_v1_dot_secret__version__service__pb2.RevealSecretVersionValueRequest.SerializeToString,
            ai_dot_h2o_dot_securestore_dot_v1_dot_secret__version__service__pb2.RevealSecretVersionValueResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
