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

from t2iapi import basic_responses_pb2 as t2iapi_dot_basic__responses__pb2
from t2iapi.operation import operation_requests_pb2 as t2iapi_dot_operation_dot_operation__requests__pb2


class OperationServiceStub(object):
    """
    Service to handle operation manipulations.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.SetOperatingMode = channel.unary_unary(
                '/t2iapi.operation.OperationService/SetOperatingMode',
                request_serializer=t2iapi_dot_operation_dot_operation__requests__pb2.SetOperatingModeRequest.SerializeToString,
                response_deserializer=t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
                )


class OperationServiceServicer(object):
    """
    Service to handle operation manipulations.
    """

    def SetOperatingMode(self, request, context):
        """
        This manipulation shall change the devices state, which results in setting the requested OperatingMode for the
        given operation.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_OperationServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'SetOperatingMode': grpc.unary_unary_rpc_method_handler(
                    servicer.SetOperatingMode,
                    request_deserializer=t2iapi_dot_operation_dot_operation__requests__pb2.SetOperatingModeRequest.FromString,
                    response_serializer=t2iapi_dot_basic__responses__pb2.BasicResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            't2iapi.operation.OperationService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class OperationService(object):
    """
    Service to handle operation manipulations.
    """

    @staticmethod
    def SetOperatingMode(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, '/t2iapi.operation.OperationService/SetOperatingMode',
            t2iapi_dot_operation_dot_operation__requests__pb2.SetOperatingModeRequest.SerializeToString,
            t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
