Package flyteidl.core

Class Tasks.TaskTemplate.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Tasks.TaskTemplateOrBuilder, Cloneable
    Enclosing class:
    Tasks.TaskTemplate

    public static final class Tasks.TaskTemplate.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Tasks.TaskTemplate.Builder>
    implements Tasks.TaskTemplateOrBuilder
     A Task structure that uniquely identifies a task in the system
     Tasks are registered as a first step in the system.
     
    Protobuf type flyteidl.core.TaskTemplate
    • Constructor Detail

      • Builder

        private Builder()
      • Builder

        private Builder​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetMapField

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Tasks.TaskTemplate.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Tasks.TaskTemplate.Builder>
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Tasks.TaskTemplate.Builder>
      • clear

        public Tasks.TaskTemplate.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<Tasks.TaskTemplate.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Tasks.TaskTemplate.Builder>
      • getDefaultInstanceForType

        public Tasks.TaskTemplate getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public Tasks.TaskTemplate build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public Tasks.TaskTemplate buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public Tasks.TaskTemplate.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Tasks.TaskTemplate.Builder>
      • setField

        public Tasks.TaskTemplate.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                   Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Tasks.TaskTemplate.Builder>
      • clearField

        public Tasks.TaskTemplate.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Tasks.TaskTemplate.Builder>
      • clearOneof

        public Tasks.TaskTemplate.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Tasks.TaskTemplate.Builder>
      • setRepeatedField

        public Tasks.TaskTemplate.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                           int index,
                                                           Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Tasks.TaskTemplate.Builder>
      • addRepeatedField

        public Tasks.TaskTemplate.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                           Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Tasks.TaskTemplate.Builder>
      • mergeFrom

        public Tasks.TaskTemplate.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Tasks.TaskTemplate.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Tasks.TaskTemplate.Builder>
      • mergeFrom

        public Tasks.TaskTemplate.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                             throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Tasks.TaskTemplate.Builder>
        Throws:
        IOException
      • hasId

        public boolean hasId()
         Auto generated taskId by the system. Task Id uniquely identifies this task globally.
         
        .flyteidl.core.Identifier id = 1;
        Specified by:
        hasId in interface Tasks.TaskTemplateOrBuilder
        Returns:
        Whether the id field is set.
      • clearId

        public Tasks.TaskTemplate.Builder clearId()
         Auto generated taskId by the system. Task Id uniquely identifies this task globally.
         
        .flyteidl.core.Identifier id = 1;
      • getIdBuilder

        public IdentifierOuterClass.Identifier.Builder getIdBuilder()
         Auto generated taskId by the system. Task Id uniquely identifies this task globally.
         
        .flyteidl.core.Identifier id = 1;
      • getType

        public String getType()
         A predefined yet extensible Task type identifier. This can be used to customize any of the components. If no
         extensions are provided in the system, Flyte will resolve this task to its TaskCategory and default the
         implementation registered for the TaskCategory.
         
        string type = 2;
        Specified by:
        getType in interface Tasks.TaskTemplateOrBuilder
        Returns:
        The type.
      • getTypeBytes

        public com.google.protobuf.ByteString getTypeBytes()
         A predefined yet extensible Task type identifier. This can be used to customize any of the components. If no
         extensions are provided in the system, Flyte will resolve this task to its TaskCategory and default the
         implementation registered for the TaskCategory.
         
        string type = 2;
        Specified by:
        getTypeBytes in interface Tasks.TaskTemplateOrBuilder
        Returns:
        The bytes for type.
      • setType

        public Tasks.TaskTemplate.Builder setType​(String value)
         A predefined yet extensible Task type identifier. This can be used to customize any of the components. If no
         extensions are provided in the system, Flyte will resolve this task to its TaskCategory and default the
         implementation registered for the TaskCategory.
         
        string type = 2;
        Parameters:
        value - The type to set.
        Returns:
        This builder for chaining.
      • clearType

        public Tasks.TaskTemplate.Builder clearType()
         A predefined yet extensible Task type identifier. This can be used to customize any of the components. If no
         extensions are provided in the system, Flyte will resolve this task to its TaskCategory and default the
         implementation registered for the TaskCategory.
         
        string type = 2;
        Returns:
        This builder for chaining.
      • setTypeBytes

        public Tasks.TaskTemplate.Builder setTypeBytes​(com.google.protobuf.ByteString value)
         A predefined yet extensible Task type identifier. This can be used to customize any of the components. If no
         extensions are provided in the system, Flyte will resolve this task to its TaskCategory and default the
         implementation registered for the TaskCategory.
         
        string type = 2;
        Parameters:
        value - The bytes for type to set.
        Returns:
        This builder for chaining.
      • hasMetadata

        public boolean hasMetadata()
         Extra metadata about the task.
         
        .flyteidl.core.TaskMetadata metadata = 3;
        Specified by:
        hasMetadata in interface Tasks.TaskTemplateOrBuilder
        Returns:
        Whether the metadata field is set.
      • clearMetadata

        public Tasks.TaskTemplate.Builder clearMetadata()
         Extra metadata about the task.
         
        .flyteidl.core.TaskMetadata metadata = 3;
      • getMetadataBuilder

        public Tasks.TaskMetadata.Builder getMetadataBuilder()
         Extra metadata about the task.
         
        .flyteidl.core.TaskMetadata metadata = 3;
      • hasInterface

        public boolean hasInterface()
         A strongly typed interface for the task. This enables others to use this task within a workflow and guarantees
         compile-time validation of the workflow to avoid costly runtime failures.
         
        .flyteidl.core.TypedInterface interface = 4;
        Specified by:
        hasInterface in interface Tasks.TaskTemplateOrBuilder
        Returns:
        Whether the interface field is set.
      • getInterface

        public Interface.TypedInterface getInterface()
         A strongly typed interface for the task. This enables others to use this task within a workflow and guarantees
         compile-time validation of the workflow to avoid costly runtime failures.
         
        .flyteidl.core.TypedInterface interface = 4;
        Specified by:
        getInterface in interface Tasks.TaskTemplateOrBuilder
        Returns:
        The interface.
      • setInterface

        public Tasks.TaskTemplate.Builder setInterface​(Interface.TypedInterface value)
         A strongly typed interface for the task. This enables others to use this task within a workflow and guarantees
         compile-time validation of the workflow to avoid costly runtime failures.
         
        .flyteidl.core.TypedInterface interface = 4;
      • setInterface

        public Tasks.TaskTemplate.Builder setInterface​(Interface.TypedInterface.Builder builderForValue)
         A strongly typed interface for the task. This enables others to use this task within a workflow and guarantees
         compile-time validation of the workflow to avoid costly runtime failures.
         
        .flyteidl.core.TypedInterface interface = 4;
      • mergeInterface

        public Tasks.TaskTemplate.Builder mergeInterface​(Interface.TypedInterface value)
         A strongly typed interface for the task. This enables others to use this task within a workflow and guarantees
         compile-time validation of the workflow to avoid costly runtime failures.
         
        .flyteidl.core.TypedInterface interface = 4;
      • clearInterface

        public Tasks.TaskTemplate.Builder clearInterface()
         A strongly typed interface for the task. This enables others to use this task within a workflow and guarantees
         compile-time validation of the workflow to avoid costly runtime failures.
         
        .flyteidl.core.TypedInterface interface = 4;
      • getInterfaceBuilder

        public Interface.TypedInterface.Builder getInterfaceBuilder()
         A strongly typed interface for the task. This enables others to use this task within a workflow and guarantees
         compile-time validation of the workflow to avoid costly runtime failures.
         
        .flyteidl.core.TypedInterface interface = 4;
      • hasCustom

        public boolean hasCustom()
         Custom data about the task. This is extensible to allow various plugins in the system.
         
        .google.protobuf.Struct custom = 5;
        Specified by:
        hasCustom in interface Tasks.TaskTemplateOrBuilder
        Returns:
        Whether the custom field is set.
      • getCustom

        public com.google.protobuf.Struct getCustom()
         Custom data about the task. This is extensible to allow various plugins in the system.
         
        .google.protobuf.Struct custom = 5;
        Specified by:
        getCustom in interface Tasks.TaskTemplateOrBuilder
        Returns:
        The custom.
      • setCustom

        public Tasks.TaskTemplate.Builder setCustom​(com.google.protobuf.Struct value)
         Custom data about the task. This is extensible to allow various plugins in the system.
         
        .google.protobuf.Struct custom = 5;
      • setCustom

        public Tasks.TaskTemplate.Builder setCustom​(com.google.protobuf.Struct.Builder builderForValue)
         Custom data about the task. This is extensible to allow various plugins in the system.
         
        .google.protobuf.Struct custom = 5;
      • mergeCustom

        public Tasks.TaskTemplate.Builder mergeCustom​(com.google.protobuf.Struct value)
         Custom data about the task. This is extensible to allow various plugins in the system.
         
        .google.protobuf.Struct custom = 5;
      • clearCustom

        public Tasks.TaskTemplate.Builder clearCustom()
         Custom data about the task. This is extensible to allow various plugins in the system.
         
        .google.protobuf.Struct custom = 5;
      • getCustomBuilder

        public com.google.protobuf.Struct.Builder getCustomBuilder()
         Custom data about the task. This is extensible to allow various plugins in the system.
         
        .google.protobuf.Struct custom = 5;
      • getCustomOrBuilder

        public com.google.protobuf.StructOrBuilder getCustomOrBuilder()
         Custom data about the task. This is extensible to allow various plugins in the system.
         
        .google.protobuf.Struct custom = 5;
        Specified by:
        getCustomOrBuilder in interface Tasks.TaskTemplateOrBuilder
      • getCustomFieldBuilder

        private com.google.protobuf.SingleFieldBuilderV3<com.google.protobuf.Struct,​com.google.protobuf.Struct.Builder,​com.google.protobuf.StructOrBuilder> getCustomFieldBuilder()
         Custom data about the task. This is extensible to allow various plugins in the system.
         
        .google.protobuf.Struct custom = 5;
      • hasContainer

        public boolean hasContainer()
        .flyteidl.core.Container container = 6;
        Specified by:
        hasContainer in interface Tasks.TaskTemplateOrBuilder
        Returns:
        Whether the container field is set.
      • getContainerBuilder

        public Tasks.Container.Builder getContainerBuilder()
        .flyteidl.core.Container container = 6;
      • hasK8SPod

        public boolean hasK8SPod()
        .flyteidl.core.K8sPod k8s_pod = 17;
        Specified by:
        hasK8SPod in interface Tasks.TaskTemplateOrBuilder
        Returns:
        Whether the k8sPod field is set.
      • getK8SPodBuilder

        public Tasks.K8sPod.Builder getK8SPodBuilder()
        .flyteidl.core.K8sPod k8s_pod = 17;
      • hasSql

        public boolean hasSql()
        .flyteidl.core.Sql sql = 18;
        Specified by:
        hasSql in interface Tasks.TaskTemplateOrBuilder
        Returns:
        Whether the sql field is set.
      • getSqlBuilder

        public Tasks.Sql.Builder getSqlBuilder()
        .flyteidl.core.Sql sql = 18;
      • getTaskTypeVersion

        public int getTaskTypeVersion()
         This can be used to customize task handling at execution time for the same task type.
         
        int32 task_type_version = 7;
        Specified by:
        getTaskTypeVersion in interface Tasks.TaskTemplateOrBuilder
        Returns:
        The taskTypeVersion.
      • setTaskTypeVersion

        public Tasks.TaskTemplate.Builder setTaskTypeVersion​(int value)
         This can be used to customize task handling at execution time for the same task type.
         
        int32 task_type_version = 7;
        Parameters:
        value - The taskTypeVersion to set.
        Returns:
        This builder for chaining.
      • clearTaskTypeVersion

        public Tasks.TaskTemplate.Builder clearTaskTypeVersion()
         This can be used to customize task handling at execution time for the same task type.
         
        int32 task_type_version = 7;
        Returns:
        This builder for chaining.
      • hasSecurityContext

        public boolean hasSecurityContext()
         security_context encapsulates security attributes requested to run this task.
         
        .flyteidl.core.SecurityContext security_context = 8;
        Specified by:
        hasSecurityContext in interface Tasks.TaskTemplateOrBuilder
        Returns:
        Whether the securityContext field is set.
      • clearSecurityContext

        public Tasks.TaskTemplate.Builder clearSecurityContext()
         security_context encapsulates security attributes requested to run this task.
         
        .flyteidl.core.SecurityContext security_context = 8;
      • getSecurityContextBuilder

        public Security.SecurityContext.Builder getSecurityContextBuilder()
         security_context encapsulates security attributes requested to run this task.
         
        .flyteidl.core.SecurityContext security_context = 8;
      • internalGetConfig

        private com.google.protobuf.MapField<String,​String> internalGetConfig()
      • internalGetMutableConfig

        private com.google.protobuf.MapField<String,​String> internalGetMutableConfig()
      • getConfigCount

        public int getConfigCount()
        Description copied from interface: Tasks.TaskTemplateOrBuilder
         Metadata about the custom defined for this task. This is extensible to allow various plugins in the system
         to use as required.
         reserve the field numbers 1 through 15 for very frequently occurring message elements
         
        map<string, string> config = 16;
        Specified by:
        getConfigCount in interface Tasks.TaskTemplateOrBuilder
      • containsConfig

        public boolean containsConfig​(String key)
         Metadata about the custom defined for this task. This is extensible to allow various plugins in the system
         to use as required.
         reserve the field numbers 1 through 15 for very frequently occurring message elements
         
        map<string, string> config = 16;
        Specified by:
        containsConfig in interface Tasks.TaskTemplateOrBuilder
      • getConfigMap

        public Map<String,​String> getConfigMap()
         Metadata about the custom defined for this task. This is extensible to allow various plugins in the system
         to use as required.
         reserve the field numbers 1 through 15 for very frequently occurring message elements
         
        map<string, string> config = 16;
        Specified by:
        getConfigMap in interface Tasks.TaskTemplateOrBuilder
      • getConfigOrDefault

        public String getConfigOrDefault​(String key,
                                         String defaultValue)
         Metadata about the custom defined for this task. This is extensible to allow various plugins in the system
         to use as required.
         reserve the field numbers 1 through 15 for very frequently occurring message elements
         
        map<string, string> config = 16;
        Specified by:
        getConfigOrDefault in interface Tasks.TaskTemplateOrBuilder
      • getConfigOrThrow

        public String getConfigOrThrow​(String key)
         Metadata about the custom defined for this task. This is extensible to allow various plugins in the system
         to use as required.
         reserve the field numbers 1 through 15 for very frequently occurring message elements
         
        map<string, string> config = 16;
        Specified by:
        getConfigOrThrow in interface Tasks.TaskTemplateOrBuilder
      • removeConfig

        public Tasks.TaskTemplate.Builder removeConfig​(String key)
         Metadata about the custom defined for this task. This is extensible to allow various plugins in the system
         to use as required.
         reserve the field numbers 1 through 15 for very frequently occurring message elements
         
        map<string, string> config = 16;
      • getMutableConfig

        @Deprecated
        public Map<String,​String> getMutableConfig()
        Deprecated.
        Use alternate mutation accessors instead.
      • putConfig

        public Tasks.TaskTemplate.Builder putConfig​(String key,
                                                    String value)
         Metadata about the custom defined for this task. This is extensible to allow various plugins in the system
         to use as required.
         reserve the field numbers 1 through 15 for very frequently occurring message elements
         
        map<string, string> config = 16;
      • putAllConfig

        public Tasks.TaskTemplate.Builder putAllConfig​(Map<String,​String> values)
         Metadata about the custom defined for this task. This is extensible to allow various plugins in the system
         to use as required.
         reserve the field numbers 1 through 15 for very frequently occurring message elements
         
        map<string, string> config = 16;
      • setUnknownFields

        public final Tasks.TaskTemplate.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Tasks.TaskTemplate.Builder>
      • mergeUnknownFields

        public final Tasks.TaskTemplate.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Tasks.TaskTemplate.Builder>