Class SecretVolume.Builder (2.8.0)

public static final class SecretVolume.Builder extends GeneratedMessageV3.Builder<SecretVolume.Builder> implements SecretVolumeOrBuilder

Configuration for a secret volume. It has the information necessary to fetch the secret value from secret manager and make it available as files mounted at the requested paths within the application container.

Protobuf type google.cloud.functions.v2.SecretVolume

Static Methods

getDescriptor()

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

Methods

addAllVersions(Iterable<? extends SecretVolume.SecretVersion> values)

public SecretVolume.Builder addAllVersions(Iterable<? extends SecretVolume.SecretVersion> values)

List of secret versions to mount for this secret. If empty, the latest version of the secret will be made available in a file named after the secret under the mount point.

repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.functions.v2.SecretVolume.SecretVersion>
Returns
TypeDescription
SecretVolume.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addVersions(SecretVolume.SecretVersion value)

public SecretVolume.Builder addVersions(SecretVolume.SecretVersion value)

List of secret versions to mount for this secret. If empty, the latest version of the secret will be made available in a file named after the secret under the mount point.

repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;

Parameter
NameDescription
valueSecretVolume.SecretVersion
Returns
TypeDescription
SecretVolume.Builder

addVersions(SecretVolume.SecretVersion.Builder builderForValue)

public SecretVolume.Builder addVersions(SecretVolume.SecretVersion.Builder builderForValue)

List of secret versions to mount for this secret. If empty, the latest version of the secret will be made available in a file named after the secret under the mount point.

repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;

Parameter
NameDescription
builderForValueSecretVolume.SecretVersion.Builder
Returns
TypeDescription
SecretVolume.Builder

addVersions(int index, SecretVolume.SecretVersion value)

public SecretVolume.Builder addVersions(int index, SecretVolume.SecretVersion value)

List of secret versions to mount for this secret. If empty, the latest version of the secret will be made available in a file named after the secret under the mount point.

repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;

Parameters
NameDescription
indexint
valueSecretVolume.SecretVersion
Returns
TypeDescription
SecretVolume.Builder

addVersions(int index, SecretVolume.SecretVersion.Builder builderForValue)

public SecretVolume.Builder addVersions(int index, SecretVolume.SecretVersion.Builder builderForValue)

List of secret versions to mount for this secret. If empty, the latest version of the secret will be made available in a file named after the secret under the mount point.

repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;

Parameters
NameDescription
indexint
builderForValueSecretVolume.SecretVersion.Builder
Returns
TypeDescription
SecretVolume.Builder

addVersionsBuilder()

public SecretVolume.SecretVersion.Builder addVersionsBuilder()

List of secret versions to mount for this secret. If empty, the latest version of the secret will be made available in a file named after the secret under the mount point.

repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;

Returns
TypeDescription
SecretVolume.SecretVersion.Builder

addVersionsBuilder(int index)

public SecretVolume.SecretVersion.Builder addVersionsBuilder(int index)

List of secret versions to mount for this secret. If empty, the latest version of the secret will be made available in a file named after the secret under the mount point.

repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
SecretVolume.SecretVersion.Builder

build()

public SecretVolume build()
Returns
TypeDescription
SecretVolume

buildPartial()

public SecretVolume buildPartial()
Returns
TypeDescription
SecretVolume

clear()

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

clearField(Descriptors.FieldDescriptor field)

public SecretVolume.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
SecretVolume.Builder
Overrides

clearMountPath()

public SecretVolume.Builder clearMountPath()

The path within the container to mount the secret volume. For example, setting the mount_path as /etc/secrets would mount the secret value files under the /etc/secrets directory. This directory will also be completely shadowed and unavailable to mount any other secrets. Recommended mount path: /etc/secrets

string mount_path = 1;

Returns
TypeDescription
SecretVolume.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public SecretVolume.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
SecretVolume.Builder
Overrides

clearProjectId()

public SecretVolume.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
SecretVolume.Builder

This builder for chaining.

clearSecret()

public SecretVolume.Builder clearSecret()

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

string secret = 3;

Returns
TypeDescription
SecretVolume.Builder

This builder for chaining.

clearVersions()

public SecretVolume.Builder clearVersions()

List of secret versions to mount for this secret. If empty, the latest version of the secret will be made available in a file named after the secret under the mount point.

repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;

Returns
TypeDescription
SecretVolume.Builder

clone()

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

getDefaultInstanceForType()

public SecretVolume getDefaultInstanceForType()
Returns
TypeDescription
SecretVolume

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getMountPath()

public String getMountPath()

The path within the container to mount the secret volume. For example, setting the mount_path as /etc/secrets would mount the secret value files under the /etc/secrets directory. This directory will also be completely shadowed and unavailable to mount any other secrets. Recommended mount path: /etc/secrets

string mount_path = 1;

Returns
TypeDescription
String

The mountPath.

getMountPathBytes()

public ByteString getMountPathBytes()

The path within the container to mount the secret volume. For example, setting the mount_path as /etc/secrets would mount the secret value files under the /etc/secrets directory. This directory will also be completely shadowed and unavailable to mount any other secrets. Recommended mount path: /etc/secrets

string mount_path = 1;

Returns
TypeDescription
ByteString

The bytes for mountPath.

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.

getVersions(int index)

public SecretVolume.SecretVersion getVersions(int index)

List of secret versions to mount for this secret. If empty, the latest version of the secret will be made available in a file named after the secret under the mount point.

repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
SecretVolume.SecretVersion

getVersionsBuilder(int index)

public SecretVolume.SecretVersion.Builder getVersionsBuilder(int index)

List of secret versions to mount for this secret. If empty, the latest version of the secret will be made available in a file named after the secret under the mount point.

repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
SecretVolume.SecretVersion.Builder

getVersionsBuilderList()

public List<SecretVolume.SecretVersion.Builder> getVersionsBuilderList()

List of secret versions to mount for this secret. If empty, the latest version of the secret will be made available in a file named after the secret under the mount point.

repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;

Returns
TypeDescription
List<Builder>

getVersionsCount()

public int getVersionsCount()

List of secret versions to mount for this secret. If empty, the latest version of the secret will be made available in a file named after the secret under the mount point.

repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;

Returns
TypeDescription
int

getVersionsList()

public List<SecretVolume.SecretVersion> getVersionsList()

List of secret versions to mount for this secret. If empty, the latest version of the secret will be made available in a file named after the secret under the mount point.

repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;

Returns
TypeDescription
List<SecretVersion>

getVersionsOrBuilder(int index)

public SecretVolume.SecretVersionOrBuilder getVersionsOrBuilder(int index)

List of secret versions to mount for this secret. If empty, the latest version of the secret will be made available in a file named after the secret under the mount point.

repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
SecretVolume.SecretVersionOrBuilder

getVersionsOrBuilderList()

public List<? extends SecretVolume.SecretVersionOrBuilder> getVersionsOrBuilderList()

List of secret versions to mount for this secret. If empty, the latest version of the secret will be made available in a file named after the secret under the mount point.

repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;

Returns
TypeDescription
List<? extends com.google.cloud.functions.v2.SecretVolume.SecretVersionOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(SecretVolume other)

public SecretVolume.Builder mergeFrom(SecretVolume other)
Parameter
NameDescription
otherSecretVolume
Returns
TypeDescription
SecretVolume.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeVersions(int index)

public SecretVolume.Builder removeVersions(int index)

List of secret versions to mount for this secret. If empty, the latest version of the secret will be made available in a file named after the secret under the mount point.

repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
SecretVolume.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setMountPath(String value)

public SecretVolume.Builder setMountPath(String value)

The path within the container to mount the secret volume. For example, setting the mount_path as /etc/secrets would mount the secret value files under the /etc/secrets directory. This directory will also be completely shadowed and unavailable to mount any other secrets. Recommended mount path: /etc/secrets

string mount_path = 1;

Parameter
NameDescription
valueString

The mountPath to set.

Returns
TypeDescription
SecretVolume.Builder

This builder for chaining.

setMountPathBytes(ByteString value)

public SecretVolume.Builder setMountPathBytes(ByteString value)

The path within the container to mount the secret volume. For example, setting the mount_path as /etc/secrets would mount the secret value files under the /etc/secrets directory. This directory will also be completely shadowed and unavailable to mount any other secrets. Recommended mount path: /etc/secrets

string mount_path = 1;

Parameter
NameDescription
valueByteString

The bytes for mountPath to set.

Returns
TypeDescription
SecretVolume.Builder

This builder for chaining.

setProjectId(String value)

public SecretVolume.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
SecretVolume.Builder

This builder for chaining.

setProjectIdBytes(ByteString value)

public SecretVolume.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
SecretVolume.Builder

This builder for chaining.

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

public SecretVolume.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
SecretVolume.Builder
Overrides

setSecret(String value)

public SecretVolume.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
SecretVolume.Builder

This builder for chaining.

setSecretBytes(ByteString value)

public SecretVolume.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
SecretVolume.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final SecretVolume.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
SecretVolume.Builder
Overrides

setVersions(int index, SecretVolume.SecretVersion value)

public SecretVolume.Builder setVersions(int index, SecretVolume.SecretVersion value)

List of secret versions to mount for this secret. If empty, the latest version of the secret will be made available in a file named after the secret under the mount point.

repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;

Parameters
NameDescription
indexint
valueSecretVolume.SecretVersion
Returns
TypeDescription
SecretVolume.Builder

setVersions(int index, SecretVolume.SecretVersion.Builder builderForValue)

public SecretVolume.Builder setVersions(int index, SecretVolume.SecretVersion.Builder builderForValue)

List of secret versions to mount for this secret. If empty, the latest version of the secret will be made available in a file named after the secret under the mount point.

repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;

Parameters
NameDescription
indexint
builderForValueSecretVolume.SecretVersion.Builder
Returns
TypeDescription
SecretVolume.Builder