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

from activities import workflow_pb2 as activities_dot_workflow__pb2
from services import api_pb2 as services_dot_api__pb2

GRPC_GENERATED_VERSION = '1.74.0'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower
    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    raise RuntimeError(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + f' but the generated code in services/api_pb2_grpc.py depends on'
        + f' grpcio>={GRPC_GENERATED_VERSION}.'
        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
    )


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.MeIndex = channel.unary_unary(
                '/com.fatehan.services.ApiService/MeIndex',
                request_serializer=services_dot_api__pb2.MeRequest.SerializeToString,
                response_deserializer=services_dot_api__pb2.MeResponse.FromString,
                _registered_method=True)
        self.AreaIndex = channel.unary_unary(
                '/com.fatehan.services.ApiService/AreaIndex',
                request_serializer=services_dot_api__pb2.AreaIndexRequest.SerializeToString,
                response_deserializer=services_dot_api__pb2.AreaIndexResponse.FromString,
                _registered_method=True)
        self.DeviceIndex = channel.unary_unary(
                '/com.fatehan.services.ApiService/DeviceIndex',
                request_serializer=services_dot_api__pb2.DeviceRequest.SerializeToString,
                response_deserializer=services_dot_api__pb2.DeviceResponse.FromString,
                _registered_method=True)
        self.ConfigIndex = channel.unary_unary(
                '/com.fatehan.services.ApiService/ConfigIndex',
                request_serializer=services_dot_api__pb2.ConfigRequest.SerializeToString,
                response_deserializer=services_dot_api__pb2.ConfigResponse.FromString,
                _registered_method=True)
        self.WorkflowStore = channel.unary_unary(
                '/com.fatehan.services.ApiService/WorkflowStore',
                request_serializer=activities_dot_workflow__pb2.Workflow.SerializeToString,
                response_deserializer=activities_dot_workflow__pb2.Workflow.FromString,
                _registered_method=True)
        self.WorkflowUpdate = channel.unary_unary(
                '/com.fatehan.services.ApiService/WorkflowUpdate',
                request_serializer=activities_dot_workflow__pb2.Workflow.SerializeToString,
                response_deserializer=activities_dot_workflow__pb2.Workflow.FromString,
                _registered_method=True)
        self.WorkflowIndex = channel.unary_unary(
                '/com.fatehan.services.ApiService/WorkflowIndex',
                request_serializer=services_dot_api__pb2.WorkflowRequest.SerializeToString,
                response_deserializer=services_dot_api__pb2.WorkflowResponse.FromString,
                _registered_method=True)


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

    def MeIndex(self, request, context):
        """* combined *
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AreaIndex(self, request, context):
        """* areas *
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeviceIndex(self, request, context):
        """* devices *
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ConfigIndex(self, request, context):
        """* configs *
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def WorkflowStore(self, request, context):
        """* workflows *
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def WorkflowUpdate(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def WorkflowIndex(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ApiServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'MeIndex': grpc.unary_unary_rpc_method_handler(
                    servicer.MeIndex,
                    request_deserializer=services_dot_api__pb2.MeRequest.FromString,
                    response_serializer=services_dot_api__pb2.MeResponse.SerializeToString,
            ),
            'AreaIndex': grpc.unary_unary_rpc_method_handler(
                    servicer.AreaIndex,
                    request_deserializer=services_dot_api__pb2.AreaIndexRequest.FromString,
                    response_serializer=services_dot_api__pb2.AreaIndexResponse.SerializeToString,
            ),
            'DeviceIndex': grpc.unary_unary_rpc_method_handler(
                    servicer.DeviceIndex,
                    request_deserializer=services_dot_api__pb2.DeviceRequest.FromString,
                    response_serializer=services_dot_api__pb2.DeviceResponse.SerializeToString,
            ),
            'ConfigIndex': grpc.unary_unary_rpc_method_handler(
                    servicer.ConfigIndex,
                    request_deserializer=services_dot_api__pb2.ConfigRequest.FromString,
                    response_serializer=services_dot_api__pb2.ConfigResponse.SerializeToString,
            ),
            'WorkflowStore': grpc.unary_unary_rpc_method_handler(
                    servicer.WorkflowStore,
                    request_deserializer=activities_dot_workflow__pb2.Workflow.FromString,
                    response_serializer=activities_dot_workflow__pb2.Workflow.SerializeToString,
            ),
            'WorkflowUpdate': grpc.unary_unary_rpc_method_handler(
                    servicer.WorkflowUpdate,
                    request_deserializer=activities_dot_workflow__pb2.Workflow.FromString,
                    response_serializer=activities_dot_workflow__pb2.Workflow.SerializeToString,
            ),
            'WorkflowIndex': grpc.unary_unary_rpc_method_handler(
                    servicer.WorkflowIndex,
                    request_deserializer=services_dot_api__pb2.WorkflowRequest.FromString,
                    response_serializer=services_dot_api__pb2.WorkflowResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'com.fatehan.services.ApiService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('com.fatehan.services.ApiService', rpc_method_handlers)


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

    @staticmethod
    def MeIndex(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,
            '/com.fatehan.services.ApiService/MeIndex',
            services_dot_api__pb2.MeRequest.SerializeToString,
            services_dot_api__pb2.MeResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def AreaIndex(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,
            '/com.fatehan.services.ApiService/AreaIndex',
            services_dot_api__pb2.AreaIndexRequest.SerializeToString,
            services_dot_api__pb2.AreaIndexResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeviceIndex(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,
            '/com.fatehan.services.ApiService/DeviceIndex',
            services_dot_api__pb2.DeviceRequest.SerializeToString,
            services_dot_api__pb2.DeviceResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ConfigIndex(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,
            '/com.fatehan.services.ApiService/ConfigIndex',
            services_dot_api__pb2.ConfigRequest.SerializeToString,
            services_dot_api__pb2.ConfigResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def WorkflowStore(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,
            '/com.fatehan.services.ApiService/WorkflowStore',
            activities_dot_workflow__pb2.Workflow.SerializeToString,
            activities_dot_workflow__pb2.Workflow.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def WorkflowUpdate(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,
            '/com.fatehan.services.ApiService/WorkflowUpdate',
            activities_dot_workflow__pb2.Workflow.SerializeToString,
            activities_dot_workflow__pb2.Workflow.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def WorkflowIndex(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,
            '/com.fatehan.services.ApiService/WorkflowIndex',
            services_dot_api__pb2.WorkflowRequest.SerializeToString,
            services_dot_api__pb2.WorkflowResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
