Class Environment (0.15.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
TypeDescription
int

SECRET_VARIABLES_FIELD_NUMBER

public static final int SECRET_VARIABLES_FIELD_NUMBER
Field Value
TypeDescription
int

VARIABLES_FIELD_NUMBER

public static final int VARIABLES_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Environment getDefaultInstance()
Returns
TypeDescription
Environment

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Environment.Builder newBuilder()
Returns
TypeDescription
Environment.Builder

newBuilder(Environment prototype)

public static Environment.Builder newBuilder(Environment prototype)
Parameter
NameDescription
prototypeEnvironment
Returns
TypeDescription
Environment.Builder

parseDelimitedFrom(InputStream input)

public static Environment parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Environment
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Environment parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Environment
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Environment parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Environment
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Environment parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Environment
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Environment parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Environment
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Environment parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Environment
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Environment parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Environment
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Environment parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Environment
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Environment parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Environment
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Environment parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Environment
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Environment parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Environment
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Environment parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Environment
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Environment> parser()
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
boolean

containsVariables(String key)

public boolean containsVariables(String key)

A map of environment variable names to values.

map<string, string> variables = 1;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public Environment getDefaultInstanceForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
Environment.KMSEnvMapOrBuilder

getParserForType()

public Parser<Environment> getParserForType()
Returns
TypeDescription
Parser<Environment>
Overrides

getSecretVariables()

public Map<String,String> getSecretVariables()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
keyString
defaultValueString
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
String

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

getVariables()

public Map<String,String> getVariables()

Use #getVariablesMap() instead.

Returns
TypeDescription
Map<String,String>

getVariablesCount()

public int getVariablesCount()

A map of environment variable names to values.

map<string, string> variables = 1;

Returns
TypeDescription
int

getVariablesMap()

public Map<String,String> getVariablesMap()

A map of environment variable names to values.

map<string, string> variables = 1;

Returns
TypeDescription
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
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getVariablesOrThrow(String key)

public String getVariablesOrThrow(String key)

A map of environment variable names to values.

map<string, string> variables = 1;

Parameter
NameDescription
keyString
Returns
TypeDescription
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
TypeDescription
boolean

Whether the encryptedVariables field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Environment.Builder newBuilderForType()
Returns
TypeDescription
Environment.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Environment.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Environment.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Environment.Builder toBuilder()
Returns
TypeDescription
Environment.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException