Package com.google.cloud.batch.v1alpha
Class Runnable.Container
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.batch.v1alpha.Runnable.Container
- All Implemented Interfaces:
Runnable.ContainerOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
- Enclosing class:
- Runnable
public static final class Runnable.Container
extends com.google.protobuf.GeneratedMessage
implements Runnable.ContainerOrBuilder
Container runnable.Protobuf type
google.cloud.batch.v1alpha.Runnable.Container- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classContainer runnable.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanIf 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.getCommands(int index) Required for some container images.com.google.protobuf.ByteStringgetCommandsBytes(int index) Required for some container images.intRequired for some container images.com.google.protobuf.ProtocolStringListRequired for some container images.static Runnable.Containerstatic final com.google.protobuf.Descriptors.DescriptorbooleanOptional.Required for some container images.com.google.protobuf.ByteStringRequired for some container images.Required.com.google.protobuf.ByteStringRequired.Required for some container images.com.google.protobuf.ByteStringRequired for some container images.com.google.protobuf.Parser<Runnable.Container>Required if the container image is from a private Docker registry.com.google.protobuf.ByteStringRequired if the container image is from a private Docker registry.intRequired if the container image is from a private Docker registry.com.google.protobuf.ByteStringRequired if the container image is from a private Docker registry.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.ByteStringgetVolumesBytes(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`.intVolumes 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.ProtocolStringListVolumes 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`.inthashCode()protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic Runnable.Container.Builderstatic Runnable.Container.BuildernewBuilder(Runnable.Container prototype) protected Runnable.Container.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static Runnable.ContainerparseDelimitedFrom(InputStream input) static Runnable.ContainerparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Runnable.ContainerparseFrom(byte[] data) static Runnable.ContainerparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Runnable.ContainerparseFrom(com.google.protobuf.ByteString data) static Runnable.ContainerparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Runnable.ContainerparseFrom(com.google.protobuf.CodedInputStream input) static Runnable.ContainerparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Runnable.ContainerparseFrom(InputStream input) static Runnable.ContainerparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Runnable.ContainerparseFrom(ByteBuffer data) static Runnable.ContainerparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<Runnable.Container>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
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, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
IMAGE_URI_FIELD_NUMBER
public static final int IMAGE_URI_FIELD_NUMBER- See Also:
-
COMMANDS_FIELD_NUMBER
public static final int COMMANDS_FIELD_NUMBER- See Also:
-
ENTRYPOINT_FIELD_NUMBER
public static final int ENTRYPOINT_FIELD_NUMBER- See Also:
-
VOLUMES_FIELD_NUMBER
public static final int VOLUMES_FIELD_NUMBER- See Also:
-
OPTIONS_FIELD_NUMBER
public static final int OPTIONS_FIELD_NUMBER- See Also:
-
BLOCK_EXTERNAL_NETWORK_FIELD_NUMBER
public static final int BLOCK_EXTERNAL_NETWORK_FIELD_NUMBER- See Also:
-
USERNAME_FIELD_NUMBER
public static final int USERNAME_FIELD_NUMBER- See Also:
-
PASSWORD_FIELD_NUMBER
public static final int PASSWORD_FIELD_NUMBER- See Also:
-
ENABLE_IMAGE_STREAMING_FIELD_NUMBER
public static final int ENABLE_IMAGE_STREAMING_FIELD_NUMBER- See Also:
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
getImageUri
Required. The URI to pull the container image from.
string image_uri = 1;- Specified by:
getImageUriin interfaceRunnable.ContainerOrBuilder- Returns:
- The imageUri.
-
getImageUriBytes
public com.google.protobuf.ByteString getImageUriBytes()Required. The URI to pull the container image from.
string image_uri = 1;- Specified by:
getImageUriBytesin interfaceRunnable.ContainerOrBuilder- Returns:
- The bytes for imageUri.
-
getCommandsList
public 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;- Specified by:
getCommandsListin interfaceRunnable.ContainerOrBuilder- Returns:
- A list containing the commands.
-
getCommandsCount
public 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;- Specified by:
getCommandsCountin interfaceRunnable.ContainerOrBuilder- Returns:
- The count of commands.
-
getCommands
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;- Specified by:
getCommandsin interfaceRunnable.ContainerOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The commands at the given index.
-
getCommandsBytes
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;- Specified by:
getCommandsBytesin interfaceRunnable.ContainerOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the commands at the given index.
-
getEntrypoint
Required for some container images. Overrides the `ENTRYPOINT` specified in the container.
string entrypoint = 3;- Specified by:
getEntrypointin interfaceRunnable.ContainerOrBuilder- Returns:
- The entrypoint.
-
getEntrypointBytes
public com.google.protobuf.ByteString getEntrypointBytes()Required for some container images. Overrides the `ENTRYPOINT` specified in the container.
string entrypoint = 3;- Specified by:
getEntrypointBytesin interfaceRunnable.ContainerOrBuilder- Returns:
- The bytes for entrypoint.
-
getVolumesList
public 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;- Specified by:
getVolumesListin interfaceRunnable.ContainerOrBuilder- Returns:
- A list containing the volumes.
-
getVolumesCount
public 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;- Specified by:
getVolumesCountin interfaceRunnable.ContainerOrBuilder- Returns:
- The count of volumes.
-
getVolumes
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;- Specified by:
getVolumesin interfaceRunnable.ContainerOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The volumes at the given index.
-
getVolumesBytes
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;- Specified by:
getVolumesBytesin interfaceRunnable.ContainerOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the volumes at the given index.
-
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;- Specified by:
getOptionsin interfaceRunnable.ContainerOrBuilder- Returns:
- The options.
-
getOptionsBytes
public 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;- Specified by:
getOptionsBytesin interfaceRunnable.ContainerOrBuilder- Returns:
- The bytes for options.
-
getBlockExternalNetwork
public 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;- Specified by:
getBlockExternalNetworkin interfaceRunnable.ContainerOrBuilder- Returns:
- The blockExternalNetwork.
-
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;- Specified by:
getUsernamein interfaceRunnable.ContainerOrBuilder- Returns:
- The username.
-
getUsernameBytes
public 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;- Specified by:
getUsernameBytesin interfaceRunnable.ContainerOrBuilder- Returns:
- The bytes for username.
-
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;- Specified by:
getPasswordin interfaceRunnable.ContainerOrBuilder- Returns:
- The password.
-
getPasswordBytes
public 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;- Specified by:
getPasswordBytesin interfaceRunnable.ContainerOrBuilder- Returns:
- The bytes for password.
-
getEnableImageStreaming
public 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];- Specified by:
getEnableImageStreamingin interfaceRunnable.ContainerOrBuilder- Returns:
- The enableImageStreaming.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static Runnable.Container parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Runnable.Container parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Runnable.Container parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Runnable.Container parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Runnable.Container parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Runnable.Container parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Runnable.Container parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static Runnable.Container parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static Runnable.Container parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static Runnable.Container parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Runnable.Container.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-