Class OAuthCredential.Builder (3.19.0) 
  
  
  
   
  
    
  
  
    
    
    
    
  Version 3.19.0keyboard_arrow_down  
  
 
    
    
    
    
      
  
  
  
    
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
    Inherited Members 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder() 
    
    
    
    
    
    
    
    
    
    
    
    
      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() 
  
    
public   static   final   Descriptors . Descriptor   getDescriptor ()  
  
  Methods
   
  addRepeatedField(Descriptors.FieldDescriptor field, Object value) 
  
    
public   OAuthCredential . Builder   addRepeatedField ( Descriptors . FieldDescriptor   field ,   Object   value )  
  
  
  Overrides 
  
  build() 
  
    
public   OAuthCredential   build ()  
  
  buildPartial() 
  
    
public   OAuthCredential   buildPartial ()  
  
  clear() 
  
    
public   OAuthCredential . Builder   clear ()  
  
  Overrides 
  
  clearField(Descriptors.FieldDescriptor field) 
  
    
public   OAuthCredential . Builder   clearField ( Descriptors . FieldDescriptor   field )  
  
  
  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) = { ... }
 
clearOneof(Descriptors.OneofDescriptor oneof) 
  
    
public   OAuthCredential . Builder   clearOneof ( Descriptors . OneofDescriptor   oneof )  
  
  
  Overrides 
  
  clearUsername() 
  
    
public   OAuthCredential . Builder   clearUsername ()  
   Output only. The username associated to this token.
 string username = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
clone() 
  
    
public   OAuthCredential . Builder   clone ()  
  
  Overrides 
  
  getDefaultInstanceForType() 
  
    
public   OAuthCredential   getDefaultInstanceForType ()  
  
  getDescriptorForType() 
  
    
public   Descriptors . Descriptor   getDescriptorForType ()  
  
  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 ()  
  
  Overrides 
  
  isInitialized() 
  
    
public   final   boolean   isInitialized ()  
  
  Overrides 
  
  mergeFrom(OAuthCredential other) 
  
    
public   OAuthCredential . Builder   mergeFrom ( OAuthCredential   other )  
  
  
  
    
public   OAuthCredential . Builder   mergeFrom ( CodedInputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  Overrides 
  
  
  mergeFrom(Message other) 
  
    
public   OAuthCredential . Builder   mergeFrom ( Message   other )  
  
    
      
        Parameter  
      
        Name Description  
      
        otherMessage  
     
  
  
  Overrides 
  
  mergeUnknownFields(UnknownFieldSet unknownFields) 
  
    
public   final   OAuthCredential . Builder   mergeUnknownFields ( UnknownFieldSet   unknownFields )  
  
  
  Overrides 
  
  setField(Descriptors.FieldDescriptor field, Object value) 
  
    
public   OAuthCredential . Builder   setField ( Descriptors . FieldDescriptor   field ,   Object   value )  
  
  
  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  
      
        valueString The oauthTokenSecretVersion to set.
 
     
  
  
  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  
      
        valueByteString The bytes for oauthTokenSecretVersion to set.
 
     
  
  
  setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value) 
  
    
public   OAuthCredential . Builder   setRepeatedField ( Descriptors . FieldDescriptor   field ,   int   index ,   Object   value )  
  
  
  Overrides 
  
  setUnknownFields(UnknownFieldSet unknownFields) 
  
    
public   final   OAuthCredential . Builder   setUnknownFields ( UnknownFieldSet   unknownFields )  
  
  
  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  
      
        valueString The username to set.
 
     
  
  
  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  
      
        valueByteString The bytes for username to set.
 
     
  
  
 
     
    
  
  
  
     
  
    
    
      
       
    
    
  
  
 
  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-10-28 UTC.
 
 
  
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-28 UTC."],[],[]]