com.google.api.services.run.v1.model.Container 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.run.v1.model;
/**
* A single application container. This specifies both the container to run, the command to run in
* the container and the arguments to supply to it. Note that additional arguments may be supplied
* by the system to the container at runtime.
*
* 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 Container extends com.google.api.client.json.GenericJson {
/**
* Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable
* references are not supported in Cloud Run.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List args;
/**
* Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is
* not provided. Variable references are not supported in Cloud Run.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List command;
/**
* List of environment variables to set in the container. EnvVar with duplicate names are
* generally allowed; if referencing a secret, the name must be unique for the container. For non-
* secret EnvVar names, the Container will only get the last-declared one.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List env;
/**
* Not supported by Cloud Run.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List envFrom;
/**
* Required. Name of the container image in Dockerhub, Google Artifact Registry, or Google
* Container Registry. If the host is not provided, Dockerhub is assumed.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String image;
/**
* Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is
* specified, or IfNotPresent otherwise.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String imagePullPolicy;
/**
* Periodic probe of container liveness. Container will be restarted if the probe fails.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private Probe livenessProbe;
/**
* Name of the container specified as a DNS_LABEL (RFC 1123).
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/**
* List of ports to expose from the container. Only a single port can be specified. The specified
* ports must be listening on all interfaces (0.0.0.0) within the container to be accessible. If
* omitted, a port number will be chosen and passed to the container through the PORT environment
* variable for the container to listen on.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List ports;
/**
* Not supported by Cloud Run.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private Probe readinessProbe;
/**
* Compute Resources required by this container.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private ResourceRequirements resources;
/**
* Not supported by Cloud Run.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private SecurityContext securityContext;
/**
* Startup probe of application within the container. All other probes are disabled if a startup
* probe is provided, until it succeeds. Container will not receive traffic if the probe fails. If
* not provided, a default startup probe with TCP socket action is used.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private Probe startupProbe;
/**
* Path at which the file to which the container's termination message will be written is mounted
* into the container's filesystem. Message written is intended to be brief final status, such as
* an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The
* total message length across all containers will be limited to 12kb. Defaults to
* /dev/termination-log.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String terminationMessagePath;
/**
* Indicate how the termination message should be populated. File will use the contents of
* terminationMessagePath to populate the container status message on both success and failure.
* FallbackToLogsOnError will use the last chunk of container log output if the termination
* message file is empty and the container exited with an error. The log output is limited to 2048
* bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String terminationMessagePolicy;
/**
* Volume to mount into the container's filesystem. Only supports SecretVolumeSources. Pod volumes
* to mount into the container's filesystem.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List volumeMounts;
/**
* Container's working directory. If not specified, the container runtime's default will be used,
* which might be configured in the container image.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String workingDir;
/**
* Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable
* references are not supported in Cloud Run.
* @return value or {@code null} for none
*/
public java.util.List getArgs() {
return args;
}
/**
* Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable
* references are not supported in Cloud Run.
* @param args args or {@code null} for none
*/
public Container setArgs(java.util.List args) {
this.args = args;
return this;
}
/**
* Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is
* not provided. Variable references are not supported in Cloud Run.
* @return value or {@code null} for none
*/
public java.util.List getCommand() {
return command;
}
/**
* Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is
* not provided. Variable references are not supported in Cloud Run.
* @param command command or {@code null} for none
*/
public Container setCommand(java.util.List command) {
this.command = command;
return this;
}
/**
* List of environment variables to set in the container. EnvVar with duplicate names are
* generally allowed; if referencing a secret, the name must be unique for the container. For non-
* secret EnvVar names, the Container will only get the last-declared one.
* @return value or {@code null} for none
*/
public java.util.List getEnv() {
return env;
}
/**
* List of environment variables to set in the container. EnvVar with duplicate names are
* generally allowed; if referencing a secret, the name must be unique for the container. For non-
* secret EnvVar names, the Container will only get the last-declared one.
* @param env env or {@code null} for none
*/
public Container setEnv(java.util.List env) {
this.env = env;
return this;
}
/**
* Not supported by Cloud Run.
* @return value or {@code null} for none
*/
public java.util.List getEnvFrom() {
return envFrom;
}
/**
* Not supported by Cloud Run.
* @param envFrom envFrom or {@code null} for none
*/
public Container setEnvFrom(java.util.List envFrom) {
this.envFrom = envFrom;
return this;
}
/**
* Required. Name of the container image in Dockerhub, Google Artifact Registry, or Google
* Container Registry. If the host is not provided, Dockerhub is assumed.
* @return value or {@code null} for none
*/
public java.lang.String getImage() {
return image;
}
/**
* Required. Name of the container image in Dockerhub, Google Artifact Registry, or Google
* Container Registry. If the host is not provided, Dockerhub is assumed.
* @param image image or {@code null} for none
*/
public Container setImage(java.lang.String image) {
this.image = image;
return this;
}
/**
* Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is
* specified, or IfNotPresent otherwise.
* @return value or {@code null} for none
*/
public java.lang.String getImagePullPolicy() {
return imagePullPolicy;
}
/**
* Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is
* specified, or IfNotPresent otherwise.
* @param imagePullPolicy imagePullPolicy or {@code null} for none
*/
public Container setImagePullPolicy(java.lang.String imagePullPolicy) {
this.imagePullPolicy = imagePullPolicy;
return this;
}
/**
* Periodic probe of container liveness. Container will be restarted if the probe fails.
* @return value or {@code null} for none
*/
public Probe getLivenessProbe() {
return livenessProbe;
}
/**
* Periodic probe of container liveness. Container will be restarted if the probe fails.
* @param livenessProbe livenessProbe or {@code null} for none
*/
public Container setLivenessProbe(Probe livenessProbe) {
this.livenessProbe = livenessProbe;
return this;
}
/**
* Name of the container specified as a DNS_LABEL (RFC 1123).
* @return value or {@code null} for none
*/
public java.lang.String getName() {
return name;
}
/**
* Name of the container specified as a DNS_LABEL (RFC 1123).
* @param name name or {@code null} for none
*/
public Container setName(java.lang.String name) {
this.name = name;
return this;
}
/**
* List of ports to expose from the container. Only a single port can be specified. The specified
* ports must be listening on all interfaces (0.0.0.0) within the container to be accessible. If
* omitted, a port number will be chosen and passed to the container through the PORT environment
* variable for the container to listen on.
* @return value or {@code null} for none
*/
public java.util.List getPorts() {
return ports;
}
/**
* List of ports to expose from the container. Only a single port can be specified. The specified
* ports must be listening on all interfaces (0.0.0.0) within the container to be accessible. If
* omitted, a port number will be chosen and passed to the container through the PORT environment
* variable for the container to listen on.
* @param ports ports or {@code null} for none
*/
public Container setPorts(java.util.List ports) {
this.ports = ports;
return this;
}
/**
* Not supported by Cloud Run.
* @return value or {@code null} for none
*/
public Probe getReadinessProbe() {
return readinessProbe;
}
/**
* Not supported by Cloud Run.
* @param readinessProbe readinessProbe or {@code null} for none
*/
public Container setReadinessProbe(Probe readinessProbe) {
this.readinessProbe = readinessProbe;
return this;
}
/**
* Compute Resources required by this container.
* @return value or {@code null} for none
*/
public ResourceRequirements getResources() {
return resources;
}
/**
* Compute Resources required by this container.
* @param resources resources or {@code null} for none
*/
public Container setResources(ResourceRequirements resources) {
this.resources = resources;
return this;
}
/**
* Not supported by Cloud Run.
* @return value or {@code null} for none
*/
public SecurityContext getSecurityContext() {
return securityContext;
}
/**
* Not supported by Cloud Run.
* @param securityContext securityContext or {@code null} for none
*/
public Container setSecurityContext(SecurityContext securityContext) {
this.securityContext = securityContext;
return this;
}
/**
* Startup probe of application within the container. All other probes are disabled if a startup
* probe is provided, until it succeeds. Container will not receive traffic if the probe fails. If
* not provided, a default startup probe with TCP socket action is used.
* @return value or {@code null} for none
*/
public Probe getStartupProbe() {
return startupProbe;
}
/**
* Startup probe of application within the container. All other probes are disabled if a startup
* probe is provided, until it succeeds. Container will not receive traffic if the probe fails. If
* not provided, a default startup probe with TCP socket action is used.
* @param startupProbe startupProbe or {@code null} for none
*/
public Container setStartupProbe(Probe startupProbe) {
this.startupProbe = startupProbe;
return this;
}
/**
* Path at which the file to which the container's termination message will be written is mounted
* into the container's filesystem. Message written is intended to be brief final status, such as
* an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The
* total message length across all containers will be limited to 12kb. Defaults to
* /dev/termination-log.
* @return value or {@code null} for none
*/
public java.lang.String getTerminationMessagePath() {
return terminationMessagePath;
}
/**
* Path at which the file to which the container's termination message will be written is mounted
* into the container's filesystem. Message written is intended to be brief final status, such as
* an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The
* total message length across all containers will be limited to 12kb. Defaults to
* /dev/termination-log.
* @param terminationMessagePath terminationMessagePath or {@code null} for none
*/
public Container setTerminationMessagePath(java.lang.String terminationMessagePath) {
this.terminationMessagePath = terminationMessagePath;
return this;
}
/**
* Indicate how the termination message should be populated. File will use the contents of
* terminationMessagePath to populate the container status message on both success and failure.
* FallbackToLogsOnError will use the last chunk of container log output if the termination
* message file is empty and the container exited with an error. The log output is limited to 2048
* bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.
* @return value or {@code null} for none
*/
public java.lang.String getTerminationMessagePolicy() {
return terminationMessagePolicy;
}
/**
* Indicate how the termination message should be populated. File will use the contents of
* terminationMessagePath to populate the container status message on both success and failure.
* FallbackToLogsOnError will use the last chunk of container log output if the termination
* message file is empty and the container exited with an error. The log output is limited to 2048
* bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.
* @param terminationMessagePolicy terminationMessagePolicy or {@code null} for none
*/
public Container setTerminationMessagePolicy(java.lang.String terminationMessagePolicy) {
this.terminationMessagePolicy = terminationMessagePolicy;
return this;
}
/**
* Volume to mount into the container's filesystem. Only supports SecretVolumeSources. Pod volumes
* to mount into the container's filesystem.
* @return value or {@code null} for none
*/
public java.util.List getVolumeMounts() {
return volumeMounts;
}
/**
* Volume to mount into the container's filesystem. Only supports SecretVolumeSources. Pod volumes
* to mount into the container's filesystem.
* @param volumeMounts volumeMounts or {@code null} for none
*/
public Container setVolumeMounts(java.util.List volumeMounts) {
this.volumeMounts = volumeMounts;
return this;
}
/**
* Container's working directory. If not specified, the container runtime's default will be used,
* which might be configured in the container image.
* @return value or {@code null} for none
*/
public java.lang.String getWorkingDir() {
return workingDir;
}
/**
* Container's working directory. If not specified, the container runtime's default will be used,
* which might be configured in the container image.
* @param workingDir workingDir or {@code null} for none
*/
public Container setWorkingDir(java.lang.String workingDir) {
this.workingDir = workingDir;
return this;
}
@Override
public Container set(String fieldName, Object value) {
return (Container) super.set(fieldName, value);
}
@Override
public Container clone() {
return (Container) super.clone();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy