public static final class Secret.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Secret.Builder> implements SecretOrBuilder
A [Secret][google.cloud.secrets.v1beta1.Secret] is a logical secret whose value and versions can be accessed. A [Secret][google.cloud.secrets.v1beta1.Secret] is made up of zero or more [SecretVersions][google.cloud.secrets.v1beta1.SecretVersion] that represent the secret data.Protobuf type
google.cloud.secrets.v1beta1.Secret| Modifier and Type | Method and Description |
|---|---|
Secret.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
Secret |
build() |
Secret |
buildPartial() |
Secret.Builder |
clear() |
Secret.Builder |
clearCreateTime()
Output only.
|
Secret.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
Secret.Builder |
clearLabels() |
Secret.Builder |
clearName()
Output only.
|
Secret.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
Secret.Builder |
clearReplication()
Required.
|
Secret.Builder |
clone() |
boolean |
containsLabels(String key)
The labels assigned to this Secret.
|
com.google.protobuf.Timestamp |
getCreateTime()
Output only.
|
com.google.protobuf.Timestamp.Builder |
getCreateTimeBuilder()
Output only.
|
com.google.protobuf.TimestampOrBuilder |
getCreateTimeOrBuilder()
Output only.
|
Secret |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
Map<String,String> |
getLabels()
Deprecated.
|
int |
getLabelsCount()
The labels assigned to this Secret.
|
Map<String,String> |
getLabelsMap()
The labels assigned to this Secret.
|
String |
getLabelsOrDefault(String key,
String defaultValue)
The labels assigned to this Secret.
|
String |
getLabelsOrThrow(String key)
The labels assigned to this Secret.
|
Map<String,String> |
getMutableLabels()
Deprecated.
|
String |
getName()
Output only.
|
com.google.protobuf.ByteString |
getNameBytes()
Output only.
|
Replication |
getReplication()
Required.
|
Replication.Builder |
getReplicationBuilder()
Required.
|
ReplicationOrBuilder |
getReplicationOrBuilder()
Required.
|
boolean |
hasCreateTime()
Output only.
|
boolean |
hasReplication()
Required.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected com.google.protobuf.MapFieldReflectionAccessor |
internalGetMapFieldReflection(int number) |
protected com.google.protobuf.MapFieldReflectionAccessor |
internalGetMutableMapFieldReflection(int number) |
boolean |
isInitialized() |
Secret.Builder |
mergeCreateTime(com.google.protobuf.Timestamp value)
Output only.
|
Secret.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
Secret.Builder |
mergeFrom(com.google.protobuf.Message other) |
Secret.Builder |
mergeFrom(Secret other) |
Secret.Builder |
mergeReplication(Replication value)
Required.
|
Secret.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
Secret.Builder |
putAllLabels(Map<String,String> values)
The labels assigned to this Secret.
|
Secret.Builder |
putLabels(String key,
String value)
The labels assigned to this Secret.
|
Secret.Builder |
removeLabels(String key)
The labels assigned to this Secret.
|
Secret.Builder |
setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)
Output only.
|
Secret.Builder |
setCreateTime(com.google.protobuf.Timestamp value)
Output only.
|
Secret.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
Secret.Builder |
setName(String value)
Output only.
|
Secret.Builder |
setNameBytes(com.google.protobuf.ByteString value)
Output only.
|
Secret.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
Secret.Builder |
setReplication(Replication.Builder builderForValue)
Required.
|
Secret.Builder |
setReplication(Replication value)
Required.
|
Secret.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessageV3.Builder<Secret.Builder>protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessageV3.Builder<Secret.Builder>protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Secret.Builder>public Secret.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<Secret.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Secret.Builder>public Secret getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic Secret build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic Secret buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic Secret.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<Secret.Builder>public Secret.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<Secret.Builder>public Secret.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<Secret.Builder>public Secret.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Secret.Builder>public Secret.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Secret.Builder>public Secret.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Secret.Builder>public Secret.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<Secret.Builder>public Secret.Builder mergeFrom(Secret other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Secret.Builder>public Secret.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<Secret.Builder>IOExceptionpublic String getName()
Output only. The resource name of the [Secret][google.cloud.secrets.v1beta1.Secret] in the format `projects/*/secrets/*`.
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];getName in interface SecretOrBuilderpublic com.google.protobuf.ByteString getNameBytes()
Output only. The resource name of the [Secret][google.cloud.secrets.v1beta1.Secret] in the format `projects/*/secrets/*`.
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];getNameBytes in interface SecretOrBuilderpublic Secret.Builder setName(String value)
Output only. The resource name of the [Secret][google.cloud.secrets.v1beta1.Secret] in the format `projects/*/secrets/*`.
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];value - The name to set.public Secret.Builder clearName()
Output only. The resource name of the [Secret][google.cloud.secrets.v1beta1.Secret] in the format `projects/*/secrets/*`.
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];public Secret.Builder setNameBytes(com.google.protobuf.ByteString value)
Output only. The resource name of the [Secret][google.cloud.secrets.v1beta1.Secret] in the format `projects/*/secrets/*`.
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];value - The bytes for name to set.public boolean hasReplication()
Required. Immutable. The replication policy of the secret data attached to the [Secret][google.cloud.secrets.v1beta1.Secret]. The replication policy cannot be changed after the Secret has been created.
.google.cloud.secrets.v1beta1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED];
hasReplication in interface SecretOrBuilderpublic Replication getReplication()
Required. Immutable. The replication policy of the secret data attached to the [Secret][google.cloud.secrets.v1beta1.Secret]. The replication policy cannot be changed after the Secret has been created.
.google.cloud.secrets.v1beta1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED];
getReplication in interface SecretOrBuilderpublic Secret.Builder setReplication(Replication value)
Required. Immutable. The replication policy of the secret data attached to the [Secret][google.cloud.secrets.v1beta1.Secret]. The replication policy cannot be changed after the Secret has been created.
.google.cloud.secrets.v1beta1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED];
public Secret.Builder setReplication(Replication.Builder builderForValue)
Required. Immutable. The replication policy of the secret data attached to the [Secret][google.cloud.secrets.v1beta1.Secret]. The replication policy cannot be changed after the Secret has been created.
.google.cloud.secrets.v1beta1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED];
public Secret.Builder mergeReplication(Replication value)
Required. Immutable. The replication policy of the secret data attached to the [Secret][google.cloud.secrets.v1beta1.Secret]. The replication policy cannot be changed after the Secret has been created.
.google.cloud.secrets.v1beta1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED];
public Secret.Builder clearReplication()
Required. Immutable. The replication policy of the secret data attached to the [Secret][google.cloud.secrets.v1beta1.Secret]. The replication policy cannot be changed after the Secret has been created.
.google.cloud.secrets.v1beta1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED];
public Replication.Builder getReplicationBuilder()
Required. Immutable. The replication policy of the secret data attached to the [Secret][google.cloud.secrets.v1beta1.Secret]. The replication policy cannot be changed after the Secret has been created.
.google.cloud.secrets.v1beta1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED];
public ReplicationOrBuilder getReplicationOrBuilder()
Required. Immutable. The replication policy of the secret data attached to the [Secret][google.cloud.secrets.v1beta1.Secret]. The replication policy cannot be changed after the Secret has been created.
.google.cloud.secrets.v1beta1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED];
getReplicationOrBuilder in interface SecretOrBuilderpublic boolean hasCreateTime()
Output only. The time at which the [Secret][google.cloud.secrets.v1beta1.Secret] was created.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
hasCreateTime in interface SecretOrBuilderpublic com.google.protobuf.Timestamp getCreateTime()
Output only. The time at which the [Secret][google.cloud.secrets.v1beta1.Secret] was created.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
getCreateTime in interface SecretOrBuilderpublic Secret.Builder setCreateTime(com.google.protobuf.Timestamp value)
Output only. The time at which the [Secret][google.cloud.secrets.v1beta1.Secret] was created.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Secret.Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)
Output only. The time at which the [Secret][google.cloud.secrets.v1beta1.Secret] was created.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Secret.Builder mergeCreateTime(com.google.protobuf.Timestamp value)
Output only. The time at which the [Secret][google.cloud.secrets.v1beta1.Secret] was created.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Secret.Builder clearCreateTime()
Output only. The time at which the [Secret][google.cloud.secrets.v1beta1.Secret] was created.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()
Output only. The time at which the [Secret][google.cloud.secrets.v1beta1.Secret] was created.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
Output only. The time at which the [Secret][google.cloud.secrets.v1beta1.Secret] was created.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
getCreateTimeOrBuilder in interface SecretOrBuilderpublic int getLabelsCount()
SecretOrBuilder
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}][\p{Ll}\p{Lo}\p{N}_-]{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;getLabelsCount in interface SecretOrBuilderpublic 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}][\p{Ll}\p{Lo}\p{N}_-]{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;containsLabels in interface SecretOrBuilder@Deprecated public Map<String,String> getLabels()
getLabelsMap() instead.getLabels in interface SecretOrBuilderpublic 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}][\p{Ll}\p{Lo}\p{N}_-]{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;getLabelsMap in interface SecretOrBuilderpublic 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}][\p{Ll}\p{Lo}\p{N}_-]{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;getLabelsOrDefault in interface SecretOrBuilderpublic 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}][\p{Ll}\p{Lo}\p{N}_-]{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;getLabelsOrThrow in interface SecretOrBuilderpublic Secret.Builder clearLabels()
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}][\p{Ll}\p{Lo}\p{N}_-]{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;@Deprecated public Map<String,String> getMutableLabels()
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}][\p{Ll}\p{Lo}\p{N}_-]{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;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}][\p{Ll}\p{Lo}\p{N}_-]{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;public final Secret.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Secret.Builder>public final Secret.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Secret.Builder>Copyright © 2025 Google LLC. All rights reserved.