Class SecretEnvVar.Builder (2.41.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public SecretEnvVar.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
SecretEnvVar.Builder
Overrides

build()

public SecretEnvVar build()
Returns
TypeDescription
SecretEnvVar

buildPartial()

public SecretEnvVar buildPartial()
Returns
TypeDescription
SecretEnvVar

clear()

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

clearField(Descriptors.FieldDescriptor field)

public SecretEnvVar.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
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.

clearOneof(Descriptors.OneofDescriptor oneof)

public SecretEnvVar.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
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.

clone()

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

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

setField(Descriptors.FieldDescriptor field, Object value)

public SecretEnvVar.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
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.

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

public SecretEnvVar.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
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.