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

import grpc

from workflow.v2 import (
    workflow_service_pb2 as workflow_dot_v2_dot_workflow__service__pb2,
)


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateWorkflow = channel.unary_unary(
            "/workflow.v2.WorkflowService/CreateWorkflow",
            request_serializer=workflow_dot_v2_dot_workflow__service__pb2.CreateWorkflowRequest.SerializeToString,
            response_deserializer=workflow_dot_v2_dot_workflow__service__pb2.CreateWorkflowResponse.FromString,
            _registered_method=True,
        )
        self.GetWorkflow = channel.unary_unary(
            "/workflow.v2.WorkflowService/GetWorkflow",
            request_serializer=workflow_dot_v2_dot_workflow__service__pb2.GetWorkflowRequest.SerializeToString,
            response_deserializer=workflow_dot_v2_dot_workflow__service__pb2.GetWorkflowResponse.FromString,
            _registered_method=True,
        )
        self.UpdateWorkflow = channel.unary_unary(
            "/workflow.v2.WorkflowService/UpdateWorkflow",
            request_serializer=workflow_dot_v2_dot_workflow__service__pb2.UpdateWorkflowRequest.SerializeToString,
            response_deserializer=workflow_dot_v2_dot_workflow__service__pb2.UpdateWorkflowResponse.FromString,
            _registered_method=True,
        )
        self.DeleteWorkflow = channel.unary_unary(
            "/workflow.v2.WorkflowService/DeleteWorkflow",
            request_serializer=workflow_dot_v2_dot_workflow__service__pb2.DeleteWorkflowRequest.SerializeToString,
            response_deserializer=workflow_dot_v2_dot_workflow__service__pb2.DeleteWorkflowResponse.FromString,
            _registered_method=True,
        )
        self.ListWorkflows = channel.unary_unary(
            "/workflow.v2.WorkflowService/ListWorkflows",
            request_serializer=workflow_dot_v2_dot_workflow__service__pb2.ListWorkflowsRequest.SerializeToString,
            response_deserializer=workflow_dot_v2_dot_workflow__service__pb2.ListWorkflowsResponse.FromString,
            _registered_method=True,
        )
        self.ListWorkflowVersions = channel.unary_unary(
            "/workflow.v2.WorkflowService/ListWorkflowVersions",
            request_serializer=workflow_dot_v2_dot_workflow__service__pb2.ListWorkflowVersionsRequest.SerializeToString,
            response_deserializer=workflow_dot_v2_dot_workflow__service__pb2.ListWorkflowVersionsResponse.FromString,
            _registered_method=True,
        )


class WorkflowServiceServicer(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 UpdateWorkflow(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 DeleteWorkflow(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 ListWorkflowVersions(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_WorkflowServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "CreateWorkflow": grpc.unary_unary_rpc_method_handler(
            servicer.CreateWorkflow,
            request_deserializer=workflow_dot_v2_dot_workflow__service__pb2.CreateWorkflowRequest.FromString,
            response_serializer=workflow_dot_v2_dot_workflow__service__pb2.CreateWorkflowResponse.SerializeToString,
        ),
        "GetWorkflow": grpc.unary_unary_rpc_method_handler(
            servicer.GetWorkflow,
            request_deserializer=workflow_dot_v2_dot_workflow__service__pb2.GetWorkflowRequest.FromString,
            response_serializer=workflow_dot_v2_dot_workflow__service__pb2.GetWorkflowResponse.SerializeToString,
        ),
        "UpdateWorkflow": grpc.unary_unary_rpc_method_handler(
            servicer.UpdateWorkflow,
            request_deserializer=workflow_dot_v2_dot_workflow__service__pb2.UpdateWorkflowRequest.FromString,
            response_serializer=workflow_dot_v2_dot_workflow__service__pb2.UpdateWorkflowResponse.SerializeToString,
        ),
        "DeleteWorkflow": grpc.unary_unary_rpc_method_handler(
            servicer.DeleteWorkflow,
            request_deserializer=workflow_dot_v2_dot_workflow__service__pb2.DeleteWorkflowRequest.FromString,
            response_serializer=workflow_dot_v2_dot_workflow__service__pb2.DeleteWorkflowResponse.SerializeToString,
        ),
        "ListWorkflows": grpc.unary_unary_rpc_method_handler(
            servicer.ListWorkflows,
            request_deserializer=workflow_dot_v2_dot_workflow__service__pb2.ListWorkflowsRequest.FromString,
            response_serializer=workflow_dot_v2_dot_workflow__service__pb2.ListWorkflowsResponse.SerializeToString,
        ),
        "ListWorkflowVersions": grpc.unary_unary_rpc_method_handler(
            servicer.ListWorkflowVersions,
            request_deserializer=workflow_dot_v2_dot_workflow__service__pb2.ListWorkflowVersionsRequest.FromString,
            response_serializer=workflow_dot_v2_dot_workflow__service__pb2.ListWorkflowVersionsResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "workflow.v2.WorkflowService", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers(
        "workflow.v2.WorkflowService", rpc_method_handlers
    )


# This class is part of an EXPERIMENTAL API.
class WorkflowService(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,
            "/workflow.v2.WorkflowService/CreateWorkflow",
            workflow_dot_v2_dot_workflow__service__pb2.CreateWorkflowRequest.SerializeToString,
            workflow_dot_v2_dot_workflow__service__pb2.CreateWorkflowResponse.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,
            "/workflow.v2.WorkflowService/GetWorkflow",
            workflow_dot_v2_dot_workflow__service__pb2.GetWorkflowRequest.SerializeToString,
            workflow_dot_v2_dot_workflow__service__pb2.GetWorkflowResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def UpdateWorkflow(
        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,
            "/workflow.v2.WorkflowService/UpdateWorkflow",
            workflow_dot_v2_dot_workflow__service__pb2.UpdateWorkflowRequest.SerializeToString,
            workflow_dot_v2_dot_workflow__service__pb2.UpdateWorkflowResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def DeleteWorkflow(
        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,
            "/workflow.v2.WorkflowService/DeleteWorkflow",
            workflow_dot_v2_dot_workflow__service__pb2.DeleteWorkflowRequest.SerializeToString,
            workflow_dot_v2_dot_workflow__service__pb2.DeleteWorkflowResponse.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,
            "/workflow.v2.WorkflowService/ListWorkflows",
            workflow_dot_v2_dot_workflow__service__pb2.ListWorkflowsRequest.SerializeToString,
            workflow_dot_v2_dot_workflow__service__pb2.ListWorkflowsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def ListWorkflowVersions(
        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,
            "/workflow.v2.WorkflowService/ListWorkflowVersions",
            workflow_dot_v2_dot_workflow__service__pb2.ListWorkflowVersionsRequest.SerializeToString,
            workflow_dot_v2_dot_workflow__service__pb2.ListWorkflowVersionsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )
