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

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

class MatchableResource(_MatchableResource, metaclass=_MatchableResourceEnumTypeWrapper):
    """Defines a resource that can be configured by customizable Project-, ProjectDomain- or WorkflowAttributes
    based on matching tags.
    """
    pass
class _MatchableResource:
    V = typing.NewType('V', builtins.int)
class _MatchableResourceEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_MatchableResource.V], builtins.type):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor = ...
    TASK_RESOURCE = MatchableResource.V(0)
    """Applies to customizable task resource requests and limits."""

    CLUSTER_RESOURCE = MatchableResource.V(1)
    """Applies to configuring templated kubernetes cluster resources."""

    EXECUTION_QUEUE = MatchableResource.V(2)
    """Configures task and dynamic task execution queue assignment."""

    EXECUTION_CLUSTER_LABEL = MatchableResource.V(3)
    """Configures the K8s cluster label to be used for execution to be run"""

    QUALITY_OF_SERVICE_SPECIFICATION = MatchableResource.V(4)
    """Configures default quality of service when undefined in an execution spec."""

    PLUGIN_OVERRIDE = MatchableResource.V(5)
    """Selects configurable plugin implementation behavior for a given task type."""

    WORKFLOW_EXECUTION_CONFIG = MatchableResource.V(6)
    """Adds defaults for customizable workflow-execution specifications and overrides."""


TASK_RESOURCE = MatchableResource.V(0)
"""Applies to customizable task resource requests and limits."""

CLUSTER_RESOURCE = MatchableResource.V(1)
"""Applies to configuring templated kubernetes cluster resources."""

EXECUTION_QUEUE = MatchableResource.V(2)
"""Configures task and dynamic task execution queue assignment."""

EXECUTION_CLUSTER_LABEL = MatchableResource.V(3)
"""Configures the K8s cluster label to be used for execution to be run"""

QUALITY_OF_SERVICE_SPECIFICATION = MatchableResource.V(4)
"""Configures default quality of service when undefined in an execution spec."""

PLUGIN_OVERRIDE = MatchableResource.V(5)
"""Selects configurable plugin implementation behavior for a given task type."""

WORKFLOW_EXECUTION_CONFIG = MatchableResource.V(6)
"""Adds defaults for customizable workflow-execution specifications and overrides."""

global___MatchableResource = MatchableResource


class TaskResourceSpec(google.protobuf.message.Message):
    """Defines a set of overridable task resource attributes set during task registration."""
    DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
    CPU_FIELD_NUMBER: builtins.int
    GPU_FIELD_NUMBER: builtins.int
    MEMORY_FIELD_NUMBER: builtins.int
    STORAGE_FIELD_NUMBER: builtins.int
    EPHEMERAL_STORAGE_FIELD_NUMBER: builtins.int
    cpu: typing.Text = ...
    gpu: typing.Text = ...
    memory: typing.Text = ...
    storage: typing.Text = ...
    ephemeral_storage: typing.Text = ...
    def __init__(self,
        *,
        cpu : typing.Text = ...,
        gpu : typing.Text = ...,
        memory : typing.Text = ...,
        storage : typing.Text = ...,
        ephemeral_storage : typing.Text = ...,
        ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal[u"cpu",b"cpu",u"ephemeral_storage",b"ephemeral_storage",u"gpu",b"gpu",u"memory",b"memory",u"storage",b"storage"]) -> None: ...
global___TaskResourceSpec = TaskResourceSpec

class TaskResourceAttributes(google.protobuf.message.Message):
    """Defines task resource defaults and limits that will be applied at task registration."""
    DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
    DEFAULTS_FIELD_NUMBER: builtins.int
    LIMITS_FIELD_NUMBER: builtins.int
    @property
    def defaults(self) -> global___TaskResourceSpec: ...
    @property
    def limits(self) -> global___TaskResourceSpec: ...
    def __init__(self,
        *,
        defaults : typing.Optional[global___TaskResourceSpec] = ...,
        limits : typing.Optional[global___TaskResourceSpec] = ...,
        ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal[u"defaults",b"defaults",u"limits",b"limits"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal[u"defaults",b"defaults",u"limits",b"limits"]) -> None: ...
global___TaskResourceAttributes = TaskResourceAttributes

class ClusterResourceAttributes(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
    class AttributesEntry(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
        KEY_FIELD_NUMBER: builtins.int
        VALUE_FIELD_NUMBER: builtins.int
        key: typing.Text = ...
        value: typing.Text = ...
        def __init__(self,
            *,
            key : typing.Text = ...,
            value : typing.Text = ...,
            ) -> None: ...
        def ClearField(self, field_name: typing_extensions.Literal[u"key",b"key",u"value",b"value"]) -> None: ...

    ATTRIBUTES_FIELD_NUMBER: builtins.int
    @property
    def attributes(self) -> google.protobuf.internal.containers.ScalarMap[typing.Text, typing.Text]:
        """Custom resource attributes which will be applied in cluster resource creation (e.g. quotas).
        Map keys are the *case-sensitive* names of variables in templatized resource files.
        Map values should be the custom values which get substituted during resource creation.
        """
        pass
    def __init__(self,
        *,
        attributes : typing.Optional[typing.Mapping[typing.Text, typing.Text]] = ...,
        ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal[u"attributes",b"attributes"]) -> None: ...
global___ClusterResourceAttributes = ClusterResourceAttributes

class ExecutionQueueAttributes(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
    TAGS_FIELD_NUMBER: builtins.int
    @property
    def tags(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[typing.Text]:
        """Tags used for assigning execution queues for tasks defined within this project."""
        pass
    def __init__(self,
        *,
        tags : typing.Optional[typing.Iterable[typing.Text]] = ...,
        ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal[u"tags",b"tags"]) -> None: ...
global___ExecutionQueueAttributes = ExecutionQueueAttributes

class ExecutionClusterLabel(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
    VALUE_FIELD_NUMBER: builtins.int
    value: typing.Text = ...
    """Label value to determine where the execution will be run"""

    def __init__(self,
        *,
        value : typing.Text = ...,
        ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal[u"value",b"value"]) -> None: ...
global___ExecutionClusterLabel = ExecutionClusterLabel

class PluginOverride(google.protobuf.message.Message):
    """This MatchableAttribute configures selecting alternate plugin implementations for a given task type.
    In addition to an override implementation a selection of fallbacks can be provided or other modes
    for handling cases where the desired plugin override is not enabled in a given Flyte deployment.
    """
    DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
    class MissingPluginBehavior(_MissingPluginBehavior, metaclass=_MissingPluginBehaviorEnumTypeWrapper):
        pass
    class _MissingPluginBehavior:
        V = typing.NewType('V', builtins.int)
    class _MissingPluginBehaviorEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_MissingPluginBehavior.V], builtins.type):
        DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor = ...
        FAIL = PluginOverride.MissingPluginBehavior.V(0)
        """By default, if this plugin is not enabled for a Flyte deployment then execution will fail."""

        USE_DEFAULT = PluginOverride.MissingPluginBehavior.V(1)
        """Uses the system-configured default implementation."""


    FAIL = PluginOverride.MissingPluginBehavior.V(0)
    """By default, if this plugin is not enabled for a Flyte deployment then execution will fail."""

    USE_DEFAULT = PluginOverride.MissingPluginBehavior.V(1)
    """Uses the system-configured default implementation."""


    TASK_TYPE_FIELD_NUMBER: builtins.int
    PLUGIN_ID_FIELD_NUMBER: builtins.int
    MISSING_PLUGIN_BEHAVIOR_FIELD_NUMBER: builtins.int
    task_type: typing.Text = ...
    """A predefined yet extensible Task type identifier."""

    @property
    def plugin_id(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[typing.Text]:
        """A set of plugin ids which should handle tasks of this type instead of the default registered plugin. The list will be tried in order until a plugin is found with that id."""
        pass
    missing_plugin_behavior: global___PluginOverride.MissingPluginBehavior.V = ...
    """Defines the behavior when no plugin from the plugin_id list is not found."""

    def __init__(self,
        *,
        task_type : typing.Text = ...,
        plugin_id : typing.Optional[typing.Iterable[typing.Text]] = ...,
        missing_plugin_behavior : global___PluginOverride.MissingPluginBehavior.V = ...,
        ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal[u"missing_plugin_behavior",b"missing_plugin_behavior",u"plugin_id",b"plugin_id",u"task_type",b"task_type"]) -> None: ...
global___PluginOverride = PluginOverride

class PluginOverrides(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
    OVERRIDES_FIELD_NUMBER: builtins.int
    @property
    def overrides(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___PluginOverride]: ...
    def __init__(self,
        *,
        overrides : typing.Optional[typing.Iterable[global___PluginOverride]] = ...,
        ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal[u"overrides",b"overrides"]) -> None: ...
global___PluginOverrides = PluginOverrides

class WorkflowExecutionConfig(google.protobuf.message.Message):
    """Adds defaults for customizable workflow-execution specifications and overrides."""
    DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
    MAX_PARALLELISM_FIELD_NUMBER: builtins.int
    max_parallelism: builtins.int = ...
    """Can be used to control the number of parallel nodes to run within the workflow. This is useful to achieve fairness."""

    def __init__(self,
        *,
        max_parallelism : builtins.int = ...,
        ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal[u"max_parallelism",b"max_parallelism"]) -> None: ...
global___WorkflowExecutionConfig = WorkflowExecutionConfig

class MatchingAttributes(google.protobuf.message.Message):
    """Generic container for encapsulating all types of the above attributes messages."""
    DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
    TASK_RESOURCE_ATTRIBUTES_FIELD_NUMBER: builtins.int
    CLUSTER_RESOURCE_ATTRIBUTES_FIELD_NUMBER: builtins.int
    EXECUTION_QUEUE_ATTRIBUTES_FIELD_NUMBER: builtins.int
    EXECUTION_CLUSTER_LABEL_FIELD_NUMBER: builtins.int
    QUALITY_OF_SERVICE_FIELD_NUMBER: builtins.int
    PLUGIN_OVERRIDES_FIELD_NUMBER: builtins.int
    WORKFLOW_EXECUTION_CONFIG_FIELD_NUMBER: builtins.int
    @property
    def task_resource_attributes(self) -> global___TaskResourceAttributes: ...
    @property
    def cluster_resource_attributes(self) -> global___ClusterResourceAttributes: ...
    @property
    def execution_queue_attributes(self) -> global___ExecutionQueueAttributes: ...
    @property
    def execution_cluster_label(self) -> global___ExecutionClusterLabel: ...
    @property
    def quality_of_service(self) -> flyteidl.core.execution_pb2.QualityOfService: ...
    @property
    def plugin_overrides(self) -> global___PluginOverrides: ...
    @property
    def workflow_execution_config(self) -> global___WorkflowExecutionConfig: ...
    def __init__(self,
        *,
        task_resource_attributes : typing.Optional[global___TaskResourceAttributes] = ...,
        cluster_resource_attributes : typing.Optional[global___ClusterResourceAttributes] = ...,
        execution_queue_attributes : typing.Optional[global___ExecutionQueueAttributes] = ...,
        execution_cluster_label : typing.Optional[global___ExecutionClusterLabel] = ...,
        quality_of_service : typing.Optional[flyteidl.core.execution_pb2.QualityOfService] = ...,
        plugin_overrides : typing.Optional[global___PluginOverrides] = ...,
        workflow_execution_config : typing.Optional[global___WorkflowExecutionConfig] = ...,
        ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal[u"cluster_resource_attributes",b"cluster_resource_attributes",u"execution_cluster_label",b"execution_cluster_label",u"execution_queue_attributes",b"execution_queue_attributes",u"plugin_overrides",b"plugin_overrides",u"quality_of_service",b"quality_of_service",u"target",b"target",u"task_resource_attributes",b"task_resource_attributes",u"workflow_execution_config",b"workflow_execution_config"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal[u"cluster_resource_attributes",b"cluster_resource_attributes",u"execution_cluster_label",b"execution_cluster_label",u"execution_queue_attributes",b"execution_queue_attributes",u"plugin_overrides",b"plugin_overrides",u"quality_of_service",b"quality_of_service",u"target",b"target",u"task_resource_attributes",b"task_resource_attributes",u"workflow_execution_config",b"workflow_execution_config"]) -> None: ...
    def WhichOneof(self, oneof_group: typing_extensions.Literal[u"target",b"target"]) -> typing.Optional[typing_extensions.Literal["task_resource_attributes","cluster_resource_attributes","execution_queue_attributes","execution_cluster_label","quality_of_service","plugin_overrides","workflow_execution_config"]]: ...
global___MatchingAttributes = MatchingAttributes

class MatchableAttributesConfiguration(google.protobuf.message.Message):
    """Represents a custom set of attributes applied for either a domain; a domain and project; or
    domain, project and workflow name.
    These are used to override system level defaults for kubernetes cluster resource management,
    default execution values, and more all across different levels of specificity.
    """
    DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
    ATTRIBUTES_FIELD_NUMBER: builtins.int
    DOMAIN_FIELD_NUMBER: builtins.int
    PROJECT_FIELD_NUMBER: builtins.int
    WORKFLOW_FIELD_NUMBER: builtins.int
    LAUNCH_PLAN_FIELD_NUMBER: builtins.int
    @property
    def attributes(self) -> global___MatchingAttributes: ...
    domain: typing.Text = ...
    project: typing.Text = ...
    workflow: typing.Text = ...
    launch_plan: typing.Text = ...
    def __init__(self,
        *,
        attributes : typing.Optional[global___MatchingAttributes] = ...,
        domain : typing.Text = ...,
        project : typing.Text = ...,
        workflow : typing.Text = ...,
        launch_plan : typing.Text = ...,
        ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal[u"attributes",b"attributes"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal[u"attributes",b"attributes",u"domain",b"domain",u"launch_plan",b"launch_plan",u"project",b"project",u"workflow",b"workflow"]) -> None: ...
global___MatchableAttributesConfiguration = MatchableAttributesConfiguration

class ListMatchableAttributesRequest(google.protobuf.message.Message):
    """Request all matching resource attributes for a resource type.
    See :ref:`ref_flyteidl.admin.MatchableAttributesConfiguration` for more details
    """
    DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
    RESOURCE_TYPE_FIELD_NUMBER: builtins.int
    resource_type: global___MatchableResource.V = ...
    """+required"""

    def __init__(self,
        *,
        resource_type : global___MatchableResource.V = ...,
        ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal[u"resource_type",b"resource_type"]) -> None: ...
global___ListMatchableAttributesRequest = ListMatchableAttributesRequest

class ListMatchableAttributesResponse(google.protobuf.message.Message):
    """Response for a request for all matching resource attributes for a resource type.
    See :ref:`ref_flyteidl.admin.MatchableAttributesConfiguration` for more details
    """
    DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
    CONFIGURATIONS_FIELD_NUMBER: builtins.int
    @property
    def configurations(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___MatchableAttributesConfiguration]: ...
    def __init__(self,
        *,
        configurations : typing.Optional[typing.Iterable[global___MatchableAttributesConfiguration]] = ...,
        ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal[u"configurations",b"configurations"]) -> None: ...
global___ListMatchableAttributesResponse = ListMatchableAttributesResponse
