# 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 oauth_client_service_pb2 as ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2


class OAuthClientServiceStub(object):
    """OAuthClientService manages OAuthClient resources.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateOAuthClient = channel.unary_unary(
                '/ai.h2o.securestore.v1.OAuthClientService/CreateOAuthClient',
                request_serializer=ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.CreateOAuthClientRequest.SerializeToString,
                response_deserializer=ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.CreateOAuthClientResponse.FromString,
                _registered_method=True)
        self.GetOAuthClient = channel.unary_unary(
                '/ai.h2o.securestore.v1.OAuthClientService/GetOAuthClient',
                request_serializer=ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.GetOAuthClientRequest.SerializeToString,
                response_deserializer=ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.GetOAuthClientResponse.FromString,
                _registered_method=True)
        self.ListOAuthClients = channel.unary_unary(
                '/ai.h2o.securestore.v1.OAuthClientService/ListOAuthClients',
                request_serializer=ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.ListOAuthClientsRequest.SerializeToString,
                response_deserializer=ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.ListOAuthClientsResponse.FromString,
                _registered_method=True)
        self.UpdateOAuthClient = channel.unary_unary(
                '/ai.h2o.securestore.v1.OAuthClientService/UpdateOAuthClient',
                request_serializer=ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.UpdateOAuthClientRequest.SerializeToString,
                response_deserializer=ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.UpdateOAuthClientResponse.FromString,
                _registered_method=True)
        self.DeleteOAuthClient = channel.unary_unary(
                '/ai.h2o.securestore.v1.OAuthClientService/DeleteOAuthClient',
                request_serializer=ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.DeleteOAuthClientRequest.SerializeToString,
                response_deserializer=ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.DeleteOAuthClientResponse.FromString,
                _registered_method=True)
        self.InvalidateTokenSources = channel.unary_unary(
                '/ai.h2o.securestore.v1.OAuthClientService/InvalidateTokenSources',
                request_serializer=ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.InvalidateTokenSourcesRequest.SerializeToString,
                response_deserializer=ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.InvalidateTokenSourcesResponse.FromString,
                _registered_method=True)


class OAuthClientServiceServicer(object):
    """OAuthClientService manages OAuthClient resources.
    """

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

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

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

    def UpdateOAuthClient(self, request, context):
        """(-- api-linter: core::0134::method-signature=disabled
        aip.dev/not-precedent: oauth not o_auth --)
        (-- api-linter: core::0134::http-uri-name=disabled
        aip.dev/not-precedent: oauth not o_auth --)
        (-- api-linter: core::0134::http-body=disabled
        aip.dev/not-precedent: oauth not o_auth  --)
        Updates an OAuthClient.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteOAuthClient(self, request, context):
        """Deletes an OAuthClient and all child resources like Tokens and TokenSources.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def InvalidateTokenSources(self, request, context):
        """Invalidates all child token sources.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_OAuthClientServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateOAuthClient': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateOAuthClient,
                    request_deserializer=ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.CreateOAuthClientRequest.FromString,
                    response_serializer=ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.CreateOAuthClientResponse.SerializeToString,
            ),
            'GetOAuthClient': grpc.unary_unary_rpc_method_handler(
                    servicer.GetOAuthClient,
                    request_deserializer=ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.GetOAuthClientRequest.FromString,
                    response_serializer=ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.GetOAuthClientResponse.SerializeToString,
            ),
            'ListOAuthClients': grpc.unary_unary_rpc_method_handler(
                    servicer.ListOAuthClients,
                    request_deserializer=ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.ListOAuthClientsRequest.FromString,
                    response_serializer=ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.ListOAuthClientsResponse.SerializeToString,
            ),
            'UpdateOAuthClient': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateOAuthClient,
                    request_deserializer=ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.UpdateOAuthClientRequest.FromString,
                    response_serializer=ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.UpdateOAuthClientResponse.SerializeToString,
            ),
            'DeleteOAuthClient': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteOAuthClient,
                    request_deserializer=ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.DeleteOAuthClientRequest.FromString,
                    response_serializer=ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.DeleteOAuthClientResponse.SerializeToString,
            ),
            'InvalidateTokenSources': grpc.unary_unary_rpc_method_handler(
                    servicer.InvalidateTokenSources,
                    request_deserializer=ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.InvalidateTokenSourcesRequest.FromString,
                    response_serializer=ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.InvalidateTokenSourcesResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'ai.h2o.securestore.v1.OAuthClientService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def CreateOAuthClient(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.OAuthClientService/CreateOAuthClient',
            ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.CreateOAuthClientRequest.SerializeToString,
            ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.CreateOAuthClientResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetOAuthClient(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.OAuthClientService/GetOAuthClient',
            ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.GetOAuthClientRequest.SerializeToString,
            ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.GetOAuthClientResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListOAuthClients(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.OAuthClientService/ListOAuthClients',
            ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.ListOAuthClientsRequest.SerializeToString,
            ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.ListOAuthClientsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def UpdateOAuthClient(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.OAuthClientService/UpdateOAuthClient',
            ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.UpdateOAuthClientRequest.SerializeToString,
            ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.UpdateOAuthClientResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeleteOAuthClient(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.OAuthClientService/DeleteOAuthClient',
            ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.DeleteOAuthClientRequest.SerializeToString,
            ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.DeleteOAuthClientResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def InvalidateTokenSources(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.OAuthClientService/InvalidateTokenSources',
            ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.InvalidateTokenSourcesRequest.SerializeToString,
            ai_dot_h2o_dot_securestore_dot_v1_dot_oauth__client__service__pb2.InvalidateTokenSourcesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
