"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""
import builtins
import flyteidl.core.tasks_pb2
import flyteidl.core.workflow_pb2
import google.protobuf.descriptor
import google.protobuf.internal.containers
import google.protobuf.message
import typing
import typing_extensions

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor = ...

class ConnectionSet(google.protobuf.message.Message):
    """Adjacency list for the workflow. This is created as part of the compilation process. Every process after the compilation
    step uses this created ConnectionSet
    """
    DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
    class IdList(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
        IDS_FIELD_NUMBER: builtins.int
        @property
        def ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[typing.Text]: ...
        def __init__(self,
            *,
            ids : typing.Optional[typing.Iterable[typing.Text]] = ...,
            ) -> None: ...
        def ClearField(self, field_name: typing_extensions.Literal[u"ids",b"ids"]) -> None: ...

    class DownstreamEntry(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
        KEY_FIELD_NUMBER: builtins.int
        VALUE_FIELD_NUMBER: builtins.int
        key: typing.Text = ...
        @property
        def value(self) -> global___ConnectionSet.IdList: ...
        def __init__(self,
            *,
            key : typing.Text = ...,
            value : typing.Optional[global___ConnectionSet.IdList] = ...,
            ) -> None: ...
        def HasField(self, field_name: typing_extensions.Literal[u"value",b"value"]) -> builtins.bool: ...
        def ClearField(self, field_name: typing_extensions.Literal[u"key",b"key",u"value",b"value"]) -> None: ...

    class UpstreamEntry(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
        KEY_FIELD_NUMBER: builtins.int
        VALUE_FIELD_NUMBER: builtins.int
        key: typing.Text = ...
        @property
        def value(self) -> global___ConnectionSet.IdList: ...
        def __init__(self,
            *,
            key : typing.Text = ...,
            value : typing.Optional[global___ConnectionSet.IdList] = ...,
            ) -> None: ...
        def HasField(self, field_name: typing_extensions.Literal[u"value",b"value"]) -> builtins.bool: ...
        def ClearField(self, field_name: typing_extensions.Literal[u"key",b"key",u"value",b"value"]) -> None: ...

    DOWNSTREAM_FIELD_NUMBER: builtins.int
    UPSTREAM_FIELD_NUMBER: builtins.int
    @property
    def downstream(self) -> google.protobuf.internal.containers.MessageMap[typing.Text, global___ConnectionSet.IdList]:
        """A list of all the node ids that are downstream from a given node id"""
        pass
    @property
    def upstream(self) -> google.protobuf.internal.containers.MessageMap[typing.Text, global___ConnectionSet.IdList]:
        """A list of all the node ids, that are upstream of this node id"""
        pass
    def __init__(self,
        *,
        downstream : typing.Optional[typing.Mapping[typing.Text, global___ConnectionSet.IdList]] = ...,
        upstream : typing.Optional[typing.Mapping[typing.Text, global___ConnectionSet.IdList]] = ...,
        ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal[u"downstream",b"downstream",u"upstream",b"upstream"]) -> None: ...
global___ConnectionSet = ConnectionSet

class CompiledWorkflow(google.protobuf.message.Message):
    """Output of the compilation Step. This object represents one workflow. We store more metadata at this layer"""
    DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
    TEMPLATE_FIELD_NUMBER: builtins.int
    CONNECTIONS_FIELD_NUMBER: builtins.int
    @property
    def template(self) -> flyteidl.core.workflow_pb2.WorkflowTemplate:
        """Completely contained Workflow Template"""
        pass
    @property
    def connections(self) -> global___ConnectionSet:
        """For internal use only! This field is used by the system and must not be filled in. Any values set will be ignored."""
        pass
    def __init__(self,
        *,
        template : typing.Optional[flyteidl.core.workflow_pb2.WorkflowTemplate] = ...,
        connections : typing.Optional[global___ConnectionSet] = ...,
        ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal[u"connections",b"connections",u"template",b"template"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal[u"connections",b"connections",u"template",b"template"]) -> None: ...
global___CompiledWorkflow = CompiledWorkflow

class CompiledTask(google.protobuf.message.Message):
    """Output of the Compilation step. This object represent one Task. We store more metadata at this layer"""
    DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
    TEMPLATE_FIELD_NUMBER: builtins.int
    @property
    def template(self) -> flyteidl.core.tasks_pb2.TaskTemplate:
        """Completely contained TaskTemplate"""
        pass
    def __init__(self,
        *,
        template : typing.Optional[flyteidl.core.tasks_pb2.TaskTemplate] = ...,
        ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal[u"template",b"template"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal[u"template",b"template"]) -> None: ...
global___CompiledTask = CompiledTask

class CompiledWorkflowClosure(google.protobuf.message.Message):
    """A Compiled Workflow Closure contains all the information required to start a new execution, or to visualize a workflow
    and its details. The CompiledWorkflowClosure should always contain a primary workflow, that is the main workflow that
    will being the execution. All subworkflows are denormalized. WorkflowNodes refer to the workflow identifiers of
    compiled subworkflows.
    """
    DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
    PRIMARY_FIELD_NUMBER: builtins.int
    SUB_WORKFLOWS_FIELD_NUMBER: builtins.int
    TASKS_FIELD_NUMBER: builtins.int
    @property
    def primary(self) -> global___CompiledWorkflow:
        """+required"""
        pass
    @property
    def sub_workflows(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___CompiledWorkflow]:
        """Guaranteed that there will only exist one and only one workflow with a given id, i.e., every sub workflow has a
        unique identifier. Also every enclosed subworkflow is used either by a primary workflow or by a subworkflow
        as an inlined workflow
        +optional
        """
        pass
    @property
    def tasks(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___CompiledTask]:
        """Guaranteed that there will only exist one and only one task with a given id, i.e., every task has a unique id
        +required (at least 1)
        """
        pass
    def __init__(self,
        *,
        primary : typing.Optional[global___CompiledWorkflow] = ...,
        sub_workflows : typing.Optional[typing.Iterable[global___CompiledWorkflow]] = ...,
        tasks : typing.Optional[typing.Iterable[global___CompiledTask]] = ...,
        ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal[u"primary",b"primary"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal[u"primary",b"primary",u"sub_workflows",b"sub_workflows",u"tasks",b"tasks"]) -> None: ...
global___CompiledWorkflowClosure = CompiledWorkflowClosure
