com.google.api.services.cloudbuild.v2.model.PipelineTask Maven / Gradle / Ivy
/*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
/*
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
* Modify at your own risk.
*/
package com.google.api.services.cloudbuild.v2.model;
/**
* PipelineTask defines a task in a Pipeline.
*
* This is the Java data model class that specifies how to parse/serialize into the JSON that is
* transmitted over HTTP when working with the Cloud Build API. For a detailed explanation see:
* https://developers.google.com/api-client-library/java/google-http-java-client/json
*
*
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public final class PipelineTask extends com.google.api.client.json.GenericJson {
/**
* Name of the task.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/**
* Params is a list of parameter names and values.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List params;
static {
// hack to force ProGuard to consider Param used, since otherwise it would be stripped out
// see https://github.com/google/google-api-java-client/issues/543
com.google.api.client.util.Data.nullOf(Param.class);
}
/**
* Retries represents how many times this task should be retried in case of task failure.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Integer retries;
/**
* RunAfter is the list of PipelineTask names that should be executed before this Task executes.
* (Used to force a specific ordering in graph execution.)
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List runAfter;
/**
* Reference to a specific instance of a task.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private TaskRef taskRef;
/**
* Spec to instantiate this TaskRun.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private EmbeddedTask taskSpec;
/**
* Time after which the TaskRun times out. Defaults to 1 hour. Specified TaskRun timeout should be
* less than 24h.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private String timeout;
/**
* Conditions that need to be true for the task to run.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List whenExpressions;
/**
* Workspaces maps workspaces from the pipeline spec to the workspaces declared in the Task.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List workspaces;
/**
* Name of the task.
* @return value or {@code null} for none
*/
public java.lang.String getName() {
return name;
}
/**
* Name of the task.
* @param name name or {@code null} for none
*/
public PipelineTask setName(java.lang.String name) {
this.name = name;
return this;
}
/**
* Params is a list of parameter names and values.
* @return value or {@code null} for none
*/
public java.util.List getParams() {
return params;
}
/**
* Params is a list of parameter names and values.
* @param params params or {@code null} for none
*/
public PipelineTask setParams(java.util.List params) {
this.params = params;
return this;
}
/**
* Retries represents how many times this task should be retried in case of task failure.
* @return value or {@code null} for none
*/
public java.lang.Integer getRetries() {
return retries;
}
/**
* Retries represents how many times this task should be retried in case of task failure.
* @param retries retries or {@code null} for none
*/
public PipelineTask setRetries(java.lang.Integer retries) {
this.retries = retries;
return this;
}
/**
* RunAfter is the list of PipelineTask names that should be executed before this Task executes.
* (Used to force a specific ordering in graph execution.)
* @return value or {@code null} for none
*/
public java.util.List getRunAfter() {
return runAfter;
}
/**
* RunAfter is the list of PipelineTask names that should be executed before this Task executes.
* (Used to force a specific ordering in graph execution.)
* @param runAfter runAfter or {@code null} for none
*/
public PipelineTask setRunAfter(java.util.List runAfter) {
this.runAfter = runAfter;
return this;
}
/**
* Reference to a specific instance of a task.
* @return value or {@code null} for none
*/
public TaskRef getTaskRef() {
return taskRef;
}
/**
* Reference to a specific instance of a task.
* @param taskRef taskRef or {@code null} for none
*/
public PipelineTask setTaskRef(TaskRef taskRef) {
this.taskRef = taskRef;
return this;
}
/**
* Spec to instantiate this TaskRun.
* @return value or {@code null} for none
*/
public EmbeddedTask getTaskSpec() {
return taskSpec;
}
/**
* Spec to instantiate this TaskRun.
* @param taskSpec taskSpec or {@code null} for none
*/
public PipelineTask setTaskSpec(EmbeddedTask taskSpec) {
this.taskSpec = taskSpec;
return this;
}
/**
* Time after which the TaskRun times out. Defaults to 1 hour. Specified TaskRun timeout should be
* less than 24h.
* @return value or {@code null} for none
*/
public String getTimeout() {
return timeout;
}
/**
* Time after which the TaskRun times out. Defaults to 1 hour. Specified TaskRun timeout should be
* less than 24h.
* @param timeout timeout or {@code null} for none
*/
public PipelineTask setTimeout(String timeout) {
this.timeout = timeout;
return this;
}
/**
* Conditions that need to be true for the task to run.
* @return value or {@code null} for none
*/
public java.util.List getWhenExpressions() {
return whenExpressions;
}
/**
* Conditions that need to be true for the task to run.
* @param whenExpressions whenExpressions or {@code null} for none
*/
public PipelineTask setWhenExpressions(java.util.List whenExpressions) {
this.whenExpressions = whenExpressions;
return this;
}
/**
* Workspaces maps workspaces from the pipeline spec to the workspaces declared in the Task.
* @return value or {@code null} for none
*/
public java.util.List getWorkspaces() {
return workspaces;
}
/**
* Workspaces maps workspaces from the pipeline spec to the workspaces declared in the Task.
* @param workspaces workspaces or {@code null} for none
*/
public PipelineTask setWorkspaces(java.util.List workspaces) {
this.workspaces = workspaces;
return this;
}
@Override
public PipelineTask set(String fieldName, Object value) {
return (PipelineTask) super.set(fieldName, value);
}
@Override
public PipelineTask clone() {
return (PipelineTask) super.clone();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy