Class Container.Builder (0.45.0)

public static final class Container.Builder extends GeneratedMessageV3.Builder<Container.Builder> implements ContainerOrBuilder

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 can be supplied by the system to the container at runtime.

Protobuf type google.cloud.run.v2.Container

Implements

ContainerOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllArgs(Iterable<String> values)

public Container.Builder addAllArgs(Iterable<String> values)

Arguments to the entrypoint. The docker image's CMD is used if this is not provided.

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)

public Container.Builder addAllCommand(Iterable<String> values)

Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided.

repeated string command = 3;

Parameter
Name Description
values Iterable<String>

The command to add.

Returns
Type Description
Container.Builder

This builder for chaining.

addAllDependsOn(Iterable<String> values)

public Container.Builder addAllDependsOn(Iterable<String> values)

Names of the containers that must start before this container.

repeated string depends_on = 12;

Parameter
Name Description
values Iterable<String>

The dependsOn to add.

Returns
Type Description
Container.Builder

This builder for chaining.

addAllEnv(Iterable<? extends EnvVar> values)

public Container.Builder addAllEnv(Iterable<? extends EnvVar> 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
Container.Builder

addAllPorts(Iterable<? extends ContainerPort> values)

public Container.Builder addAllPorts(Iterable<? extends ContainerPort> 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
Container.Builder

addAllVolumeMounts(Iterable<? extends VolumeMount> values)

public Container.Builder addAllVolumeMounts(Iterable<? extends VolumeMount> 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
Container.Builder

addArgs(String value)

public Container.Builder addArgs(String value)

Arguments to the entrypoint. The docker image's CMD is used if this is not provided.

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)

public Container.Builder addArgsBytes(ByteString value)

Arguments to the entrypoint. The docker image's CMD is used if this is not provided.

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)

public Container.Builder addCommand(String value)

Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided.

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)

public Container.Builder addCommandBytes(ByteString value)

Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided.

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.

addDependsOn(String value)

public Container.Builder addDependsOn(String value)

Names of the containers that must start before this container.

repeated string depends_on = 12;

Parameter
Name Description
value String

The dependsOn to add.

Returns
Type Description
Container.Builder

This builder for chaining.

addDependsOnBytes(ByteString value)

public Container.Builder addDependsOnBytes(ByteString value)

Names of the containers that must start before this container.

repeated string depends_on = 12;

Parameter
Name Description
value ByteString

The bytes of the dependsOn to add.

Returns
Type Description
Container.Builder

This builder for chaining.

addEnv(EnvVar value)

public Container.Builder addEnv(EnvVar value)

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
Container.Builder

addEnv(EnvVar.Builder builderForValue)

public Container.Builder addEnv(EnvVar.Builder builderForValue)

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
Container.Builder

addEnv(int index, EnvVar value)

public Container.Builder addEnv(int index, EnvVar value)

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
Container.Builder

addEnv(int index, EnvVar.Builder builderForValue)

public Container.Builder addEnv(int index, EnvVar.Builder builderForValue)

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
Container.Builder

addEnvBuilder()

public EnvVar.Builder addEnvBuilder()

List of environment variables to set in the container.

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

Returns
Type Description
EnvVar.Builder

addEnvBuilder(int index)

public EnvVar.Builder addEnvBuilder(int index)

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
EnvVar.Builder

addPorts(ContainerPort value)

public Container.Builder addPorts(ContainerPort value)

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
value ContainerPort
Returns
Type Description
Container.Builder

addPorts(ContainerPort.Builder builderForValue)

public Container.Builder addPorts(ContainerPort.Builder builderForValue)

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
Container.Builder

addPorts(int index, ContainerPort value)

public Container.Builder addPorts(int index, ContainerPort value)

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
value ContainerPort
Returns
Type Description
Container.Builder

addPorts(int index, ContainerPort.Builder builderForValue)

public Container.Builder addPorts(int index, ContainerPort.Builder builderForValue)

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
Container.Builder

addPortsBuilder()

public ContainerPort.Builder addPortsBuilder()

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
ContainerPort.Builder

addPortsBuilder(int index)

public ContainerPort.Builder addPortsBuilder(int index)

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
ContainerPort.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Container.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Container.Builder
Overrides

addVolumeMounts(VolumeMount value)

public Container.Builder addVolumeMounts(VolumeMount value)

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
Container.Builder

addVolumeMounts(VolumeMount.Builder builderForValue)

public Container.Builder addVolumeMounts(VolumeMount.Builder builderForValue)

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
Container.Builder

addVolumeMounts(int index, VolumeMount value)

public Container.Builder addVolumeMounts(int index, VolumeMount value)

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
Container.Builder

addVolumeMounts(int index, VolumeMount.Builder builderForValue)

public Container.Builder addVolumeMounts(int index, VolumeMount.Builder builderForValue)

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
Container.Builder

addVolumeMountsBuilder()

public VolumeMount.Builder addVolumeMountsBuilder()

Volume to mount into the container's filesystem.

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

Returns
Type Description
VolumeMount.Builder

addVolumeMountsBuilder(int index)

public VolumeMount.Builder addVolumeMountsBuilder(int index)

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
VolumeMount.Builder

build()

public Container build()
Returns
Type Description
Container

buildPartial()

public Container buildPartial()
Returns
Type Description
Container

clear()

public Container.Builder clear()
Returns
Type Description
Container.Builder
Overrides

clearArgs()

public Container.Builder clearArgs()

Arguments to the entrypoint. The docker image's CMD is used if this is not provided.

repeated string args = 4;

Returns
Type Description
Container.Builder

This builder for chaining.

clearCommand()

public Container.Builder clearCommand()

Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided.

repeated string command = 3;

Returns
Type Description
Container.Builder

This builder for chaining.

clearDependsOn()

public Container.Builder clearDependsOn()

Names of the containers that must start before this container.

repeated string depends_on = 12;

Returns
Type Description
Container.Builder

This builder for chaining.

clearEnv()

public Container.Builder clearEnv()

List of environment variables to set in the container.

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

Returns
Type Description
Container.Builder

clearField(Descriptors.FieldDescriptor field)

public Container.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Container.Builder
Overrides

clearImage()

public Container.Builder clearImage()

Required. Name of the container image in Dockerhub, Google Artifact Registry, or Google Container Registry. If the host is not provided, Dockerhub is assumed.

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

Returns
Type Description
Container.Builder

This builder for chaining.

clearLivenessProbe()

public Container.Builder clearLivenessProbe()

Periodic probe of container liveness. Container will be restarted if the probe fails.

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

Returns
Type Description
Container.Builder

clearName()

public Container.Builder clearName()

Name of the container specified as a DNS_LABEL (RFC 1123).

string name = 1;

Returns
Type Description
Container.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Container.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Container.Builder
Overrides

clearPorts()

public Container.Builder clearPorts()

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
Container.Builder

clearResources()

public Container.Builder clearResources()

Compute Resource requirements by this container.

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

Returns
Type Description
Container.Builder

clearStartupProbe()

public Container.Builder clearStartupProbe()

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.

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

Returns
Type Description
Container.Builder

clearVolumeMounts()

public Container.Builder clearVolumeMounts()

Volume to mount into the container's filesystem.

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

Returns
Type Description
Container.Builder

clearWorkingDir()

public Container.Builder clearWorkingDir()

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()

public Container.Builder clone()
Returns
Type Description
Container.Builder
Overrides

getArgs(int index)

public String getArgs(int index)

Arguments to the entrypoint. The docker image's CMD is used if this is not provided.

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)

public ByteString getArgsBytes(int index)

Arguments to the entrypoint. The docker image's CMD is used if this is not provided.

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()

public int getArgsCount()

Arguments to the entrypoint. The docker image's CMD is used if this is not provided.

repeated string args = 4;

Returns
Type Description
int

The count of args.

getArgsList()

public ProtocolStringList getArgsList()

Arguments to the entrypoint. The docker image's CMD is used if this is not provided.

repeated string args = 4;

Returns
Type Description
ProtocolStringList

A list containing the args.

getCommand(int index)

public String getCommand(int index)

Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided.

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)

public ByteString getCommandBytes(int index)

Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided.

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()

public int getCommandCount()

Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided.

repeated string command = 3;

Returns
Type Description
int

The count of command.

getCommandList()

public ProtocolStringList getCommandList()

Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided.

repeated string command = 3;

Returns
Type Description
ProtocolStringList

A list containing the command.

getDefaultInstanceForType()

public Container getDefaultInstanceForType()
Returns
Type Description
Container

getDependsOn(int index)

public String getDependsOn(int index)

Names of the containers that must start before this container.

repeated string depends_on = 12;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The dependsOn at the given index.

getDependsOnBytes(int index)

public ByteString getDependsOnBytes(int index)

Names of the containers that must start before this container.

repeated string depends_on = 12;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the dependsOn at the given index.

getDependsOnCount()

public int getDependsOnCount()

Names of the containers that must start before this container.

repeated string depends_on = 12;

Returns
Type Description
int

The count of dependsOn.

getDependsOnList()

public ProtocolStringList getDependsOnList()

Names of the containers that must start before this container.

repeated string depends_on = 12;

Returns
Type Description
ProtocolStringList

A list containing the dependsOn.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getEnv(int index)

public EnvVar getEnv(int index)

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
EnvVar

getEnvBuilder(int index)

public EnvVar.Builder getEnvBuilder(int index)

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
EnvVar.Builder

getEnvBuilderList()

public List<EnvVar.Builder> getEnvBuilderList()

List of environment variables to set in the container.

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

Returns
Type Description
List<Builder>

getEnvCount()

public int getEnvCount()

List of environment variables to set in the container.

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

Returns
Type Description
int

getEnvList()

public List<EnvVar> getEnvList()

List of environment variables to set in the container.

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

Returns
Type Description
List<EnvVar>

getEnvOrBuilder(int index)

public EnvVarOrBuilder getEnvOrBuilder(int index)

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
EnvVarOrBuilder

getEnvOrBuilderList()

public List<? extends EnvVarOrBuilder> 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()

public String getImage()

Required. Name of the container image in Dockerhub, Google Artifact Registry, or Google Container Registry. If the host is not provided, Dockerhub is assumed.

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

Returns
Type Description
String

The image.

getImageBytes()

public ByteString getImageBytes()

Required. Name of the container image in Dockerhub, Google Artifact Registry, or Google Container Registry. If the host is not provided, Dockerhub is assumed.

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

Returns
Type Description
ByteString

The bytes for image.

getLivenessProbe()

public Probe getLivenessProbe()

Periodic probe of container liveness. Container will be restarted if the probe fails.

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

Returns
Type Description
Probe

The livenessProbe.

getLivenessProbeBuilder()

public Probe.Builder getLivenessProbeBuilder()

Periodic probe of container liveness. Container will be restarted if the probe fails.

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

Returns
Type Description
Probe.Builder

getLivenessProbeOrBuilder()

public ProbeOrBuilder getLivenessProbeOrBuilder()

Periodic probe of container liveness. Container will be restarted if the probe fails.

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

Returns
Type Description
ProbeOrBuilder

getName()

public String getName()

Name of the container specified as a DNS_LABEL (RFC 1123).

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Name of the container specified as a DNS_LABEL (RFC 1123).

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getPorts(int index)

public ContainerPort getPorts(int index)

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
ContainerPort

getPortsBuilder(int index)

public ContainerPort.Builder getPortsBuilder(int index)

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
ContainerPort.Builder

getPortsBuilderList()

public List<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
List<Builder>

getPortsCount()

public int getPortsCount()

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()

public List<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
List<ContainerPort>

getPortsOrBuilder(int index)

public ContainerPortOrBuilder getPortsOrBuilder(int index)

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
ContainerPortOrBuilder

getPortsOrBuilderList()

public List<? extends ContainerPortOrBuilder> 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()

public ResourceRequirements getResources()

Compute Resource requirements by this container.

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

Returns
Type Description
ResourceRequirements

The resources.

getResourcesBuilder()

public ResourceRequirements.Builder getResourcesBuilder()

Compute Resource requirements by this container.

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

Returns
Type Description
ResourceRequirements.Builder

getResourcesOrBuilder()

public ResourceRequirementsOrBuilder getResourcesOrBuilder()

Compute Resource requirements by this container.

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

Returns
Type Description
ResourceRequirementsOrBuilder

getStartupProbe()

public Probe getStartupProbe()

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.

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

Returns
Type Description
Probe

The startupProbe.

getStartupProbeBuilder()

public Probe.Builder getStartupProbeBuilder()

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.

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

Returns
Type Description
Probe.Builder

getStartupProbeOrBuilder()

public ProbeOrBuilder getStartupProbeOrBuilder()

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.

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

Returns
Type Description
ProbeOrBuilder

getVolumeMounts(int index)

public VolumeMount getVolumeMounts(int index)

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
VolumeMount

getVolumeMountsBuilder(int index)

public VolumeMount.Builder getVolumeMountsBuilder(int index)

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
VolumeMount.Builder

getVolumeMountsBuilderList()

public List<VolumeMount.Builder> getVolumeMountsBuilderList()

Volume to mount into the container's filesystem.

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

Returns
Type Description
List<Builder>

getVolumeMountsCount()

public int getVolumeMountsCount()

Volume to mount into the container's filesystem.

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

Returns
Type Description
int

getVolumeMountsList()

public List<VolumeMount> getVolumeMountsList()

Volume to mount into the container's filesystem.

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

Returns
Type Description
List<VolumeMount>

getVolumeMountsOrBuilder(int index)

public VolumeMountOrBuilder getVolumeMountsOrBuilder(int index)

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
VolumeMountOrBuilder

getVolumeMountsOrBuilderList()

public List<? extends VolumeMountOrBuilder> 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()

public String getWorkingDir()

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()

public ByteString getWorkingDirBytes()

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()

public boolean hasLivenessProbe()

Periodic probe of container liveness. Container will be restarted if the probe fails.

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

Returns
Type Description
boolean

Whether the livenessProbe field is set.

hasResources()

public boolean hasResources()

Compute Resource requirements by this container.

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

Returns
Type Description
boolean

Whether the resources field is set.

hasStartupProbe()

public boolean hasStartupProbe()

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.

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

Returns
Type Description
boolean

Whether the startupProbe field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Container other)

public Container.Builder mergeFrom(Container other)
Parameter
Name Description
other Container
Returns
Type Description
Container.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Container.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Container.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Container.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Container.Builder
Overrides

mergeLivenessProbe(Probe value)

public Container.Builder mergeLivenessProbe(Probe value)

Periodic probe of container liveness. Container will be restarted if the probe fails.

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

Parameter
Name Description
value Probe
Returns
Type Description
Container.Builder

mergeResources(ResourceRequirements value)

public Container.Builder mergeResources(ResourceRequirements value)

Compute Resource requirements by this container.

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

Parameter
Name Description
value ResourceRequirements
Returns
Type Description
Container.Builder

mergeStartupProbe(Probe value)

public Container.Builder mergeStartupProbe(Probe value)

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.

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

Parameter
Name Description
value Probe
Returns
Type Description
Container.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Container.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Container.Builder
Overrides

removeEnv(int index)

public Container.Builder removeEnv(int index)

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
Container.Builder

removePorts(int index)

public Container.Builder removePorts(int index)

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
Container.Builder

removeVolumeMounts(int index)

public Container.Builder removeVolumeMounts(int index)

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
Container.Builder

setArgs(int index, String value)

public Container.Builder setArgs(int index, String value)

Arguments to the entrypoint. The docker image's CMD is used if this is not provided.

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)

public Container.Builder setCommand(int index, String value)

Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided.

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.

setDependsOn(int index, String value)

public Container.Builder setDependsOn(int index, String value)

Names of the containers that must start before this container.

repeated string depends_on = 12;

Parameters
Name Description
index int

The index to set the value at.

value String

The dependsOn to set.

Returns
Type Description
Container.Builder

This builder for chaining.

setEnv(int index, EnvVar value)

public Container.Builder setEnv(int index, EnvVar value)

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
Container.Builder

setEnv(int index, EnvVar.Builder builderForValue)

public Container.Builder setEnv(int index, EnvVar.Builder builderForValue)

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
Container.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Container.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Container.Builder
Overrides

setImage(String value)

public Container.Builder setImage(String value)

Required. Name of the container image in Dockerhub, Google Artifact Registry, or Google Container Registry. If the host is not provided, Dockerhub is assumed.

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)

public Container.Builder setImageBytes(ByteString value)

Required. Name of the container image in Dockerhub, Google Artifact Registry, or Google Container Registry. If the host is not provided, Dockerhub is assumed.

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)

public Container.Builder setLivenessProbe(Probe value)

Periodic probe of container liveness. Container will be restarted if the probe fails.

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

Parameter
Name Description
value Probe
Returns
Type Description
Container.Builder

setLivenessProbe(Probe.Builder builderForValue)

public Container.Builder setLivenessProbe(Probe.Builder builderForValue)

Periodic probe of container liveness. Container will be restarted if the probe fails.

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

Parameter
Name Description
builderForValue Probe.Builder
Returns
Type Description
Container.Builder

setName(String value)

public Container.Builder setName(String value)

Name of the container specified as a DNS_LABEL (RFC 1123).

string name = 1;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Container.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Container.Builder setNameBytes(ByteString value)

Name of the container specified as a DNS_LABEL (RFC 1123).

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)

public Container.Builder setPorts(int index, ContainerPort value)

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
value ContainerPort
Returns
Type Description
Container.Builder

setPorts(int index, ContainerPort.Builder builderForValue)

public Container.Builder setPorts(int index, ContainerPort.Builder builderForValue)

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
Container.Builder

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

public Container.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Container.Builder
Overrides

setResources(ResourceRequirements value)

public Container.Builder setResources(ResourceRequirements value)

Compute Resource requirements by this container.

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

Parameter
Name Description
value ResourceRequirements
Returns
Type Description
Container.Builder

setResources(ResourceRequirements.Builder builderForValue)

public Container.Builder setResources(ResourceRequirements.Builder builderForValue)

Compute Resource requirements by this container.

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

Parameter
Name Description
builderForValue ResourceRequirements.Builder
Returns
Type Description
Container.Builder

setStartupProbe(Probe value)

public Container.Builder setStartupProbe(Probe value)

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.

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

Parameter
Name Description
value Probe
Returns
Type Description
Container.Builder

setStartupProbe(Probe.Builder builderForValue)

public Container.Builder setStartupProbe(Probe.Builder builderForValue)

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.

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

Parameter
Name Description
builderForValue Probe.Builder
Returns
Type Description
Container.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final Container.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Container.Builder
Overrides

setVolumeMounts(int index, VolumeMount value)

public Container.Builder setVolumeMounts(int index, VolumeMount value)

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
Container.Builder

setVolumeMounts(int index, VolumeMount.Builder builderForValue)

public Container.Builder setVolumeMounts(int index, VolumeMount.Builder builderForValue)

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
Container.Builder

setWorkingDir(String value)

public Container.Builder setWorkingDir(String value)

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)

public Container.Builder setWorkingDirBytes(ByteString value)

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.