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

from terrascope_api.models import analysis_config_pb2 as analysis__config__pb2


class AnalysisConfigApiStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.create = channel.unary_unary(
                '/oi.papi.AnalysisConfigApi/create',
                request_serializer=analysis__config__pb2.AnalysisConfigCreateRequest.SerializeToString,
                response_deserializer=analysis__config__pb2.AnalysisConfigCreateResponse.FromString,
                )
        self.update = channel.unary_unary(
                '/oi.papi.AnalysisConfigApi/update',
                request_serializer=analysis__config__pb2.AnalysisConfigUpdateRequest.SerializeToString,
                response_deserializer=analysis__config__pb2.AnalysisConfigUpdateResponse.FromString,
                )
        self.get = channel.unary_unary(
                '/oi.papi.AnalysisConfigApi/get',
                request_serializer=analysis__config__pb2.AnalysisConfigGetRequest.SerializeToString,
                response_deserializer=analysis__config__pb2.AnalysisConfigGetResponse.FromString,
                )
        self.list = channel.unary_unary(
                '/oi.papi.AnalysisConfigApi/list',
                request_serializer=analysis__config__pb2.AnalysisConfigListRequest.SerializeToString,
                response_deserializer=analysis__config__pb2.AnalysisConfigListResponse.FromString,
                )
        self.deactivate = channel.unary_unary(
                '/oi.papi.AnalysisConfigApi/deactivate',
                request_serializer=analysis__config__pb2.AnalysisConfigDeactivateRequest.SerializeToString,
                response_deserializer=analysis__config__pb2.AnalysisConfigDeactivateResponse.FromString,
                )


class AnalysisConfigApiServicer(object):
    """Missing associated documentation comment in .proto file."""

    def create(self, request, context):
        """
        Creates a configuration of the specified AnalysisVersion, including concrete values for all of the Analysis parameters.
        This configuration is stored in the system and the analysis_config is returned to the user.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def update(self, request, context):
        """
        Updates name, description or algorithm_config_nodes in the specified AnalysisConfig.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def get(self, request, context):
        """
        Retrieve the metadata of a particular AnalysisConfig.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def list(self, request, context):
        """
        Retrieve the metadata for all AnalysisConfigs that this user has access to and that match the provided search filters.
        By default, deactivated AnalysisConfigs are not returned. Setting include_deactivated to true will also return any AnalysisConfigs that had been deactivated.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def deactivate(self, request, context):
        """
        Deactivate the specific configuration of an AnalysisVersion.
        Deactivated AnalysisConfigs will no longer show up in searches, but metadata can still be retrieved for deactivated AnalysisConfigs via the get endpoint.
        Deactivated AnalysisConfigs cannot be used in any new AnalysisComputations, but existing AnalysisComputations will continue to function properly.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_AnalysisConfigApiServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'create': grpc.unary_unary_rpc_method_handler(
                    servicer.create,
                    request_deserializer=analysis__config__pb2.AnalysisConfigCreateRequest.FromString,
                    response_serializer=analysis__config__pb2.AnalysisConfigCreateResponse.SerializeToString,
            ),
            'update': grpc.unary_unary_rpc_method_handler(
                    servicer.update,
                    request_deserializer=analysis__config__pb2.AnalysisConfigUpdateRequest.FromString,
                    response_serializer=analysis__config__pb2.AnalysisConfigUpdateResponse.SerializeToString,
            ),
            'get': grpc.unary_unary_rpc_method_handler(
                    servicer.get,
                    request_deserializer=analysis__config__pb2.AnalysisConfigGetRequest.FromString,
                    response_serializer=analysis__config__pb2.AnalysisConfigGetResponse.SerializeToString,
            ),
            'list': grpc.unary_unary_rpc_method_handler(
                    servicer.list,
                    request_deserializer=analysis__config__pb2.AnalysisConfigListRequest.FromString,
                    response_serializer=analysis__config__pb2.AnalysisConfigListResponse.SerializeToString,
            ),
            'deactivate': grpc.unary_unary_rpc_method_handler(
                    servicer.deactivate,
                    request_deserializer=analysis__config__pb2.AnalysisConfigDeactivateRequest.FromString,
                    response_serializer=analysis__config__pb2.AnalysisConfigDeactivateResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'oi.papi.AnalysisConfigApi', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class AnalysisConfigApi(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def create(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, '/oi.papi.AnalysisConfigApi/create',
            analysis__config__pb2.AnalysisConfigCreateRequest.SerializeToString,
            analysis__config__pb2.AnalysisConfigCreateResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def update(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, '/oi.papi.AnalysisConfigApi/update',
            analysis__config__pb2.AnalysisConfigUpdateRequest.SerializeToString,
            analysis__config__pb2.AnalysisConfigUpdateResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def get(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, '/oi.papi.AnalysisConfigApi/get',
            analysis__config__pb2.AnalysisConfigGetRequest.SerializeToString,
            analysis__config__pb2.AnalysisConfigGetResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def list(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, '/oi.papi.AnalysisConfigApi/list',
            analysis__config__pb2.AnalysisConfigListRequest.SerializeToString,
            analysis__config__pb2.AnalysisConfigListResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def deactivate(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, '/oi.papi.AnalysisConfigApi/deactivate',
            analysis__config__pb2.AnalysisConfigDeactivateRequest.SerializeToString,
            analysis__config__pb2.AnalysisConfigDeactivateResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
