Class: Google::Apis::WorkstationsV1beta::OAuthToken

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

Overview

OAuth token.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ OAuthToken

Returns a new instance of OAuthToken.



1350
1351
1352
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 1350

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

Instance Attribute Details

#access_tokenString

Required. The OAuth token. Corresponds to the JSON property accessToken

Returns:

  • (String)


1330
1331
1332
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 1330

def access_token
  @access_token
end

#emailString

Optional. The email address encapsulated in the OAuth token. Corresponds to the JSON property email

Returns:

  • (String)


1335
1336
1337
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 1335

def email
  @email
end

#expire_timeString

Optional. The time the OAuth access token will expire. This should be the time the access token was generated plus the expires_in offset returned from the Access Token Response. Corresponds to the JSON property expireTime

Returns:

  • (String)


1342
1343
1344
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 1342

def expire_time
  @expire_time
end

#scopesString

Optional. The scopes encapsulated in the OAuth token. See https://developers. google.com/identity/protocols/oauth2/scopes for more information. Corresponds to the JSON property scopes

Returns:

  • (String)


1348
1349
1350
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 1348

def scopes
  @scopes
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1355
1356
1357
1358
1359
1360
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 1355

def update!(**args)
  @access_token = args[:access_token] if args.key?(:access_token)
  @email = args[:email] if args.key?(:email)
  @expire_time = args[:expire_time] if args.key?(:expire_time)
  @scopes = args[:scopes] if args.key?(:scopes)
end