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
     An Environment describes a collection of environment variables to set when
     executing Tasks.
     
    Protobuf type google.cloud.batch.v1.Environment
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Environment.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Environment.Builder>
      • 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
      • containsVariables

        public boolean containsVariables​(String key)
         A map of environment variable names to values.
         
        map<string, string> variables = 1;
        Specified by:
        containsVariables in interface EnvironmentOrBuilder
      • removeVariables

        public Environment.Builder removeVariables​(String key)
         A map of environment variable names to values.
         
        map<string, string> variables = 1;
      • getMutableVariables

        @Deprecated
        public Map<String,​String> getMutableVariables()
        Deprecated.
        Use alternate mutation accessors instead.
      • putVariables

        public Environment.Builder putVariables​(String key,
                                                String value)
         A map of environment variable names to values.
         
        map<string, string> variables = 1;
      • putAllVariables

        public Environment.Builder putAllVariables​(Map<String,​String> values)
         A map of environment variable names to values.
         
        map<string, string> variables = 1;
      • getSecretVariablesCount

        public int getSecretVariablesCount()
        Description copied from interface: EnvironmentOrBuilder
         A map of environment variable names to Secret Manager secret names.
         The VM will access the named secrets to set the value of each environment
         variable.
         
        map<string, string> secret_variables = 2;
        Specified by:
        getSecretVariablesCount in interface EnvironmentOrBuilder
      • containsSecretVariables

        public boolean containsSecretVariables​(String key)
         A map of environment variable names to Secret Manager secret names.
         The VM will access the named secrets to set the value of each environment
         variable.
         
        map<string, string> secret_variables = 2;
        Specified by:
        containsSecretVariables in interface EnvironmentOrBuilder
      • getSecretVariablesMap

        public Map<String,​String> getSecretVariablesMap()
         A map of environment variable names to Secret Manager secret names.
         The VM will access the named secrets to set the value of each environment
         variable.
         
        map<string, string> secret_variables = 2;
        Specified by:
        getSecretVariablesMap in interface EnvironmentOrBuilder
      • getSecretVariablesOrDefault

        public String getSecretVariablesOrDefault​(String key,
                                                  String defaultValue)
         A map of environment variable names to Secret Manager secret names.
         The VM will access the named secrets to set the value of each environment
         variable.
         
        map<string, string> secret_variables = 2;
        Specified by:
        getSecretVariablesOrDefault in interface EnvironmentOrBuilder
      • getSecretVariablesOrThrow

        public String getSecretVariablesOrThrow​(String key)
         A map of environment variable names to Secret Manager secret names.
         The VM will access the named secrets to set the value of each environment
         variable.
         
        map<string, string> secret_variables = 2;
        Specified by:
        getSecretVariablesOrThrow in interface EnvironmentOrBuilder
      • removeSecretVariables

        public Environment.Builder removeSecretVariables​(String key)
         A map of environment variable names to Secret Manager secret names.
         The VM will access the named secrets to set the value of each environment
         variable.
         
        map<string, string> secret_variables = 2;
      • getMutableSecretVariables

        @Deprecated
        public Map<String,​String> getMutableSecretVariables()
        Deprecated.
        Use alternate mutation accessors instead.
      • putSecretVariables

        public Environment.Builder putSecretVariables​(String key,
                                                      String value)
         A map of environment variable names to Secret Manager secret names.
         The VM will access the named secrets to set the value of each environment
         variable.
         
        map<string, string> secret_variables = 2;
      • putAllSecretVariables

        public Environment.Builder putAllSecretVariables​(Map<String,​String> values)
         A map of environment variable names to Secret Manager secret names.
         The VM will access the named secrets to set the value of each environment
         variable.
         
        map<string, string> secret_variables = 2;
      • hasEncryptedVariables

        public boolean hasEncryptedVariables()
         An encrypted JSON dictionary where the key/value pairs correspond to
         environment variable names and their values.
         
        .google.cloud.batch.v1.Environment.KMSEnvMap encrypted_variables = 3;
        Specified by:
        hasEncryptedVariables in interface EnvironmentOrBuilder
        Returns:
        Whether the encryptedVariables field is set.
      • getEncryptedVariables

        public Environment.KMSEnvMap getEncryptedVariables()
         An encrypted JSON dictionary where the key/value pairs correspond to
         environment variable names and their values.
         
        .google.cloud.batch.v1.Environment.KMSEnvMap encrypted_variables = 3;
        Specified by:
        getEncryptedVariables in interface EnvironmentOrBuilder
        Returns:
        The encryptedVariables.
      • setEncryptedVariables

        public Environment.Builder setEncryptedVariables​(Environment.KMSEnvMap value)
         An encrypted JSON dictionary where the key/value pairs correspond to
         environment variable names and their values.
         
        .google.cloud.batch.v1.Environment.KMSEnvMap encrypted_variables = 3;
      • setEncryptedVariables

        public Environment.Builder setEncryptedVariables​(Environment.KMSEnvMap.Builder builderForValue)
         An encrypted JSON dictionary where the key/value pairs correspond to
         environment variable names and their values.
         
        .google.cloud.batch.v1.Environment.KMSEnvMap encrypted_variables = 3;
      • mergeEncryptedVariables

        public Environment.Builder mergeEncryptedVariables​(Environment.KMSEnvMap value)
         An encrypted JSON dictionary where the key/value pairs correspond to
         environment variable names and their values.
         
        .google.cloud.batch.v1.Environment.KMSEnvMap encrypted_variables = 3;
      • clearEncryptedVariables

        public Environment.Builder clearEncryptedVariables()
         An encrypted JSON dictionary where the key/value pairs correspond to
         environment variable names and their values.
         
        .google.cloud.batch.v1.Environment.KMSEnvMap encrypted_variables = 3;
      • getEncryptedVariablesBuilder

        public Environment.KMSEnvMap.Builder getEncryptedVariablesBuilder()
         An encrypted JSON dictionary where the key/value pairs correspond to
         environment variable names and their values.
         
        .google.cloud.batch.v1.Environment.KMSEnvMap encrypted_variables = 3;
      • 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>