Class Secret.Builder (2.46.0)

public static final class Secret.Builder extends GeneratedMessageV3.Builder<Secret.Builder> implements SecretOrBuilder

A Secret is a logical secret whose value and versions can be accessed.

A Secret is made up of zero or more SecretVersions that represent the secret data.

Protobuf type google.cloud.secretmanager.v1.Secret

Implements

SecretOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllTopics(Iterable<? extends Topic> values)

public Secret.Builder addAllTopics(Iterable<? extends Topic> values)

Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.

repeated .google.cloud.secretmanager.v1.Topic topics = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<? extends com.google.cloud.secretmanager.v1.Topic>
Returns
Type Description
Secret.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Secret.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Secret.Builder
Overrides

addTopics(Topic value)

public Secret.Builder addTopics(Topic value)

Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.

repeated .google.cloud.secretmanager.v1.Topic topics = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Topic
Returns
Type Description
Secret.Builder

addTopics(Topic.Builder builderForValue)

public Secret.Builder addTopics(Topic.Builder builderForValue)

Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.

repeated .google.cloud.secretmanager.v1.Topic topics = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Topic.Builder
Returns
Type Description
Secret.Builder

addTopics(int index, Topic value)

public Secret.Builder addTopics(int index, Topic value)

Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.

repeated .google.cloud.secretmanager.v1.Topic topics = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value Topic
Returns
Type Description
Secret.Builder

addTopics(int index, Topic.Builder builderForValue)

public Secret.Builder addTopics(int index, Topic.Builder builderForValue)

Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.

repeated .google.cloud.secretmanager.v1.Topic topics = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue Topic.Builder
Returns
Type Description
Secret.Builder

addTopicsBuilder()

public Topic.Builder addTopicsBuilder()

Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.

repeated .google.cloud.secretmanager.v1.Topic topics = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Topic.Builder

addTopicsBuilder(int index)

public Topic.Builder addTopicsBuilder(int index)

Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.

repeated .google.cloud.secretmanager.v1.Topic topics = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Topic.Builder

build()

public Secret build()
Returns
Type Description
Secret

buildPartial()

public Secret buildPartial()
Returns
Type Description
Secret

clear()

public Secret.Builder clear()
Returns
Type Description
Secret.Builder
Overrides

clearAnnotations()

public Secret.Builder clearAnnotations()
Returns
Type Description
Secret.Builder

clearCreateTime()

public Secret.Builder clearCreateTime()

Output only. The time at which the Secret was created.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Secret.Builder

clearCustomerManagedEncryption()

public Secret.Builder clearCustomerManagedEncryption()

Optional. The customer-managed encryption configuration of the Regionalised Secrets. If no configuration is provided, Google-managed default encryption is used.

Updates to the Secret encryption configuration only apply to SecretVersions added afterwards. They do not apply retroactively to existing SecretVersions.

.google.cloud.secretmanager.v1.CustomerManagedEncryption customer_managed_encryption = 15 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Secret.Builder

clearEtag()

public Secret.Builder clearEtag()

Optional. Etag of the currently stored Secret.

string etag = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Secret.Builder

This builder for chaining.

clearExpiration()

public Secret.Builder clearExpiration()
Returns
Type Description
Secret.Builder

clearExpireTime()

public Secret.Builder clearExpireTime()

Optional. Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input.

.google.protobuf.Timestamp expire_time = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Secret.Builder

clearField(Descriptors.FieldDescriptor field)

public Secret.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Secret.Builder
Overrides

clearLabels()

public Secret.Builder clearLabels()
Returns
Type Description
Secret.Builder

clearName()

public Secret.Builder clearName()

Output only. The resource name of the Secret in the format projects/*/secrets/*.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Secret.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Secret.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Secret.Builder
Overrides

clearReplication()

public Secret.Builder clearReplication()

Optional. Immutable. The replication policy of the secret data attached to the Secret.

The replication policy cannot be changed after the Secret has been created.

.google.cloud.secretmanager.v1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Secret.Builder

clearRotation()

public Secret.Builder clearRotation()

Optional. Rotation policy attached to the Secret. May be excluded if there is no rotation policy.

.google.cloud.secretmanager.v1.Rotation rotation = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Secret.Builder

clearTopics()

public Secret.Builder clearTopics()

Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.

repeated .google.cloud.secretmanager.v1.Topic topics = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Secret.Builder

clearTtl()

public Secret.Builder clearTtl()

Input only. The TTL for the Secret.

.google.protobuf.Duration ttl = 7 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
Secret.Builder

clearVersionAliases()

public Secret.Builder clearVersionAliases()
Returns
Type Description
Secret.Builder

clearVersionDestroyTtl()

public Secret.Builder clearVersionDestroyTtl()

Optional. Secret Version TTL after destruction request

This is a part of the Delayed secret version destroy feature. For secret with TTL>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and destruction happens after the TTL expires.

.google.protobuf.Duration version_destroy_ttl = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Secret.Builder

clone()

public Secret.Builder clone()
Returns
Type Description
Secret.Builder
Overrides

containsAnnotations(String key)

public boolean containsAnnotations(String key)

Optional. Custom metadata about the secret.

Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database.

Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character ([a-z0-9A-Z]), and may have dashes (-), underscores (_), dots (.), and alphanumerics in between these symbols.

The total size of annotation keys and values must be less than 16KiB.

map<string, string> annotations = 13 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
boolean

containsLabels(String key)

public boolean containsLabels(String key)

The labels assigned to this Secret.

Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: \p{Ll}\p{Lo}{0,62}

Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}

No more than 64 labels can be assigned to a given resource.

map<string, string> labels = 4;

Parameter
Name Description
key String
Returns
Type Description
boolean

containsVersionAliases(String key)

public boolean containsVersionAliases(String key)

Optional. Mapping from version alias to version name.

A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (-) and underscore ('_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret.

Version-Alias pairs will be viewable via GetSecret and modifiable via UpdateSecret. Access by alias is only be supported on GetSecretVersion and AccessSecretVersion.

map<string, int64> version_aliases = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
boolean

getAnnotations() (deprecated)

public Map<String,String> getAnnotations()

Use #getAnnotationsMap() instead.

Returns
Type Description
Map<String,String>

getAnnotationsCount()

public int getAnnotationsCount()

Optional. Custom metadata about the secret.

Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database.

Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character ([a-z0-9A-Z]), and may have dashes (-), underscores (_), dots (.), and alphanumerics in between these symbols.

The total size of annotation keys and values must be less than 16KiB.

map<string, string> annotations = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getAnnotationsMap()

public Map<String,String> getAnnotationsMap()

Optional. Custom metadata about the secret.

Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database.

Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character ([a-z0-9A-Z]), and may have dashes (-), underscores (_), dots (.), and alphanumerics in between these symbols.

The total size of annotation keys and values must be less than 16KiB.

map<string, string> annotations = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Map<String,String>

getAnnotationsOrDefault(String key, String defaultValue)

public String getAnnotationsOrDefault(String key, String defaultValue)

Optional. Custom metadata about the secret.

Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database.

Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character ([a-z0-9A-Z]), and may have dashes (-), underscores (_), dots (.), and alphanumerics in between these symbols.

The total size of annotation keys and values must be less than 16KiB.

map<string, string> annotations = 13 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getAnnotationsOrThrow(String key)

public String getAnnotationsOrThrow(String key)

Optional. Custom metadata about the secret.

Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database.

Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character ([a-z0-9A-Z]), and may have dashes (-), underscores (_), dots (.), and alphanumerics in between these symbols.

The total size of annotation keys and values must be less than 16KiB.

map<string, string> annotations = 13 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
String

getCreateTime()

public Timestamp getCreateTime()

Output only. The time at which the Secret was created.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. The time at which the Secret was created.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The time at which the Secret was created.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getCustomerManagedEncryption()

public CustomerManagedEncryption getCustomerManagedEncryption()

Optional. The customer-managed encryption configuration of the Regionalised Secrets. If no configuration is provided, Google-managed default encryption is used.

Updates to the Secret encryption configuration only apply to SecretVersions added afterwards. They do not apply retroactively to existing SecretVersions.

.google.cloud.secretmanager.v1.CustomerManagedEncryption customer_managed_encryption = 15 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CustomerManagedEncryption

The customerManagedEncryption.

getCustomerManagedEncryptionBuilder()

public CustomerManagedEncryption.Builder getCustomerManagedEncryptionBuilder()

Optional. The customer-managed encryption configuration of the Regionalised Secrets. If no configuration is provided, Google-managed default encryption is used.

Updates to the Secret encryption configuration only apply to SecretVersions added afterwards. They do not apply retroactively to existing SecretVersions.

.google.cloud.secretmanager.v1.CustomerManagedEncryption customer_managed_encryption = 15 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CustomerManagedEncryption.Builder

getCustomerManagedEncryptionOrBuilder()

public CustomerManagedEncryptionOrBuilder getCustomerManagedEncryptionOrBuilder()

Optional. The customer-managed encryption configuration of the Regionalised Secrets. If no configuration is provided, Google-managed default encryption is used.

Updates to the Secret encryption configuration only apply to SecretVersions added afterwards. They do not apply retroactively to existing SecretVersions.

.google.cloud.secretmanager.v1.CustomerManagedEncryption customer_managed_encryption = 15 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CustomerManagedEncryptionOrBuilder

getDefaultInstanceForType()

public Secret getDefaultInstanceForType()
Returns
Type Description
Secret

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getEtag()

public String getEtag()

Optional. Etag of the currently stored Secret.

string etag = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The etag.

getEtagBytes()

public ByteString getEtagBytes()

Optional. Etag of the currently stored Secret.

string etag = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for etag.

getExpirationCase()

public Secret.ExpirationCase getExpirationCase()
Returns
Type Description
Secret.ExpirationCase

getExpireTime()

public Timestamp getExpireTime()

Optional. Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input.

.google.protobuf.Timestamp expire_time = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Timestamp

The expireTime.

getExpireTimeBuilder()

public Timestamp.Builder getExpireTimeBuilder()

Optional. Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input.

.google.protobuf.Timestamp expire_time = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Builder

getExpireTimeOrBuilder()

public TimestampOrBuilder getExpireTimeOrBuilder()

Optional. Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input.

.google.protobuf.Timestamp expire_time = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TimestampOrBuilder

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

public int getLabelsCount()

The labels assigned to this Secret.

Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: \p{Ll}\p{Lo}{0,62}

Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}

No more than 64 labels can be assigned to a given resource.

map<string, string> labels = 4;

Returns
Type Description
int

getLabelsMap()

public Map<String,String> getLabelsMap()

The labels assigned to this Secret.

Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: \p{Ll}\p{Lo}{0,62}

Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}

No more than 64 labels can be assigned to a given resource.

map<string, string> labels = 4;

Returns
Type Description
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

The labels assigned to this Secret.

Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: \p{Ll}\p{Lo}{0,62}

Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}

No more than 64 labels can be assigned to a given resource.

map<string, string> labels = 4;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

The labels assigned to this Secret.

Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: \p{Ll}\p{Lo}{0,62}

Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}

No more than 64 labels can be assigned to a given resource.

map<string, string> labels = 4;

Parameter
Name Description
key String
Returns
Type Description
String

getMutableAnnotations() (deprecated)

public Map<String,String> getMutableAnnotations()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getMutableLabels() (deprecated)

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getMutableVersionAliases() (deprecated)

public Map<String,Long> getMutableVersionAliases()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,java.lang.Long>

getName()

public String getName()

Output only. The resource name of the Secret in the format projects/*/secrets/*.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. The resource name of the Secret in the format projects/*/secrets/*.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for name.

getReplication()

public Replication getReplication()

Optional. Immutable. The replication policy of the secret data attached to the Secret.

The replication policy cannot be changed after the Secret has been created.

.google.cloud.secretmanager.v1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Replication

The replication.

getReplicationBuilder()

public Replication.Builder getReplicationBuilder()

Optional. Immutable. The replication policy of the secret data attached to the Secret.

The replication policy cannot be changed after the Secret has been created.

.google.cloud.secretmanager.v1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Replication.Builder

getReplicationOrBuilder()

public ReplicationOrBuilder getReplicationOrBuilder()

Optional. Immutable. The replication policy of the secret data attached to the Secret.

The replication policy cannot be changed after the Secret has been created.

.google.cloud.secretmanager.v1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ReplicationOrBuilder

getRotation()

public Rotation getRotation()

Optional. Rotation policy attached to the Secret. May be excluded if there is no rotation policy.

.google.cloud.secretmanager.v1.Rotation rotation = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Rotation

The rotation.

getRotationBuilder()

public Rotation.Builder getRotationBuilder()

Optional. Rotation policy attached to the Secret. May be excluded if there is no rotation policy.

.google.cloud.secretmanager.v1.Rotation rotation = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Rotation.Builder

getRotationOrBuilder()

public RotationOrBuilder getRotationOrBuilder()

Optional. Rotation policy attached to the Secret. May be excluded if there is no rotation policy.

.google.cloud.secretmanager.v1.Rotation rotation = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
RotationOrBuilder

getTopics(int index)

public Topic getTopics(int index)

Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.

repeated .google.cloud.secretmanager.v1.Topic topics = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Topic

getTopicsBuilder(int index)

public Topic.Builder getTopicsBuilder(int index)

Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.

repeated .google.cloud.secretmanager.v1.Topic topics = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Topic.Builder

getTopicsBuilderList()

public List<Topic.Builder> getTopicsBuilderList()

Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.

repeated .google.cloud.secretmanager.v1.Topic topics = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Builder>

getTopicsCount()

public int getTopicsCount()

Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.

repeated .google.cloud.secretmanager.v1.Topic topics = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getTopicsList()

public List<Topic> getTopicsList()

Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.

repeated .google.cloud.secretmanager.v1.Topic topics = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Topic>

getTopicsOrBuilder(int index)

public TopicOrBuilder getTopicsOrBuilder(int index)

Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.

repeated .google.cloud.secretmanager.v1.Topic topics = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
TopicOrBuilder

getTopicsOrBuilderList()

public List<? extends TopicOrBuilder> getTopicsOrBuilderList()

Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.

repeated .google.cloud.secretmanager.v1.Topic topics = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.cloud.secretmanager.v1.TopicOrBuilder>

getTtl()

public Duration getTtl()

Input only. The TTL for the Secret.

.google.protobuf.Duration ttl = 7 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
Duration

The ttl.

getTtlBuilder()

public Duration.Builder getTtlBuilder()

Input only. The TTL for the Secret.

.google.protobuf.Duration ttl = 7 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
Builder

getTtlOrBuilder()

public DurationOrBuilder getTtlOrBuilder()

Input only. The TTL for the Secret.

.google.protobuf.Duration ttl = 7 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
DurationOrBuilder

getVersionAliases() (deprecated)

public Map<String,Long> getVersionAliases()
Returns
Type Description
Map<String,java.lang.Long>

getVersionAliasesCount()

public int getVersionAliasesCount()

Optional. Mapping from version alias to version name.

A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (-) and underscore ('_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret.

Version-Alias pairs will be viewable via GetSecret and modifiable via UpdateSecret. Access by alias is only be supported on GetSecretVersion and AccessSecretVersion.

map<string, int64> version_aliases = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getVersionAliasesMap()

public Map<String,Long> getVersionAliasesMap()

Optional. Mapping from version alias to version name.

A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (-) and underscore ('_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret.

Version-Alias pairs will be viewable via GetSecret and modifiable via UpdateSecret. Access by alias is only be supported on GetSecretVersion and AccessSecretVersion.

map<string, int64> version_aliases = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Map<String,java.lang.Long>

getVersionAliasesOrDefault(String key, long defaultValue)

public long getVersionAliasesOrDefault(String key, long defaultValue)

Optional. Mapping from version alias to version name.

A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (-) and underscore ('_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret.

Version-Alias pairs will be viewable via GetSecret and modifiable via UpdateSecret. Access by alias is only be supported on GetSecretVersion and AccessSecretVersion.

map<string, int64> version_aliases = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
defaultValue long
Returns
Type Description
long

getVersionAliasesOrThrow(String key)

public long getVersionAliasesOrThrow(String key)

Optional. Mapping from version alias to version name.

A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (-) and underscore ('_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret.

Version-Alias pairs will be viewable via GetSecret and modifiable via UpdateSecret. Access by alias is only be supported on GetSecretVersion and AccessSecretVersion.

map<string, int64> version_aliases = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
long

getVersionDestroyTtl()

public Duration getVersionDestroyTtl()

Optional. Secret Version TTL after destruction request

This is a part of the Delayed secret version destroy feature. For secret with TTL>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and destruction happens after the TTL expires.

.google.protobuf.Duration version_destroy_ttl = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Duration

The versionDestroyTtl.

getVersionDestroyTtlBuilder()

public Duration.Builder getVersionDestroyTtlBuilder()

Optional. Secret Version TTL after destruction request

This is a part of the Delayed secret version destroy feature. For secret with TTL>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and destruction happens after the TTL expires.

.google.protobuf.Duration version_destroy_ttl = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Builder

getVersionDestroyTtlOrBuilder()

public DurationOrBuilder getVersionDestroyTtlOrBuilder()

Optional. Secret Version TTL after destruction request

This is a part of the Delayed secret version destroy feature. For secret with TTL>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and destruction happens after the TTL expires.

.google.protobuf.Duration version_destroy_ttl = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DurationOrBuilder

hasCreateTime()

public boolean hasCreateTime()

Output only. The time at which the Secret was created.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasCustomerManagedEncryption()

public boolean hasCustomerManagedEncryption()

Optional. The customer-managed encryption configuration of the Regionalised Secrets. If no configuration is provided, Google-managed default encryption is used.

Updates to the Secret encryption configuration only apply to SecretVersions added afterwards. They do not apply retroactively to existing SecretVersions.

.google.cloud.secretmanager.v1.CustomerManagedEncryption customer_managed_encryption = 15 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the customerManagedEncryption field is set.

hasExpireTime()

public boolean hasExpireTime()

Optional. Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input.

.google.protobuf.Timestamp expire_time = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the expireTime field is set.

hasReplication()

public boolean hasReplication()

Optional. Immutable. The replication policy of the secret data attached to the Secret.

The replication policy cannot be changed after the Secret has been created.

.google.cloud.secretmanager.v1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the replication field is set.

hasRotation()

public boolean hasRotation()

Optional. Rotation policy attached to the Secret. May be excluded if there is no rotation policy.

.google.cloud.secretmanager.v1.Rotation rotation = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the rotation field is set.

hasTtl()

public boolean hasTtl()

Input only. The TTL for the Secret.

.google.protobuf.Duration ttl = 7 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
boolean

Whether the ttl field is set.

hasVersionDestroyTtl()

public boolean hasVersionDestroyTtl()

Optional. Secret Version TTL after destruction request

This is a part of the Delayed secret version destroy feature. For secret with TTL>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and destruction happens after the TTL expires.

.google.protobuf.Duration version_destroy_ttl = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the versionDestroyTtl field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCreateTime(Timestamp value)

public Secret.Builder mergeCreateTime(Timestamp value)

Output only. The time at which the Secret was created.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Secret.Builder

mergeCustomerManagedEncryption(CustomerManagedEncryption value)

public Secret.Builder mergeCustomerManagedEncryption(CustomerManagedEncryption value)

Optional. The customer-managed encryption configuration of the Regionalised Secrets. If no configuration is provided, Google-managed default encryption is used.

Updates to the Secret encryption configuration only apply to SecretVersions added afterwards. They do not apply retroactively to existing SecretVersions.

.google.cloud.secretmanager.v1.CustomerManagedEncryption customer_managed_encryption = 15 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value CustomerManagedEncryption
Returns
Type Description
Secret.Builder

mergeExpireTime(Timestamp value)

public Secret.Builder mergeExpireTime(Timestamp value)

Optional. Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input.

.google.protobuf.Timestamp expire_time = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Timestamp
Returns
Type Description
Secret.Builder

mergeFrom(Secret other)

public Secret.Builder mergeFrom(Secret other)
Parameter
Name Description
other Secret
Returns
Type Description
Secret.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Secret.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Secret.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Secret.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Secret.Builder
Overrides

mergeReplication(Replication value)

public Secret.Builder mergeReplication(Replication value)

Optional. Immutable. The replication policy of the secret data attached to the Secret.

The replication policy cannot be changed after the Secret has been created.

.google.cloud.secretmanager.v1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Replication
Returns
Type Description
Secret.Builder

mergeRotation(Rotation value)

public Secret.Builder mergeRotation(Rotation value)

Optional. Rotation policy attached to the Secret. May be excluded if there is no rotation policy.

.google.cloud.secretmanager.v1.Rotation rotation = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Rotation
Returns
Type Description
Secret.Builder

mergeTtl(Duration value)

public Secret.Builder mergeTtl(Duration value)

Input only. The TTL for the Secret.

.google.protobuf.Duration ttl = 7 [(.google.api.field_behavior) = INPUT_ONLY];

Parameter
Name Description
value Duration
Returns
Type Description
Secret.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Secret.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Secret.Builder
Overrides

mergeVersionDestroyTtl(Duration value)

public Secret.Builder mergeVersionDestroyTtl(Duration value)

Optional. Secret Version TTL after destruction request

This is a part of the Delayed secret version destroy feature. For secret with TTL>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and destruction happens after the TTL expires.

.google.protobuf.Duration version_destroy_ttl = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Duration
Returns
Type Description
Secret.Builder

putAllAnnotations(Map<String,String> values)

public Secret.Builder putAllAnnotations(Map<String,String> values)

Optional. Custom metadata about the secret.

Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database.

Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character ([a-z0-9A-Z]), and may have dashes (-), underscores (_), dots (.), and alphanumerics in between these symbols.

The total size of annotation keys and values must be less than 16KiB.

map<string, string> annotations = 13 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Map<String,String>
Returns
Type Description
Secret.Builder

putAllLabels(Map<String,String> values)

public Secret.Builder putAllLabels(Map<String,String> values)

The labels assigned to this Secret.

Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: \p{Ll}\p{Lo}{0,62}

Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}

No more than 64 labels can be assigned to a given resource.

map<string, string> labels = 4;

Parameter
Name Description
values Map<String,String>
Returns
Type Description
Secret.Builder

putAllVersionAliases(Map<String,Long> values)

public Secret.Builder putAllVersionAliases(Map<String,Long> values)

Optional. Mapping from version alias to version name.

A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (-) and underscore ('_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret.

Version-Alias pairs will be viewable via GetSecret and modifiable via UpdateSecret. Access by alias is only be supported on GetSecretVersion and AccessSecretVersion.

map<string, int64> version_aliases = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Map<String,java.lang.Long>
Returns
Type Description
Secret.Builder

putAnnotations(String key, String value)

public Secret.Builder putAnnotations(String key, String value)

Optional. Custom metadata about the secret.

Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database.

Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character ([a-z0-9A-Z]), and may have dashes (-), underscores (_), dots (.), and alphanumerics in between these symbols.

The total size of annotation keys and values must be less than 16KiB.

map<string, string> annotations = 13 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
value String
Returns
Type Description
Secret.Builder

putLabels(String key, String value)

public Secret.Builder putLabels(String key, String value)

The labels assigned to this Secret.

Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: \p{Ll}\p{Lo}{0,62}

Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}

No more than 64 labels can be assigned to a given resource.

map<string, string> labels = 4;

Parameters
Name Description
key String
value String
Returns
Type Description
Secret.Builder

putVersionAliases(String key, long value)

public Secret.Builder putVersionAliases(String key, long value)

Optional. Mapping from version alias to version name.

A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (-) and underscore ('_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret.

Version-Alias pairs will be viewable via GetSecret and modifiable via UpdateSecret. Access by alias is only be supported on GetSecretVersion and AccessSecretVersion.

map<string, int64> version_aliases = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
value long
Returns
Type Description
Secret.Builder

removeAnnotations(String key)

public Secret.Builder removeAnnotations(String key)

Optional. Custom metadata about the secret.

Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database.

Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character ([a-z0-9A-Z]), and may have dashes (-), underscores (_), dots (.), and alphanumerics in between these symbols.

The total size of annotation keys and values must be less than 16KiB.

map<string, string> annotations = 13 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
Secret.Builder

removeLabels(String key)

public Secret.Builder removeLabels(String key)

The labels assigned to this Secret.

Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: \p{Ll}\p{Lo}{0,62}

Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}

No more than 64 labels can be assigned to a given resource.

map<string, string> labels = 4;

Parameter
Name Description
key String
Returns
Type Description
Secret.Builder

removeTopics(int index)

public Secret.Builder removeTopics(int index)

Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.

repeated .google.cloud.secretmanager.v1.Topic topics = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Secret.Builder

removeVersionAliases(String key)

public Secret.Builder removeVersionAliases(String key)

Optional. Mapping from version alias to version name.

A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (-) and underscore ('_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret.

Version-Alias pairs will be viewable via GetSecret and modifiable via UpdateSecret. Access by alias is only be supported on GetSecretVersion and AccessSecretVersion.

map<string, int64> version_aliases = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
Secret.Builder

setCreateTime(Timestamp value)

public Secret.Builder setCreateTime(Timestamp value)

Output only. The time at which the Secret was created.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Secret.Builder

setCreateTime(Timestamp.Builder builderForValue)

public Secret.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. The time at which the Secret was created.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Secret.Builder

setCustomerManagedEncryption(CustomerManagedEncryption value)

public Secret.Builder setCustomerManagedEncryption(CustomerManagedEncryption value)

Optional. The customer-managed encryption configuration of the Regionalised Secrets. If no configuration is provided, Google-managed default encryption is used.

Updates to the Secret encryption configuration only apply to SecretVersions added afterwards. They do not apply retroactively to existing SecretVersions.

.google.cloud.secretmanager.v1.CustomerManagedEncryption customer_managed_encryption = 15 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value CustomerManagedEncryption
Returns
Type Description
Secret.Builder

setCustomerManagedEncryption(CustomerManagedEncryption.Builder builderForValue)

public Secret.Builder setCustomerManagedEncryption(CustomerManagedEncryption.Builder builderForValue)

Optional. The customer-managed encryption configuration of the Regionalised Secrets. If no configuration is provided, Google-managed default encryption is used.

Updates to the Secret encryption configuration only apply to SecretVersions added afterwards. They do not apply retroactively to existing SecretVersions.

.google.cloud.secretmanager.v1.CustomerManagedEncryption customer_managed_encryption = 15 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue CustomerManagedEncryption.Builder
Returns
Type Description
Secret.Builder

setEtag(String value)

public Secret.Builder setEtag(String value)

Optional. Etag of the currently stored Secret.

string etag = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The etag to set.

Returns
Type Description
Secret.Builder

This builder for chaining.

setEtagBytes(ByteString value)

public Secret.Builder setEtagBytes(ByteString value)

Optional. Etag of the currently stored Secret.

string etag = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for etag to set.

Returns
Type Description
Secret.Builder

This builder for chaining.

setExpireTime(Timestamp value)

public Secret.Builder setExpireTime(Timestamp value)

Optional. Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input.

.google.protobuf.Timestamp expire_time = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Timestamp
Returns
Type Description
Secret.Builder

setExpireTime(Timestamp.Builder builderForValue)

public Secret.Builder setExpireTime(Timestamp.Builder builderForValue)

Optional. Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input.

.google.protobuf.Timestamp expire_time = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Secret.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Secret.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Secret.Builder
Overrides

setName(String value)

public Secret.Builder setName(String value)

Output only. The resource name of the Secret in the format projects/*/secrets/*.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Secret.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Secret.Builder setNameBytes(ByteString value)

Output only. The resource name of the Secret in the format projects/*/secrets/*.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Secret.Builder

This builder for chaining.

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

public Secret.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Secret.Builder
Overrides

setReplication(Replication value)

public Secret.Builder setReplication(Replication value)

Optional. Immutable. The replication policy of the secret data attached to the Secret.

The replication policy cannot be changed after the Secret has been created.

.google.cloud.secretmanager.v1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Replication
Returns
Type Description
Secret.Builder

setReplication(Replication.Builder builderForValue)

public Secret.Builder setReplication(Replication.Builder builderForValue)

Optional. Immutable. The replication policy of the secret data attached to the Secret.

The replication policy cannot be changed after the Secret has been created.

.google.cloud.secretmanager.v1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Replication.Builder
Returns
Type Description
Secret.Builder

setRotation(Rotation value)

public Secret.Builder setRotation(Rotation value)

Optional. Rotation policy attached to the Secret. May be excluded if there is no rotation policy.

.google.cloud.secretmanager.v1.Rotation rotation = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Rotation
Returns
Type Description
Secret.Builder

setRotation(Rotation.Builder builderForValue)

public Secret.Builder setRotation(Rotation.Builder builderForValue)

Optional. Rotation policy attached to the Secret. May be excluded if there is no rotation policy.

.google.cloud.secretmanager.v1.Rotation rotation = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Rotation.Builder
Returns
Type Description
Secret.Builder

setTopics(int index, Topic value)

public Secret.Builder setTopics(int index, Topic value)

Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.

repeated .google.cloud.secretmanager.v1.Topic topics = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value Topic
Returns
Type Description
Secret.Builder

setTopics(int index, Topic.Builder builderForValue)

public Secret.Builder setTopics(int index, Topic.Builder builderForValue)

Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.

repeated .google.cloud.secretmanager.v1.Topic topics = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue Topic.Builder
Returns
Type Description
Secret.Builder

setTtl(Duration value)

public Secret.Builder setTtl(Duration value)

Input only. The TTL for the Secret.

.google.protobuf.Duration ttl = 7 [(.google.api.field_behavior) = INPUT_ONLY];

Parameter
Name Description
value Duration
Returns
Type Description
Secret.Builder

setTtl(Duration.Builder builderForValue)

public Secret.Builder setTtl(Duration.Builder builderForValue)

Input only. The TTL for the Secret.

.google.protobuf.Duration ttl = 7 [(.google.api.field_behavior) = INPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Secret.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final Secret.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Secret.Builder
Overrides

setVersionDestroyTtl(Duration value)

public Secret.Builder setVersionDestroyTtl(Duration value)

Optional. Secret Version TTL after destruction request

This is a part of the Delayed secret version destroy feature. For secret with TTL>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and destruction happens after the TTL expires.

.google.protobuf.Duration version_destroy_ttl = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Duration
Returns
Type Description
Secret.Builder

setVersionDestroyTtl(Duration.Builder builderForValue)

public Secret.Builder setVersionDestroyTtl(Duration.Builder builderForValue)

Optional. Secret Version TTL after destruction request

This is a part of the Delayed secret version destroy feature. For secret with TTL>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and destruction happens after the TTL expires.

.google.protobuf.Duration version_destroy_ttl = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Secret.Builder