Class SecretEnvVar (2.21.0)

publicfinalclass SecretEnvVarextendsGeneratedMessageV3implementsSecretEnvVarOrBuilder

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

Inherited Members

com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)

Static Fields

KEY_FIELD_NUMBER

publicstaticfinalintKEY_FIELD_NUMBER
Field Value
Type Description
int

PROJECT_ID_FIELD_NUMBER

publicstaticfinalintPROJECT_ID_FIELD_NUMBER
Field Value
Type Description
int

SECRET_FIELD_NUMBER

publicstaticfinalintSECRET_FIELD_NUMBER
Field Value
Type Description
int

VERSION_FIELD_NUMBER

publicstaticfinalintVERSION_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticSecretEnvVargetDefaultInstance()
Returns
Type Description
SecretEnvVar

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

newBuilder()

publicstaticSecretEnvVar.BuildernewBuilder()
Returns
Type Description
SecretEnvVar.Builder

newBuilder(SecretEnvVar prototype)

publicstaticSecretEnvVar.BuildernewBuilder(SecretEnvVarprototype)
Parameter
Name Description
prototype SecretEnvVar
Returns
Type Description
SecretEnvVar.Builder

parseDelimitedFrom(InputStream input)

publicstaticSecretEnvVarparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
SecretEnvVar
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticSecretEnvVarparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SecretEnvVar
Exceptions
Type Description
IOException

parseFrom(byte[] data)

publicstaticSecretEnvVarparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
SecretEnvVar
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticSecretEnvVarparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SecretEnvVar
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

publicstaticSecretEnvVarparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
SecretEnvVar
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticSecretEnvVarparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SecretEnvVar
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticSecretEnvVarparseFrom(CodedInputStreaminput)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
SecretEnvVar
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticSecretEnvVarparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SecretEnvVar
Exceptions
Type Description
IOException

parseFrom(InputStream input)

publicstaticSecretEnvVarparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
SecretEnvVar
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticSecretEnvVarparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SecretEnvVar
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

publicstaticSecretEnvVarparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
SecretEnvVar
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticSecretEnvVarparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SecretEnvVar
Exceptions
Type Description
InvalidProtocolBufferException

parser()

publicstaticParser<SecretEnvVar>parser()
Returns
Type Description
Parser<SecretEnvVar>

Methods

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

publicSecretEnvVargetDefaultInstanceForType()
Returns
Type Description
SecretEnvVar

getKey()

publicStringgetKey()

Name of the environment variable.

string key = 1;

Returns
Type Description
String

The key.

getKeyBytes()

publicByteStringgetKeyBytes()

Name of the environment variable.

string key = 1;

Returns
Type Description
ByteString

The bytes for key.

getParserForType()

publicParser<SecretEnvVar>getParserForType()
Returns
Type Description
Parser<SecretEnvVar>
Overrides

getProjectId()

publicStringgetProjectId()

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()

publicByteStringgetProjectIdBytes()

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()

publicStringgetSecret()

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

string secret = 3;

Returns
Type Description
String

The secret.

getSecretBytes()

publicByteStringgetSecretBytes()

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

string secret = 3;

Returns
Type Description
ByteString

The bytes for secret.

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

getVersion()

publicStringgetVersion()

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()

publicByteStringgetVersionBytes()

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.

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

publicSecretEnvVar.BuildernewBuilderForType()
Returns
Type Description
SecretEnvVar.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedSecretEnvVar.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
SecretEnvVar.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

publicSecretEnvVar.BuildertoBuilder()
Returns
Type Description
SecretEnvVar.Builder

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.