Class OAuthCredential.Builder (3.16.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public OAuthCredential.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
OAuthCredential.Builder
Overrides

build()

public OAuthCredential build()
Returns
TypeDescription
OAuthCredential

buildPartial()

public OAuthCredential buildPartial()
Returns
TypeDescription
OAuthCredential

clear()

public OAuthCredential.Builder clear()
Returns
TypeDescription
OAuthCredential.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public OAuthCredential.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
OAuthCredential.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public OAuthCredential.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
OAuthCredential.Builder

This builder for chaining.

clone()

public OAuthCredential.Builder clone()
Returns
TypeDescription
OAuthCredential.Builder
Overrides

getDefaultInstanceForType()

public OAuthCredential getDefaultInstanceForType()
Returns
TypeDescription
OAuthCredential

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for username.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(OAuthCredential other)

public OAuthCredential.Builder mergeFrom(OAuthCredential other)
Parameter
NameDescription
otherOAuthCredential
Returns
TypeDescription
OAuthCredential.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public OAuthCredential.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OAuthCredential.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public OAuthCredential.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
OAuthCredential.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

public OAuthCredential.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The oauthTokenSecretVersion to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for oauthTokenSecretVersion to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
OAuthCredential.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final OAuthCredential.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueString

The username to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for username to set.

Returns
TypeDescription
OAuthCredential.Builder

This builder for chaining.