Class 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.GeneratedMessageV3.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 Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Environment.Builder>
      • clear

        public Environment.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<Environment.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Environment.Builder>
      • getDefaultInstanceForType

        public Environment getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public Environment build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public Environment buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public Environment.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Environment.Builder>
      • setField

        public Environment.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                            Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Environment.Builder>
      • clearField

        public Environment.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Environment.Builder>
      • clearOneof

        public Environment.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Environment.Builder>
      • setRepeatedField

        public Environment.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                    int index,
                                                    Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Environment.Builder>
      • addRepeatedField

        public Environment.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                    Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Environment.Builder>
      • mergeFrom

        public Environment.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Environment.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Environment.Builder>
      • mergeFrom

        public Environment.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                      throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Environment.Builder>
        Throws:
        IOException
      • getName

        public String 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:
        getName in interface EnvironmentOrBuilder
        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:
        getNameBytes in interface EnvironmentOrBuilder
        Returns:
        The bytes for name.
      • setName

        public Environment.Builder setName​(String value)
         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

        public Environment.Builder 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

        public Environment.Builder setNameBytes​(com.google.protobuf.ByteString value)
         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

        public String getId()
         Output only. The environment's identifier, unique among the user's
         environments.
         
        string id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getId in interface EnvironmentOrBuilder
        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:
        getIdBytes in interface EnvironmentOrBuilder
        Returns:
        The bytes for id.
      • setId

        public Environment.Builder setId​(String value)
         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

        public Environment.Builder 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

        public Environment.Builder setIdBytes​(com.google.protobuf.ByteString value)
         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

        public String 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:
        getDockerImage in interface EnvironmentOrBuilder
        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:
        getDockerImageBytes in interface EnvironmentOrBuilder
        Returns:
        The bytes for dockerImage.
      • setDockerImage

        public Environment.Builder setDockerImage​(String value)
         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

        public Environment.Builder 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

        public Environment.Builder setDockerImageBytes​(com.google.protobuf.ByteString value)
         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:
        getStateValue in interface EnvironmentOrBuilder
        Returns:
        The enum numeric value on the wire for state.
      • setStateValue

        public Environment.Builder setStateValue​(int value)
         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

        public Environment.State 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:
        getState in interface EnvironmentOrBuilder
        Returns:
        The state.
      • setState

        public Environment.Builder setState​(Environment.State value)
         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

        public Environment.Builder 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

        public String 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:
        getWebHost in interface EnvironmentOrBuilder
        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:
        getWebHostBytes in interface EnvironmentOrBuilder
        Returns:
        The bytes for webHost.
      • setWebHost

        public Environment.Builder setWebHost​(String value)
         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

        public Environment.Builder 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

        public Environment.Builder setWebHostBytes​(com.google.protobuf.ByteString value)
         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

        public String 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:
        getSshUsername in interface EnvironmentOrBuilder
        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:
        getSshUsernameBytes in interface EnvironmentOrBuilder
        Returns:
        The bytes for sshUsername.
      • setSshUsername

        public Environment.Builder setSshUsername​(String value)
         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

        public Environment.Builder 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

        public Environment.Builder setSshUsernameBytes​(com.google.protobuf.ByteString value)
         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

        public String 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:
        getSshHost in interface EnvironmentOrBuilder
        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:
        getSshHostBytes in interface EnvironmentOrBuilder
        Returns:
        The bytes for sshHost.
      • setSshHost

        public Environment.Builder setSshHost​(String value)
         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

        public Environment.Builder 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

        public Environment.Builder setSshHostBytes​(com.google.protobuf.ByteString value)
         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:
        getSshPort in interface EnvironmentOrBuilder
        Returns:
        The sshPort.
      • setSshPort

        public Environment.Builder setSshPort​(int value)
         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

        public Environment.Builder 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:
        getPublicKeysList in interface EnvironmentOrBuilder
        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:
        getPublicKeysCount in interface EnvironmentOrBuilder
        Returns:
        The count of publicKeys.
      • getPublicKeys

        public String getPublicKeys​(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:
        getPublicKeys in interface EnvironmentOrBuilder
        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:
        getPublicKeysBytes in interface EnvironmentOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the publicKeys at the given index.
      • setPublicKeys

        public Environment.Builder setPublicKeys​(int index,
                                                 String value)
         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

        public Environment.Builder addPublicKeys​(String value)
         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

        public Environment.Builder addAllPublicKeys​(Iterable<String> values)
         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

        public Environment.Builder 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

        public Environment.Builder addPublicKeysBytes​(com.google.protobuf.ByteString value)
         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.
      • setUnknownFields

        public final Environment.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Environment.Builder>
      • mergeUnknownFields

        public final Environment.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Environment.Builder>