Class Secret.Builder (2.0.7)

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

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
NameDescription
valuesIterable<? extends com.google.cloud.secretmanager.v1.Topic>
Returns
TypeDescription
Secret.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Secret.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueTopic
Returns
TypeDescription
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
NameDescription
builderForValueTopic.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueTopic
Returns
TypeDescription
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
NameDescription
indexint
builderForValueTopic.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
Topic.Builder

build()

public Secret build()
Returns
TypeDescription
Secret

buildPartial()

public Secret buildPartial()
Returns
TypeDescription
Secret

clear()

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

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
TypeDescription
Secret.Builder

clearEtag()

public Secret.Builder clearEtag()

Optional. Etag of the currently stored Secret.

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

Returns
TypeDescription
Secret.Builder

This builder for chaining.

clearExpiration()

public Secret.Builder clearExpiration()
Returns
TypeDescription
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
TypeDescription
Secret.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearLabels()

public Secret.Builder clearLabels()
Returns
TypeDescription
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
TypeDescription
Secret.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearReplication()

public Secret.Builder clearReplication()

Required. 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) = REQUIRED];

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
Secret.Builder

clone()

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

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
NameDescription
keyString
Returns
TypeDescription
boolean

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
TypeDescription
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
TypeDescription
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
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public Secret getDefaultInstanceForType()
Returns
TypeDescription
Secret

getDescriptor()

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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getEtag()

public String getEtag()

Optional. Etag of the currently stored Secret.

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

Returns
TypeDescription
String

The etag.

getEtagBytes()

public ByteString getEtagBytes()

Optional. Etag of the currently stored Secret.

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

Returns
TypeDescription
ByteString

The bytes for etag.

getExpirationCase()

public Secret.ExpirationCase getExpirationCase()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
TimestampOrBuilder

getLabels()

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
keyString
defaultValueString
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
String

getMutableLabels()

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

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
TypeDescription
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
TypeDescription
ByteString

The bytes for name.

getReplication()

public Replication getReplication()

Required. 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) = REQUIRED];

Returns
TypeDescription
Replication

The replication.

getReplicationBuilder()

public Replication.Builder getReplicationBuilder()

Required. 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) = REQUIRED];

Returns
TypeDescription
Replication.Builder

getReplicationOrBuilder()

public ReplicationOrBuilder getReplicationOrBuilder()

Required. 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) = REQUIRED];

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
Builder

getTtlOrBuilder()

public DurationOrBuilder getTtlOrBuilder()

Input only. The TTL for the Secret.

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

Returns
TypeDescription
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
TypeDescription
boolean

Whether the createTime 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
TypeDescription
boolean

Whether the expireTime field is set.

hasReplication()

public boolean hasReplication()

Required. 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) = REQUIRED];

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the ttl field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
Secret.Builder

mergeFrom(Secret other)

public Secret.Builder mergeFrom(Secret other)
Parameter
NameDescription
otherSecret
Returns
TypeDescription
Secret.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeReplication(Replication value)

public Secret.Builder mergeReplication(Replication value)

Required. 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) = REQUIRED];

Parameter
NameDescription
valueReplication
Returns
TypeDescription
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
NameDescription
valueRotation
Returns
TypeDescription
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
NameDescription
valueDuration
Returns
TypeDescription
Secret.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

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
NameDescription
valuesMap<String,String>
Returns
TypeDescription
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
NameDescription
keyString
valueString
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
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
NameDescription
valueString

The etag to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for etag to set.

Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
Secret.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

The name to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Secret.Builder
Overrides

setReplication(Replication value)

public Secret.Builder setReplication(Replication value)

Required. 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) = REQUIRED];

Parameter
NameDescription
valueReplication
Returns
TypeDescription
Secret.Builder

setReplication(Replication.Builder builderForValue)

public Secret.Builder setReplication(Replication.Builder builderForValue)

Required. 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) = REQUIRED];

Parameter
NameDescription
builderForValueReplication.Builder
Returns
TypeDescription
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
NameDescription
valueRotation
Returns
TypeDescription
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
NameDescription
builderForValueRotation.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueTopic
Returns
TypeDescription
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
NameDescription
indexint
builderForValueTopic.Builder
Returns
TypeDescription
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
NameDescription
valueDuration
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
Secret.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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