public final class Container extends GeneratedMessageV3 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 may be supplied by the system to the container
at runtime.
Protobuf type google.cloud.run.v2.Container
Static Fields
ARGS_FIELD_NUMBER
public static final int ARGS_FIELD_NUMBER
Field Value
COMMAND_FIELD_NUMBER
public static final int COMMAND_FIELD_NUMBER
Field Value
ENV_FIELD_NUMBER
public static final int ENV_FIELD_NUMBER
Field Value
IMAGE_FIELD_NUMBER
public static final int IMAGE_FIELD_NUMBER
Field Value
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value
PORTS_FIELD_NUMBER
public static final int PORTS_FIELD_NUMBER
Field Value
RESOURCES_FIELD_NUMBER
public static final int RESOURCES_FIELD_NUMBER
Field Value
VOLUME_MOUNTS_FIELD_NUMBER
public static final int VOLUME_MOUNTS_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static Container getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static Container.Builder newBuilder()
Returns
newBuilder(Container prototype)
public static Container.Builder newBuilder(Container prototype)
Parameter
Returns
public static Container parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static Container parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static Container parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Container parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static Container parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Container parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Container parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static Container parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Container parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static Container parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static Container parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Container parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<Container> parser()
Returns
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getArgs(int index)
public String getArgs(int index)
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)
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()
Returns
Type | Description |
int | The count of args.
|
getArgsList()
public ProtocolStringList getArgsList()
Returns
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.
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)
public ByteString getCommandBytes(int index)
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()
public int getCommandCount()
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()
public ProtocolStringList getCommandList()
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
getDefaultInstanceForType()
public Container getDefaultInstanceForType()
Returns
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
Returns
getEnvCount()
List of environment variables to set in the container.
repeated .google.cloud.run.v2.EnvVar env = 5;
Returns
getEnvList()
public List<EnvVar> getEnvList()
List of environment variables to set in the container.
repeated .google.cloud.run.v2.EnvVar env = 5;
Returns
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
Returns
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()
Returns
Type | Description |
String | The image.
|
getImageBytes()
public ByteString getImageBytes()
Returns
getName()
Name of the container specified as a DNS_LABEL.
string name = 1;
Returns
Type | Description |
String | The name.
|
getNameBytes()
public ByteString getNameBytes()
Name of the container specified as a DNS_LABEL.
string name = 1;
Returns
getParserForType()
public Parser<Container> getParserForType()
Returns
Overrides
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
Returns
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
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
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
Returns
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()
Returns
getResourcesOrBuilder()
public ResourceRequirementsOrBuilder getResourcesOrBuilder()
Returns
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
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
Returns
getVolumeMountsCount()
public int getVolumeMountsCount()
Volume to mount into the container's filesystem.
repeated .google.cloud.run.v2.VolumeMount volume_mounts = 8;
Returns
getVolumeMountsList()
public List<VolumeMount> getVolumeMountsList()
Volume to mount into the container's filesystem.
repeated .google.cloud.run.v2.VolumeMount volume_mounts = 8;
Returns
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
Returns
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> | |
hasResources()
public boolean hasResources()
Returns
Type | Description |
boolean | Whether the resources field is set.
|
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public Container.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Container.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public Container.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions