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

from aruna.api.storage.services.v1 import endpoint_service_pb2 as aruna_dot_api_dot_storage_dot_services_dot_v1_dot_endpoint__service__pb2


class EndpointServiceStub(object):
    """EndpointService

    Contains all methods that get/create or update Endpoint and associated resources
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.AddEndpoint = channel.unary_unary(
                '/aruna.api.storage.services.v1.EndpointService/AddEndpoint',
                request_serializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_endpoint__service__pb2.AddEndpointRequest.SerializeToString,
                response_deserializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_endpoint__service__pb2.AddEndpointResponse.FromString,
                )
        self.GetEndpoint = channel.unary_unary(
                '/aruna.api.storage.services.v1.EndpointService/GetEndpoint',
                request_serializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_endpoint__service__pb2.GetEndpointRequest.SerializeToString,
                response_deserializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_endpoint__service__pb2.GetEndpointResponse.FromString,
                )
        self.GetEndpoints = channel.unary_unary(
                '/aruna.api.storage.services.v1.EndpointService/GetEndpoints',
                request_serializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_endpoint__service__pb2.GetEndpointsRequest.SerializeToString,
                response_deserializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_endpoint__service__pb2.GetEndpointsResponse.FromString,
                )
        self.DeleteEndpoint = channel.unary_unary(
                '/aruna.api.storage.services.v1.EndpointService/DeleteEndpoint',
                request_serializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_endpoint__service__pb2.DeleteEndpointRequest.SerializeToString,
                response_deserializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_endpoint__service__pb2.DeleteEndpointResponse.FromString,
                )
        self.GetDefaultEndpoint = channel.unary_unary(
                '/aruna.api.storage.services.v1.EndpointService/GetDefaultEndpoint',
                request_serializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_endpoint__service__pb2.GetDefaultEndpointRequest.SerializeToString,
                response_deserializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_endpoint__service__pb2.GetDefaultEndpointResponse.FromString,
                )


class EndpointServiceServicer(object):
    """EndpointService

    Contains all methods that get/create or update Endpoint and associated resources
    """

    def AddEndpoint(self, request, context):
        """AddEndpoint

        Status: BETA

        Registers a new Endpoint (Aruna DataProxy) to the server
        Needs admin permissions
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetEndpoint(self, request, context):
        """GetEndpoint

        Status: BETA

        Gets an specific endpoint by ID or Name
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetEndpoints(self, request, context):
        """GetEndpoints

        Status: BETA

        Gets all available endpoints
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteEndpoint(self, request, context):
        """DeleteEndpoint

        Status: BETA

        Deletes a specific endpoint by id
        This needs admin permissions
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetDefaultEndpoint(self, request, context):
        """GetDefaultEndpoint

        Status: BETA

        This request returns the default endpoint for the current aruna_server
        It may produce different results depending on the used server
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_EndpointServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'AddEndpoint': grpc.unary_unary_rpc_method_handler(
                    servicer.AddEndpoint,
                    request_deserializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_endpoint__service__pb2.AddEndpointRequest.FromString,
                    response_serializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_endpoint__service__pb2.AddEndpointResponse.SerializeToString,
            ),
            'GetEndpoint': grpc.unary_unary_rpc_method_handler(
                    servicer.GetEndpoint,
                    request_deserializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_endpoint__service__pb2.GetEndpointRequest.FromString,
                    response_serializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_endpoint__service__pb2.GetEndpointResponse.SerializeToString,
            ),
            'GetEndpoints': grpc.unary_unary_rpc_method_handler(
                    servicer.GetEndpoints,
                    request_deserializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_endpoint__service__pb2.GetEndpointsRequest.FromString,
                    response_serializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_endpoint__service__pb2.GetEndpointsResponse.SerializeToString,
            ),
            'DeleteEndpoint': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteEndpoint,
                    request_deserializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_endpoint__service__pb2.DeleteEndpointRequest.FromString,
                    response_serializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_endpoint__service__pb2.DeleteEndpointResponse.SerializeToString,
            ),
            'GetDefaultEndpoint': grpc.unary_unary_rpc_method_handler(
                    servicer.GetDefaultEndpoint,
                    request_deserializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_endpoint__service__pb2.GetDefaultEndpointRequest.FromString,
                    response_serializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_endpoint__service__pb2.GetDefaultEndpointResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'aruna.api.storage.services.v1.EndpointService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    Contains all methods that get/create or update Endpoint and associated resources
    """

    @staticmethod
    def AddEndpoint(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, '/aruna.api.storage.services.v1.EndpointService/AddEndpoint',
            aruna_dot_api_dot_storage_dot_services_dot_v1_dot_endpoint__service__pb2.AddEndpointRequest.SerializeToString,
            aruna_dot_api_dot_storage_dot_services_dot_v1_dot_endpoint__service__pb2.AddEndpointResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetEndpoint(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, '/aruna.api.storage.services.v1.EndpointService/GetEndpoint',
            aruna_dot_api_dot_storage_dot_services_dot_v1_dot_endpoint__service__pb2.GetEndpointRequest.SerializeToString,
            aruna_dot_api_dot_storage_dot_services_dot_v1_dot_endpoint__service__pb2.GetEndpointResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetEndpoints(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, '/aruna.api.storage.services.v1.EndpointService/GetEndpoints',
            aruna_dot_api_dot_storage_dot_services_dot_v1_dot_endpoint__service__pb2.GetEndpointsRequest.SerializeToString,
            aruna_dot_api_dot_storage_dot_services_dot_v1_dot_endpoint__service__pb2.GetEndpointsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteEndpoint(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, '/aruna.api.storage.services.v1.EndpointService/DeleteEndpoint',
            aruna_dot_api_dot_storage_dot_services_dot_v1_dot_endpoint__service__pb2.DeleteEndpointRequest.SerializeToString,
            aruna_dot_api_dot_storage_dot_services_dot_v1_dot_endpoint__service__pb2.DeleteEndpointResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetDefaultEndpoint(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, '/aruna.api.storage.services.v1.EndpointService/GetDefaultEndpoint',
            aruna_dot_api_dot_storage_dot_services_dot_v1_dot_endpoint__service__pb2.GetDefaultEndpointRequest.SerializeToString,
            aruna_dot_api_dot_storage_dot_services_dot_v1_dot_endpoint__service__pb2.GetDefaultEndpointResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
