# 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 ArtifactPublicServiceStub(object):
    """Artifact

    ArtifactPublicService exposes the public endpoints that allow clients to
    manage artifacts.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Liveness = channel.unary_unary(
                '/artifact.artifact.v1alpha.ArtifactPublicService/Liveness',
                request_serializer=artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.LivenessRequest.SerializeToString,
                response_deserializer=artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.LivenessResponse.FromString,
                )
        self.Readiness = channel.unary_unary(
                '/artifact.artifact.v1alpha.ArtifactPublicService/Readiness',
                request_serializer=artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.ReadinessRequest.SerializeToString,
                response_deserializer=artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.ReadinessResponse.FromString,
                )


class ArtifactPublicServiceServicer(object):
    """Artifact

    ArtifactPublicService exposes the public endpoints that allow clients to
    manage artifacts.
    """

    def Liveness(self, request, context):
        """Check if the artifact server is alive

        See https://github.com/grpc/grpc/blob/master/doc/health-checking.md.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Readiness(self, request, context):
        """Check if the artifact server is ready

        See https://github.com/grpc/grpc/blob/master/doc/health-checking.md
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ArtifactPublicServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Liveness': grpc.unary_unary_rpc_method_handler(
                    servicer.Liveness,
                    request_deserializer=artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.LivenessRequest.FromString,
                    response_serializer=artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.LivenessResponse.SerializeToString,
            ),
            'Readiness': grpc.unary_unary_rpc_method_handler(
                    servicer.Readiness,
                    request_deserializer=artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.ReadinessRequest.FromString,
                    response_serializer=artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.ReadinessResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'artifact.artifact.v1alpha.ArtifactPublicService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class ArtifactPublicService(object):
    """Artifact

    ArtifactPublicService exposes the public endpoints that allow clients to
    manage artifacts.
    """

    @staticmethod
    def Liveness(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.ArtifactPublicService/Liveness',
            artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.LivenessRequest.SerializeToString,
            artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.LivenessResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Readiness(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.ArtifactPublicService/Readiness',
            artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.ReadinessRequest.SerializeToString,
            artifact_dot_artifact_dot_v1alpha_dot_artifact__pb2.ReadinessResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
