com.google.api.services.run.v1alpha1.model.Container Maven / Gradle / Ivy
/*
* Copyright 2010 Google Inc.
*
* 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://code.google.com/p/google-apis-client-generator/
* (build: 2018-10-08 17:45:39 UTC)
* on 2019-11-08 at 00:46:02 UTC
* Modify at your own risk.
*/
package com.google.api.services.run.v1alpha1.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 API. For a detailed explanation see:
* http://code.google.com/p/google-http-java-client/wiki/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 $(VAR_NAME) are expanded using the container's environment. If a variable cannot be
* resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be
* escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
* regardless of whether the variable exists or not. Cannot be updated. More info:
* https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-
* container/#running-a-command-in-a-shell +optional
* 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 $(VAR_NAME) are expanded using the container's environment.
* If a variable cannot be resolved, the reference in the input string will be unchanged. The
* $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will
* never be expanded, regardless of whether the variable exists or not. Cannot be updated. More
* info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-
* container/#running-a-command-in-a-shell +optional
* 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. Cannot be updated. +optional
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List env;
static {
// hack to force ProGuard to consider EnvVar used, since otherwise it would be stripped out
// see http://code.google.com/p/google-api-java-client/issues/detail?id=528
com.google.api.client.util.Data.nullOf(EnvVar.class);
}
/**
* List of sources to populate environment variables in the container. The keys defined within a
* source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container
* is starting. When a key exists in multiple sources, the value associated with the last source
* will take precedence. Values defined by an Env with a duplicate key will take precedence.
* Cannot be updated. +optional
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List envFrom;
/**
* Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images
* 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. Cannot be updated. More info:
* https://kubernetes.io/docs/concepts/containers/images#updating-images +optional
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String imagePullPolicy;
/**
* Actions that the management system should take in response to container lifecycle events.
* Cannot be updated. +optional
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private Lifecycle lifecycle;
/**
* Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be
* updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-
* probes +optional
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private Probe livenessProbe;
/**
* Name of the container specified as a DNS_LABEL. Each container must have a unique name
* (DNS_LABEL). Cannot be updated.
* 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. Exposing a port here gives the system additional
* information about the network connections a container uses, but is primarily informational. Not
* specifying a port here DOES NOT prevent that port from being exposed. Any port which is
* listening on the default "0.0.0.0" address inside a container will be accessible from the
* network. Cannot be updated. +optional
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List ports;
/**
* Periodic probe of container service readiness. Container will be removed from service endpoints
* if the probe fails. Cannot be updated. More info:
* https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes +optional
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private Probe readinessProbe;
/**
* Compute Resources required by this container. Cannot be updated. More info:
* https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources +optional
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private ResourceRequirements resources;
/**
* Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy
* /security-context/ More info: https://kubernetes.io/docs/tasks/configure-pod-container
* /security-context/ +optional
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private SecurityContext securityContext;
/**
* Whether this container should allocate a buffer for stdin in the container runtime. If this is
* not set, reads from stdin in the container will always result in EOF. Default is false.
* +optional
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Boolean stdin;
/**
* Whether the container runtime should close the stdin channel after it has been opened by a
* single attach. When stdin is true the stdin stream will remain open across multiple attach
* sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the
* first client attaches to stdin, and then remains open and accepts data until the client
* disconnects, at which time stdin is closed and remains closed until the container is restarted.
* If this flag is false, a container processes that reads from stdin will never receive an EOF.
* Default is false +optional
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Boolean stdinOnce;
/**
* Optional: 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. Cannot be updated. +optional
* 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. +optional
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String terminationMessagePolicy;
/**
* Whether this container should allocate a TTY for itself, also requires 'stdin' to be true.
* Default is false. +optional
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Boolean tty;
/**
* volumeDevices is the list of block devices to be used by the container. This is an alpha
* feature and may change in the future. +optional
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List volumeDevices;
static {
// hack to force ProGuard to consider VolumeDevice used, since otherwise it would be stripped out
// see http://code.google.com/p/google-api-java-client/issues/detail?id=528
com.google.api.client.util.Data.nullOf(VolumeDevice.class);
}
/**
* Pod volumes to mount into the container's filesystem. Cannot be updated. +optional
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List volumeMounts;
static {
// hack to force ProGuard to consider VolumeMount used, since otherwise it would be stripped out
// see http://code.google.com/p/google-api-java-client/issues/detail?id=528
com.google.api.client.util.Data.nullOf(VolumeMount.class);
}
/**
* Container's working directory. If not specified, the container runtime's default will be used,
* which might be configured in the container image. Cannot be updated. +optional
* 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 $(VAR_NAME) are expanded using the container's environment. If a variable cannot be
* resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be
* escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
* regardless of whether the variable exists or not. Cannot be updated. More info:
* https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-
* container/#running-a-command-in-a-shell +optional
* @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 $(VAR_NAME) are expanded using the container's environment. If a variable cannot be
* resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be
* escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
* regardless of whether the variable exists or not. Cannot be updated. More info:
* https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-
* container/#running-a-command-in-a-shell +optional
* @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 $(VAR_NAME) are expanded using the container's environment.
* If a variable cannot be resolved, the reference in the input string will be unchanged. The
* $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will
* never be expanded, regardless of whether the variable exists or not. Cannot be updated. More
* info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-
* container/#running-a-command-in-a-shell +optional
* @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 $(VAR_NAME) are expanded using the container's environment.
* If a variable cannot be resolved, the reference in the input string will be unchanged. The
* $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will
* never be expanded, regardless of whether the variable exists or not. Cannot be updated. More
* info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-
* container/#running-a-command-in-a-shell +optional
* @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. Cannot be updated. +optional
* @return value or {@code null} for none
*/
public java.util.List getEnv() {
return env;
}
/**
* List of environment variables to set in the container. Cannot be updated. +optional
* @param env env or {@code null} for none
*/
public Container setEnv(java.util.List env) {
this.env = env;
return this;
}
/**
* List of sources to populate environment variables in the container. The keys defined within a
* source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container
* is starting. When a key exists in multiple sources, the value associated with the last source
* will take precedence. Values defined by an Env with a duplicate key will take precedence.
* Cannot be updated. +optional
* @return value or {@code null} for none
*/
public java.util.List getEnvFrom() {
return envFrom;
}
/**
* List of sources to populate environment variables in the container. The keys defined within a
* source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container
* is starting. When a key exists in multiple sources, the value associated with the last source
* will take precedence. Values defined by an Env with a duplicate key will take precedence.
* Cannot be updated. +optional
* @param envFrom envFrom or {@code null} for none
*/
public Container setEnvFrom(java.util.List envFrom) {
this.envFrom = envFrom;
return this;
}
/**
* Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images
* @return value or {@code null} for none
*/
public java.lang.String getImage() {
return image;
}
/**
* Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images
* @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. Cannot be updated. More info:
* https://kubernetes.io/docs/concepts/containers/images#updating-images +optional
* @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. Cannot be updated. More info:
* https://kubernetes.io/docs/concepts/containers/images#updating-images +optional
* @param imagePullPolicy imagePullPolicy or {@code null} for none
*/
public Container setImagePullPolicy(java.lang.String imagePullPolicy) {
this.imagePullPolicy = imagePullPolicy;
return this;
}
/**
* Actions that the management system should take in response to container lifecycle events.
* Cannot be updated. +optional
* @return value or {@code null} for none
*/
public Lifecycle getLifecycle() {
return lifecycle;
}
/**
* Actions that the management system should take in response to container lifecycle events.
* Cannot be updated. +optional
* @param lifecycle lifecycle or {@code null} for none
*/
public Container setLifecycle(Lifecycle lifecycle) {
this.lifecycle = lifecycle;
return this;
}
/**
* Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be
* updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-
* probes +optional
* @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. Cannot be
* updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-
* probes +optional
* @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. Each container must have a unique name
* (DNS_LABEL). Cannot be updated.
* @return value or {@code null} for none
*/
public java.lang.String getName() {
return name;
}
/**
* Name of the container specified as a DNS_LABEL. Each container must have a unique name
* (DNS_LABEL). Cannot be updated.
* @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. Exposing a port here gives the system additional
* information about the network connections a container uses, but is primarily informational. Not
* specifying a port here DOES NOT prevent that port from being exposed. Any port which is
* listening on the default "0.0.0.0" address inside a container will be accessible from the
* network. Cannot be updated. +optional
* @return value or {@code null} for none
*/
public java.util.List getPorts() {
return ports;
}
/**
* List of ports to expose from the container. Exposing a port here gives the system additional
* information about the network connections a container uses, but is primarily informational. Not
* specifying a port here DOES NOT prevent that port from being exposed. Any port which is
* listening on the default "0.0.0.0" address inside a container will be accessible from the
* network. Cannot be updated. +optional
* @param ports ports or {@code null} for none
*/
public Container setPorts(java.util.List ports) {
this.ports = ports;
return this;
}
/**
* Periodic probe of container service readiness. Container will be removed from service endpoints
* if the probe fails. Cannot be updated. More info:
* https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes +optional
* @return value or {@code null} for none
*/
public Probe getReadinessProbe() {
return readinessProbe;
}
/**
* Periodic probe of container service readiness. Container will be removed from service endpoints
* if the probe fails. Cannot be updated. More info:
* https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes +optional
* @param readinessProbe readinessProbe or {@code null} for none
*/
public Container setReadinessProbe(Probe readinessProbe) {
this.readinessProbe = readinessProbe;
return this;
}
/**
* Compute Resources required by this container. Cannot be updated. More info:
* https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources +optional
* @return value or {@code null} for none
*/
public ResourceRequirements getResources() {
return resources;
}
/**
* Compute Resources required by this container. Cannot be updated. More info:
* https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources +optional
* @param resources resources or {@code null} for none
*/
public Container setResources(ResourceRequirements resources) {
this.resources = resources;
return this;
}
/**
* Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy
* /security-context/ More info: https://kubernetes.io/docs/tasks/configure-pod-container
* /security-context/ +optional
* @return value or {@code null} for none
*/
public SecurityContext getSecurityContext() {
return securityContext;
}
/**
* Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy
* /security-context/ More info: https://kubernetes.io/docs/tasks/configure-pod-container
* /security-context/ +optional
* @param securityContext securityContext or {@code null} for none
*/
public Container setSecurityContext(SecurityContext securityContext) {
this.securityContext = securityContext;
return this;
}
/**
* Whether this container should allocate a buffer for stdin in the container runtime. If this is
* not set, reads from stdin in the container will always result in EOF. Default is false.
* +optional
* @return value or {@code null} for none
*/
public java.lang.Boolean getStdin() {
return stdin;
}
/**
* Whether this container should allocate a buffer for stdin in the container runtime. If this is
* not set, reads from stdin in the container will always result in EOF. Default is false.
* +optional
* @param stdin stdin or {@code null} for none
*/
public Container setStdin(java.lang.Boolean stdin) {
this.stdin = stdin;
return this;
}
/**
* Whether the container runtime should close the stdin channel after it has been opened by a
* single attach. When stdin is true the stdin stream will remain open across multiple attach
* sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the
* first client attaches to stdin, and then remains open and accepts data until the client
* disconnects, at which time stdin is closed and remains closed until the container is restarted.
* If this flag is false, a container processes that reads from stdin will never receive an EOF.
* Default is false +optional
* @return value or {@code null} for none
*/
public java.lang.Boolean getStdinOnce() {
return stdinOnce;
}
/**
* Whether the container runtime should close the stdin channel after it has been opened by a
* single attach. When stdin is true the stdin stream will remain open across multiple attach
* sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the
* first client attaches to stdin, and then remains open and accepts data until the client
* disconnects, at which time stdin is closed and remains closed until the container is restarted.
* If this flag is false, a container processes that reads from stdin will never receive an EOF.
* Default is false +optional
* @param stdinOnce stdinOnce or {@code null} for none
*/
public Container setStdinOnce(java.lang.Boolean stdinOnce) {
this.stdinOnce = stdinOnce;
return this;
}
/**
* Optional: 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. Cannot be updated. +optional
* @return value or {@code null} for none
*/
public java.lang.String getTerminationMessagePath() {
return terminationMessagePath;
}
/**
* Optional: 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. Cannot be updated. +optional
* @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. +optional
* @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. +optional
* @param terminationMessagePolicy terminationMessagePolicy or {@code null} for none
*/
public Container setTerminationMessagePolicy(java.lang.String terminationMessagePolicy) {
this.terminationMessagePolicy = terminationMessagePolicy;
return this;
}
/**
* Whether this container should allocate a TTY for itself, also requires 'stdin' to be true.
* Default is false. +optional
* @return value or {@code null} for none
*/
public java.lang.Boolean getTty() {
return tty;
}
/**
* Whether this container should allocate a TTY for itself, also requires 'stdin' to be true.
* Default is false. +optional
* @param tty tty or {@code null} for none
*/
public Container setTty(java.lang.Boolean tty) {
this.tty = tty;
return this;
}
/**
* volumeDevices is the list of block devices to be used by the container. This is an alpha
* feature and may change in the future. +optional
* @return value or {@code null} for none
*/
public java.util.List getVolumeDevices() {
return volumeDevices;
}
/**
* volumeDevices is the list of block devices to be used by the container. This is an alpha
* feature and may change in the future. +optional
* @param volumeDevices volumeDevices or {@code null} for none
*/
public Container setVolumeDevices(java.util.List volumeDevices) {
this.volumeDevices = volumeDevices;
return this;
}
/**
* Pod volumes to mount into the container's filesystem. Cannot be updated. +optional
* @return value or {@code null} for none
*/
public java.util.List getVolumeMounts() {
return volumeMounts;
}
/**
* Pod volumes to mount into the container's filesystem. Cannot be updated. +optional
* @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. Cannot be updated. +optional
* @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. Cannot be updated. +optional
* @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