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

from ..common import versions_common_pb2 as versions__common__pb2


class VersionsStub(object):
    """*
    Service for handling versions.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.ListVersions = channel.unary_unary(
                '/armonik.api.grpc.v1.versions.Versions/ListVersions',
                request_serializer=versions__common__pb2.ListVersionsRequest.SerializeToString,
                response_deserializer=versions__common__pb2.ListVersionsResponse.FromString,
                )


class VersionsServicer(object):
    """*
    Service for handling versions.
    """

    def ListVersions(self, request, context):
        """*
        Get all versions.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_VersionsServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ListVersions': grpc.unary_unary_rpc_method_handler(
                    servicer.ListVersions,
                    request_deserializer=versions__common__pb2.ListVersionsRequest.FromString,
                    response_serializer=versions__common__pb2.ListVersionsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'armonik.api.grpc.v1.versions.Versions', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class Versions(object):
    """*
    Service for handling versions.
    """

    @staticmethod
    def ListVersions(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, '/armonik.api.grpc.v1.versions.Versions/ListVersions',
            versions__common__pb2.ListVersionsRequest.SerializeToString,
            versions__common__pb2.ListVersionsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
