Class OAuthCredential.Builder (3.51.0)

public static final class OAuthCredential.Builder extends GeneratedMessageV3.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

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

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

clearField(Descriptors.FieldDescriptor field)

public OAuthCredential.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
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.

clearOneof(Descriptors.OneofDescriptor oneof)

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

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.

clone()

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

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 GeneratedMessageV3.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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

public OAuthCredential.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
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.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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

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.