Class Container (0.2.0)

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

Implements

ContainerOrBuilder

Static Fields

ARGS_FIELD_NUMBER

public static final int ARGS_FIELD_NUMBER
Field Value
TypeDescription
int

COMMAND_FIELD_NUMBER

public static final int COMMAND_FIELD_NUMBER
Field Value
TypeDescription
int

ENV_FIELD_NUMBER

public static final int ENV_FIELD_NUMBER
Field Value
TypeDescription
int

IMAGE_FIELD_NUMBER

public static final int IMAGE_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

PORTS_FIELD_NUMBER

public static final int PORTS_FIELD_NUMBER
Field Value
TypeDescription
int

RESOURCES_FIELD_NUMBER

public static final int RESOURCES_FIELD_NUMBER
Field Value
TypeDescription
int

VOLUME_MOUNTS_FIELD_NUMBER

public static final int VOLUME_MOUNTS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Container getDefaultInstance()
Returns
TypeDescription
Container

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Container.Builder newBuilder()
Returns
TypeDescription
Container.Builder

newBuilder(Container prototype)

public static Container.Builder newBuilder(Container prototype)
Parameter
NameDescription
prototypeContainer
Returns
TypeDescription
Container.Builder

parseDelimitedFrom(InputStream input)

public static Container parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Container
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Container parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Container
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Container parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Container
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Container parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Container
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Container parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Container
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Container parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Container
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Container parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Container
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Container parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Container
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Container parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Container
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Container parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Container
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Container parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Container
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Container parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Container
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Container> parser()
Returns
TypeDescription
Parser<Container>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
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. 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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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. 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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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. 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
TypeDescription
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. 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
TypeDescription
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. 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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ProtocolStringList

A list containing the command.

getDefaultInstanceForType()

public Container getDefaultInstanceForType()
Returns
TypeDescription
Container

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
NameDescription
indexint
Returns
TypeDescription
EnvVar

getEnvCount()

public int getEnvCount()

List of environment variables to set in the container.

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

Returns
TypeDescription
int

getEnvList()

public List<EnvVar> getEnvList()

List of environment variables to set in the container.

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

Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
List<? extends com.google.cloud.run.v2.EnvVarOrBuilder>

getImage()

public String getImage()

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

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

Returns
TypeDescription
String

The image.

getImageBytes()

public ByteString getImageBytes()

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

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

Returns
TypeDescription
ByteString

The bytes for image.

getName()

public String getName()

Name of the container specified as a DNS_LABEL.

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Name of the container specified as a DNS_LABEL.

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getParserForType()

public Parser<Container> getParserForType()
Returns
TypeDescription
Parser<Container>
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
NameDescription
indexint
Returns
TypeDescription
ContainerPort

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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
List<? extends com.google.cloud.run.v2.ContainerPortOrBuilder>

getResources()

public ResourceRequirements getResources()

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
TypeDescription
ResourceRequirements

The resources.

getResourcesOrBuilder()

public ResourceRequirementsOrBuilder getResourcesOrBuilder()

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
TypeDescription
ResourceRequirementsOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
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
NameDescription
indexint
Returns
TypeDescription
VolumeMount

getVolumeMountsCount()

public int getVolumeMountsCount()

Volume to mount into the container's filesystem.

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

Returns
TypeDescription
int

getVolumeMountsList()

public List<VolumeMount> getVolumeMountsList()

Volume to mount into the container's filesystem.

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

Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
List<? extends com.google.cloud.run.v2.VolumeMountOrBuilder>

hasResources()

public boolean hasResources()

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
TypeDescription
boolean

Whether the resources field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Container.Builder newBuilderForType()
Returns
TypeDescription
Container.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Container.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Container.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Container.Builder toBuilder()
Returns
TypeDescription
Container.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException