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

from yandex.cloud.serverless.workflows.v1 import execution_service_pb2 as yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2


class ExecutionServiceStub(object):
    """Set of methods for managing Workflows Executions.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Start = channel.unary_unary(
                '/yandex.cloud.serverless.workflows.v1.ExecutionService/Start',
                request_serializer=yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.StartExecutionRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.StartExecutionResponse.FromString,
                )
        self.Stop = channel.unary_unary(
                '/yandex.cloud.serverless.workflows.v1.ExecutionService/Stop',
                request_serializer=yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.StopExecutionRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.StopExecutionResponse.FromString,
                )
        self.Terminate = channel.unary_unary(
                '/yandex.cloud.serverless.workflows.v1.ExecutionService/Terminate',
                request_serializer=yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.TerminateExecutionRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.TerminateExecutionResponse.FromString,
                )
        self.Get = channel.unary_unary(
                '/yandex.cloud.serverless.workflows.v1.ExecutionService/Get',
                request_serializer=yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.GetExecutionRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.GetExecutionResponse.FromString,
                )
        self.GetHistory = channel.unary_unary(
                '/yandex.cloud.serverless.workflows.v1.ExecutionService/GetHistory',
                request_serializer=yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.GetExecutionHistoryRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.GetExecutionHistoryResponse.FromString,
                )
        self.List = channel.unary_unary(
                '/yandex.cloud.serverless.workflows.v1.ExecutionService/List',
                request_serializer=yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.ListExecutionsRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.ListExecutionsResponse.FromString,
                )


class ExecutionServiceServicer(object):
    """Set of methods for managing Workflows Executions.
    """

    def Start(self, request, context):
        """Starts new Workflow execution.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Stop(self, request, context):
        """Stops specified Workflow execution.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Terminate(self, request, context):
        """Terminates specified Workflow execution.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Get(self, request, context):
        """Retrieves specified Workflow execution.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetHistory(self, request, context):
        """Retrieves detailed history of specified Workflow execution.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def List(self, request, context):
        """Retrieves list of Workflow executions.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ExecutionServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Start': grpc.unary_unary_rpc_method_handler(
                    servicer.Start,
                    request_deserializer=yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.StartExecutionRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.StartExecutionResponse.SerializeToString,
            ),
            'Stop': grpc.unary_unary_rpc_method_handler(
                    servicer.Stop,
                    request_deserializer=yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.StopExecutionRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.StopExecutionResponse.SerializeToString,
            ),
            'Terminate': grpc.unary_unary_rpc_method_handler(
                    servicer.Terminate,
                    request_deserializer=yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.TerminateExecutionRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.TerminateExecutionResponse.SerializeToString,
            ),
            'Get': grpc.unary_unary_rpc_method_handler(
                    servicer.Get,
                    request_deserializer=yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.GetExecutionRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.GetExecutionResponse.SerializeToString,
            ),
            'GetHistory': grpc.unary_unary_rpc_method_handler(
                    servicer.GetHistory,
                    request_deserializer=yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.GetExecutionHistoryRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.GetExecutionHistoryResponse.SerializeToString,
            ),
            'List': grpc.unary_unary_rpc_method_handler(
                    servicer.List,
                    request_deserializer=yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.ListExecutionsRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.ListExecutionsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'yandex.cloud.serverless.workflows.v1.ExecutionService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class ExecutionService(object):
    """Set of methods for managing Workflows Executions.
    """

    @staticmethod
    def Start(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, '/yandex.cloud.serverless.workflows.v1.ExecutionService/Start',
            yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.StartExecutionRequest.SerializeToString,
            yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.StartExecutionResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Stop(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, '/yandex.cloud.serverless.workflows.v1.ExecutionService/Stop',
            yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.StopExecutionRequest.SerializeToString,
            yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.StopExecutionResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Terminate(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, '/yandex.cloud.serverless.workflows.v1.ExecutionService/Terminate',
            yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.TerminateExecutionRequest.SerializeToString,
            yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.TerminateExecutionResponse.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, '/yandex.cloud.serverless.workflows.v1.ExecutionService/Get',
            yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.GetExecutionRequest.SerializeToString,
            yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.GetExecutionResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetHistory(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, '/yandex.cloud.serverless.workflows.v1.ExecutionService/GetHistory',
            yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.GetExecutionHistoryRequest.SerializeToString,
            yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.GetExecutionHistoryResponse.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, '/yandex.cloud.serverless.workflows.v1.ExecutionService/List',
            yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.ListExecutionsRequest.SerializeToString,
            yandex_dot_cloud_dot_serverless_dot_workflows_dot_v1_dot_execution__service__pb2.ListExecutionsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
