Class Container.Builder (0.6.0)

publicstaticfinalclass Container.BuilderextendsGeneratedMessageV3.Builder<Container.Builder>implementsContainerOrBuilder

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.

Protobuf type google.cloud.run.v2.Container

Implements

ContainerOrBuilder

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description

Methods

addAllArgs(Iterable<String> values)

publicContainer.BuilderaddAllArgs(Iterable<String>values)

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. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

repeated string args = 4;

Parameter
Name Description
values Iterable<String>

The args to add.

Returns
Type Description
Container.Builder

This builder for chaining.

addAllCommand(Iterable<String> values)

publicContainer.BuilderaddAllCommand(Iterable<String>values)

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. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

repeated string command = 3;

Parameter
Name Description
values Iterable<String>

The command to add.

Returns
Type Description
Container.Builder

This builder for chaining.

addAllEnv(Iterable<? extends EnvVar> values)

publicContainer.BuilderaddAllEnv(Iterable<?extendsEnvVar>values)

List of environment variables to set in the container.

repeated .google.cloud.run.v2.EnvVar env = 5;

Parameter
Name Description
values Iterable<? extends com.google.cloud.run.v2.EnvVar>
Returns
Type Description

addAllPorts(Iterable<? extends ContainerPort> values)

publicContainer.BuilderaddAllPorts(Iterable<?extendsContainerPort>values)

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.

repeated .google.cloud.run.v2.ContainerPort ports = 7;

Parameter
Name Description
values Iterable<? extends com.google.cloud.run.v2.ContainerPort>
Returns
Type Description

addAllVolumeMounts(Iterable<? extends VolumeMount> values)

publicContainer.BuilderaddAllVolumeMounts(Iterable<?extendsVolumeMount>values)

Volume to mount into the container's filesystem.

repeated .google.cloud.run.v2.VolumeMount volume_mounts = 8;

Parameter
Name Description
values Iterable<? extends com.google.cloud.run.v2.VolumeMount>
Returns
Type Description

addArgs(String value)

publicContainer.BuilderaddArgs(Stringvalue)

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. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

repeated string args = 4;

Parameter
Name Description
value String

The args to add.

Returns
Type Description
Container.Builder

This builder for chaining.

addArgsBytes(ByteString value)

publicContainer.BuilderaddArgsBytes(ByteStringvalue)

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. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

repeated string args = 4;

Parameter
Name Description
value ByteString

The bytes of the args to add.

Returns
Type Description
Container.Builder

This builder for chaining.

addCommand(String value)

publicContainer.BuilderaddCommand(Stringvalue)

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. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

repeated string command = 3;

Parameter
Name Description
value String

The command to add.

Returns
Type Description
Container.Builder

This builder for chaining.

addCommandBytes(ByteString value)

publicContainer.BuilderaddCommandBytes(ByteStringvalue)

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. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

repeated string command = 3;

Parameter
Name Description
value ByteString

The bytes of the command to add.

Returns
Type Description
Container.Builder

This builder for chaining.

addEnv(EnvVar value)

publicContainer.BuilderaddEnv(EnvVarvalue)

List of environment variables to set in the container.

repeated .google.cloud.run.v2.EnvVar env = 5;

Parameter
Name Description
value EnvVar
Returns
Type Description

addEnv(EnvVar.Builder builderForValue)

publicContainer.BuilderaddEnv(EnvVar.BuilderbuilderForValue)

List of environment variables to set in the container.

repeated .google.cloud.run.v2.EnvVar env = 5;

Parameter
Name Description
builderForValue EnvVar.Builder
Returns
Type Description

addEnv(int index, EnvVar value)

publicContainer.BuilderaddEnv(intindex,EnvVarvalue)

List of environment variables to set in the container.

repeated .google.cloud.run.v2.EnvVar env = 5;

Parameters
Name Description
index int
value EnvVar
Returns
Type Description

addEnv(int index, EnvVar.Builder builderForValue)

publicContainer.BuilderaddEnv(intindex,EnvVar.BuilderbuilderForValue)

List of environment variables to set in the container.

repeated .google.cloud.run.v2.EnvVar env = 5;

Parameters
Name Description
index int
builderForValue EnvVar.Builder
Returns
Type Description

addEnvBuilder()

publicEnvVar.BuilderaddEnvBuilder()

List of environment variables to set in the container.

repeated .google.cloud.run.v2.EnvVar env = 5;

Returns
Type Description

addEnvBuilder(int index)

publicEnvVar.BuilderaddEnvBuilder(intindex)

List of environment variables to set in the container.

repeated .google.cloud.run.v2.EnvVar env = 5;

Parameter
Name Description
index int
Returns
Type Description

addPorts(ContainerPort value)

publicContainer.BuilderaddPorts(ContainerPortvalue)

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.

repeated .google.cloud.run.v2.ContainerPort ports = 7;

Parameter
Name Description
Returns
Type Description

addPorts(ContainerPort.Builder builderForValue)

publicContainer.BuilderaddPorts(ContainerPort.BuilderbuilderForValue)

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.

repeated .google.cloud.run.v2.ContainerPort ports = 7;

Parameter
Name Description
builderForValue ContainerPort.Builder
Returns
Type Description

addPorts(int index, ContainerPort value)

publicContainer.BuilderaddPorts(intindex,ContainerPortvalue)

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.

repeated .google.cloud.run.v2.ContainerPort ports = 7;

Parameters
Name Description
index int
Returns
Type Description

addPorts(int index, ContainerPort.Builder builderForValue)

publicContainer.BuilderaddPorts(intindex,ContainerPort.BuilderbuilderForValue)

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.

repeated .google.cloud.run.v2.ContainerPort ports = 7;

Parameters
Name Description
index int
builderForValue ContainerPort.Builder
Returns
Type Description

addPortsBuilder()

publicContainerPort.BuilderaddPortsBuilder()

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.

repeated .google.cloud.run.v2.ContainerPort ports = 7;

Returns
Type Description

addPortsBuilder(int index)

publicContainerPort.BuilderaddPortsBuilder(intindex)

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.

repeated .google.cloud.run.v2.ContainerPort ports = 7;

Parameter
Name Description
index int
Returns
Type Description

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicContainer.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
value Object
Returns
Type Description
Overrides

addVolumeMounts(VolumeMount value)

publicContainer.BuilderaddVolumeMounts(VolumeMountvalue)

Volume to mount into the container's filesystem.

repeated .google.cloud.run.v2.VolumeMount volume_mounts = 8;

Parameter
Name Description
value VolumeMount
Returns
Type Description

addVolumeMounts(VolumeMount.Builder builderForValue)

publicContainer.BuilderaddVolumeMounts(VolumeMount.BuilderbuilderForValue)

Volume to mount into the container's filesystem.

repeated .google.cloud.run.v2.VolumeMount volume_mounts = 8;

Parameter
Name Description
builderForValue VolumeMount.Builder
Returns
Type Description

addVolumeMounts(int index, VolumeMount value)

publicContainer.BuilderaddVolumeMounts(intindex,VolumeMountvalue)

Volume to mount into the container's filesystem.

repeated .google.cloud.run.v2.VolumeMount volume_mounts = 8;

Parameters
Name Description
index int
value VolumeMount
Returns
Type Description

addVolumeMounts(int index, VolumeMount.Builder builderForValue)

publicContainer.BuilderaddVolumeMounts(intindex,VolumeMount.BuilderbuilderForValue)

Volume to mount into the container's filesystem.

repeated .google.cloud.run.v2.VolumeMount volume_mounts = 8;

Parameters
Name Description
index int
builderForValue VolumeMount.Builder
Returns
Type Description

addVolumeMountsBuilder()

publicVolumeMount.BuilderaddVolumeMountsBuilder()

Volume to mount into the container's filesystem.

repeated .google.cloud.run.v2.VolumeMount volume_mounts = 8;

Returns
Type Description

addVolumeMountsBuilder(int index)

publicVolumeMount.BuilderaddVolumeMountsBuilder(intindex)

Volume to mount into the container's filesystem.

repeated .google.cloud.run.v2.VolumeMount volume_mounts = 8;

Parameter
Name Description
index int
Returns
Type Description

build()

publicContainerbuild()
Returns
Type Description

buildPartial()

publicContainerbuildPartial()
Returns
Type Description

clear()

publicContainer.Builderclear()
Returns
Type Description
Overrides

clearArgs()

publicContainer.BuilderclearArgs()

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. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

repeated string args = 4;

Returns
Type Description
Container.Builder

This builder for chaining.

clearCommand()

publicContainer.BuilderclearCommand()

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. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

repeated string command = 3;

Returns
Type Description
Container.Builder

This builder for chaining.

clearEnv()

publicContainer.BuilderclearEnv()

List of environment variables to set in the container.

repeated .google.cloud.run.v2.EnvVar env = 5;

Returns
Type Description

clearField(Descriptors.FieldDescriptor field)

publicContainer.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
Returns
Type Description
Overrides

clearImage()

publicContainer.BuilderclearImage()

Required. URL of the Container image in Google Container Registry or Google Artifact Registry. More info: https://kubernetes.io/docs/concepts/containers/images

string image = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Container.Builder

This builder for chaining.

clearLivenessProbe()

publicContainer.BuilderclearLivenessProbe()

Periodic probe of container liveness. Container will be restarted if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

.google.cloud.run.v2.Probe liveness_probe = 10;

Returns
Type Description

clearName()

publicContainer.BuilderclearName()

Name of the container specified as a DNS_LABEL.

string name = 1;

Returns
Type Description
Container.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

publicContainer.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
Returns
Type Description
Overrides

clearPorts()

publicContainer.BuilderclearPorts()

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.

repeated .google.cloud.run.v2.ContainerPort ports = 7;

Returns
Type Description

clearResources()

publicContainer.BuilderclearResources()

Compute Resource requirements by this container. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources

.google.cloud.run.v2.ResourceRequirements resources = 6;

Returns
Type Description

clearStartupProbe()

publicContainer.BuilderclearStartupProbe()

Startup probe of application within the container. All other probes are disabled if a startup probe is provided, until it succeeds. Container will not be added to service endpoints if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

.google.cloud.run.v2.Probe startup_probe = 11;

Returns
Type Description

clearVolumeMounts()

publicContainer.BuilderclearVolumeMounts()

Volume to mount into the container's filesystem.

repeated .google.cloud.run.v2.VolumeMount volume_mounts = 8;

Returns
Type Description

clearWorkingDir()

publicContainer.BuilderclearWorkingDir()

Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image.

string working_dir = 9;

Returns
Type Description
Container.Builder

This builder for chaining.

clone()

publicContainer.Builderclone()
Returns
Type Description
Overrides

getArgs(int index)

publicStringgetArgs(intindex)

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. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

repeated string args = 4;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The args at the given index.

getArgsBytes(int index)

publicByteStringgetArgsBytes(intindex)

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. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

repeated string args = 4;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the args at the given index.

getArgsCount()

publicintgetArgsCount()

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. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

repeated string args = 4;

Returns
Type Description
int

The count of args.

getArgsList()

publicProtocolStringListgetArgsList()

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. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

repeated string args = 4;

Returns
Type Description
ProtocolStringList

A list containing the args.

getCommand(int index)

publicStringgetCommand(intindex)

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. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

repeated string command = 3;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The command at the given index.

getCommandBytes(int index)

publicByteStringgetCommandBytes(intindex)

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. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

repeated string command = 3;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the command at the given index.

getCommandCount()

publicintgetCommandCount()

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. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

repeated string command = 3;

Returns
Type Description
int

The count of command.

getCommandList()

publicProtocolStringListgetCommandList()

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. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

repeated string command = 3;

Returns
Type Description
ProtocolStringList

A list containing the command.

getDefaultInstanceForType()

publicContainergetDefaultInstanceForType()
Returns
Type Description

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Overrides

getEnv(int index)

publicEnvVargetEnv(intindex)

List of environment variables to set in the container.

repeated .google.cloud.run.v2.EnvVar env = 5;

Parameter
Name Description
index int
Returns
Type Description

getEnvBuilder(int index)

publicEnvVar.BuildergetEnvBuilder(intindex)

List of environment variables to set in the container.

repeated .google.cloud.run.v2.EnvVar env = 5;

Parameter
Name Description
index int
Returns
Type Description

getEnvBuilderList()

publicList<EnvVar.Builder>getEnvBuilderList()

List of environment variables to set in the container.

repeated .google.cloud.run.v2.EnvVar env = 5;

Returns
Type Description

getEnvCount()

publicintgetEnvCount()

List of environment variables to set in the container.

repeated .google.cloud.run.v2.EnvVar env = 5;

Returns
Type Description
int

getEnvList()

publicList<EnvVar>getEnvList()

List of environment variables to set in the container.

repeated .google.cloud.run.v2.EnvVar env = 5;

Returns
Type Description

getEnvOrBuilder(int index)

publicEnvVarOrBuildergetEnvOrBuilder(intindex)

List of environment variables to set in the container.

repeated .google.cloud.run.v2.EnvVar env = 5;

Parameter
Name Description
index int
Returns
Type Description

getEnvOrBuilderList()

publicList<?extendsEnvVarOrBuilder>getEnvOrBuilderList()

List of environment variables to set in the container.

repeated .google.cloud.run.v2.EnvVar env = 5;

Returns
Type Description
List<? extends com.google.cloud.run.v2.EnvVarOrBuilder>

getImage()

publicStringgetImage()

Required. URL of the Container image in Google Container Registry or Google Artifact Registry. More info: https://kubernetes.io/docs/concepts/containers/images

string image = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The image.

getImageBytes()

publicByteStringgetImageBytes()

Required. URL of the Container image in Google Container Registry or Google Artifact Registry. More info: https://kubernetes.io/docs/concepts/containers/images

string image = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for image.

getLivenessProbe()

publicProbegetLivenessProbe()

Periodic probe of container liveness. Container will be restarted if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

.google.cloud.run.v2.Probe liveness_probe = 10;

Returns
Type Description
Probe

The livenessProbe.

getLivenessProbeBuilder()

publicProbe.BuildergetLivenessProbeBuilder()

Periodic probe of container liveness. Container will be restarted if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

.google.cloud.run.v2.Probe liveness_probe = 10;

Returns
Type Description

getLivenessProbeOrBuilder()

publicProbeOrBuildergetLivenessProbeOrBuilder()

Periodic probe of container liveness. Container will be restarted if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

.google.cloud.run.v2.Probe liveness_probe = 10;

Returns
Type Description

getName()

publicStringgetName()

Name of the container specified as a DNS_LABEL.

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

publicByteStringgetNameBytes()

Name of the container specified as a DNS_LABEL.

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getPorts(int index)

publicContainerPortgetPorts(intindex)

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.

repeated .google.cloud.run.v2.ContainerPort ports = 7;

Parameter
Name Description
index int
Returns
Type Description

getPortsBuilder(int index)

publicContainerPort.BuildergetPortsBuilder(intindex)

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.

repeated .google.cloud.run.v2.ContainerPort ports = 7;

Parameter
Name Description
index int
Returns
Type Description

getPortsBuilderList()

publicList<ContainerPort.Builder>getPortsBuilderList()

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.

repeated .google.cloud.run.v2.ContainerPort ports = 7;

Returns
Type Description

getPortsCount()

publicintgetPortsCount()

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.

repeated .google.cloud.run.v2.ContainerPort ports = 7;

Returns
Type Description
int

getPortsList()

publicList<ContainerPort>getPortsList()

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.

repeated .google.cloud.run.v2.ContainerPort ports = 7;

Returns
Type Description

getPortsOrBuilder(int index)

publicContainerPortOrBuildergetPortsOrBuilder(intindex)

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.

repeated .google.cloud.run.v2.ContainerPort ports = 7;

Parameter
Name Description
index int
Returns
Type Description

getPortsOrBuilderList()

publicList<?extendsContainerPortOrBuilder>getPortsOrBuilderList()

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.

repeated .google.cloud.run.v2.ContainerPort ports = 7;

Returns
Type Description
List<? extends com.google.cloud.run.v2.ContainerPortOrBuilder>

getResources()

publicResourceRequirementsgetResources()

Compute Resource requirements by this container. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources

.google.cloud.run.v2.ResourceRequirements resources = 6;

Returns
Type Description
ResourceRequirements

The resources.

getResourcesBuilder()

publicResourceRequirements.BuildergetResourcesBuilder()

Compute Resource requirements by this container. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources

.google.cloud.run.v2.ResourceRequirements resources = 6;

Returns
Type Description

getResourcesOrBuilder()

publicResourceRequirementsOrBuildergetResourcesOrBuilder()

Compute Resource requirements by this container. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources

.google.cloud.run.v2.ResourceRequirements resources = 6;

Returns
Type Description

getStartupProbe()

publicProbegetStartupProbe()

Startup probe of application within the container. All other probes are disabled if a startup probe is provided, until it succeeds. Container will not be added to service endpoints if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

.google.cloud.run.v2.Probe startup_probe = 11;

Returns
Type Description
Probe

The startupProbe.

getStartupProbeBuilder()

publicProbe.BuildergetStartupProbeBuilder()

Startup probe of application within the container. All other probes are disabled if a startup probe is provided, until it succeeds. Container will not be added to service endpoints if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

.google.cloud.run.v2.Probe startup_probe = 11;

Returns
Type Description

getStartupProbeOrBuilder()

publicProbeOrBuildergetStartupProbeOrBuilder()

Startup probe of application within the container. All other probes are disabled if a startup probe is provided, until it succeeds. Container will not be added to service endpoints if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

.google.cloud.run.v2.Probe startup_probe = 11;

Returns
Type Description

getVolumeMounts(int index)

publicVolumeMountgetVolumeMounts(intindex)

Volume to mount into the container's filesystem.

repeated .google.cloud.run.v2.VolumeMount volume_mounts = 8;

Parameter
Name Description
index int
Returns
Type Description

getVolumeMountsBuilder(int index)

publicVolumeMount.BuildergetVolumeMountsBuilder(intindex)

Volume to mount into the container's filesystem.

repeated .google.cloud.run.v2.VolumeMount volume_mounts = 8;

Parameter
Name Description
index int
Returns
Type Description

getVolumeMountsBuilderList()

publicList<VolumeMount.Builder>getVolumeMountsBuilderList()

Volume to mount into the container's filesystem.

repeated .google.cloud.run.v2.VolumeMount volume_mounts = 8;

Returns
Type Description

getVolumeMountsCount()

publicintgetVolumeMountsCount()

Volume to mount into the container's filesystem.

repeated .google.cloud.run.v2.VolumeMount volume_mounts = 8;

Returns
Type Description
int

getVolumeMountsList()

publicList<VolumeMount>getVolumeMountsList()

Volume to mount into the container's filesystem.

repeated .google.cloud.run.v2.VolumeMount volume_mounts = 8;

Returns
Type Description

getVolumeMountsOrBuilder(int index)

publicVolumeMountOrBuildergetVolumeMountsOrBuilder(intindex)

Volume to mount into the container's filesystem.

repeated .google.cloud.run.v2.VolumeMount volume_mounts = 8;

Parameter
Name Description
index int
Returns
Type Description

getVolumeMountsOrBuilderList()

publicList<?extendsVolumeMountOrBuilder>getVolumeMountsOrBuilderList()

Volume to mount into the container's filesystem.

repeated .google.cloud.run.v2.VolumeMount volume_mounts = 8;

Returns
Type Description
List<? extends com.google.cloud.run.v2.VolumeMountOrBuilder>

getWorkingDir()

publicStringgetWorkingDir()

Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image.

string working_dir = 9;

Returns
Type Description
String

The workingDir.

getWorkingDirBytes()

publicByteStringgetWorkingDirBytes()

Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image.

string working_dir = 9;

Returns
Type Description
ByteString

The bytes for workingDir.

hasLivenessProbe()

publicbooleanhasLivenessProbe()

Periodic probe of container liveness. Container will be restarted if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

.google.cloud.run.v2.Probe liveness_probe = 10;

Returns
Type Description
boolean

Whether the livenessProbe field is set.

hasResources()

publicbooleanhasResources()

Compute Resource requirements by this container. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources

.google.cloud.run.v2.ResourceRequirements resources = 6;

Returns
Type Description
boolean

Whether the resources field is set.

hasStartupProbe()

publicbooleanhasStartupProbe()

Startup probe of application within the container. All other probes are disabled if a startup probe is provided, until it succeeds. Container will not be added to service endpoints if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

.google.cloud.run.v2.Probe startup_probe = 11;

Returns
Type Description
boolean

Whether the startupProbe field is set.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
Overrides

mergeFrom(Container other)

publicContainer.BuildermergeFrom(Containerother)
Parameter
Name Description
other Container
Returns
Type Description

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicContainer.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Overrides Exceptions
Type Description

mergeFrom(Message other)

publicContainer.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
Overrides

mergeLivenessProbe(Probe value)

publicContainer.BuildermergeLivenessProbe(Probevalue)

Periodic probe of container liveness. Container will be restarted if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

.google.cloud.run.v2.Probe liveness_probe = 10;

Parameter
Name Description
value Probe
Returns
Type Description

mergeResources(ResourceRequirements value)

publicContainer.BuildermergeResources(ResourceRequirementsvalue)

Compute Resource requirements by this container. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources

.google.cloud.run.v2.ResourceRequirements resources = 6;

Parameter
Name Description
Returns
Type Description

mergeStartupProbe(Probe value)

publicContainer.BuildermergeStartupProbe(Probevalue)

Startup probe of application within the container. All other probes are disabled if a startup probe is provided, until it succeeds. Container will not be added to service endpoints if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

.google.cloud.run.v2.Probe startup_probe = 11;

Parameter
Name Description
value Probe
Returns
Type Description

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalContainer.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Overrides

removeEnv(int index)

publicContainer.BuilderremoveEnv(intindex)

List of environment variables to set in the container.

repeated .google.cloud.run.v2.EnvVar env = 5;

Parameter
Name Description
index int
Returns
Type Description

removePorts(int index)

publicContainer.BuilderremovePorts(intindex)

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.

repeated .google.cloud.run.v2.ContainerPort ports = 7;

Parameter
Name Description
index int
Returns
Type Description

removeVolumeMounts(int index)

publicContainer.BuilderremoveVolumeMounts(intindex)

Volume to mount into the container's filesystem.

repeated .google.cloud.run.v2.VolumeMount volume_mounts = 8;

Parameter
Name Description
index int
Returns
Type Description

setArgs(int index, String value)

publicContainer.BuildersetArgs(intindex,Stringvalue)

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. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

repeated string args = 4;

Parameters
Name Description
index int

The index to set the value at.

value String

The args to set.

Returns
Type Description
Container.Builder

This builder for chaining.

setCommand(int index, String value)

publicContainer.BuildersetCommand(intindex,Stringvalue)

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. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

repeated string command = 3;

Parameters
Name Description
index int

The index to set the value at.

value String

The command to set.

Returns
Type Description
Container.Builder

This builder for chaining.

setEnv(int index, EnvVar value)

publicContainer.BuildersetEnv(intindex,EnvVarvalue)

List of environment variables to set in the container.

repeated .google.cloud.run.v2.EnvVar env = 5;

Parameters
Name Description
index int
value EnvVar
Returns
Type Description

setEnv(int index, EnvVar.Builder builderForValue)

publicContainer.BuildersetEnv(intindex,EnvVar.BuilderbuilderForValue)

List of environment variables to set in the container.

repeated .google.cloud.run.v2.EnvVar env = 5;

Parameters
Name Description
index int
builderForValue EnvVar.Builder
Returns
Type Description

setField(Descriptors.FieldDescriptor field, Object value)

publicContainer.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
value Object
Returns
Type Description
Overrides

setImage(String value)

publicContainer.BuildersetImage(Stringvalue)

Required. URL of the Container image in Google Container Registry or Google Artifact Registry. More info: https://kubernetes.io/docs/concepts/containers/images

string image = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The image to set.

Returns
Type Description
Container.Builder

This builder for chaining.

setImageBytes(ByteString value)

publicContainer.BuildersetImageBytes(ByteStringvalue)

Required. URL of the Container image in Google Container Registry or Google Artifact Registry. More info: https://kubernetes.io/docs/concepts/containers/images

string image = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for image to set.

Returns
Type Description
Container.Builder

This builder for chaining.

setLivenessProbe(Probe value)

publicContainer.BuildersetLivenessProbe(Probevalue)

Periodic probe of container liveness. Container will be restarted if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

.google.cloud.run.v2.Probe liveness_probe = 10;

Parameter
Name Description
value Probe
Returns
Type Description

setLivenessProbe(Probe.Builder builderForValue)

publicContainer.BuildersetLivenessProbe(Probe.BuilderbuilderForValue)

Periodic probe of container liveness. Container will be restarted if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

.google.cloud.run.v2.Probe liveness_probe = 10;

Parameter
Name Description
builderForValue Probe.Builder
Returns
Type Description

setName(String value)

publicContainer.BuildersetName(Stringvalue)

Name of the container specified as a DNS_LABEL.

string name = 1;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Container.Builder

This builder for chaining.

setNameBytes(ByteString value)

publicContainer.BuildersetNameBytes(ByteStringvalue)

Name of the container specified as a DNS_LABEL.

string name = 1;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Container.Builder

This builder for chaining.

setPorts(int index, ContainerPort value)

publicContainer.BuildersetPorts(intindex,ContainerPortvalue)

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.

repeated .google.cloud.run.v2.ContainerPort ports = 7;

Parameters
Name Description
index int
Returns
Type Description

setPorts(int index, ContainerPort.Builder builderForValue)

publicContainer.BuildersetPorts(intindex,ContainerPort.BuilderbuilderForValue)

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.

repeated .google.cloud.run.v2.ContainerPort ports = 7;

Parameters
Name Description
index int
builderForValue ContainerPort.Builder
Returns
Type Description

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

publicContainer.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
index int
value Object
Returns
Type Description
Overrides

setResources(ResourceRequirements value)

publicContainer.BuildersetResources(ResourceRequirementsvalue)

Compute Resource requirements by this container. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources

.google.cloud.run.v2.ResourceRequirements resources = 6;

Parameter
Name Description
Returns
Type Description

setResources(ResourceRequirements.Builder builderForValue)

publicContainer.BuildersetResources(ResourceRequirements.BuilderbuilderForValue)

Compute Resource requirements by this container. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources

.google.cloud.run.v2.ResourceRequirements resources = 6;

Parameter
Name Description
Returns
Type Description

setStartupProbe(Probe value)

publicContainer.BuildersetStartupProbe(Probevalue)

Startup probe of application within the container. All other probes are disabled if a startup probe is provided, until it succeeds. Container will not be added to service endpoints if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

.google.cloud.run.v2.Probe startup_probe = 11;

Parameter
Name Description
value Probe
Returns
Type Description

setStartupProbe(Probe.Builder builderForValue)

publicContainer.BuildersetStartupProbe(Probe.BuilderbuilderForValue)

Startup probe of application within the container. All other probes are disabled if a startup probe is provided, until it succeeds. Container will not be added to service endpoints if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

.google.cloud.run.v2.Probe startup_probe = 11;

Parameter
Name Description
builderForValue Probe.Builder
Returns
Type Description

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalContainer.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Overrides

setVolumeMounts(int index, VolumeMount value)

publicContainer.BuildersetVolumeMounts(intindex,VolumeMountvalue)

Volume to mount into the container's filesystem.

repeated .google.cloud.run.v2.VolumeMount volume_mounts = 8;

Parameters
Name Description
index int
value VolumeMount
Returns
Type Description

setVolumeMounts(int index, VolumeMount.Builder builderForValue)

publicContainer.BuildersetVolumeMounts(intindex,VolumeMount.BuilderbuilderForValue)

Volume to mount into the container's filesystem.

repeated .google.cloud.run.v2.VolumeMount volume_mounts = 8;

Parameters
Name Description
index int
builderForValue VolumeMount.Builder
Returns
Type Description

setWorkingDir(String value)

publicContainer.BuildersetWorkingDir(Stringvalue)

Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image.

string working_dir = 9;

Parameter
Name Description
value String

The workingDir to set.

Returns
Type Description
Container.Builder

This builder for chaining.

setWorkingDirBytes(ByteString value)

publicContainer.BuildersetWorkingDirBytes(ByteStringvalue)

Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image.

string working_dir = 9;

Parameter
Name Description
value ByteString

The bytes for workingDir to set.

Returns
Type Description
Container.Builder

This builder for chaining.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.