Class OAuthCredential.Builder (3.85.0)

public static final class OAuthCredential.Builder extends GeneratedMessage.Builder<OAuthCredential.Builder> implements OAuthCredentialOrBuilder

Represents an OAuth token of the account that authorized the Connection, and associated metadata.

Protobuf type google.devtools.cloudbuild.v2.OAuthCredential

Static Methods

getDescriptor()

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

Methods

build()

public OAuthCredential build()
Returns
Type Description
OAuthCredential

buildPartial()

public OAuthCredential buildPartial()
Returns
Type Description
OAuthCredential

clear()

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

clearOauthTokenSecretVersion()

public OAuthCredential.Builder clearOauthTokenSecretVersion()

A SecretManager resource containing the OAuth token that authorizes the Cloud Build connection. Format: projects/*/secrets/*/versions/*.

string oauth_token_secret_version = 1 [(.google.api.resource_reference) = { ... }

Returns
Type Description
OAuthCredential.Builder

This builder for chaining.

clearUsername()

public OAuthCredential.Builder clearUsername()

Output only. The username associated to this token.

string username = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
OAuthCredential.Builder

This builder for chaining.

getDefaultInstanceForType()

public OAuthCredential getDefaultInstanceForType()
Returns
Type Description
OAuthCredential

getDescriptorForType()

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

getOauthTokenSecretVersion()

public String getOauthTokenSecretVersion()

A SecretManager resource containing the OAuth token that authorizes the Cloud Build connection. Format: projects/*/secrets/*/versions/*.

string oauth_token_secret_version = 1 [(.google.api.resource_reference) = { ... }

Returns
Type Description
String

The oauthTokenSecretVersion.

getOauthTokenSecretVersionBytes()

public ByteString getOauthTokenSecretVersionBytes()

A SecretManager resource containing the OAuth token that authorizes the Cloud Build connection. Format: projects/*/secrets/*/versions/*.

string oauth_token_secret_version = 1 [(.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for oauthTokenSecretVersion.

getUsername()

public String getUsername()

Output only. The username associated to this token.

string username = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The username.

getUsernameBytes()

public ByteString getUsernameBytes()

Output only. The username associated to this token.

string username = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for username.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(OAuthCredential other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setOauthTokenSecretVersion(String value)

public OAuthCredential.Builder setOauthTokenSecretVersion(String value)

A SecretManager resource containing the OAuth token that authorizes the Cloud Build connection. Format: projects/*/secrets/*/versions/*.

string oauth_token_secret_version = 1 [(.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The oauthTokenSecretVersion to set.

Returns
Type Description
OAuthCredential.Builder

This builder for chaining.

setOauthTokenSecretVersionBytes(ByteString value)

public OAuthCredential.Builder setOauthTokenSecretVersionBytes(ByteString value)

A SecretManager resource containing the OAuth token that authorizes the Cloud Build connection. Format: projects/*/secrets/*/versions/*.

string oauth_token_secret_version = 1 [(.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for oauthTokenSecretVersion to set.

Returns
Type Description
OAuthCredential.Builder

This builder for chaining.

setUsername(String value)

public OAuthCredential.Builder setUsername(String value)

Output only. The username associated to this token.

string username = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The username to set.

Returns
Type Description
OAuthCredential.Builder

This builder for chaining.

setUsernameBytes(ByteString value)

public OAuthCredential.Builder setUsernameBytes(ByteString value)

Output only. The username associated to this token.

string username = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for username to set.

Returns
Type Description
OAuthCredential.Builder

This builder for chaining.