Class SecretVersion.Builder (2.34.0)

public static final class SecretVersion.Builder extends GeneratedMessageV3.Builder<SecretVersion.Builder> implements SecretVersionOrBuilder

A secret version resource in the Secret Manager API.

Protobuf type google.cloud.secretmanager.v1.SecretVersion

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public SecretVersion build()
Returns
TypeDescription
SecretVersion

buildPartial()

public SecretVersion buildPartial()
Returns
TypeDescription
SecretVersion

clear()

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

clearClientSpecifiedPayloadChecksum()

public SecretVersion.Builder clearClientSpecifiedPayloadChecksum()

Output only. True if payload checksum specified in SecretPayload object has been received by SecretManagerService on SecretManagerService.AddSecretVersion.

bool client_specified_payload_checksum = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
SecretVersion.Builder

This builder for chaining.

clearCreateTime()

public SecretVersion.Builder clearCreateTime()

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

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

Returns
TypeDescription
SecretVersion.Builder

clearDestroyTime()

public SecretVersion.Builder clearDestroyTime()

Output only. The time this SecretVersion was destroyed. Only present if state is DESTROYED.

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

Returns
TypeDescription
SecretVersion.Builder

clearEtag()

public SecretVersion.Builder clearEtag()

Output only. Etag of the currently stored SecretVersion.

string etag = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
SecretVersion.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public SecretVersion.Builder clearName()

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

SecretVersion IDs in a Secret start at 1 and are incremented for each subsequent version of the secret.

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

Returns
TypeDescription
SecretVersion.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearReplicationStatus()

public SecretVersion.Builder clearReplicationStatus()

The replication status of the SecretVersion.

.google.cloud.secretmanager.v1.ReplicationStatus replication_status = 5;

Returns
TypeDescription
SecretVersion.Builder

clearState()

public SecretVersion.Builder clearState()

Output only. The current state of the SecretVersion.

.google.cloud.secretmanager.v1.SecretVersion.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
SecretVersion.Builder

This builder for chaining.

clone()

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

getClientSpecifiedPayloadChecksum()

public boolean getClientSpecifiedPayloadChecksum()

Output only. True if payload checksum specified in SecretPayload object has been received by SecretManagerService on SecretManagerService.AddSecretVersion.

bool client_specified_payload_checksum = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

The clientSpecifiedPayloadChecksum.

getCreateTime()

public Timestamp getCreateTime()

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

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

Returns
TypeDescription
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

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

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

Returns
TypeDescription
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

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

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

Returns
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public SecretVersion getDefaultInstanceForType()
Returns
TypeDescription
SecretVersion

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDestroyTime()

public Timestamp getDestroyTime()

Output only. The time this SecretVersion was destroyed. Only present if state is DESTROYED.

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

Returns
TypeDescription
Timestamp

The destroyTime.

getDestroyTimeBuilder()

public Timestamp.Builder getDestroyTimeBuilder()

Output only. The time this SecretVersion was destroyed. Only present if state is DESTROYED.

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

Returns
TypeDescription
Builder

getDestroyTimeOrBuilder()

public TimestampOrBuilder getDestroyTimeOrBuilder()

Output only. The time this SecretVersion was destroyed. Only present if state is DESTROYED.

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

Returns
TypeDescription
TimestampOrBuilder

getEtag()

public String getEtag()

Output only. Etag of the currently stored SecretVersion.

string etag = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The etag.

getEtagBytes()

public ByteString getEtagBytes()

Output only. Etag of the currently stored SecretVersion.

string etag = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for etag.

getName()

public String getName()

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

SecretVersion IDs in a Secret start at 1 and are incremented for each subsequent version of the secret.

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 SecretVersion in the format projects/*/secrets/*/versions/*.

SecretVersion IDs in a Secret start at 1 and are incremented for each subsequent version of the secret.

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

Returns
TypeDescription
ByteString

The bytes for name.

getReplicationStatus()

public ReplicationStatus getReplicationStatus()

The replication status of the SecretVersion.

.google.cloud.secretmanager.v1.ReplicationStatus replication_status = 5;

Returns
TypeDescription
ReplicationStatus

The replicationStatus.

getReplicationStatusBuilder()

public ReplicationStatus.Builder getReplicationStatusBuilder()

The replication status of the SecretVersion.

.google.cloud.secretmanager.v1.ReplicationStatus replication_status = 5;

Returns
TypeDescription
ReplicationStatus.Builder

getReplicationStatusOrBuilder()

public ReplicationStatusOrBuilder getReplicationStatusOrBuilder()

The replication status of the SecretVersion.

.google.cloud.secretmanager.v1.ReplicationStatus replication_status = 5;

Returns
TypeDescription
ReplicationStatusOrBuilder

getState()

public SecretVersion.State getState()

Output only. The current state of the SecretVersion.

.google.cloud.secretmanager.v1.SecretVersion.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
SecretVersion.State

The state.

getStateValue()

public int getStateValue()

Output only. The current state of the SecretVersion.

.google.cloud.secretmanager.v1.SecretVersion.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
int

The enum numeric value on the wire for state.

hasCreateTime()

public boolean hasCreateTime()

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

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

Returns
TypeDescription
boolean

Whether the createTime field is set.

hasDestroyTime()

public boolean hasDestroyTime()

Output only. The time this SecretVersion was destroyed. Only present if state is DESTROYED.

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

Returns
TypeDescription
boolean

Whether the destroyTime field is set.

hasReplicationStatus()

public boolean hasReplicationStatus()

The replication status of the SecretVersion.

.google.cloud.secretmanager.v1.ReplicationStatus replication_status = 5;

Returns
TypeDescription
boolean

Whether the replicationStatus field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeCreateTime(Timestamp value)

public SecretVersion.Builder mergeCreateTime(Timestamp value)

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

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
SecretVersion.Builder

mergeDestroyTime(Timestamp value)

public SecretVersion.Builder mergeDestroyTime(Timestamp value)

Output only. The time this SecretVersion was destroyed. Only present if state is DESTROYED.

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
SecretVersion.Builder

mergeFrom(SecretVersion other)

public SecretVersion.Builder mergeFrom(SecretVersion other)
Parameter
NameDescription
otherSecretVersion
Returns
TypeDescription
SecretVersion.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeReplicationStatus(ReplicationStatus value)

public SecretVersion.Builder mergeReplicationStatus(ReplicationStatus value)

The replication status of the SecretVersion.

.google.cloud.secretmanager.v1.ReplicationStatus replication_status = 5;

Parameter
NameDescription
valueReplicationStatus
Returns
TypeDescription
SecretVersion.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setClientSpecifiedPayloadChecksum(boolean value)

public SecretVersion.Builder setClientSpecifiedPayloadChecksum(boolean value)

Output only. True if payload checksum specified in SecretPayload object has been received by SecretManagerService on SecretManagerService.AddSecretVersion.

bool client_specified_payload_checksum = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueboolean

The clientSpecifiedPayloadChecksum to set.

Returns
TypeDescription
SecretVersion.Builder

This builder for chaining.

setCreateTime(Timestamp value)

public SecretVersion.Builder setCreateTime(Timestamp value)

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

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
SecretVersion.Builder

setCreateTime(Timestamp.Builder builderForValue)

public SecretVersion.Builder setCreateTime(Timestamp.Builder builderForValue)

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

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

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
SecretVersion.Builder

setDestroyTime(Timestamp value)

public SecretVersion.Builder setDestroyTime(Timestamp value)

Output only. The time this SecretVersion was destroyed. Only present if state is DESTROYED.

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
SecretVersion.Builder

setDestroyTime(Timestamp.Builder builderForValue)

public SecretVersion.Builder setDestroyTime(Timestamp.Builder builderForValue)

Output only. The time this SecretVersion was destroyed. Only present if state is DESTROYED.

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

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
SecretVersion.Builder

setEtag(String value)

public SecretVersion.Builder setEtag(String value)

Output only. Etag of the currently stored SecretVersion.

string etag = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueString

The etag to set.

Returns
TypeDescription
SecretVersion.Builder

This builder for chaining.

setEtagBytes(ByteString value)

public SecretVersion.Builder setEtagBytes(ByteString value)

Output only. Etag of the currently stored SecretVersion.

string etag = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueByteString

The bytes for etag to set.

Returns
TypeDescription
SecretVersion.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public SecretVersion.Builder setName(String value)

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

SecretVersion IDs in a Secret start at 1 and are incremented for each subsequent version of the secret.

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

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
SecretVersion.Builder

This builder for chaining.

setNameBytes(ByteString value)

public SecretVersion.Builder setNameBytes(ByteString value)

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

SecretVersion IDs in a Secret start at 1 and are incremented for each subsequent version of the secret.

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

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
SecretVersion.Builder

This builder for chaining.

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

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

setReplicationStatus(ReplicationStatus value)

public SecretVersion.Builder setReplicationStatus(ReplicationStatus value)

The replication status of the SecretVersion.

.google.cloud.secretmanager.v1.ReplicationStatus replication_status = 5;

Parameter
NameDescription
valueReplicationStatus
Returns
TypeDescription
SecretVersion.Builder

setReplicationStatus(ReplicationStatus.Builder builderForValue)

public SecretVersion.Builder setReplicationStatus(ReplicationStatus.Builder builderForValue)

The replication status of the SecretVersion.

.google.cloud.secretmanager.v1.ReplicationStatus replication_status = 5;

Parameter
NameDescription
builderForValueReplicationStatus.Builder
Returns
TypeDescription
SecretVersion.Builder

setState(SecretVersion.State value)

public SecretVersion.Builder setState(SecretVersion.State value)

Output only. The current state of the SecretVersion.

.google.cloud.secretmanager.v1.SecretVersion.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueSecretVersion.State

The state to set.

Returns
TypeDescription
SecretVersion.Builder

This builder for chaining.

setStateValue(int value)

public SecretVersion.Builder setStateValue(int value)

Output only. The current state of the SecretVersion.

.google.cloud.secretmanager.v1.SecretVersion.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueint

The enum numeric value on the wire for state to set.

Returns
TypeDescription
SecretVersion.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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