Class SecretKeySelector.Builder (0.7.0)

public static final class SecretKeySelector.Builder extends GeneratedMessageV3.Builder<SecretKeySelector.Builder> implements SecretKeySelectorOrBuilder

SecretEnvVarSource represents a source for the value of an EnvVar.

Protobuf type google.cloud.run.v2.SecretKeySelector

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public SecretKeySelector build()
Returns
TypeDescription
SecretKeySelector

buildPartial()

public SecretKeySelector buildPartial()
Returns
TypeDescription
SecretKeySelector

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearSecret()

public SecretKeySelector.Builder clearSecret()

Required. The name of the secret in Cloud Secret Manager. Format: {secret_name} if the secret is in the same project. projects/{project}/secrets/{secret_name} if the secret is in a different project.

string secret = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
SecretKeySelector.Builder

This builder for chaining.

clearVersion()

public SecretKeySelector.Builder clearVersion()

The Cloud Secret Manager secret version. Can be 'latest' for the latest version, an integer for a specific version, or a version alias.

string version = 2 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
SecretKeySelector.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public SecretKeySelector getDefaultInstanceForType()
Returns
TypeDescription
SecretKeySelector

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getSecret()

public String getSecret()

Required. The name of the secret in Cloud Secret Manager. Format: {secret_name} if the secret is in the same project. projects/{project}/secrets/{secret_name} if the secret is in a different project.

string secret = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
String

The secret.

getSecretBytes()

public ByteString getSecretBytes()

Required. The name of the secret in Cloud Secret Manager. Format: {secret_name} if the secret is in the same project. projects/{project}/secrets/{secret_name} if the secret is in a different project.

string secret = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
ByteString

The bytes for secret.

getVersion()

public String getVersion()

The Cloud Secret Manager secret version. Can be 'latest' for the latest version, an integer for a specific version, or a version alias.

string version = 2 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
String

The version.

getVersionBytes()

public ByteString getVersionBytes()

The Cloud Secret Manager secret version. Can be 'latest' for the latest version, an integer for a specific version, or a version alias.

string version = 2 [(.google.api.resource_reference) = { ... }

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

public SecretKeySelector.Builder mergeFrom(SecretKeySelector other)
Parameter
NameDescription
otherSecretKeySelector
Returns
TypeDescription
SecretKeySelector.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setSecret(String value)

public SecretKeySelector.Builder setSecret(String value)

Required. The name of the secret in Cloud Secret Manager. Format: {secret_name} if the secret is in the same project. projects/{project}/secrets/{secret_name} if the secret is in a different project.

string secret = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueString

The secret to set.

Returns
TypeDescription
SecretKeySelector.Builder

This builder for chaining.

setSecretBytes(ByteString value)

public SecretKeySelector.Builder setSecretBytes(ByteString value)

Required. The name of the secret in Cloud Secret Manager. Format: {secret_name} if the secret is in the same project. projects/{project}/secrets/{secret_name} if the secret is in a different project.

string secret = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueByteString

The bytes for secret to set.

Returns
TypeDescription
SecretKeySelector.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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

setVersion(String value)

public SecretKeySelector.Builder setVersion(String value)

The Cloud Secret Manager secret version. Can be 'latest' for the latest version, an integer for a specific version, or a version alias.

string version = 2 [(.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueString

The version to set.

Returns
TypeDescription
SecretKeySelector.Builder

This builder for chaining.

setVersionBytes(ByteString value)

public SecretKeySelector.Builder setVersionBytes(ByteString value)

The Cloud Secret Manager secret version. Can be 'latest' for the latest version, an integer for a specific version, or a version alias.

string version = 2 [(.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueByteString

The bytes for version to set.

Returns
TypeDescription
SecretKeySelector.Builder

This builder for chaining.