All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.api.services.run.v2.model.GoogleCloudRunV2TaskTemplate Maven / Gradle / Ivy

There is a newer version: v2-rev20241213-2.0.0
Show newest version
/*
 * 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.run.v2.model;

/**
 * TaskTemplate describes the data a task should have when created from a template.
 *
 * 

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 Run Admin 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 GoogleCloudRunV2TaskTemplate extends com.google.api.client.json.GenericJson { /** * Holds the single container that defines the unit of execution for this task. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.List containers; static { // hack to force ProGuard to consider GoogleCloudRunV2Container 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(GoogleCloudRunV2Container.class); } /** * A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. * For more information, go to https://cloud.google.com/run/docs/securing/using-cmek * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String encryptionKey; /** * Optional. The execution environment being used to host this Task. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String executionEnvironment; /** * Number of retries allowed per Task, before marking this Task failed. Defaults to 3. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.Integer maxRetries; /** * Optional. Email address of the IAM service account associated with the Task of a Job. The * service account represents the identity of the running task, and determines what permissions * the task has. If not provided, the task will use the project's default service account. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String serviceAccount; /** * Optional. Max allowed time duration the Task may be active before the system will actively try * to mark it failed and kill associated containers. This applies per attempt of a task, meaning * each retry can run for the full timeout. Defaults to 600 seconds. * The value may be {@code null}. */ @com.google.api.client.util.Key private String timeout; /** * Optional. A list of Volumes to make available to containers. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.List volumes; /** * Optional. VPC Access configuration to use for this Task. For more information, visit * https://cloud.google.com/run/docs/configuring/connecting-vpc. * The value may be {@code null}. */ @com.google.api.client.util.Key private GoogleCloudRunV2VpcAccess vpcAccess; /** * Holds the single container that defines the unit of execution for this task. * @return value or {@code null} for none */ public java.util.List getContainers() { return containers; } /** * Holds the single container that defines the unit of execution for this task. * @param containers containers or {@code null} for none */ public GoogleCloudRunV2TaskTemplate setContainers(java.util.List containers) { this.containers = containers; return this; } /** * A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. * For more information, go to https://cloud.google.com/run/docs/securing/using-cmek * @return value or {@code null} for none */ public java.lang.String getEncryptionKey() { return encryptionKey; } /** * A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. * For more information, go to https://cloud.google.com/run/docs/securing/using-cmek * @param encryptionKey encryptionKey or {@code null} for none */ public GoogleCloudRunV2TaskTemplate setEncryptionKey(java.lang.String encryptionKey) { this.encryptionKey = encryptionKey; return this; } /** * Optional. The execution environment being used to host this Task. * @return value or {@code null} for none */ public java.lang.String getExecutionEnvironment() { return executionEnvironment; } /** * Optional. The execution environment being used to host this Task. * @param executionEnvironment executionEnvironment or {@code null} for none */ public GoogleCloudRunV2TaskTemplate setExecutionEnvironment(java.lang.String executionEnvironment) { this.executionEnvironment = executionEnvironment; return this; } /** * Number of retries allowed per Task, before marking this Task failed. Defaults to 3. * @return value or {@code null} for none */ public java.lang.Integer getMaxRetries() { return maxRetries; } /** * Number of retries allowed per Task, before marking this Task failed. Defaults to 3. * @param maxRetries maxRetries or {@code null} for none */ public GoogleCloudRunV2TaskTemplate setMaxRetries(java.lang.Integer maxRetries) { this.maxRetries = maxRetries; return this; } /** * Optional. Email address of the IAM service account associated with the Task of a Job. The * service account represents the identity of the running task, and determines what permissions * the task has. If not provided, the task will use the project's default service account. * @return value or {@code null} for none */ public java.lang.String getServiceAccount() { return serviceAccount; } /** * Optional. Email address of the IAM service account associated with the Task of a Job. The * service account represents the identity of the running task, and determines what permissions * the task has. If not provided, the task will use the project's default service account. * @param serviceAccount serviceAccount or {@code null} for none */ public GoogleCloudRunV2TaskTemplate setServiceAccount(java.lang.String serviceAccount) { this.serviceAccount = serviceAccount; return this; } /** * Optional. Max allowed time duration the Task may be active before the system will actively try * to mark it failed and kill associated containers. This applies per attempt of a task, meaning * each retry can run for the full timeout. Defaults to 600 seconds. * @return value or {@code null} for none */ public String getTimeout() { return timeout; } /** * Optional. Max allowed time duration the Task may be active before the system will actively try * to mark it failed and kill associated containers. This applies per attempt of a task, meaning * each retry can run for the full timeout. Defaults to 600 seconds. * @param timeout timeout or {@code null} for none */ public GoogleCloudRunV2TaskTemplate setTimeout(String timeout) { this.timeout = timeout; return this; } /** * Optional. A list of Volumes to make available to containers. * @return value or {@code null} for none */ public java.util.List getVolumes() { return volumes; } /** * Optional. A list of Volumes to make available to containers. * @param volumes volumes or {@code null} for none */ public GoogleCloudRunV2TaskTemplate setVolumes(java.util.List volumes) { this.volumes = volumes; return this; } /** * Optional. VPC Access configuration to use for this Task. For more information, visit * https://cloud.google.com/run/docs/configuring/connecting-vpc. * @return value or {@code null} for none */ public GoogleCloudRunV2VpcAccess getVpcAccess() { return vpcAccess; } /** * Optional. VPC Access configuration to use for this Task. For more information, visit * https://cloud.google.com/run/docs/configuring/connecting-vpc. * @param vpcAccess vpcAccess or {@code null} for none */ public GoogleCloudRunV2TaskTemplate setVpcAccess(GoogleCloudRunV2VpcAccess vpcAccess) { this.vpcAccess = vpcAccess; return this; } @Override public GoogleCloudRunV2TaskTemplate set(String fieldName, Object value) { return (GoogleCloudRunV2TaskTemplate) super.set(fieldName, value); } @Override public GoogleCloudRunV2TaskTemplate clone() { return (GoogleCloudRunV2TaskTemplate) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy