# 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 info_service_pb2 as aruna_dot_api_dot_storage_dot_services_dot_v1_dot_info__service__pb2


class ResourceInfoServiceStub(object):
    """ResourceInfoService

    This is a generic service that contains utility functions 
    these functions are used to query additional meta-information
    about resources
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetResourceHierarchy = channel.unary_unary(
                '/aruna.api.storage.services.v1.ResourceInfoService/GetResourceHierarchy',
                request_serializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_info__service__pb2.GetResourceHierarchyRequest.SerializeToString,
                response_deserializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_info__service__pb2.GetResourceHierarchyResponse.FromString,
                )


class ResourceInfoServiceServicer(object):
    """ResourceInfoService

    This is a generic service that contains utility functions 
    these functions are used to query additional meta-information
    about resources
    """

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

        This requests a hierarchy based on one resource (object / objectgroup or collection)
        and returns a hierarchy with all associated higherlevel objects up to projects.
        Needs projects level read access.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ResourceInfoServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetResourceHierarchy': grpc.unary_unary_rpc_method_handler(
                    servicer.GetResourceHierarchy,
                    request_deserializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_info__service__pb2.GetResourceHierarchyRequest.FromString,
                    response_serializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_info__service__pb2.GetResourceHierarchyResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'aruna.api.storage.services.v1.ResourceInfoService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    This is a generic service that contains utility functions 
    these functions are used to query additional meta-information
    about resources
    """

    @staticmethod
    def GetResourceHierarchy(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.ResourceInfoService/GetResourceHierarchy',
            aruna_dot_api_dot_storage_dot_services_dot_v1_dot_info__service__pb2.GetResourceHierarchyRequest.SerializeToString,
            aruna_dot_api_dot_storage_dot_services_dot_v1_dot_info__service__pb2.GetResourceHierarchyResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)


class StorageInfoServiceStub(object):
    """StorageInfoService

    This is a generic service that contains utility functions 
    these functions are used to query additional meta-information
    about the status of the overall storage architecture
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetStorageVersion = channel.unary_unary(
                '/aruna.api.storage.services.v1.StorageInfoService/GetStorageVersion',
                request_serializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_info__service__pb2.GetStorageVersionRequest.SerializeToString,
                response_deserializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_info__service__pb2.GetStorageVersionResponse.FromString,
                )
        self.GetStorageStatus = channel.unary_unary(
                '/aruna.api.storage.services.v1.StorageInfoService/GetStorageStatus',
                request_serializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_info__service__pb2.GetStorageStatusRequest.SerializeToString,
                response_deserializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_info__service__pb2.GetStorageStatusResponse.FromString,
                )


class StorageInfoServiceServicer(object):
    """StorageInfoService

    This is a generic service that contains utility functions 
    these functions are used to query additional meta-information
    about the status of the overall storage architecture
    """

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

        Status: ALPHA

        A request to get the current version of the server application
        String representation and https://semver.org/
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

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

        Status: ALPHA

        A request to get the current status of the storage components by location(s)
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_StorageInfoServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetStorageVersion': grpc.unary_unary_rpc_method_handler(
                    servicer.GetStorageVersion,
                    request_deserializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_info__service__pb2.GetStorageVersionRequest.FromString,
                    response_serializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_info__service__pb2.GetStorageVersionResponse.SerializeToString,
            ),
            'GetStorageStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.GetStorageStatus,
                    request_deserializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_info__service__pb2.GetStorageStatusRequest.FromString,
                    response_serializer=aruna_dot_api_dot_storage_dot_services_dot_v1_dot_info__service__pb2.GetStorageStatusResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'aruna.api.storage.services.v1.StorageInfoService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    This is a generic service that contains utility functions 
    these functions are used to query additional meta-information
    about the status of the overall storage architecture
    """

    @staticmethod
    def GetStorageVersion(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.StorageInfoService/GetStorageVersion',
            aruna_dot_api_dot_storage_dot_services_dot_v1_dot_info__service__pb2.GetStorageVersionRequest.SerializeToString,
            aruna_dot_api_dot_storage_dot_services_dot_v1_dot_info__service__pb2.GetStorageVersionResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetStorageStatus(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.StorageInfoService/GetStorageStatus',
            aruna_dot_api_dot_storage_dot_services_dot_v1_dot_info__service__pb2.GetStorageStatusRequest.SerializeToString,
            aruna_dot_api_dot_storage_dot_services_dot_v1_dot_info__service__pb2.GetStorageStatusResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
