Class: Google::Apis::ConnectorsV2::AccessCredentials

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

Overview

AccessCredentials includes the OAuth access token, and the other fields returned along with it.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AccessCredentials

Returns a new instance of AccessCredentials.



45
46
47
# File 'lib/google/apis/connectors_v2/classes.rb', line 45

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

Instance Attribute Details

#access_tokenString

OAuth access token. Corresponds to the JSON property accessToken

Returns:

  • (String)


33
34
35
# File 'lib/google/apis/connectors_v2/classes.rb', line 33

def access_token
  @access_token
end

#expires_inString

Duration till the access token expires. Corresponds to the JSON property expiresIn

Returns:

  • (String)


38
39
40
# File 'lib/google/apis/connectors_v2/classes.rb', line 38

def expires_in
  @expires_in
end

#refresh_tokenString

OAuth refresh token. Corresponds to the JSON property refreshToken

Returns:

  • (String)


43
44
45
# File 'lib/google/apis/connectors_v2/classes.rb', line 43

def refresh_token
  @refresh_token
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



50
51
52
53
54
# File 'lib/google/apis/connectors_v2/classes.rb', line 50

def update!(**args)
  @access_token = args[:access_token] if args.key?(:access_token)
  @expires_in = args[:expires_in] if args.key?(:expires_in)
  @refresh_token = args[:refresh_token] if args.key?(:refresh_token)
end