public static final class Runnable.Container extends com.google.protobuf.GeneratedMessageV3 implements Runnable.ContainerOrBuilder
Container runnable.Protobuf type
google.cloud.batch.v1.Runnable.Container| Modifier and Type | Class and Description |
|---|---|
static class |
Runnable.Container.Builder
Container runnable.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
BLOCK_EXTERNAL_NETWORK_FIELD_NUMBER |
static int |
COMMANDS_FIELD_NUMBER |
static int |
ENABLE_IMAGE_STREAMING_FIELD_NUMBER |
static int |
ENTRYPOINT_FIELD_NUMBER |
static int |
IMAGE_URI_FIELD_NUMBER |
static int |
OPTIONS_FIELD_NUMBER |
static int |
PASSWORD_FIELD_NUMBER |
static int |
USERNAME_FIELD_NUMBER |
static int |
VOLUMES_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
boolean |
getBlockExternalNetwork()
If set to true, external network access to and from container will be
blocked, containers that are with block_external_network as true can
still communicate with each other, network cannot be specified in the
`container.options` field.
|
String |
getCommands(int index)
Required for some container images.
|
com.google.protobuf.ByteString |
getCommandsBytes(int index)
Required for some container images.
|
int |
getCommandsCount()
Required for some container images.
|
com.google.protobuf.ProtocolStringList |
getCommandsList()
Required for some container images.
|
static Runnable.Container |
getDefaultInstance() |
Runnable.Container |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
boolean |
getEnableImageStreaming()
Optional.
|
String |
getEntrypoint()
Required for some container images.
|
com.google.protobuf.ByteString |
getEntrypointBytes()
Required for some container images.
|
String |
getImageUri()
Required.
|
com.google.protobuf.ByteString |
getImageUriBytes()
Required.
|
String |
getOptions()
Required for some container images.
|
com.google.protobuf.ByteString |
getOptionsBytes()
Required for some container images.
|
com.google.protobuf.Parser<Runnable.Container> |
getParserForType() |
String |
getPassword()
Required if the container image is from a private Docker registry.
|
com.google.protobuf.ByteString |
getPasswordBytes()
Required if the container image is from a private Docker registry.
|
int |
getSerializedSize() |
String |
getUsername()
Required if the container image is from a private Docker registry.
|
com.google.protobuf.ByteString |
getUsernameBytes()
Required if the container image is from a private Docker registry.
|
String |
getVolumes(int index)
Volumes to mount (bind mount) from the host machine files or directories
into the container, formatted to match `--volume` option for the
`docker run` command—for example, `/foo:/bar` or `/foo:/bar:ro`.
|
com.google.protobuf.ByteString |
getVolumesBytes(int index)
Volumes to mount (bind mount) from the host machine files or directories
into the container, formatted to match `--volume` option for the
`docker run` command—for example, `/foo:/bar` or `/foo:/bar:ro`.
|
int |
getVolumesCount()
Volumes to mount (bind mount) from the host machine files or directories
into the container, formatted to match `--volume` option for the
`docker run` command—for example, `/foo:/bar` or `/foo:/bar:ro`.
|
com.google.protobuf.ProtocolStringList |
getVolumesList()
Volumes to mount (bind mount) from the host machine files or directories
into the container, formatted to match `--volume` option for the
`docker run` command—for example, `/foo:/bar` or `/foo:/bar:ro`.
|
int |
hashCode() |
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static Runnable.Container.Builder |
newBuilder() |
static Runnable.Container.Builder |
newBuilder(Runnable.Container prototype) |
Runnable.Container.Builder |
newBuilderForType() |
protected Runnable.Container.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static Runnable.Container |
parseDelimitedFrom(InputStream input) |
static Runnable.Container |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Runnable.Container |
parseFrom(byte[] data) |
static Runnable.Container |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Runnable.Container |
parseFrom(ByteBuffer data) |
static Runnable.Container |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Runnable.Container |
parseFrom(com.google.protobuf.ByteString data) |
static Runnable.Container |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Runnable.Container |
parseFrom(com.google.protobuf.CodedInputStream input) |
static Runnable.Container |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Runnable.Container |
parseFrom(InputStream input) |
static Runnable.Container |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<Runnable.Container> |
parser() |
Runnable.Container.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int IMAGE_URI_FIELD_NUMBER
public static final int COMMANDS_FIELD_NUMBER
public static final int ENTRYPOINT_FIELD_NUMBER
public static final int VOLUMES_FIELD_NUMBER
public static final int OPTIONS_FIELD_NUMBER
public static final int BLOCK_EXTERNAL_NETWORK_FIELD_NUMBER
public static final int USERNAME_FIELD_NUMBER
public static final int PASSWORD_FIELD_NUMBER
public static final int ENABLE_IMAGE_STREAMING_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public String getImageUri()
Required. The URI to pull the container image from.
string image_uri = 1;getImageUri in interface Runnable.ContainerOrBuilderpublic com.google.protobuf.ByteString getImageUriBytes()
Required. The URI to pull the container image from.
string image_uri = 1;getImageUriBytes in interface Runnable.ContainerOrBuilderpublic com.google.protobuf.ProtocolStringList getCommandsList()
Required for some container images. Overrides the `CMD` specified in the container. If there is an `ENTRYPOINT` (either in the container image or with the `entrypoint` field below) then these commands are appended as arguments to the `ENTRYPOINT`.
repeated string commands = 2;getCommandsList in interface Runnable.ContainerOrBuilderpublic int getCommandsCount()
Required for some container images. Overrides the `CMD` specified in the container. If there is an `ENTRYPOINT` (either in the container image or with the `entrypoint` field below) then these commands are appended as arguments to the `ENTRYPOINT`.
repeated string commands = 2;getCommandsCount in interface Runnable.ContainerOrBuilderpublic String getCommands(int index)
Required for some container images. Overrides the `CMD` specified in the container. If there is an `ENTRYPOINT` (either in the container image or with the `entrypoint` field below) then these commands are appended as arguments to the `ENTRYPOINT`.
repeated string commands = 2;getCommands in interface Runnable.ContainerOrBuilderindex - The index of the element to return.public com.google.protobuf.ByteString getCommandsBytes(int index)
Required for some container images. Overrides the `CMD` specified in the container. If there is an `ENTRYPOINT` (either in the container image or with the `entrypoint` field below) then these commands are appended as arguments to the `ENTRYPOINT`.
repeated string commands = 2;getCommandsBytes in interface Runnable.ContainerOrBuilderindex - The index of the value to return.public String getEntrypoint()
Required for some container images. Overrides the `ENTRYPOINT` specified in the container.
string entrypoint = 3;getEntrypoint in interface Runnable.ContainerOrBuilderpublic com.google.protobuf.ByteString getEntrypointBytes()
Required for some container images. Overrides the `ENTRYPOINT` specified in the container.
string entrypoint = 3;getEntrypointBytes in interface Runnable.ContainerOrBuilderpublic com.google.protobuf.ProtocolStringList getVolumesList()
Volumes to mount (bind mount) from the host machine files or directories into the container, formatted to match `--volume` option for the `docker run` command—for example, `/foo:/bar` or `/foo:/bar:ro`. If the `TaskSpec.Volumes` field is specified but this field is not, Batch will mount each volume from the host machine to the container with the same mount path by default. In this case, the default mount option for containers will be read-only (`ro`) for existing persistent disks and read-write (`rw`) for other volume types, regardless of the original mount options specified in `TaskSpec.Volumes`. If you need different mount settings, you can explicitly configure them in this field.
repeated string volumes = 7;getVolumesList in interface Runnable.ContainerOrBuilderpublic int getVolumesCount()
Volumes to mount (bind mount) from the host machine files or directories into the container, formatted to match `--volume` option for the `docker run` command—for example, `/foo:/bar` or `/foo:/bar:ro`. If the `TaskSpec.Volumes` field is specified but this field is not, Batch will mount each volume from the host machine to the container with the same mount path by default. In this case, the default mount option for containers will be read-only (`ro`) for existing persistent disks and read-write (`rw`) for other volume types, regardless of the original mount options specified in `TaskSpec.Volumes`. If you need different mount settings, you can explicitly configure them in this field.
repeated string volumes = 7;getVolumesCount in interface Runnable.ContainerOrBuilderpublic String getVolumes(int index)
Volumes to mount (bind mount) from the host machine files or directories into the container, formatted to match `--volume` option for the `docker run` command—for example, `/foo:/bar` or `/foo:/bar:ro`. If the `TaskSpec.Volumes` field is specified but this field is not, Batch will mount each volume from the host machine to the container with the same mount path by default. In this case, the default mount option for containers will be read-only (`ro`) for existing persistent disks and read-write (`rw`) for other volume types, regardless of the original mount options specified in `TaskSpec.Volumes`. If you need different mount settings, you can explicitly configure them in this field.
repeated string volumes = 7;getVolumes in interface Runnable.ContainerOrBuilderindex - The index of the element to return.public com.google.protobuf.ByteString getVolumesBytes(int index)
Volumes to mount (bind mount) from the host machine files or directories into the container, formatted to match `--volume` option for the `docker run` command—for example, `/foo:/bar` or `/foo:/bar:ro`. If the `TaskSpec.Volumes` field is specified but this field is not, Batch will mount each volume from the host machine to the container with the same mount path by default. In this case, the default mount option for containers will be read-only (`ro`) for existing persistent disks and read-write (`rw`) for other volume types, regardless of the original mount options specified in `TaskSpec.Volumes`. If you need different mount settings, you can explicitly configure them in this field.
repeated string volumes = 7;getVolumesBytes in interface Runnable.ContainerOrBuilderindex - The index of the value to return.public String getOptions()
Required for some container images. Arbitrary additional options to include in the `docker run` command when running this container—for example, `--network host`. For the `--volume` option, use the `volumes` field for the container.
string options = 8;getOptions in interface Runnable.ContainerOrBuilderpublic com.google.protobuf.ByteString getOptionsBytes()
Required for some container images. Arbitrary additional options to include in the `docker run` command when running this container—for example, `--network host`. For the `--volume` option, use the `volumes` field for the container.
string options = 8;getOptionsBytes in interface Runnable.ContainerOrBuilderpublic boolean getBlockExternalNetwork()
If set to true, external network access to and from container will be blocked, containers that are with block_external_network as true can still communicate with each other, network cannot be specified in the `container.options` field.
bool block_external_network = 9;getBlockExternalNetwork in interface Runnable.ContainerOrBuilderpublic String getUsername()
Required if the container image is from a private Docker registry. The username to login to the Docker registry that contains the image. You can either specify the username directly by using plain text or specify an encrypted username by using a Secret Manager secret: `projects/*/secrets/*/versions/*`. However, using a secret is recommended for enhanced security. Caution: If you specify the username using plain text, you risk the username being exposed to any users who can view the job or its logs. To avoid this risk, specify a secret that contains the username instead. Learn more about [Secret Manager](https://cloud.google.com/secret-manager/docs/) and [using Secret Manager with Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager).
string username = 10;getUsername in interface Runnable.ContainerOrBuilderpublic com.google.protobuf.ByteString getUsernameBytes()
Required if the container image is from a private Docker registry. The username to login to the Docker registry that contains the image. You can either specify the username directly by using plain text or specify an encrypted username by using a Secret Manager secret: `projects/*/secrets/*/versions/*`. However, using a secret is recommended for enhanced security. Caution: If you specify the username using plain text, you risk the username being exposed to any users who can view the job or its logs. To avoid this risk, specify a secret that contains the username instead. Learn more about [Secret Manager](https://cloud.google.com/secret-manager/docs/) and [using Secret Manager with Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager).
string username = 10;getUsernameBytes in interface Runnable.ContainerOrBuilderpublic String getPassword()
Required if the container image is from a private Docker registry. The password to login to the Docker registry that contains the image. For security, it is strongly recommended to specify an encrypted password by using a Secret Manager secret: `projects/*/secrets/*/versions/*`. Warning: If you specify the password using plain text, you risk the password being exposed to any users who can view the job or its logs. To avoid this risk, specify a secret that contains the password instead. Learn more about [Secret Manager](https://cloud.google.com/secret-manager/docs/) and [using Secret Manager with Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager).
string password = 11;getPassword in interface Runnable.ContainerOrBuilderpublic com.google.protobuf.ByteString getPasswordBytes()
Required if the container image is from a private Docker registry. The password to login to the Docker registry that contains the image. For security, it is strongly recommended to specify an encrypted password by using a Secret Manager secret: `projects/*/secrets/*/versions/*`. Warning: If you specify the password using plain text, you risk the password being exposed to any users who can view the job or its logs. To avoid this risk, specify a secret that contains the password instead. Learn more about [Secret Manager](https://cloud.google.com/secret-manager/docs/) and [using Secret Manager with Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager).
string password = 11;getPasswordBytes in interface Runnable.ContainerOrBuilderpublic boolean getEnableImageStreaming()
Optional. If set to true, this container runnable uses Image streaming. Use Image streaming to allow the runnable to initialize without waiting for the entire container image to download, which can significantly reduce startup time for large container images. When `enableImageStreaming` is set to true, the container runtime is [containerd](https://containerd.io/) instead of Docker. Additionally, this container runnable only supports the following `container` subfields: `imageUri`, `commands[]`, `entrypoint`, and `volumes[]`; any other `container` subfields are ignored. For more information about the requirements and limitations for using Image streaming with Batch, see the [`image-streaming` sample on GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming).
bool enable_image_streaming = 12 [(.google.api.field_behavior) = OPTIONAL];getEnableImageStreaming in interface Runnable.ContainerOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static Runnable.Container parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Runnable.Container parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Runnable.Container parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Runnable.Container parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Runnable.Container parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Runnable.Container parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Runnable.Container parseFrom(InputStream input) throws IOException
IOExceptionpublic static Runnable.Container parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Runnable.Container parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static Runnable.Container parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Runnable.Container parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static Runnable.Container parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic Runnable.Container.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static Runnable.Container.Builder newBuilder()
public static Runnable.Container.Builder newBuilder(Runnable.Container prototype)
public Runnable.Container.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected Runnable.Container.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static Runnable.Container getDefaultInstance()
public static com.google.protobuf.Parser<Runnable.Container> parser()
public com.google.protobuf.Parser<Runnable.Container> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public Runnable.Container getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2025 Google LLC. All rights reserved.