Class WorkstationConfig.Container (0.43.0)

public static final class WorkstationConfig.Container extends GeneratedMessageV3 implements WorkstationConfig.ContainerOrBuilder

A Docker container.

Protobuf type google.cloud.workstations.v1.WorkstationConfig.Container

Static Fields

ARGS_FIELD_NUMBER

public static final int ARGS_FIELD_NUMBER
Field Value
Type Description
int

COMMAND_FIELD_NUMBER

public static final int COMMAND_FIELD_NUMBER
Field Value
Type Description
int

ENV_FIELD_NUMBER

public static final int ENV_FIELD_NUMBER
Field Value
Type Description
int

IMAGE_FIELD_NUMBER

public static final int IMAGE_FIELD_NUMBER
Field Value
Type Description
int

RUN_AS_USER_FIELD_NUMBER

public static final int RUN_AS_USER_FIELD_NUMBER
Field Value
Type Description
int

WORKING_DIR_FIELD_NUMBER

public static final int WORKING_DIR_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static WorkstationConfig.Container getDefaultInstance()
Returns
Type Description
WorkstationConfig.Container

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static WorkstationConfig.Container.Builder newBuilder()
Returns
Type Description
WorkstationConfig.Container.Builder

newBuilder(WorkstationConfig.Container prototype)

public static WorkstationConfig.Container.Builder newBuilder(WorkstationConfig.Container prototype)
Parameter
Name Description
prototype WorkstationConfig.Container
Returns
Type Description
WorkstationConfig.Container.Builder

parseDelimitedFrom(InputStream input)

public static WorkstationConfig.Container parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
WorkstationConfig.Container
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static WorkstationConfig.Container parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
WorkstationConfig.Container
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static WorkstationConfig.Container parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
WorkstationConfig.Container
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static WorkstationConfig.Container parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
WorkstationConfig.Container
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static WorkstationConfig.Container parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
WorkstationConfig.Container
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static WorkstationConfig.Container parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
WorkstationConfig.Container
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static WorkstationConfig.Container parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
WorkstationConfig.Container
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static WorkstationConfig.Container parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
WorkstationConfig.Container
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static WorkstationConfig.Container parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
WorkstationConfig.Container
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static WorkstationConfig.Container parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
WorkstationConfig.Container
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static WorkstationConfig.Container parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
WorkstationConfig.Container
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static WorkstationConfig.Container parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
WorkstationConfig.Container
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<WorkstationConfig.Container> parser()
Returns
Type Description
Parser<Container>

Methods

containsEnv(String key)

public boolean containsEnv(String key)

Optional. Environment variables passed to the container's entrypoint.

map<string, string> env = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getArgs(int index)

public String getArgs(int index)

Optional. Arguments passed to the entrypoint.

repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL];

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)

Optional. Arguments passed to the entrypoint.

repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL];

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()

Optional. Arguments passed to the entrypoint.

repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of args.

getArgsList()

public ProtocolStringList getArgsList()

Optional. Arguments passed to the entrypoint.

repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the args.

getCommand(int index)

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];

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)

Optional. If set, overrides the default ENTRYPOINT specified by the image.

repeated string command = 2 [(.google.api.field_behavior) = OPTIONAL];

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()

Optional. If set, overrides the default ENTRYPOINT specified by the image.

repeated string command = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of command.

getCommandList()

public ProtocolStringList getCommandList()

Optional. If set, overrides the default ENTRYPOINT specified by the image.

repeated string command = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the command.

getDefaultInstanceForType()

public WorkstationConfig.Container getDefaultInstanceForType()
Returns
Type Description
WorkstationConfig.Container

getEnv() (deprecated)

public Map<String,String> getEnv()

Use #getEnvMap() instead.

Returns
Type Description
Map<String,String>

getEnvCount()

public int getEnvCount()

Optional. Environment variables passed to the container's entrypoint.

map<string, string> env = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

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];

Returns
Type Description
Map<String,String>

getEnvOrDefault(String key, String defaultValue)

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];

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getEnvOrThrow(String key)

public String getEnvOrThrow(String key)

Optional. Environment variables passed to the container's entrypoint.

map<string, string> env = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
String

getImage()

public String getImage()

Optional. A Docker container image that defines a custom environment.

Cloud Workstations provides a number of preconfigured images, but you can create your own 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
Type Description
String

The image.

getImageBytes()

public ByteString getImageBytes()

Optional. A Docker container image that defines a custom environment.

Cloud Workstations provides a number of preconfigured images, but you can create your own 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
Type Description
ByteString

The bytes for image.

getParserForType()

public Parser<WorkstationConfig.Container> getParserForType()
Returns
Type Description
Parser<Container>
Overrides

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];

Returns
Type Description
int

The runAsUser.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getWorkingDir()

public String getWorkingDir()

Optional. If set, overrides the default DIR specified by the image.

string working_dir = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The workingDir.

getWorkingDirBytes()

public ByteString getWorkingDirBytes()

Optional. If set, overrides the default DIR specified by the image.

string working_dir = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for workingDir.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public WorkstationConfig.Container.Builder newBuilderForType()
Returns
Type Description
WorkstationConfig.Container.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected WorkstationConfig.Container.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
WorkstationConfig.Container.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public WorkstationConfig.Container.Builder toBuilder()
Returns
Type Description
WorkstationConfig.Container.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException