# 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 token_source_service_pb2 as ai_dot_h2o_dot_securestore_dot_v1_dot_token__source__service__pb2


class TokenSourceServiceStub(object):
    """TokenSourceService manages TokenSource resources.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateTokenSource = channel.unary_unary(
                '/ai.h2o.securestore.v1.TokenSourceService/CreateTokenSource',
                request_serializer=ai_dot_h2o_dot_securestore_dot_v1_dot_token__source__service__pb2.CreateTokenSourceRequest.SerializeToString,
                response_deserializer=ai_dot_h2o_dot_securestore_dot_v1_dot_token__source__service__pb2.CreateTokenSourceResponse.FromString,
                _registered_method=True)
        self.GetTokenSource = channel.unary_unary(
                '/ai.h2o.securestore.v1.TokenSourceService/GetTokenSource',
                request_serializer=ai_dot_h2o_dot_securestore_dot_v1_dot_token__source__service__pb2.GetTokenSourceRequest.SerializeToString,
                response_deserializer=ai_dot_h2o_dot_securestore_dot_v1_dot_token__source__service__pb2.GetTokenSourceResponse.FromString,
                _registered_method=True)
        self.ListTokenSources = channel.unary_unary(
                '/ai.h2o.securestore.v1.TokenSourceService/ListTokenSources',
                request_serializer=ai_dot_h2o_dot_securestore_dot_v1_dot_token__source__service__pb2.ListTokenSourcesRequest.SerializeToString,
                response_deserializer=ai_dot_h2o_dot_securestore_dot_v1_dot_token__source__service__pb2.ListTokenSourcesResponse.FromString,
                _registered_method=True)
        self.DeleteTokenSource = channel.unary_unary(
                '/ai.h2o.securestore.v1.TokenSourceService/DeleteTokenSource',
                request_serializer=ai_dot_h2o_dot_securestore_dot_v1_dot_token__source__service__pb2.DeleteTokenSourceRequest.SerializeToString,
                response_deserializer=ai_dot_h2o_dot_securestore_dot_v1_dot_token__source__service__pb2.DeleteTokenSourceResponse.FromString,
                _registered_method=True)


class TokenSourceServiceServicer(object):
    """TokenSourceService manages TokenSource resources.
    """

    def CreateTokenSource(self, request, context):
        """Creates a new TokenSource.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetTokenSource(self, request, context):
        """Returns a specific TokenSource.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListTokenSources(self, request, context):
        """Returns a collection of TokenSources.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteTokenSource(self, request, context):
        """Deletes a TokenSource.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_TokenSourceServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateTokenSource': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateTokenSource,
                    request_deserializer=ai_dot_h2o_dot_securestore_dot_v1_dot_token__source__service__pb2.CreateTokenSourceRequest.FromString,
                    response_serializer=ai_dot_h2o_dot_securestore_dot_v1_dot_token__source__service__pb2.CreateTokenSourceResponse.SerializeToString,
            ),
            'GetTokenSource': grpc.unary_unary_rpc_method_handler(
                    servicer.GetTokenSource,
                    request_deserializer=ai_dot_h2o_dot_securestore_dot_v1_dot_token__source__service__pb2.GetTokenSourceRequest.FromString,
                    response_serializer=ai_dot_h2o_dot_securestore_dot_v1_dot_token__source__service__pb2.GetTokenSourceResponse.SerializeToString,
            ),
            'ListTokenSources': grpc.unary_unary_rpc_method_handler(
                    servicer.ListTokenSources,
                    request_deserializer=ai_dot_h2o_dot_securestore_dot_v1_dot_token__source__service__pb2.ListTokenSourcesRequest.FromString,
                    response_serializer=ai_dot_h2o_dot_securestore_dot_v1_dot_token__source__service__pb2.ListTokenSourcesResponse.SerializeToString,
            ),
            'DeleteTokenSource': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteTokenSource,
                    request_deserializer=ai_dot_h2o_dot_securestore_dot_v1_dot_token__source__service__pb2.DeleteTokenSourceRequest.FromString,
                    response_serializer=ai_dot_h2o_dot_securestore_dot_v1_dot_token__source__service__pb2.DeleteTokenSourceResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'ai.h2o.securestore.v1.TokenSourceService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def CreateTokenSource(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.TokenSourceService/CreateTokenSource',
            ai_dot_h2o_dot_securestore_dot_v1_dot_token__source__service__pb2.CreateTokenSourceRequest.SerializeToString,
            ai_dot_h2o_dot_securestore_dot_v1_dot_token__source__service__pb2.CreateTokenSourceResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetTokenSource(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.TokenSourceService/GetTokenSource',
            ai_dot_h2o_dot_securestore_dot_v1_dot_token__source__service__pb2.GetTokenSourceRequest.SerializeToString,
            ai_dot_h2o_dot_securestore_dot_v1_dot_token__source__service__pb2.GetTokenSourceResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListTokenSources(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.TokenSourceService/ListTokenSources',
            ai_dot_h2o_dot_securestore_dot_v1_dot_token__source__service__pb2.ListTokenSourcesRequest.SerializeToString,
            ai_dot_h2o_dot_securestore_dot_v1_dot_token__source__service__pb2.ListTokenSourcesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeleteTokenSource(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.TokenSourceService/DeleteTokenSource',
            ai_dot_h2o_dot_securestore_dot_v1_dot_token__source__service__pb2.DeleteTokenSourceRequest.SerializeToString,
            ai_dot_h2o_dot_securestore_dot_v1_dot_token__source__service__pb2.DeleteTokenSourceResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
