Class WorkstationConfig.Container (0.12.0)

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

A Docker container.

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

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

RUN_AS_USER_FIELD_NUMBER

public static final int RUN_AS_USER_FIELD_NUMBER
Field Value
TypeDescription
int

WORKING_DIR_FIELD_NUMBER

public static final int WORKING_DIR_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static WorkstationConfig.Container getDefaultInstance()
Returns
TypeDescription
WorkstationConfig.Container

getDescriptor()

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

newBuilder()

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

newBuilder(WorkstationConfig.Container prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

public static Parser<WorkstationConfig.Container> parser()
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

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

Optional. Arguments passed to the entrypoint.

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

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

Optional. Arguments passed to the entrypoint.

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

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

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

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

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

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

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

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

A list containing the command.

getDefaultInstanceForType()

public WorkstationConfig.Container getDefaultInstanceForType()
Returns
TypeDescription
WorkstationConfig.Container

getEnv()

public Map<String,String> getEnv()

Use #getEnvMap() instead.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
keyString
defaultValueString
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for image.

getParserForType()

public Parser<WorkstationConfig.Container> getParserForType()
Returns
TypeDescription
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
TypeDescription
int

The runAsUser.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for workingDir.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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