Class SecretVersion.Builder (2.29.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.secrets.v1beta1.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

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

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

clearState()

public SecretVersion.Builder clearState()

Output only. The current state of the SecretVersion.

.google.cloud.secrets.v1beta1.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

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

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.

getState()

public SecretVersion.State getState()

Output only. The current state of the SecretVersion.

.google.cloud.secrets.v1beta1.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.secrets.v1beta1.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.

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

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

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

setState(SecretVersion.State value)

public SecretVersion.Builder setState(SecretVersion.State value)

Output only. The current state of the SecretVersion.

.google.cloud.secrets.v1beta1.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.secrets.v1beta1.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