Package flyteidl.core

Class Tasks.TaskTemplate

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

    public static final class Tasks.TaskTemplate
    extends com.google.protobuf.GeneratedMessageV3
    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
    See Also:
    Serialized Form
    • Constructor Detail

      • TaskTemplate

        private TaskTemplate​(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)
      • TaskTemplate

        private TaskTemplate()
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getUnknownFields

        public final com.google.protobuf.UnknownFieldSet getUnknownFields()
        Specified by:
        getUnknownFields in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getUnknownFields in class com.google.protobuf.GeneratedMessageV3
      • 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
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • 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.
      • 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.
      • 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.
      • 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.
      • 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.
      • 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
      • hasContainer

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

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

        public boolean hasSql()
        .flyteidl.core.Sql sql = 18;
        Specified by:
        hasSql in interface Tasks.TaskTemplateOrBuilder
        Returns:
        Whether the sql field is set.
      • 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.
      • 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.
      • internalGetConfig

        private com.google.protobuf.MapField<String,​String> internalGetConfig()
      • 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
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static Tasks.TaskTemplate parseFrom​(ByteBuffer data)
                                            throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Tasks.TaskTemplate parseFrom​(ByteBuffer data,
                                                   com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                            throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Tasks.TaskTemplate parseFrom​(com.google.protobuf.ByteString data)
                                            throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Tasks.TaskTemplate parseFrom​(com.google.protobuf.ByteString data,
                                                   com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                            throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Tasks.TaskTemplate parseFrom​(byte[] data)
                                            throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Tasks.TaskTemplate parseFrom​(byte[] data,
                                                   com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                            throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Tasks.TaskTemplate parseFrom​(com.google.protobuf.CodedInputStream input,
                                                   com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                            throws IOException
        Throws:
        IOException
      • newBuilderForType

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

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

        protected Tasks.TaskTemplate.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<Tasks.TaskTemplate> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

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