Class Secret.Builder (0.36.0)

public static final class Secret.Builder extends GeneratedMessage.Builder<Secret.Builder> implements SecretOrBuilder

Secret provides a reference to entries in Secret Manager.

Protobuf type google.cloud.apihub.v1.Secret

Implements

SecretOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

build()

public Secret build()
Returns
Type Description
Secret

buildPartial()

public Secret buildPartial()
Returns
Type Description
Secret

clear()

public Secret.Builder clear()
Returns
Type Description
Secret.Builder
Overrides

clearSecretVersion()

public Secret.Builder clearSecretVersion()

Required. The resource name of the secret version in the format, format as: projects/*/secrets/*/versions/*.

string secret_version = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Secret.Builder

This builder for chaining.

getDefaultInstanceForType()

public Secret getDefaultInstanceForType()
Returns
Type Description
Secret

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getSecretVersion()

public String getSecretVersion()

Required. The resource name of the secret version in the format, format as: projects/*/secrets/*/versions/*.

string secret_version = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The secretVersion.

getSecretVersionBytes()

public ByteString getSecretVersionBytes()

Required. The resource name of the secret version in the format, format as: projects/*/secrets/*/versions/*.

string secret_version = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for secretVersion.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Secret other)

public Secret.Builder mergeFrom(Secret other)
Parameter
Name Description
other Secret
Returns
Type Description
Secret.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Secret.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Secret.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Secret.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Secret.Builder
Overrides

setSecretVersion(String value)

public Secret.Builder setSecretVersion(String value)

Required. The resource name of the secret version in the format, format as: projects/*/secrets/*/versions/*.

string secret_version = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The secretVersion to set.

Returns
Type Description
Secret.Builder

This builder for chaining.

setSecretVersionBytes(ByteString value)

public Secret.Builder setSecretVersionBytes(ByteString value)

Required. The resource name of the secret version in the format, format as: projects/*/secrets/*/versions/*.

string secret_version = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for secretVersion to set.

Returns
Type Description
Secret.Builder

This builder for chaining.