Class: Google::Apis::WorkstationsV1beta::OAuthToken
- Inherits:
-
Object
- Object
- Google::Apis::WorkstationsV1beta::OAuthToken
- 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
Represents an OAuth 2.0 access token and its associated metadata.
Instance Attribute Summary collapse
-
#access_token ⇒ String
Required.
-
#email ⇒ String
Optional.
-
#expire_time ⇒ String
Optional.
-
#expires_in ⇒ String
Optional.
-
#scopes ⇒ String
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ OAuthToken
constructor
A new instance of OAuthToken.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ OAuthToken
Returns a new instance of OAuthToken.
1357 1358 1359 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 1357 def initialize(**args) update!(**args) end |
Instance Attribute Details
#access_token ⇒ String
Required. The OAuth 2.0 access token value.
Corresponds to the JSON property accessToken
1330 1331 1332 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 1330 def access_token @access_token end |
#email ⇒ String
Optional. The email address associated with the OAuth 2.0 access token.
Corresponds to the JSON property email
1335 1336 1337 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 1335 def email @email end |
#expire_time ⇒ String
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. Only one of expire_time or expires_in should be
specified.
Corresponds to the JSON property expireTime
1343 1344 1345 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 1343 def expire_time @expire_time end |
#expires_in ⇒ String
Optional. The lifetime duration of the access token. Only one of expire_time
or expires_in should be specified.
Corresponds to the JSON property expiresIn
1349 1350 1351 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 1349 def expires_in @expires_in end |
#scopes ⇒ String
Optional. The scopes associated with the OAuth 2.0 access token. See https://
developers.google.com/identity/protocols/oauth2/scopes for more information.
Corresponds to the JSON property scopes
1355 1356 1357 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 1355 def scopes @scopes end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1362 1363 1364 1365 1366 1367 1368 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 1362 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) @expires_in = args[:expires_in] if args.key?(:expires_in) @scopes = args[:scopes] if args.key?(:scopes) end |