Class SecretEnvVar.Builder (2.44.0)

public static final class SecretEnvVar.Builder extends GeneratedMessageV3.Builder<SecretEnvVar.Builder> implements SecretEnvVarOrBuilder

Configuration for a secret environment variable. It has the information necessary to fetch the secret value from secret manager and expose it as an environment variable.

Protobuf type google.cloud.functions.v2beta.SecretEnvVar

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public SecretEnvVar.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SecretEnvVar.Builder
Overrides

build()

public SecretEnvVar build()
Returns
Type Description
SecretEnvVar

buildPartial()

public SecretEnvVar buildPartial()
Returns
Type Description
SecretEnvVar

clear()

public SecretEnvVar.Builder clear()
Returns
Type Description
SecretEnvVar.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public SecretEnvVar.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
SecretEnvVar.Builder
Overrides

clearKey()

public SecretEnvVar.Builder clearKey()

Name of the environment variable.

string key = 1;

Returns
Type Description
SecretEnvVar.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public SecretEnvVar.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
SecretEnvVar.Builder
Overrides

clearProjectId()

public SecretEnvVar.Builder clearProjectId()

Project identifier (preferably project number but can also be the project ID) of the project that contains the secret. If not set, it is assumed that the secret is in the same project as the function.

string project_id = 2;

Returns
Type Description
SecretEnvVar.Builder

This builder for chaining.

clearSecret()

public SecretEnvVar.Builder clearSecret()

Name of the secret in secret manager (not the full resource name).

string secret = 3;

Returns
Type Description
SecretEnvVar.Builder

This builder for chaining.

clearVersion()

public SecretEnvVar.Builder clearVersion()

Version of the secret (version number or the string 'latest'). It is recommended to use a numeric version for secret environment variables as any updates to the secret value is not reflected until new instances start.

string version = 4;

Returns
Type Description
SecretEnvVar.Builder

This builder for chaining.

clone()

public SecretEnvVar.Builder clone()
Returns
Type Description
SecretEnvVar.Builder
Overrides

getDefaultInstanceForType()

public SecretEnvVar getDefaultInstanceForType()
Returns
Type Description
SecretEnvVar

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getKey()

public String getKey()

Name of the environment variable.

string key = 1;

Returns
Type Description
String

The key.

getKeyBytes()

public ByteString getKeyBytes()

Name of the environment variable.

string key = 1;

Returns
Type Description
ByteString

The bytes for key.

getProjectId()

public String getProjectId()

Project identifier (preferably project number but can also be the project ID) of the project that contains the secret. If not set, it is assumed that the secret is in the same project as the function.

string project_id = 2;

Returns
Type Description
String

The projectId.

getProjectIdBytes()

public ByteString getProjectIdBytes()

Project identifier (preferably project number but can also be the project ID) of the project that contains the secret. If not set, it is assumed that the secret is in the same project as the function.

string project_id = 2;

Returns
Type Description
ByteString

The bytes for projectId.

getSecret()

public String getSecret()

Name of the secret in secret manager (not the full resource name).

string secret = 3;

Returns
Type Description
String

The secret.

getSecretBytes()

public ByteString getSecretBytes()

Name of the secret in secret manager (not the full resource name).

string secret = 3;

Returns
Type Description
ByteString

The bytes for secret.

getVersion()

public String getVersion()

Version of the secret (version number or the string 'latest'). It is recommended to use a numeric version for secret environment variables as any updates to the secret value is not reflected until new instances start.

string version = 4;

Returns
Type Description
String

The version.

getVersionBytes()

public ByteString getVersionBytes()

Version of the secret (version number or the string 'latest'). It is recommended to use a numeric version for secret environment variables as any updates to the secret value is not reflected until new instances start.

string version = 4;

Returns
Type Description
ByteString

The bytes for version.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SecretEnvVar other)

public SecretEnvVar.Builder mergeFrom(SecretEnvVar other)
Parameter
Name Description
other SecretEnvVar
Returns
Type Description
SecretEnvVar.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public SecretEnvVar.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SecretEnvVar.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public SecretEnvVar.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
SecretEnvVar.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SecretEnvVar.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SecretEnvVar.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public SecretEnvVar.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SecretEnvVar.Builder
Overrides

setKey(String value)

public SecretEnvVar.Builder setKey(String value)

Name of the environment variable.

string key = 1;

Parameter
Name Description
value String

The key to set.

Returns
Type Description
SecretEnvVar.Builder

This builder for chaining.

setKeyBytes(ByteString value)

public SecretEnvVar.Builder setKeyBytes(ByteString value)

Name of the environment variable.

string key = 1;

Parameter
Name Description
value ByteString

The bytes for key to set.

Returns
Type Description
SecretEnvVar.Builder

This builder for chaining.

setProjectId(String value)

public SecretEnvVar.Builder setProjectId(String value)

Project identifier (preferably project number but can also be the project ID) of the project that contains the secret. If not set, it is assumed that the secret is in the same project as the function.

string project_id = 2;

Parameter
Name Description
value String

The projectId to set.

Returns
Type Description
SecretEnvVar.Builder

This builder for chaining.

setProjectIdBytes(ByteString value)

public SecretEnvVar.Builder setProjectIdBytes(ByteString value)

Project identifier (preferably project number but can also be the project ID) of the project that contains the secret. If not set, it is assumed that the secret is in the same project as the function.

string project_id = 2;

Parameter
Name Description
value ByteString

The bytes for projectId to set.

Returns
Type Description
SecretEnvVar.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public SecretEnvVar.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
SecretEnvVar.Builder
Overrides

setSecret(String value)

public SecretEnvVar.Builder setSecret(String value)

Name of the secret in secret manager (not the full resource name).

string secret = 3;

Parameter
Name Description
value String

The secret to set.

Returns
Type Description
SecretEnvVar.Builder

This builder for chaining.

setSecretBytes(ByteString value)

public SecretEnvVar.Builder setSecretBytes(ByteString value)

Name of the secret in secret manager (not the full resource name).

string secret = 3;

Parameter
Name Description
value ByteString

The bytes for secret to set.

Returns
Type Description
SecretEnvVar.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final SecretEnvVar.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SecretEnvVar.Builder
Overrides

setVersion(String value)

public SecretEnvVar.Builder setVersion(String value)

Version of the secret (version number or the string 'latest'). It is recommended to use a numeric version for secret environment variables as any updates to the secret value is not reflected until new instances start.

string version = 4;

Parameter
Name Description
value String

The version to set.

Returns
Type Description
SecretEnvVar.Builder

This builder for chaining.

setVersionBytes(ByteString value)

public SecretEnvVar.Builder setVersionBytes(ByteString value)

Version of the secret (version number or the string 'latest'). It is recommended to use a numeric version for secret environment variables as any updates to the secret value is not reflected until new instances start.

string version = 4;

Parameter
Name Description
value ByteString

The bytes for version to set.

Returns
Type Description
SecretEnvVar.Builder

This builder for chaining.