com.google.api.services.batch.v1.model.Job 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.batch.v1.model;
/**
* The Cloud Batch Job description.
*
* 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 Batch 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 Job extends com.google.api.client.json.GenericJson {
/**
* Compute resource allocation for all TaskGroups in the Job.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private AllocationPolicy allocationPolicy;
/**
* Output only. When the Job was created.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private String createTime;
/**
* Custom labels to apply to the job and any Cloud Logging
* [LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry) that it
* generates. Use labels to group and describe the resources they are applied to. Batch
* automatically applies predefined labels and supports multiple `labels` fields for each job,
* which each let you apply custom labels to various resources. Label names that start with
* "goog-" or "google-" are reserved for predefined labels. For more information about labels with
* Batch, see [Organize resources using labels](https://cloud.google.com/batch/docs/organize-
* resources-using-labels).
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.Map labels;
/**
* Log preservation policy for the Job.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private LogsPolicy logsPolicy;
/**
* Output only. Job name. For example: "projects/123456/locations/us-central1/jobs/job01".
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/**
* Notification configurations.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List notifications;
/**
* Priority of the Job. The valid value range is [0, 100). Default value is 0. Higher value
* indicates higher priority. A job with higher priority value is more likely to run earlier if
* all other requirements are satisfied.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key @com.google.api.client.json.JsonString
private java.lang.Long priority;
/**
* Output only. Job status. It is read only for users.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private JobStatus status;
/**
* Required. TaskGroups in the Job. Only one TaskGroup is supported now.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List taskGroups;
/**
* Output only. A system generated unique ID for the Job.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String uid;
/**
* Output only. The last time the Job was updated.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private String updateTime;
/**
* Compute resource allocation for all TaskGroups in the Job.
* @return value or {@code null} for none
*/
public AllocationPolicy getAllocationPolicy() {
return allocationPolicy;
}
/**
* Compute resource allocation for all TaskGroups in the Job.
* @param allocationPolicy allocationPolicy or {@code null} for none
*/
public Job setAllocationPolicy(AllocationPolicy allocationPolicy) {
this.allocationPolicy = allocationPolicy;
return this;
}
/**
* Output only. When the Job was created.
* @return value or {@code null} for none
*/
public String getCreateTime() {
return createTime;
}
/**
* Output only. When the Job was created.
* @param createTime createTime or {@code null} for none
*/
public Job setCreateTime(String createTime) {
this.createTime = createTime;
return this;
}
/**
* Custom labels to apply to the job and any Cloud Logging
* [LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry) that it
* generates. Use labels to group and describe the resources they are applied to. Batch
* automatically applies predefined labels and supports multiple `labels` fields for each job,
* which each let you apply custom labels to various resources. Label names that start with
* "goog-" or "google-" are reserved for predefined labels. For more information about labels with
* Batch, see [Organize resources using labels](https://cloud.google.com/batch/docs/organize-
* resources-using-labels).
* @return value or {@code null} for none
*/
public java.util.Map getLabels() {
return labels;
}
/**
* Custom labels to apply to the job and any Cloud Logging
* [LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry) that it
* generates. Use labels to group and describe the resources they are applied to. Batch
* automatically applies predefined labels and supports multiple `labels` fields for each job,
* which each let you apply custom labels to various resources. Label names that start with
* "goog-" or "google-" are reserved for predefined labels. For more information about labels with
* Batch, see [Organize resources using labels](https://cloud.google.com/batch/docs/organize-
* resources-using-labels).
* @param labels labels or {@code null} for none
*/
public Job setLabels(java.util.Map labels) {
this.labels = labels;
return this;
}
/**
* Log preservation policy for the Job.
* @return value or {@code null} for none
*/
public LogsPolicy getLogsPolicy() {
return logsPolicy;
}
/**
* Log preservation policy for the Job.
* @param logsPolicy logsPolicy or {@code null} for none
*/
public Job setLogsPolicy(LogsPolicy logsPolicy) {
this.logsPolicy = logsPolicy;
return this;
}
/**
* Output only. Job name. For example: "projects/123456/locations/us-central1/jobs/job01".
* @return value or {@code null} for none
*/
public java.lang.String getName() {
return name;
}
/**
* Output only. Job name. For example: "projects/123456/locations/us-central1/jobs/job01".
* @param name name or {@code null} for none
*/
public Job setName(java.lang.String name) {
this.name = name;
return this;
}
/**
* Notification configurations.
* @return value or {@code null} for none
*/
public java.util.List getNotifications() {
return notifications;
}
/**
* Notification configurations.
* @param notifications notifications or {@code null} for none
*/
public Job setNotifications(java.util.List notifications) {
this.notifications = notifications;
return this;
}
/**
* Priority of the Job. The valid value range is [0, 100). Default value is 0. Higher value
* indicates higher priority. A job with higher priority value is more likely to run earlier if
* all other requirements are satisfied.
* @return value or {@code null} for none
*/
public java.lang.Long getPriority() {
return priority;
}
/**
* Priority of the Job. The valid value range is [0, 100). Default value is 0. Higher value
* indicates higher priority. A job with higher priority value is more likely to run earlier if
* all other requirements are satisfied.
* @param priority priority or {@code null} for none
*/
public Job setPriority(java.lang.Long priority) {
this.priority = priority;
return this;
}
/**
* Output only. Job status. It is read only for users.
* @return value or {@code null} for none
*/
public JobStatus getStatus() {
return status;
}
/**
* Output only. Job status. It is read only for users.
* @param status status or {@code null} for none
*/
public Job setStatus(JobStatus status) {
this.status = status;
return this;
}
/**
* Required. TaskGroups in the Job. Only one TaskGroup is supported now.
* @return value or {@code null} for none
*/
public java.util.List getTaskGroups() {
return taskGroups;
}
/**
* Required. TaskGroups in the Job. Only one TaskGroup is supported now.
* @param taskGroups taskGroups or {@code null} for none
*/
public Job setTaskGroups(java.util.List taskGroups) {
this.taskGroups = taskGroups;
return this;
}
/**
* Output only. A system generated unique ID for the Job.
* @return value or {@code null} for none
*/
public java.lang.String getUid() {
return uid;
}
/**
* Output only. A system generated unique ID for the Job.
* @param uid uid or {@code null} for none
*/
public Job setUid(java.lang.String uid) {
this.uid = uid;
return this;
}
/**
* Output only. The last time the Job was updated.
* @return value or {@code null} for none
*/
public String getUpdateTime() {
return updateTime;
}
/**
* Output only. The last time the Job was updated.
* @param updateTime updateTime or {@code null} for none
*/
public Job setUpdateTime(String updateTime) {
this.updateTime = updateTime;
return this;
}
@Override
public Job set(String fieldName, Object value) {
return (Job) super.set(fieldName, value);
}
@Override
public Job clone() {
return (Job) super.clone();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy