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

import grpc

from api.v2 import (
    workflow_gateway_service_pb2 as api_dot_v2_dot_workflow__gateway__service__pb2,
)


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateWorkflow = channel.unary_unary(
            "/api.v2.WorkflowGatewayService/CreateWorkflow",
            request_serializer=api_dot_v2_dot_workflow__gateway__service__pb2.WorkflowGatewayServiceCreateWorkflowRequest.SerializeToString,
            response_deserializer=api_dot_v2_dot_workflow__gateway__service__pb2.WorkflowGatewayServiceCreateWorkflowResponse.FromString,
            _registered_method=True,
        )
        self.GetWorkflow = channel.unary_unary(
            "/api.v2.WorkflowGatewayService/GetWorkflow",
            request_serializer=api_dot_v2_dot_workflow__gateway__service__pb2.WorkflowGatewayServiceGetWorkflowRequest.SerializeToString,
            response_deserializer=api_dot_v2_dot_workflow__gateway__service__pb2.WorkflowGatewayServiceGetWorkflowResponse.FromString,
            _registered_method=True,
        )
        self.ListWorkflows = channel.unary_unary(
            "/api.v2.WorkflowGatewayService/ListWorkflows",
            request_serializer=api_dot_v2_dot_workflow__gateway__service__pb2.WorkflowGatewayServiceListWorkflowsRequest.SerializeToString,
            response_deserializer=api_dot_v2_dot_workflow__gateway__service__pb2.WorkflowGatewayServiceListWorkflowsResponse.FromString,
            _registered_method=True,
        )
        self.StartExecution = channel.unary_unary(
            "/api.v2.WorkflowGatewayService/StartExecution",
            request_serializer=api_dot_v2_dot_workflow__gateway__service__pb2.WorkflowGatewayServiceStartExecutionRequest.SerializeToString,
            response_deserializer=api_dot_v2_dot_workflow__gateway__service__pb2.WorkflowGatewayServiceStartExecutionResponse.FromString,
            _registered_method=True,
        )
        self.GetExecution = channel.unary_unary(
            "/api.v2.WorkflowGatewayService/GetExecution",
            request_serializer=api_dot_v2_dot_workflow__gateway__service__pb2.WorkflowGatewayServiceGetExecutionRequest.SerializeToString,
            response_deserializer=api_dot_v2_dot_workflow__gateway__service__pb2.WorkflowGatewayServiceGetExecutionResponse.FromString,
            _registered_method=True,
        )


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

    def CreateWorkflow(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 GetWorkflow(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 ListWorkflows(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 StartExecution(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 GetExecution(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_WorkflowGatewayServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "CreateWorkflow": grpc.unary_unary_rpc_method_handler(
            servicer.CreateWorkflow,
            request_deserializer=api_dot_v2_dot_workflow__gateway__service__pb2.WorkflowGatewayServiceCreateWorkflowRequest.FromString,
            response_serializer=api_dot_v2_dot_workflow__gateway__service__pb2.WorkflowGatewayServiceCreateWorkflowResponse.SerializeToString,
        ),
        "GetWorkflow": grpc.unary_unary_rpc_method_handler(
            servicer.GetWorkflow,
            request_deserializer=api_dot_v2_dot_workflow__gateway__service__pb2.WorkflowGatewayServiceGetWorkflowRequest.FromString,
            response_serializer=api_dot_v2_dot_workflow__gateway__service__pb2.WorkflowGatewayServiceGetWorkflowResponse.SerializeToString,
        ),
        "ListWorkflows": grpc.unary_unary_rpc_method_handler(
            servicer.ListWorkflows,
            request_deserializer=api_dot_v2_dot_workflow__gateway__service__pb2.WorkflowGatewayServiceListWorkflowsRequest.FromString,
            response_serializer=api_dot_v2_dot_workflow__gateway__service__pb2.WorkflowGatewayServiceListWorkflowsResponse.SerializeToString,
        ),
        "StartExecution": grpc.unary_unary_rpc_method_handler(
            servicer.StartExecution,
            request_deserializer=api_dot_v2_dot_workflow__gateway__service__pb2.WorkflowGatewayServiceStartExecutionRequest.FromString,
            response_serializer=api_dot_v2_dot_workflow__gateway__service__pb2.WorkflowGatewayServiceStartExecutionResponse.SerializeToString,
        ),
        "GetExecution": grpc.unary_unary_rpc_method_handler(
            servicer.GetExecution,
            request_deserializer=api_dot_v2_dot_workflow__gateway__service__pb2.WorkflowGatewayServiceGetExecutionRequest.FromString,
            response_serializer=api_dot_v2_dot_workflow__gateway__service__pb2.WorkflowGatewayServiceGetExecutionResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "api.v2.WorkflowGatewayService", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers(
        "api.v2.WorkflowGatewayService", rpc_method_handlers
    )


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

    @staticmethod
    def CreateWorkflow(
        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,
            "/api.v2.WorkflowGatewayService/CreateWorkflow",
            api_dot_v2_dot_workflow__gateway__service__pb2.WorkflowGatewayServiceCreateWorkflowRequest.SerializeToString,
            api_dot_v2_dot_workflow__gateway__service__pb2.WorkflowGatewayServiceCreateWorkflowResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def GetWorkflow(
        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,
            "/api.v2.WorkflowGatewayService/GetWorkflow",
            api_dot_v2_dot_workflow__gateway__service__pb2.WorkflowGatewayServiceGetWorkflowRequest.SerializeToString,
            api_dot_v2_dot_workflow__gateway__service__pb2.WorkflowGatewayServiceGetWorkflowResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def ListWorkflows(
        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,
            "/api.v2.WorkflowGatewayService/ListWorkflows",
            api_dot_v2_dot_workflow__gateway__service__pb2.WorkflowGatewayServiceListWorkflowsRequest.SerializeToString,
            api_dot_v2_dot_workflow__gateway__service__pb2.WorkflowGatewayServiceListWorkflowsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def StartExecution(
        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,
            "/api.v2.WorkflowGatewayService/StartExecution",
            api_dot_v2_dot_workflow__gateway__service__pb2.WorkflowGatewayServiceStartExecutionRequest.SerializeToString,
            api_dot_v2_dot_workflow__gateway__service__pb2.WorkflowGatewayServiceStartExecutionResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def GetExecution(
        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,
            "/api.v2.WorkflowGatewayService/GetExecution",
            api_dot_v2_dot_workflow__gateway__service__pb2.WorkflowGatewayServiceGetExecutionRequest.SerializeToString,
            api_dot_v2_dot_workflow__gateway__service__pb2.WorkflowGatewayServiceGetExecutionResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )
