Package com.google.cloud.shell.v1
Class Environment.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Environment.Builder>
com.google.cloud.shell.v1.Environment.Builder
- All Implemented Interfaces:
EnvironmentOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- Environment
public static final class Environment.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Environment.Builder>
implements EnvironmentOrBuilder
A Cloud Shell environment, which is defined as the combination of a Docker image specifying what is installed on the environment and a home directory containing the user's data that will remain across sessions. Each user has at least an environment with the ID "default".Protobuf type
google.cloud.shell.v1.Environment-
Method Summary
Modifier and TypeMethodDescriptionaddAllPublicKeys(Iterable<String> values) Output only.addPublicKeys(String value) Output only.addPublicKeysBytes(com.google.protobuf.ByteString value) Output only.build()clear()Required.clearId()Output only.Immutable.Output only.Output only.Output only.Output only.Output only.Output only.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorRequired.com.google.protobuf.ByteStringRequired.getId()Output only.com.google.protobuf.ByteStringOutput only.getName()Immutable.com.google.protobuf.ByteStringImmutable.getPublicKeys(int index) Output only.com.google.protobuf.ByteStringgetPublicKeysBytes(int index) Output only.intOutput only.com.google.protobuf.ProtocolStringListOutput only.Output only.com.google.protobuf.ByteStringOutput only.intOutput only.Output only.com.google.protobuf.ByteStringOutput only.getState()Output only.intOutput only.Output only.com.google.protobuf.ByteStringOutput only.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(Environment other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setDockerImage(String value) Required.setDockerImageBytes(com.google.protobuf.ByteString value) Required.Output only.setIdBytes(com.google.protobuf.ByteString value) Output only.Immutable.setNameBytes(com.google.protobuf.ByteString value) Immutable.setPublicKeys(int index, String value) Output only.setSshHost(String value) Output only.setSshHostBytes(com.google.protobuf.ByteString value) Output only.setSshPort(int value) Output only.setSshUsername(String value) Output only.setSshUsernameBytes(com.google.protobuf.ByteString value) Output only.setState(Environment.State value) Output only.setStateValue(int value) Output only.setWebHost(String value) Output only.setWebHostBytes(com.google.protobuf.ByteString value) Output only.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
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.Builder<Environment.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<Environment.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<Environment.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Environment.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Environment.Builder>
-
mergeFrom
public Environment.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Environment.Builder>- Throws:
IOException
-
getName
Immutable. Full name of this resource, in the format `users/{owner_email}/environments/{environment_id}`. `{owner_email}` is the email address of the user to whom this environment belongs, and `{environment_id}` is the identifier of this environment. For example, `users/someone@example.com/environments/default`.string name = 1 [(.google.api.field_behavior) = IMMUTABLE];- Specified by:
getNamein interfaceEnvironmentOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()Immutable. Full name of this resource, in the format `users/{owner_email}/environments/{environment_id}`. `{owner_email}` is the email address of the user to whom this environment belongs, and `{environment_id}` is the identifier of this environment. For example, `users/someone@example.com/environments/default`.string name = 1 [(.google.api.field_behavior) = IMMUTABLE];- Specified by:
getNameBytesin interfaceEnvironmentOrBuilder- Returns:
- The bytes for name.
-
setName
Immutable. Full name of this resource, in the format `users/{owner_email}/environments/{environment_id}`. `{owner_email}` is the email address of the user to whom this environment belongs, and `{environment_id}` is the identifier of this environment. For example, `users/someone@example.com/environments/default`.string name = 1 [(.google.api.field_behavior) = IMMUTABLE];- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
Immutable. Full name of this resource, in the format `users/{owner_email}/environments/{environment_id}`. `{owner_email}` is the email address of the user to whom this environment belongs, and `{environment_id}` is the identifier of this environment. For example, `users/someone@example.com/environments/default`.string name = 1 [(.google.api.field_behavior) = IMMUTABLE];- Returns:
- This builder for chaining.
-
setNameBytes
Immutable. Full name of this resource, in the format `users/{owner_email}/environments/{environment_id}`. `{owner_email}` is the email address of the user to whom this environment belongs, and `{environment_id}` is the identifier of this environment. For example, `users/someone@example.com/environments/default`.string name = 1 [(.google.api.field_behavior) = IMMUTABLE];- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
getId
Output only. The environment's identifier, unique among the user's environments.
string id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getIdin interfaceEnvironmentOrBuilder- Returns:
- The id.
-
getIdBytes
public com.google.protobuf.ByteString getIdBytes()Output only. The environment's identifier, unique among the user's environments.
string id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getIdBytesin interfaceEnvironmentOrBuilder- Returns:
- The bytes for id.
-
setId
Output only. The environment's identifier, unique among the user's environments.
string id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The id to set.- Returns:
- This builder for chaining.
-
clearId
Output only. The environment's identifier, unique among the user's environments.
string id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];- Returns:
- This builder for chaining.
-
setIdBytes
Output only. The environment's identifier, unique among the user's environments.
string id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The bytes for id to set.- Returns:
- This builder for chaining.
-
getDockerImage
Required. Immutable. Full path to the Docker image used to run this environment, e.g. "gcr.io/dev-con/cloud-devshell:latest".
string docker_image = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];- Specified by:
getDockerImagein interfaceEnvironmentOrBuilder- Returns:
- The dockerImage.
-
getDockerImageBytes
public com.google.protobuf.ByteString getDockerImageBytes()Required. Immutable. Full path to the Docker image used to run this environment, e.g. "gcr.io/dev-con/cloud-devshell:latest".
string docker_image = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];- Specified by:
getDockerImageBytesin interfaceEnvironmentOrBuilder- Returns:
- The bytes for dockerImage.
-
setDockerImage
Required. Immutable. Full path to the Docker image used to run this environment, e.g. "gcr.io/dev-con/cloud-devshell:latest".
string docker_image = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];- Parameters:
value- The dockerImage to set.- Returns:
- This builder for chaining.
-
clearDockerImage
Required. Immutable. Full path to the Docker image used to run this environment, e.g. "gcr.io/dev-con/cloud-devshell:latest".
string docker_image = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];- Returns:
- This builder for chaining.
-
setDockerImageBytes
Required. Immutable. Full path to the Docker image used to run this environment, e.g. "gcr.io/dev-con/cloud-devshell:latest".
string docker_image = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];- Parameters:
value- The bytes for dockerImage to set.- Returns:
- This builder for chaining.
-
getStateValue
public int getStateValue()Output only. Current execution state of this environment.
.google.cloud.shell.v1.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getStateValuein interfaceEnvironmentOrBuilder- Returns:
- The enum numeric value on the wire for state.
-
setStateValue
Output only. Current execution state of this environment.
.google.cloud.shell.v1.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The enum numeric value on the wire for state to set.- Returns:
- This builder for chaining.
-
getState
Output only. Current execution state of this environment.
.google.cloud.shell.v1.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getStatein interfaceEnvironmentOrBuilder- Returns:
- The state.
-
setState
Output only. Current execution state of this environment.
.google.cloud.shell.v1.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The state to set.- Returns:
- This builder for chaining.
-
clearState
Output only. Current execution state of this environment.
.google.cloud.shell.v1.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];- Returns:
- This builder for chaining.
-
getWebHost
Output only. Host to which clients can connect to initiate HTTPS or WSS connections with the environment.
string web_host = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getWebHostin interfaceEnvironmentOrBuilder- Returns:
- The webHost.
-
getWebHostBytes
public com.google.protobuf.ByteString getWebHostBytes()Output only. Host to which clients can connect to initiate HTTPS or WSS connections with the environment.
string web_host = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getWebHostBytesin interfaceEnvironmentOrBuilder- Returns:
- The bytes for webHost.
-
setWebHost
Output only. Host to which clients can connect to initiate HTTPS or WSS connections with the environment.
string web_host = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The webHost to set.- Returns:
- This builder for chaining.
-
clearWebHost
Output only. Host to which clients can connect to initiate HTTPS or WSS connections with the environment.
string web_host = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];- Returns:
- This builder for chaining.
-
setWebHostBytes
Output only. Host to which clients can connect to initiate HTTPS or WSS connections with the environment.
string web_host = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The bytes for webHost to set.- Returns:
- This builder for chaining.
-
getSshUsername
Output only. Username that clients should use when initiating SSH sessions with the environment.
string ssh_username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getSshUsernamein interfaceEnvironmentOrBuilder- Returns:
- The sshUsername.
-
getSshUsernameBytes
public com.google.protobuf.ByteString getSshUsernameBytes()Output only. Username that clients should use when initiating SSH sessions with the environment.
string ssh_username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getSshUsernameBytesin interfaceEnvironmentOrBuilder- Returns:
- The bytes for sshUsername.
-
setSshUsername
Output only. Username that clients should use when initiating SSH sessions with the environment.
string ssh_username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The sshUsername to set.- Returns:
- This builder for chaining.
-
clearSshUsername
Output only. Username that clients should use when initiating SSH sessions with the environment.
string ssh_username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];- Returns:
- This builder for chaining.
-
setSshUsernameBytes
Output only. Username that clients should use when initiating SSH sessions with the environment.
string ssh_username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The bytes for sshUsername to set.- Returns:
- This builder for chaining.
-
getSshHost
Output only. Host to which clients can connect to initiate SSH sessions with the environment.
string ssh_host = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getSshHostin interfaceEnvironmentOrBuilder- Returns:
- The sshHost.
-
getSshHostBytes
public com.google.protobuf.ByteString getSshHostBytes()Output only. Host to which clients can connect to initiate SSH sessions with the environment.
string ssh_host = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getSshHostBytesin interfaceEnvironmentOrBuilder- Returns:
- The bytes for sshHost.
-
setSshHost
Output only. Host to which clients can connect to initiate SSH sessions with the environment.
string ssh_host = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The sshHost to set.- Returns:
- This builder for chaining.
-
clearSshHost
Output only. Host to which clients can connect to initiate SSH sessions with the environment.
string ssh_host = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];- Returns:
- This builder for chaining.
-
setSshHostBytes
Output only. Host to which clients can connect to initiate SSH sessions with the environment.
string ssh_host = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The bytes for sshHost to set.- Returns:
- This builder for chaining.
-
getSshPort
public int getSshPort()Output only. Port to which clients can connect to initiate SSH sessions with the environment.
int32 ssh_port = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getSshPortin interfaceEnvironmentOrBuilder- Returns:
- The sshPort.
-
setSshPort
Output only. Port to which clients can connect to initiate SSH sessions with the environment.
int32 ssh_port = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The sshPort to set.- Returns:
- This builder for chaining.
-
clearSshPort
Output only. Port to which clients can connect to initiate SSH sessions with the environment.
int32 ssh_port = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];- Returns:
- This builder for chaining.
-
getPublicKeysList
public com.google.protobuf.ProtocolStringList getPublicKeysList()Output only. Public keys associated with the environment. Clients can connect to this environment via SSH only if they possess a private key corresponding to at least one of these public keys. Keys can be added to or removed from the environment using the AddPublicKey and RemovePublicKey methods.
repeated string public_keys = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getPublicKeysListin interfaceEnvironmentOrBuilder- Returns:
- A list containing the publicKeys.
-
getPublicKeysCount
public int getPublicKeysCount()Output only. Public keys associated with the environment. Clients can connect to this environment via SSH only if they possess a private key corresponding to at least one of these public keys. Keys can be added to or removed from the environment using the AddPublicKey and RemovePublicKey methods.
repeated string public_keys = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getPublicKeysCountin interfaceEnvironmentOrBuilder- Returns:
- The count of publicKeys.
-
getPublicKeys
Output only. Public keys associated with the environment. Clients can connect to this environment via SSH only if they possess a private key corresponding to at least one of these public keys. Keys can be added to or removed from the environment using the AddPublicKey and RemovePublicKey methods.
repeated string public_keys = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getPublicKeysin interfaceEnvironmentOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The publicKeys at the given index.
-
getPublicKeysBytes
public com.google.protobuf.ByteString getPublicKeysBytes(int index) Output only. Public keys associated with the environment. Clients can connect to this environment via SSH only if they possess a private key corresponding to at least one of these public keys. Keys can be added to or removed from the environment using the AddPublicKey and RemovePublicKey methods.
repeated string public_keys = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getPublicKeysBytesin interfaceEnvironmentOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the publicKeys at the given index.
-
setPublicKeys
Output only. Public keys associated with the environment. Clients can connect to this environment via SSH only if they possess a private key corresponding to at least one of these public keys. Keys can be added to or removed from the environment using the AddPublicKey and RemovePublicKey methods.
repeated string public_keys = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
index- The index to set the value at.value- The publicKeys to set.- Returns:
- This builder for chaining.
-
addPublicKeys
Output only. Public keys associated with the environment. Clients can connect to this environment via SSH only if they possess a private key corresponding to at least one of these public keys. Keys can be added to or removed from the environment using the AddPublicKey and RemovePublicKey methods.
repeated string public_keys = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The publicKeys to add.- Returns:
- This builder for chaining.
-
addAllPublicKeys
Output only. Public keys associated with the environment. Clients can connect to this environment via SSH only if they possess a private key corresponding to at least one of these public keys. Keys can be added to or removed from the environment using the AddPublicKey and RemovePublicKey methods.
repeated string public_keys = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
values- The publicKeys to add.- Returns:
- This builder for chaining.
-
clearPublicKeys
Output only. Public keys associated with the environment. Clients can connect to this environment via SSH only if they possess a private key corresponding to at least one of these public keys. Keys can be added to or removed from the environment using the AddPublicKey and RemovePublicKey methods.
repeated string public_keys = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];- Returns:
- This builder for chaining.
-
addPublicKeysBytes
Output only. Public keys associated with the environment. Clients can connect to this environment via SSH only if they possess a private key corresponding to at least one of these public keys. Keys can be added to or removed from the environment using the AddPublicKey and RemovePublicKey methods.
repeated string public_keys = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The bytes of the publicKeys to add.- Returns:
- This builder for chaining.
-