Class SecretEnvVar.Builder (2.20.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.v2alpha.SecretEnvVar

Static Methods

getDescriptor()

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

Methods

build()

public SecretEnvVar build()
Returns
TypeDescription
SecretEnvVar

buildPartial()

public SecretEnvVar buildPartial()
Returns
TypeDescription
SecretEnvVar

clear()

public SecretEnvVar.Builder clear()
Returns
TypeDescription
SecretEnvVar.Builder
Overrides

clearKey()

public SecretEnvVar.Builder clearKey()

Name of the environment variable.

string key = 1;

Returns
TypeDescription
SecretEnvVar.Builder

This builder for chaining.

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
TypeDescription
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
TypeDescription
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
TypeDescription
SecretEnvVar.Builder

This builder for chaining.

getDefaultInstanceForType()

public SecretEnvVar getDefaultInstanceForType()
Returns
TypeDescription
SecretEnvVar

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getKey()

public String getKey()

Name of the environment variable.

string key = 1;

Returns
TypeDescription
String

The key.

getKeyBytes()

public ByteString getKeyBytes()

Name of the environment variable.

string key = 1;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
String

The secret.

getSecretBytes()

public ByteString getSecretBytes()

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

string secret = 3;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for version.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(SecretEnvVar other)

public SecretEnvVar.Builder mergeFrom(SecretEnvVar other)
Parameter
NameDescription
otherSecretEnvVar
Returns
TypeDescription
SecretEnvVar.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public SecretEnvVar.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SecretEnvVar.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public SecretEnvVar.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
SecretEnvVar.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SecretEnvVar.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
SecretEnvVar.Builder
Overrides

setKey(String value)

public SecretEnvVar.Builder setKey(String value)

Name of the environment variable.

string key = 1;

Parameter
NameDescription
valueString

The key to set.

Returns
TypeDescription
SecretEnvVar.Builder

This builder for chaining.

setKeyBytes(ByteString value)

public SecretEnvVar.Builder setKeyBytes(ByteString value)

Name of the environment variable.

string key = 1;

Parameter
NameDescription
valueByteString

The bytes for key to set.

Returns
TypeDescription
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
NameDescription
valueString

The projectId to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for projectId to set.

Returns
TypeDescription
SecretEnvVar.Builder

This builder for chaining.

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
NameDescription
valueString

The secret to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for secret to set.

Returns
TypeDescription
SecretEnvVar.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final SecretEnvVar.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueString

The version to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for version to set.

Returns
TypeDescription
SecretEnvVar.Builder

This builder for chaining.