Class WorkflowTemplate

  • All Implemented Interfaces:
    WorkflowTemplateOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class WorkflowTemplate
    extends com.google.protobuf.GeneratedMessageV3
    implements WorkflowTemplateOrBuilder
     A Dataproc workflow template resource.
     
    Protobuf type google.cloud.dataproc.v1.WorkflowTemplate
    See Also:
    Serialized Form
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance 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
      • getIdBytes

        public com.google.protobuf.ByteString getIdBytes()
        string id = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getIdBytes in interface WorkflowTemplateOrBuilder
        Returns:
        The bytes for id.
      • getName

        public String getName()
         Output only. The resource name of the workflow template, as described
         in https://cloud.google.com/apis/design/resource_names.
        
         * For `projects.regions.workflowTemplates`, the resource name of the
           template has the following format:
           `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
        
         * For `projects.locations.workflowTemplates`, the resource name of the
           template has the following format:
           `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getName in interface WorkflowTemplateOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Output only. The resource name of the workflow template, as described
         in https://cloud.google.com/apis/design/resource_names.
        
         * For `projects.regions.workflowTemplates`, the resource name of the
           template has the following format:
           `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
        
         * For `projects.locations.workflowTemplates`, the resource name of the
           template has the following format:
           `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getNameBytes in interface WorkflowTemplateOrBuilder
        Returns:
        The bytes for name.
      • getVersion

        public int getVersion()
         Optional. Used to perform a consistent read-modify-write.
        
         This field should be left blank for a `CreateWorkflowTemplate` request. It
         is required for an `UpdateWorkflowTemplate` request, and must match the
         current server version. A typical update template flow would fetch the
         current template with a `GetWorkflowTemplate` request, which will return
         the current template with the `version` field filled in with the
         current server version. The user updates other fields in the template,
         then returns it as part of the `UpdateWorkflowTemplate` request.
         
        int32 version = 3 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getVersion in interface WorkflowTemplateOrBuilder
        Returns:
        The version.
      • hasCreateTime

        public boolean hasCreateTime()
         Output only. The time template was created.
         
        .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasCreateTime in interface WorkflowTemplateOrBuilder
        Returns:
        Whether the createTime field is set.
      • getCreateTime

        public com.google.protobuf.Timestamp getCreateTime()
         Output only. The time template was created.
         
        .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreateTime in interface WorkflowTemplateOrBuilder
        Returns:
        The createTime.
      • getCreateTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
         Output only. The time template was created.
         
        .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreateTimeOrBuilder in interface WorkflowTemplateOrBuilder
      • hasUpdateTime

        public boolean hasUpdateTime()
         Output only. The time template was last updated.
         
        .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasUpdateTime in interface WorkflowTemplateOrBuilder
        Returns:
        Whether the updateTime field is set.
      • getUpdateTime

        public com.google.protobuf.Timestamp getUpdateTime()
         Output only. The time template was last updated.
         
        .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getUpdateTime in interface WorkflowTemplateOrBuilder
        Returns:
        The updateTime.
      • getUpdateTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
         Output only. The time template was last updated.
         
        .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getUpdateTimeOrBuilder in interface WorkflowTemplateOrBuilder
      • getLabelsCount

        public int getLabelsCount()
        Description copied from interface: WorkflowTemplateOrBuilder
         Optional. The labels to associate with this template. These labels
         will be propagated to all jobs and clusters created by the workflow
         instance.
        
         Label **keys** must contain 1 to 63 characters, and must conform to
         [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
        
         Label **values** may be empty, but, if present, must contain 1 to 63
         characters, and must conform to
         [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
        
         No more than 32 labels can be associated with a template.
         
        map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsCount in interface WorkflowTemplateOrBuilder
      • containsLabels

        public boolean containsLabels​(String key)
         Optional. The labels to associate with this template. These labels
         will be propagated to all jobs and clusters created by the workflow
         instance.
        
         Label **keys** must contain 1 to 63 characters, and must conform to
         [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
        
         Label **values** may be empty, but, if present, must contain 1 to 63
         characters, and must conform to
         [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
        
         No more than 32 labels can be associated with a template.
         
        map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        containsLabels in interface WorkflowTemplateOrBuilder
      • getLabelsMap

        public Map<String,​String> getLabelsMap()
         Optional. The labels to associate with this template. These labels
         will be propagated to all jobs and clusters created by the workflow
         instance.
        
         Label **keys** must contain 1 to 63 characters, and must conform to
         [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
        
         Label **values** may be empty, but, if present, must contain 1 to 63
         characters, and must conform to
         [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
        
         No more than 32 labels can be associated with a template.
         
        map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsMap in interface WorkflowTemplateOrBuilder
      • getLabelsOrDefault

        public String getLabelsOrDefault​(String key,
                                         String defaultValue)
         Optional. The labels to associate with this template. These labels
         will be propagated to all jobs and clusters created by the workflow
         instance.
        
         Label **keys** must contain 1 to 63 characters, and must conform to
         [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
        
         Label **values** may be empty, but, if present, must contain 1 to 63
         characters, and must conform to
         [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
        
         No more than 32 labels can be associated with a template.
         
        map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsOrDefault in interface WorkflowTemplateOrBuilder
      • getLabelsOrThrow

        public String getLabelsOrThrow​(String key)
         Optional. The labels to associate with this template. These labels
         will be propagated to all jobs and clusters created by the workflow
         instance.
        
         Label **keys** must contain 1 to 63 characters, and must conform to
         [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
        
         Label **values** may be empty, but, if present, must contain 1 to 63
         characters, and must conform to
         [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
        
         No more than 32 labels can be associated with a template.
         
        map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsOrThrow in interface WorkflowTemplateOrBuilder
      • hasPlacement

        public boolean hasPlacement()
         Required. WorkflowTemplate scheduling information.
         
        .google.cloud.dataproc.v1.WorkflowTemplatePlacement placement = 7 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        hasPlacement in interface WorkflowTemplateOrBuilder
        Returns:
        Whether the placement field is set.
      • getPlacement

        public WorkflowTemplatePlacement getPlacement()
         Required. WorkflowTemplate scheduling information.
         
        .google.cloud.dataproc.v1.WorkflowTemplatePlacement placement = 7 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getPlacement in interface WorkflowTemplateOrBuilder
        Returns:
        The placement.
      • getJobsList

        public List<OrderedJob> getJobsList()
         Required. The Directed Acyclic Graph of Jobs to submit.
         
        repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getJobsList in interface WorkflowTemplateOrBuilder
      • getJobsCount

        public int getJobsCount()
         Required. The Directed Acyclic Graph of Jobs to submit.
         
        repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getJobsCount in interface WorkflowTemplateOrBuilder
      • getJobs

        public OrderedJob getJobs​(int index)
         Required. The Directed Acyclic Graph of Jobs to submit.
         
        repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getJobs in interface WorkflowTemplateOrBuilder
      • getJobsOrBuilder

        public OrderedJobOrBuilder getJobsOrBuilder​(int index)
         Required. The Directed Acyclic Graph of Jobs to submit.
         
        repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getJobsOrBuilder in interface WorkflowTemplateOrBuilder
      • getParametersList

        public List<TemplateParameter> getParametersList()
         Optional. Template parameters whose values are substituted into the
         template. Values for parameters must be provided when the template is
         instantiated.
         
        repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getParametersList in interface WorkflowTemplateOrBuilder
      • getParametersOrBuilderList

        public List<? extends TemplateParameterOrBuilder> getParametersOrBuilderList()
         Optional. Template parameters whose values are substituted into the
         template. Values for parameters must be provided when the template is
         instantiated.
         
        repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getParametersOrBuilderList in interface WorkflowTemplateOrBuilder
      • getParametersCount

        public int getParametersCount()
         Optional. Template parameters whose values are substituted into the
         template. Values for parameters must be provided when the template is
         instantiated.
         
        repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getParametersCount in interface WorkflowTemplateOrBuilder
      • getParameters

        public TemplateParameter getParameters​(int index)
         Optional. Template parameters whose values are substituted into the
         template. Values for parameters must be provided when the template is
         instantiated.
         
        repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getParameters in interface WorkflowTemplateOrBuilder
      • getParametersOrBuilder

        public TemplateParameterOrBuilder getParametersOrBuilder​(int index)
         Optional. Template parameters whose values are substituted into the
         template. Values for parameters must be provided when the template is
         instantiated.
         
        repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getParametersOrBuilder in interface WorkflowTemplateOrBuilder
      • hasDagTimeout

        public boolean hasDagTimeout()
         Optional. Timeout duration for the DAG of jobs, expressed in seconds (see
         [JSON representation of
         duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
         The timeout duration must be from 10 minutes ("600s") to 24 hours
         ("86400s"). The timer begins when the first job is submitted. If the
         workflow is running at the end of the timeout period, any remaining jobs
         are cancelled, the workflow is ended, and if the workflow was running on a
         [managed
         cluster](/dataproc/docs/concepts/workflows/using-workflows#configuring_or_selecting_a_cluster),
         the cluster is deleted.
         
        .google.protobuf.Duration dag_timeout = 10 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        hasDagTimeout in interface WorkflowTemplateOrBuilder
        Returns:
        Whether the dagTimeout field is set.
      • getDagTimeout

        public com.google.protobuf.Duration getDagTimeout()
         Optional. Timeout duration for the DAG of jobs, expressed in seconds (see
         [JSON representation of
         duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
         The timeout duration must be from 10 minutes ("600s") to 24 hours
         ("86400s"). The timer begins when the first job is submitted. If the
         workflow is running at the end of the timeout period, any remaining jobs
         are cancelled, the workflow is ended, and if the workflow was running on a
         [managed
         cluster](/dataproc/docs/concepts/workflows/using-workflows#configuring_or_selecting_a_cluster),
         the cluster is deleted.
         
        .google.protobuf.Duration dag_timeout = 10 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getDagTimeout in interface WorkflowTemplateOrBuilder
        Returns:
        The dagTimeout.
      • getDagTimeoutOrBuilder

        public com.google.protobuf.DurationOrBuilder getDagTimeoutOrBuilder()
         Optional. Timeout duration for the DAG of jobs, expressed in seconds (see
         [JSON representation of
         duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
         The timeout duration must be from 10 minutes ("600s") to 24 hours
         ("86400s"). The timer begins when the first job is submitted. If the
         workflow is running at the end of the timeout period, any remaining jobs
         are cancelled, the workflow is ended, and if the workflow was running on a
         [managed
         cluster](/dataproc/docs/concepts/workflows/using-workflows#configuring_or_selecting_a_cluster),
         the cluster is deleted.
         
        .google.protobuf.Duration dag_timeout = 10 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getDagTimeoutOrBuilder in interface WorkflowTemplateOrBuilder
      • 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 WorkflowTemplate parseFrom​(ByteBuffer data)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

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

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

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

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

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

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

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

        public com.google.protobuf.Parser<WorkflowTemplate> 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 WorkflowTemplate getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder