Class UserCredential.Builder (3.82.0)

publicstaticfinalclass UserCredential.BuilderextendsGeneratedMessageV3.Builder<UserCredential.Builder>implementsUserCredentialOrBuilder

Represents a personal access token that authorized the Connection, and associated metadata.

Protobuf type google.devtools.cloudbuild.v2.UserCredential

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)

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

build()

publicUserCredentialbuild()
Returns
Type Description
UserCredential

buildPartial()

publicUserCredentialbuildPartial()
Returns
Type Description
UserCredential

clear()

publicUserCredential.Builderclear()
Returns
Type Description
UserCredential.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

publicUserCredential.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
UserCredential.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

publicUserCredential.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
UserCredential.Builder
Overrides

clearUserTokenSecretVersion()

publicUserCredential.BuilderclearUserTokenSecretVersion()

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

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

Returns
Type Description
UserCredential.Builder

This builder for chaining.

clearUsername()

publicUserCredential.BuilderclearUsername()

Output only. The username associated to this token.

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

Returns
Type Description
UserCredential.Builder

This builder for chaining.

clone()

publicUserCredential.Builderclone()
Returns
Type Description
UserCredential.Builder
Overrides

getDefaultInstanceForType()

publicUserCredentialgetDefaultInstanceForType()
Returns
Type Description
UserCredential

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getUserTokenSecretVersion()

publicStringgetUserTokenSecretVersion()

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

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

Returns
Type Description
String

The userTokenSecretVersion.

getUserTokenSecretVersionBytes()

publicByteStringgetUserTokenSecretVersionBytes()

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

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

Returns
Type Description
ByteString

The bytes for userTokenSecretVersion.

getUsername()

publicStringgetUsername()

Output only. The username associated to this token.

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

Returns
Type Description
String

The username.

getUsernameBytes()

publicByteStringgetUsernameBytes()

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()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(UserCredential other)

publicUserCredential.BuildermergeFrom(UserCredentialother)
Parameter
Name Description
other UserCredential
Returns
Type Description
UserCredential.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

publicUserCredential.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
UserCredential.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalUserCredential.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
UserCredential.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalUserCredential.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
UserCredential.Builder
Overrides

setUserTokenSecretVersion(String value)

publicUserCredential.BuildersetUserTokenSecretVersion(Stringvalue)

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

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

Parameter
Name Description
value String

The userTokenSecretVersion to set.

Returns
Type Description
UserCredential.Builder

This builder for chaining.

setUserTokenSecretVersionBytes(ByteString value)

publicUserCredential.BuildersetUserTokenSecretVersionBytes(ByteStringvalue)

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

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

Parameter
Name Description
value ByteString

The bytes for userTokenSecretVersion to set.

Returns
Type Description
UserCredential.Builder

This builder for chaining.

setUsername(String value)

publicUserCredential.BuildersetUsername(Stringvalue)

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
UserCredential.Builder

This builder for chaining.

setUsernameBytes(ByteString value)

publicUserCredential.BuildersetUsernameBytes(ByteStringvalue)

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