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

from artifact.artifact.v1alpha import artifact_pb2 as artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2


class ArtifactPrivateServiceStub(object):
    """ArtifactPrivateService exposes the private endpoints that allow clients to
    manage artifacts.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.ListRepositoryTags = channel.unary_unary(
                '/artifact.artifact.v1alpha.ArtifactPrivateService/ListRepositoryTags',
                request_serializer=artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.ListRepositoryTagsRequest.SerializeToString,
                response_deserializer=artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.ListRepositoryTagsResponse.FromString,
                )
        self.GetRepositoryTag = channel.unary_unary(
                '/artifact.artifact.v1alpha.ArtifactPrivateService/GetRepositoryTag',
                request_serializer=artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.GetRepositoryTagRequest.SerializeToString,
                response_deserializer=artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.GetRepositoryTagResponse.FromString,
                )
        self.CreateRepositoryTag = channel.unary_unary(
                '/artifact.artifact.v1alpha.ArtifactPrivateService/CreateRepositoryTag',
                request_serializer=artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.CreateRepositoryTagRequest.SerializeToString,
                response_deserializer=artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.CreateRepositoryTagResponse.FromString,
                )
        self.DeleteRepositoryTag = channel.unary_unary(
                '/artifact.artifact.v1alpha.ArtifactPrivateService/DeleteRepositoryTag',
                request_serializer=artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.DeleteRepositoryTagRequest.SerializeToString,
                response_deserializer=artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.DeleteRepositoryTagResponse.FromString,
                )


class ArtifactPrivateServiceServicer(object):
    """ArtifactPrivateService exposes the private endpoints that allow clients to
    manage artifacts.
    """

    def ListRepositoryTags(self, request, context):
        """List the tags in a repository.

        Returns a portion of the versions that the specified repository holds.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetRepositoryTag(self, request, context):
        """Get details of repository tag.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CreateRepositoryTag(self, request, context):
        """Create a new repository tag.

        Adds a tag to a given repository. Note that this operation is only
        intended to register the information of an *already created* tag. This
        method should be called as part of the content push operation, right after
        the [PUT Manifest](https://distribution.github.io/distribution/#put-manifest) has
        succeeded. The distribution registry won't hold data such as the push time
        or the tag digest, so `artifact-backend` will hold this information locally.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteRepositoryTag(self, request, context):
        """Delete a repository tag.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ArtifactPrivateServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ListRepositoryTags': grpc.unary_unary_rpc_method_handler(
                    servicer.ListRepositoryTags,
                    request_deserializer=artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.ListRepositoryTagsRequest.FromString,
                    response_serializer=artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.ListRepositoryTagsResponse.SerializeToString,
            ),
            'GetRepositoryTag': grpc.unary_unary_rpc_method_handler(
                    servicer.GetRepositoryTag,
                    request_deserializer=artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.GetRepositoryTagRequest.FromString,
                    response_serializer=artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.GetRepositoryTagResponse.SerializeToString,
            ),
            'CreateRepositoryTag': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateRepositoryTag,
                    request_deserializer=artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.CreateRepositoryTagRequest.FromString,
                    response_serializer=artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.CreateRepositoryTagResponse.SerializeToString,
            ),
            'DeleteRepositoryTag': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteRepositoryTag,
                    request_deserializer=artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.DeleteRepositoryTagRequest.FromString,
                    response_serializer=artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.DeleteRepositoryTagResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'artifact.artifact.v1alpha.ArtifactPrivateService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class ArtifactPrivateService(object):
    """ArtifactPrivateService exposes the private endpoints that allow clients to
    manage artifacts.
    """

    @staticmethod
    def ListRepositoryTags(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, '/artifact.artifact.v1alpha.ArtifactPrivateService/ListRepositoryTags',
            artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.ListRepositoryTagsRequest.SerializeToString,
            artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.ListRepositoryTagsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetRepositoryTag(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, '/artifact.artifact.v1alpha.ArtifactPrivateService/GetRepositoryTag',
            artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.GetRepositoryTagRequest.SerializeToString,
            artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.GetRepositoryTagResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CreateRepositoryTag(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, '/artifact.artifact.v1alpha.ArtifactPrivateService/CreateRepositoryTag',
            artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.CreateRepositoryTagRequest.SerializeToString,
            artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.CreateRepositoryTagResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteRepositoryTag(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, '/artifact.artifact.v1alpha.ArtifactPrivateService/DeleteRepositoryTag',
            artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.DeleteRepositoryTagRequest.SerializeToString,
            artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.DeleteRepositoryTagResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
