Class OAuthCredential.Builder (0.37.0)

publicstaticfinalclass OAuthCredential.BuilderextendsGeneratedMessageV3.Builder<OAuthCredential.Builder>implementsOAuthCredentialOrBuilder

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

Protobuf type google.cloud.developerconnect.v1.OAuthCredential

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicOAuthCredential.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
OAuthCredential.Builder
Overrides

build()

publicOAuthCredentialbuild()
Returns
Type Description
OAuthCredential

buildPartial()

publicOAuthCredentialbuildPartial()
Returns
Type Description
OAuthCredential

clear()

publicOAuthCredential.Builderclear()
Returns
Type Description
OAuthCredential.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

publicOAuthCredential.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
OAuthCredential.Builder
Overrides

clearOauthTokenSecretVersion()

publicOAuthCredential.BuilderclearOauthTokenSecretVersion()

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

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

Returns
Type Description
OAuthCredential.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

publicOAuthCredential.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
OAuthCredential.Builder
Overrides

clearUsername()

publicOAuthCredential.BuilderclearUsername()

Output only. The username associated with this token.

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

Returns
Type Description
OAuthCredential.Builder

This builder for chaining.

clone()

publicOAuthCredential.Builderclone()
Returns
Type Description
OAuthCredential.Builder
Overrides

getDefaultInstanceForType()

publicOAuthCredentialgetDefaultInstanceForType()
Returns
Type Description
OAuthCredential

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getOauthTokenSecretVersion()

publicStringgetOauthTokenSecretVersion()

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

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

Returns
Type Description
String

The oauthTokenSecretVersion.

getOauthTokenSecretVersionBytes()

publicByteStringgetOauthTokenSecretVersionBytes()

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

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

Returns
Type Description
ByteString

The bytes for oauthTokenSecretVersion.

getUsername()

publicStringgetUsername()

Output only. The username associated with this token.

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

Returns
Type Description
String

The username.

getUsernameBytes()

publicByteStringgetUsernameBytes()

Output only. The username associated with this token.

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

Returns
Type Description
ByteString

The bytes for username.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(OAuthCredential other)

publicOAuthCredential.BuildermergeFrom(OAuthCredentialother)
Parameter
Name Description
other OAuthCredential
Returns
Type Description
OAuthCredential.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicOAuthCredential.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OAuthCredential.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

publicOAuthCredential.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
OAuthCredential.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalOAuthCredential.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
OAuthCredential.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

publicOAuthCredential.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
OAuthCredential.Builder
Overrides

setOauthTokenSecretVersion(String value)

publicOAuthCredential.BuildersetOauthTokenSecretVersion(Stringvalue)

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

string oauth_token_secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.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)

publicOAuthCredential.BuildersetOauthTokenSecretVersionBytes(ByteStringvalue)

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

string oauth_token_secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.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)

publicOAuthCredential.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
OAuthCredential.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalOAuthCredential.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
OAuthCredential.Builder
Overrides

setUsername(String value)

publicOAuthCredential.BuildersetUsername(Stringvalue)

Output only. The username associated with 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)

publicOAuthCredential.BuildersetUsernameBytes(ByteStringvalue)

Output only. The username associated with 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.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月19日 UTC.