Class: Google::Apis::CloudbuildV2::OAuthCredential

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/cloudbuild_v2/classes.rb,
lib/google/apis/cloudbuild_v2/representations.rb,
lib/google/apis/cloudbuild_v2/representations.rb

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ OAuthCredential

Returns a new instance of OAuthCredential.



1333
1334
1335
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 1333

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#oauth_token_secret_versionString

Optional. A SecretManager resource containing the OAuth token that authorizes the Cloud Build connection. Format: projects/*/secrets/*/versions/*. Corresponds to the JSON property oauthTokenSecretVersion

Returns:

  • (String)


1326
1327
1328
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 1326

def oauth_token_secret_version
  @oauth_token_secret_version
end

#usernameString

Output only. The username associated to this token. Corresponds to the JSON property username

Returns:

  • (String)


1331
1332
1333
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 1331

def username
  @username
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1338
1339
1340
1341
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 1338

def update!(**args)
  @oauth_token_secret_version = args[:oauth_token_secret_version] if args.key?(:oauth_token_secret_version)
  @username = args[:username] if args.key?(:username)
end