Class WorkstationConfig.Container.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<WorkstationConfig.Container.Builder>
-
- com.google.cloud.workstations.v1beta.WorkstationConfig.Container.Builder
-
- All Implemented Interfaces:
WorkstationConfig.ContainerOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
- WorkstationConfig.Container
public static final class WorkstationConfig.Container.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<WorkstationConfig.Container.Builder> implements WorkstationConfig.ContainerOrBuilder
A Docker container.
Protobuf typegoogle.cloud.workstations.v1beta.WorkstationConfig.Container
-
-
Method Summary
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetMapField
protected com.google.protobuf.MapField internalGetMapField(int number)
- Overrides:
internalGetMapField
in classcom.google.protobuf.GeneratedMessageV3.Builder<WorkstationConfig.Container.Builder>
-
internalGetMutableMapField
protected com.google.protobuf.MapField internalGetMutableMapField(int number)
- Overrides:
internalGetMutableMapField
in classcom.google.protobuf.GeneratedMessageV3.Builder<WorkstationConfig.Container.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<WorkstationConfig.Container.Builder>
-
clear
public WorkstationConfig.Container.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<WorkstationConfig.Container.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<WorkstationConfig.Container.Builder>
-
getDefaultInstanceForType
public WorkstationConfig.Container getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public WorkstationConfig.Container build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public WorkstationConfig.Container buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public WorkstationConfig.Container.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<WorkstationConfig.Container.Builder>
-
setField
public WorkstationConfig.Container.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<WorkstationConfig.Container.Builder>
-
clearField
public WorkstationConfig.Container.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<WorkstationConfig.Container.Builder>
-
clearOneof
public WorkstationConfig.Container.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<WorkstationConfig.Container.Builder>
-
setRepeatedField
public WorkstationConfig.Container.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<WorkstationConfig.Container.Builder>
-
addRepeatedField
public WorkstationConfig.Container.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<WorkstationConfig.Container.Builder>
-
mergeFrom
public WorkstationConfig.Container.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<WorkstationConfig.Container.Builder>
-
mergeFrom
public WorkstationConfig.Container.Builder mergeFrom(WorkstationConfig.Container other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<WorkstationConfig.Container.Builder>
-
mergeFrom
public WorkstationConfig.Container.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<WorkstationConfig.Container.Builder>
- Throws:
IOException
-
getImage
public String getImage()
Optional. A Docker container image that defines a custom environment. Cloud Workstations provides a number of [preconfigured images](https://cloud.google.com/workstations/docs/preconfigured-base-images), but you can create your own [custom container images](https://cloud.google.com/workstations/docs/custom-container-images). If using a private image, the `host.gceInstance.serviceAccount` field must be specified in the workstation configuration and must have permission to pull the specified image. Otherwise, the image must be publicly accessible.
string image = 1 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getImage
in interfaceWorkstationConfig.ContainerOrBuilder
- Returns:
- The image.
-
getImageBytes
public com.google.protobuf.ByteString getImageBytes()
Optional. A Docker container image that defines a custom environment. Cloud Workstations provides a number of [preconfigured images](https://cloud.google.com/workstations/docs/preconfigured-base-images), but you can create your own [custom container images](https://cloud.google.com/workstations/docs/custom-container-images). If using a private image, the `host.gceInstance.serviceAccount` field must be specified in the workstation configuration and must have permission to pull the specified image. Otherwise, the image must be publicly accessible.
string image = 1 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getImageBytes
in interfaceWorkstationConfig.ContainerOrBuilder
- Returns:
- The bytes for image.
-
setImage
public WorkstationConfig.Container.Builder setImage(String value)
Optional. A Docker container image that defines a custom environment. Cloud Workstations provides a number of [preconfigured images](https://cloud.google.com/workstations/docs/preconfigured-base-images), but you can create your own [custom container images](https://cloud.google.com/workstations/docs/custom-container-images). If using a private image, the `host.gceInstance.serviceAccount` field must be specified in the workstation configuration and must have permission to pull the specified image. Otherwise, the image must be publicly accessible.
string image = 1 [(.google.api.field_behavior) = OPTIONAL];
- Parameters:
value
- The image to set.- Returns:
- This builder for chaining.
-
clearImage
public WorkstationConfig.Container.Builder clearImage()
Optional. A Docker container image that defines a custom environment. Cloud Workstations provides a number of [preconfigured images](https://cloud.google.com/workstations/docs/preconfigured-base-images), but you can create your own [custom container images](https://cloud.google.com/workstations/docs/custom-container-images). If using a private image, the `host.gceInstance.serviceAccount` field must be specified in the workstation configuration and must have permission to pull the specified image. Otherwise, the image must be publicly accessible.
string image = 1 [(.google.api.field_behavior) = OPTIONAL];
- Returns:
- This builder for chaining.
-
setImageBytes
public WorkstationConfig.Container.Builder setImageBytes(com.google.protobuf.ByteString value)
Optional. A Docker container image that defines a custom environment. Cloud Workstations provides a number of [preconfigured images](https://cloud.google.com/workstations/docs/preconfigured-base-images), but you can create your own [custom container images](https://cloud.google.com/workstations/docs/custom-container-images). If using a private image, the `host.gceInstance.serviceAccount` field must be specified in the workstation configuration and must have permission to pull the specified image. Otherwise, the image must be publicly accessible.
string image = 1 [(.google.api.field_behavior) = OPTIONAL];
- Parameters:
value
- The bytes for image to set.- Returns:
- This builder for chaining.
-
getCommandList
public com.google.protobuf.ProtocolStringList getCommandList()
Optional. If set, overrides the default ENTRYPOINT specified by the image.
repeated string command = 2 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getCommandList
in interfaceWorkstationConfig.ContainerOrBuilder
- Returns:
- A list containing the command.
-
getCommandCount
public int getCommandCount()
Optional. If set, overrides the default ENTRYPOINT specified by the image.
repeated string command = 2 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getCommandCount
in interfaceWorkstationConfig.ContainerOrBuilder
- Returns:
- The count of command.
-
getCommand
public String getCommand(int index)
Optional. If set, overrides the default ENTRYPOINT specified by the image.
repeated string command = 2 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getCommand
in interfaceWorkstationConfig.ContainerOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The command at the given index.
-
getCommandBytes
public com.google.protobuf.ByteString getCommandBytes(int index)
Optional. If set, overrides the default ENTRYPOINT specified by the image.
repeated string command = 2 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getCommandBytes
in interfaceWorkstationConfig.ContainerOrBuilder
- Parameters:
index
- The index of the value to return.- Returns:
- The bytes of the command at the given index.
-
setCommand
public WorkstationConfig.Container.Builder setCommand(int index, String value)
Optional. If set, overrides the default ENTRYPOINT specified by the image.
repeated string command = 2 [(.google.api.field_behavior) = OPTIONAL];
- Parameters:
index
- The index to set the value at.value
- The command to set.- Returns:
- This builder for chaining.
-
addCommand
public WorkstationConfig.Container.Builder addCommand(String value)
Optional. If set, overrides the default ENTRYPOINT specified by the image.
repeated string command = 2 [(.google.api.field_behavior) = OPTIONAL];
- Parameters:
value
- The command to add.- Returns:
- This builder for chaining.
-
addAllCommand
public WorkstationConfig.Container.Builder addAllCommand(Iterable<String> values)
Optional. If set, overrides the default ENTRYPOINT specified by the image.
repeated string command = 2 [(.google.api.field_behavior) = OPTIONAL];
- Parameters:
values
- The command to add.- Returns:
- This builder for chaining.
-
clearCommand
public WorkstationConfig.Container.Builder clearCommand()
Optional. If set, overrides the default ENTRYPOINT specified by the image.
repeated string command = 2 [(.google.api.field_behavior) = OPTIONAL];
- Returns:
- This builder for chaining.
-
addCommandBytes
public WorkstationConfig.Container.Builder addCommandBytes(com.google.protobuf.ByteString value)
Optional. If set, overrides the default ENTRYPOINT specified by the image.
repeated string command = 2 [(.google.api.field_behavior) = OPTIONAL];
- Parameters:
value
- The bytes of the command to add.- Returns:
- This builder for chaining.
-
getArgsList
public com.google.protobuf.ProtocolStringList getArgsList()
Optional. Arguments passed to the entrypoint.
repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getArgsList
in interfaceWorkstationConfig.ContainerOrBuilder
- Returns:
- A list containing the args.
-
getArgsCount
public int getArgsCount()
Optional. Arguments passed to the entrypoint.
repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getArgsCount
in interfaceWorkstationConfig.ContainerOrBuilder
- Returns:
- The count of args.
-
getArgs
public String getArgs(int index)
Optional. Arguments passed to the entrypoint.
repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getArgs
in interfaceWorkstationConfig.ContainerOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The args at the given index.
-
getArgsBytes
public com.google.protobuf.ByteString getArgsBytes(int index)
Optional. Arguments passed to the entrypoint.
repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getArgsBytes
in interfaceWorkstationConfig.ContainerOrBuilder
- Parameters:
index
- The index of the value to return.- Returns:
- The bytes of the args at the given index.
-
setArgs
public WorkstationConfig.Container.Builder setArgs(int index, String value)
Optional. Arguments passed to the entrypoint.
repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL];
- Parameters:
index
- The index to set the value at.value
- The args to set.- Returns:
- This builder for chaining.
-
addArgs
public WorkstationConfig.Container.Builder addArgs(String value)
Optional. Arguments passed to the entrypoint.
repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL];
- Parameters:
value
- The args to add.- Returns:
- This builder for chaining.
-
addAllArgs
public WorkstationConfig.Container.Builder addAllArgs(Iterable<String> values)
Optional. Arguments passed to the entrypoint.
repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL];
- Parameters:
values
- The args to add.- Returns:
- This builder for chaining.
-
clearArgs
public WorkstationConfig.Container.Builder clearArgs()
Optional. Arguments passed to the entrypoint.
repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL];
- Returns:
- This builder for chaining.
-
addArgsBytes
public WorkstationConfig.Container.Builder addArgsBytes(com.google.protobuf.ByteString value)
Optional. Arguments passed to the entrypoint.
repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL];
- Parameters:
value
- The bytes of the args to add.- Returns:
- This builder for chaining.
-
getEnvCount
public int getEnvCount()
Description copied from interface:WorkstationConfig.ContainerOrBuilder
Optional. Environment variables passed to the container's entrypoint.
map<string, string> env = 4 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getEnvCount
in interfaceWorkstationConfig.ContainerOrBuilder
-
containsEnv
public boolean containsEnv(String key)
Optional. Environment variables passed to the container's entrypoint.
map<string, string> env = 4 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
containsEnv
in interfaceWorkstationConfig.ContainerOrBuilder
-
getEnv
@Deprecated public Map<String,String> getEnv()
Deprecated.UsegetEnvMap()
instead.- Specified by:
getEnv
in interfaceWorkstationConfig.ContainerOrBuilder
-
getEnvMap
public Map<String,String> getEnvMap()
Optional. Environment variables passed to the container's entrypoint.
map<string, string> env = 4 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getEnvMap
in interfaceWorkstationConfig.ContainerOrBuilder
-
getEnvOrDefault
public String getEnvOrDefault(String key, String defaultValue)
Optional. Environment variables passed to the container's entrypoint.
map<string, string> env = 4 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getEnvOrDefault
in interfaceWorkstationConfig.ContainerOrBuilder
-
getEnvOrThrow
public String getEnvOrThrow(String key)
Optional. Environment variables passed to the container's entrypoint.
map<string, string> env = 4 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getEnvOrThrow
in interfaceWorkstationConfig.ContainerOrBuilder
-
clearEnv
public WorkstationConfig.Container.Builder clearEnv()
-
removeEnv
public WorkstationConfig.Container.Builder removeEnv(String key)
Optional. Environment variables passed to the container's entrypoint.
map<string, string> env = 4 [(.google.api.field_behavior) = OPTIONAL];
-
getMutableEnv
@Deprecated public Map<String,String> getMutableEnv()
Deprecated.Use alternate mutation accessors instead.
-
putEnv
public WorkstationConfig.Container.Builder putEnv(String key, String value)
Optional. Environment variables passed to the container's entrypoint.
map<string, string> env = 4 [(.google.api.field_behavior) = OPTIONAL];
-
putAllEnv
public WorkstationConfig.Container.Builder putAllEnv(Map<String,String> values)
Optional. Environment variables passed to the container's entrypoint.
map<string, string> env = 4 [(.google.api.field_behavior) = OPTIONAL];
-
getWorkingDir
public String getWorkingDir()
Optional. If set, overrides the default DIR specified by the image.
string working_dir = 5 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getWorkingDir
in interfaceWorkstationConfig.ContainerOrBuilder
- Returns:
- The workingDir.
-
getWorkingDirBytes
public com.google.protobuf.ByteString getWorkingDirBytes()
Optional. If set, overrides the default DIR specified by the image.
string working_dir = 5 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getWorkingDirBytes
in interfaceWorkstationConfig.ContainerOrBuilder
- Returns:
- The bytes for workingDir.
-
setWorkingDir
public WorkstationConfig.Container.Builder setWorkingDir(String value)
Optional. If set, overrides the default DIR specified by the image.
string working_dir = 5 [(.google.api.field_behavior) = OPTIONAL];
- Parameters:
value
- The workingDir to set.- Returns:
- This builder for chaining.
-
clearWorkingDir
public WorkstationConfig.Container.Builder clearWorkingDir()
Optional. If set, overrides the default DIR specified by the image.
string working_dir = 5 [(.google.api.field_behavior) = OPTIONAL];
- Returns:
- This builder for chaining.
-
setWorkingDirBytes
public WorkstationConfig.Container.Builder setWorkingDirBytes(com.google.protobuf.ByteString value)
Optional. If set, overrides the default DIR specified by the image.
string working_dir = 5 [(.google.api.field_behavior) = OPTIONAL];
- Parameters:
value
- The bytes for workingDir to set.- Returns:
- This builder for chaining.
-
getRunAsUser
public int getRunAsUser()
Optional. If set, overrides the USER specified in the image with the given uid.
int32 run_as_user = 6 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getRunAsUser
in interfaceWorkstationConfig.ContainerOrBuilder
- Returns:
- The runAsUser.
-
setRunAsUser
public WorkstationConfig.Container.Builder setRunAsUser(int value)
Optional. If set, overrides the USER specified in the image with the given uid.
int32 run_as_user = 6 [(.google.api.field_behavior) = OPTIONAL];
- Parameters:
value
- The runAsUser to set.- Returns:
- This builder for chaining.
-
clearRunAsUser
public WorkstationConfig.Container.Builder clearRunAsUser()
Optional. If set, overrides the USER specified in the image with the given uid.
int32 run_as_user = 6 [(.google.api.field_behavior) = OPTIONAL];
- Returns:
- This builder for chaining.
-
setUnknownFields
public final WorkstationConfig.Container.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<WorkstationConfig.Container.Builder>
-
mergeUnknownFields
public final WorkstationConfig.Container.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<WorkstationConfig.Container.Builder>
-
-