public final class Secret extends com.google.protobuf.GeneratedMessageV3 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 | Class and Description |
|---|---|
static class |
Secret.Builder
A [Secret][google.cloud.secrets.v1beta1.Secret] is a logical secret whose value and versions can
be accessed.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
CREATE_TIME_FIELD_NUMBER |
static int |
LABELS_FIELD_NUMBER |
static int |
NAME_FIELD_NUMBER |
static int |
REPLICATION_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsLabels(String key)
The labels assigned to this Secret.
|
boolean |
equals(Object obj) |
com.google.protobuf.Timestamp |
getCreateTime()
Output only.
|
com.google.protobuf.TimestampOrBuilder |
getCreateTimeOrBuilder()
Output only.
|
static Secret |
getDefaultInstance() |
Secret |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
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.
|
String |
getName()
Output only.
|
com.google.protobuf.ByteString |
getNameBytes()
Output only.
|
com.google.protobuf.Parser<Secret> |
getParserForType() |
Replication |
getReplication()
Required.
|
ReplicationOrBuilder |
getReplicationOrBuilder()
Required.
|
int |
getSerializedSize() |
boolean |
hasCreateTime()
Output only.
|
int |
hashCode() |
boolean |
hasReplication()
Required.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected com.google.protobuf.MapFieldReflectionAccessor |
internalGetMapFieldReflection(int number) |
boolean |
isInitialized() |
static Secret.Builder |
newBuilder() |
static Secret.Builder |
newBuilder(Secret prototype) |
Secret.Builder |
newBuilderForType() |
protected Secret.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static Secret |
parseDelimitedFrom(InputStream input) |
static Secret |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Secret |
parseFrom(byte[] data) |
static Secret |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Secret |
parseFrom(ByteBuffer data) |
static Secret |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Secret |
parseFrom(com.google.protobuf.ByteString data) |
static Secret |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Secret |
parseFrom(com.google.protobuf.CodedInputStream input) |
static Secret |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Secret |
parseFrom(InputStream input) |
static Secret |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<Secret> |
parser() |
Secret.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int NAME_FIELD_NUMBER
public static final int REPLICATION_FIELD_NUMBER
public static final int CREATE_TIME_FIELD_NUMBER
public static final int LABELS_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessageV3protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public 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 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 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 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 final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static Secret parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Secret parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Secret parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Secret parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Secret parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Secret parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Secret parseFrom(InputStream input) throws IOException
IOExceptionpublic static Secret parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Secret parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static Secret parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Secret parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static Secret parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic Secret.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static Secret.Builder newBuilder()
public static Secret.Builder newBuilder(Secret prototype)
public Secret.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected Secret.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static Secret getDefaultInstance()
public static com.google.protobuf.Parser<Secret> parser()
public com.google.protobuf.Parser<Secret> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public Secret getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2025 Google LLC. All rights reserved.