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

from _qwak_proto.qwak.ecosystem.jfrog.v0 import token_service_pb2 as qwak_dot_ecosystem_dot_jfrog_dot_v0_dot_token__service__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GenerateToken = channel.unary_unary(
                '/qwak.ecosystem.jfrog.token.v0.TokenService/GenerateToken',
                request_serializer=qwak_dot_ecosystem_dot_jfrog_dot_v0_dot_token__service__pb2.GenerateTokenRequest.SerializeToString,
                response_deserializer=qwak_dot_ecosystem_dot_jfrog_dot_v0_dot_token__service__pb2.GenerateTokenResponse.FromString,
                )
        self.GenerateArtifactoryImagePullToken = channel.unary_unary(
                '/qwak.ecosystem.jfrog.token.v0.TokenService/GenerateArtifactoryImagePullToken',
                request_serializer=qwak_dot_ecosystem_dot_jfrog_dot_v0_dot_token__service__pb2.GenerateArtifactoryImagePullTokenRequest.SerializeToString,
                response_deserializer=qwak_dot_ecosystem_dot_jfrog_dot_v0_dot_token__service__pb2.GenerateArtifactoryImagePullTokenResponse.FromString,
                )
        self.PersistTokenClaims = channel.unary_unary(
                '/qwak.ecosystem.jfrog.token.v0.TokenService/PersistTokenClaims',
                request_serializer=qwak_dot_ecosystem_dot_jfrog_dot_v0_dot_token__service__pb2.PersistTokenClaimsRequest.SerializeToString,
                response_deserializer=qwak_dot_ecosystem_dot_jfrog_dot_v0_dot_token__service__pb2.PersistTokenClaimsResponse.FromString,
                )
        self.RevokeToken = channel.unary_unary(
                '/qwak.ecosystem.jfrog.token.v0.TokenService/RevokeToken',
                request_serializer=qwak_dot_ecosystem_dot_jfrog_dot_v0_dot_token__service__pb2.RevokeTokenRequest.SerializeToString,
                response_deserializer=qwak_dot_ecosystem_dot_jfrog_dot_v0_dot_token__service__pb2.RevokeTokenRequestResponse.FromString,
                )


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

    def GenerateToken(self, request, context):
        """Generate token
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GenerateArtifactoryImagePullToken(self, request, context):
        """Generate artifactory pull image token
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def PersistTokenClaims(self, request, context):
        """Persist token claims for later usage
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RevokeToken(self, request, context):
        """Revoke token
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_TokenServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GenerateToken': grpc.unary_unary_rpc_method_handler(
                    servicer.GenerateToken,
                    request_deserializer=qwak_dot_ecosystem_dot_jfrog_dot_v0_dot_token__service__pb2.GenerateTokenRequest.FromString,
                    response_serializer=qwak_dot_ecosystem_dot_jfrog_dot_v0_dot_token__service__pb2.GenerateTokenResponse.SerializeToString,
            ),
            'GenerateArtifactoryImagePullToken': grpc.unary_unary_rpc_method_handler(
                    servicer.GenerateArtifactoryImagePullToken,
                    request_deserializer=qwak_dot_ecosystem_dot_jfrog_dot_v0_dot_token__service__pb2.GenerateArtifactoryImagePullTokenRequest.FromString,
                    response_serializer=qwak_dot_ecosystem_dot_jfrog_dot_v0_dot_token__service__pb2.GenerateArtifactoryImagePullTokenResponse.SerializeToString,
            ),
            'PersistTokenClaims': grpc.unary_unary_rpc_method_handler(
                    servicer.PersistTokenClaims,
                    request_deserializer=qwak_dot_ecosystem_dot_jfrog_dot_v0_dot_token__service__pb2.PersistTokenClaimsRequest.FromString,
                    response_serializer=qwak_dot_ecosystem_dot_jfrog_dot_v0_dot_token__service__pb2.PersistTokenClaimsResponse.SerializeToString,
            ),
            'RevokeToken': grpc.unary_unary_rpc_method_handler(
                    servicer.RevokeToken,
                    request_deserializer=qwak_dot_ecosystem_dot_jfrog_dot_v0_dot_token__service__pb2.RevokeTokenRequest.FromString,
                    response_serializer=qwak_dot_ecosystem_dot_jfrog_dot_v0_dot_token__service__pb2.RevokeTokenRequestResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'qwak.ecosystem.jfrog.token.v0.TokenService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def GenerateToken(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, '/qwak.ecosystem.jfrog.token.v0.TokenService/GenerateToken',
            qwak_dot_ecosystem_dot_jfrog_dot_v0_dot_token__service__pb2.GenerateTokenRequest.SerializeToString,
            qwak_dot_ecosystem_dot_jfrog_dot_v0_dot_token__service__pb2.GenerateTokenResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GenerateArtifactoryImagePullToken(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, '/qwak.ecosystem.jfrog.token.v0.TokenService/GenerateArtifactoryImagePullToken',
            qwak_dot_ecosystem_dot_jfrog_dot_v0_dot_token__service__pb2.GenerateArtifactoryImagePullTokenRequest.SerializeToString,
            qwak_dot_ecosystem_dot_jfrog_dot_v0_dot_token__service__pb2.GenerateArtifactoryImagePullTokenResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def PersistTokenClaims(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, '/qwak.ecosystem.jfrog.token.v0.TokenService/PersistTokenClaims',
            qwak_dot_ecosystem_dot_jfrog_dot_v0_dot_token__service__pb2.PersistTokenClaimsRequest.SerializeToString,
            qwak_dot_ecosystem_dot_jfrog_dot_v0_dot_token__service__pb2.PersistTokenClaimsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RevokeToken(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, '/qwak.ecosystem.jfrog.token.v0.TokenService/RevokeToken',
            qwak_dot_ecosystem_dot_jfrog_dot_v0_dot_token__service__pb2.RevokeTokenRequest.SerializeToString,
            qwak_dot_ecosystem_dot_jfrog_dot_v0_dot_token__service__pb2.RevokeTokenRequestResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
