Class Environment

  • All Implemented Interfaces:
    EnvironmentOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class Environment
    extends com.google.protobuf.GeneratedMessageV3
    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
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Environment.Builder
      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.
      static class  Environment.State
      Possible execution states for an environment.
      • Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3

        com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,​BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,​BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

        com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • 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
      • 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.
      • 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.
      • 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.
      • 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.
      • 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.
      • 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.
      • 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.
      • 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.
      • 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.
      • 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.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static Environment parseFrom​(ByteBuffer data)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Environment parseFrom​(ByteBuffer data,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Environment parseFrom​(com.google.protobuf.ByteString data)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Environment parseFrom​(com.google.protobuf.ByteString data,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Environment parseFrom​(byte[] data)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Environment parseFrom​(byte[] data,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Environment parseFrom​(com.google.protobuf.CodedInputStream input,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws IOException
        Throws:
        IOException
      • newBuilderForType

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

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

        protected Environment.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static Environment getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<Environment> parser()
      • getParserForType

        public com.google.protobuf.Parser<Environment> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

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