Class Environment (0.47.0)

public final class Environment extends GeneratedMessageV3 implements EnvironmentOrBuilder

An Environment describes a collection of environment variables to set when executing Tasks.

Protobuf type google.cloud.batch.v1.Environment

Static Fields

ENCRYPTED_VARIABLES_FIELD_NUMBER

public static final int ENCRYPTED_VARIABLES_FIELD_NUMBER
Field Value
Type Description
int

SECRET_VARIABLES_FIELD_NUMBER

public static final int SECRET_VARIABLES_FIELD_NUMBER
Field Value
Type Description
int

VARIABLES_FIELD_NUMBER

public static final int VARIABLES_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Environment getDefaultInstance()
Returns
Type Description
Environment

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static Environment.Builder newBuilder()
Returns
Type Description
Environment.Builder

newBuilder(Environment prototype)

public static Environment.Builder newBuilder(Environment prototype)
Parameter
Name Description
prototype Environment
Returns
Type Description
Environment.Builder

parseDelimitedFrom(InputStream input)

public static Environment parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Environment
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Environment parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Environment
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Environment parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Environment
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Environment parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Environment
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Environment parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Environment
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Environment parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Environment
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Environment parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Environment
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Environment parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Environment
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Environment parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Environment
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Environment parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Environment
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Environment parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Environment
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Environment parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Environment
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Environment> parser()
Returns
Type Description
Parser<Environment>

Methods

containsSecretVariables(String key)

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;

Parameter
Name Description
key String
Returns
Type Description
boolean

containsVariables(String key)

public boolean containsVariables(String key)

A map of environment variable names to values.

map<string, string> variables = 1;

Parameter
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public Environment getDefaultInstanceForType()
Returns
Type Description
Environment

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;

Returns
Type Description
Environment.KMSEnvMap

The encryptedVariables.

getEncryptedVariablesOrBuilder()

public Environment.KMSEnvMapOrBuilder getEncryptedVariablesOrBuilder()

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;

Returns
Type Description
Environment.KMSEnvMapOrBuilder

getParserForType()

public Parser<Environment> getParserForType()
Returns
Type Description
Parser<Environment>
Overrides

getSecretVariables() (deprecated)

public Map<String,String> getSecretVariables()
Returns
Type Description
Map<String,String>

getSecretVariablesCount()

public int getSecretVariablesCount()

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;

Returns
Type Description
int

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;

Returns
Type Description
Map<String,String>

getSecretVariablesOrDefault(String key, String defaultValue)

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;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getSecretVariablesOrThrow(String key)

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;

Parameter
Name Description
key String
Returns
Type Description
String

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getVariables() (deprecated)

public Map<String,String> getVariables()

Use #getVariablesMap() instead.

Returns
Type Description
Map<String,String>

getVariablesCount()

public int getVariablesCount()

A map of environment variable names to values.

map<string, string> variables = 1;

Returns
Type Description
int

getVariablesMap()

public Map<String,String> getVariablesMap()

A map of environment variable names to values.

map<string, string> variables = 1;

Returns
Type Description
Map<String,String>

getVariablesOrDefault(String key, String defaultValue)

public String getVariablesOrDefault(String key, String defaultValue)

A map of environment variable names to values.

map<string, string> variables = 1;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getVariablesOrThrow(String key)

public String getVariablesOrThrow(String key)

A map of environment variable names to values.

map<string, string> variables = 1;

Parameter
Name Description
key String
Returns
Type Description
String

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;

Returns
Type Description
boolean

Whether the encryptedVariables field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Environment.Builder newBuilderForType()
Returns
Type Description
Environment.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Environment.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Environment.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public Environment.Builder toBuilder()
Returns
Type Description
Environment.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException