Class SecretManagerCredential.Builder (3.53.0)

public static final class SecretManagerCredential.Builder extends GeneratedMessageV3.Builder<SecretManagerCredential.Builder> implements SecretManagerCredentialOrBuilder

A credential consisting of a username and password, where the password is stored in a Secret Manager resource. Note: Secret Manager charges apply.

Protobuf type google.privacy.dlp.v2.SecretManagerCredential

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public SecretManagerCredential.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SecretManagerCredential.Builder
Overrides

build()

public SecretManagerCredential build()
Returns
Type Description
SecretManagerCredential

buildPartial()

public SecretManagerCredential buildPartial()
Returns
Type Description
SecretManagerCredential

clear()

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

clearField(Descriptors.FieldDescriptor field)

public SecretManagerCredential.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
SecretManagerCredential.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public SecretManagerCredential.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
SecretManagerCredential.Builder
Overrides

clearPasswordSecretVersionName()

public SecretManagerCredential.Builder clearPasswordSecretVersionName()

Required. The name of the Secret Manager resource that stores the password, in the form projects/project-id/secrets/secret-name/versions/version.

string password_secret_version_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
SecretManagerCredential.Builder

This builder for chaining.

clearUsername()

public SecretManagerCredential.Builder clearUsername()

Required. The username.

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

Returns
Type Description
SecretManagerCredential.Builder

This builder for chaining.

clone()

public SecretManagerCredential.Builder clone()
Returns
Type Description
SecretManagerCredential.Builder
Overrides

getDefaultInstanceForType()

public SecretManagerCredential getDefaultInstanceForType()
Returns
Type Description
SecretManagerCredential

getDescriptorForType()

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

getPasswordSecretVersionName()

public String getPasswordSecretVersionName()

Required. The name of the Secret Manager resource that stores the password, in the form projects/project-id/secrets/secret-name/versions/version.

string password_secret_version_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The passwordSecretVersionName.

getPasswordSecretVersionNameBytes()

public ByteString getPasswordSecretVersionNameBytes()

Required. The name of the Secret Manager resource that stores the password, in the form projects/project-id/secrets/secret-name/versions/version.

string password_secret_version_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for passwordSecretVersionName.

getUsername()

public String getUsername()

Required. The username.

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

Returns
Type Description
String

The username.

getUsernameBytes()

public ByteString getUsernameBytes()

Required. The username.

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

Returns
Type Description
ByteString

The bytes for username.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SecretManagerCredential other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SecretManagerCredential.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SecretManagerCredential.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public SecretManagerCredential.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SecretManagerCredential.Builder
Overrides

setPasswordSecretVersionName(String value)

public SecretManagerCredential.Builder setPasswordSecretVersionName(String value)

Required. The name of the Secret Manager resource that stores the password, in the form projects/project-id/secrets/secret-name/versions/version.

string password_secret_version_name = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The passwordSecretVersionName to set.

Returns
Type Description
SecretManagerCredential.Builder

This builder for chaining.

setPasswordSecretVersionNameBytes(ByteString value)

public SecretManagerCredential.Builder setPasswordSecretVersionNameBytes(ByteString value)

Required. The name of the Secret Manager resource that stores the password, in the form projects/project-id/secrets/secret-name/versions/version.

string password_secret_version_name = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for passwordSecretVersionName to set.

Returns
Type Description
SecretManagerCredential.Builder

This builder for chaining.

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

public SecretManagerCredential.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
SecretManagerCredential.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final SecretManagerCredential.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SecretManagerCredential.Builder
Overrides

setUsername(String value)

public SecretManagerCredential.Builder setUsername(String value)

Required. The username.

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

Parameter
Name Description
value String

The username to set.

Returns
Type Description
SecretManagerCredential.Builder

This builder for chaining.

setUsernameBytes(ByteString value)

public SecretManagerCredential.Builder setUsernameBytes(ByteString value)

Required. The username.

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

Parameter
Name Description
value ByteString

The bytes for username to set.

Returns
Type Description
SecretManagerCredential.Builder

This builder for chaining.