daytona_api_client 0.203.0 → 0.204.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/FILES +13 -0
  3. data/lib/daytona_api_client/api/admin_api.rb +3 -0
  4. data/lib/daytona_api_client/api/audit_api.rb +57 -0
  5. data/lib/daytona_api_client/api/organizations_api.rb +485 -0
  6. data/lib/daytona_api_client/api/runners_api.rb +58 -0
  7. data/lib/daytona_api_client/api/snapshots_api.rb +3 -0
  8. data/lib/daytona_api_client/api/users_api.rb +173 -0
  9. data/lib/daytona_api_client/models/audit_scenarios.rb +167 -0
  10. data/lib/daytona_api_client/models/audit_target_scenario.rb +208 -0
  11. data/lib/daytona_api_client/models/create_identity_provider.rb +269 -0
  12. data/lib/daytona_api_client/models/create_organization_region_quota.rb +16 -5
  13. data/lib/daytona_api_client/models/create_sandbox.rb +12 -2
  14. data/lib/daytona_api_client/models/create_user.rb +26 -21
  15. data/lib/daytona_api_client/models/daytona_configuration.rb +33 -1
  16. data/lib/daytona_api_client/models/identity_provider.rb +439 -0
  17. data/lib/daytona_api_client/models/oidc_id_p_config.rb +229 -0
  18. data/lib/daytona_api_client/models/oidc_id_p_config_response.rb +202 -0
  19. data/lib/daytona_api_client/models/organization.rb +28 -1
  20. data/lib/daytona_api_client/models/organization_sso_enabled.rb +165 -0
  21. data/lib/daytona_api_client/models/pending_sso_link.rb +283 -0
  22. data/lib/daytona_api_client/models/region_quota.rb +18 -5
  23. data/lib/daytona_api_client/models/sandbox.rb +11 -1
  24. data/lib/daytona_api_client/models/sandbox_list_item.rb +48 -1
  25. data/lib/daytona_api_client/models/snapshot_dto.rb +14 -1
  26. data/lib/daytona_api_client/models/sso_oidc_config.rb +192 -0
  27. data/lib/daytona_api_client/models/test_identity_provider_connection.rb +165 -0
  28. data/lib/daytona_api_client/models/test_identity_provider_connection_response.rb +185 -0
  29. data/lib/daytona_api_client/models/update_identity_provider.rb +212 -0
  30. data/lib/daytona_api_client/models/update_oidc_id_p_config.rb +178 -0
  31. data/lib/daytona_api_client/models/update_organization_region_quota.rb +16 -5
  32. data/lib/daytona_api_client/models/user.rb +28 -1
  33. data/lib/daytona_api_client/version.rb +1 -1
  34. data/lib/daytona_api_client.rb +13 -0
  35. metadata +14 -1
@@ -0,0 +1,439 @@
1
+ =begin
2
+ #Daytona
3
+
4
+ #Daytona AI platform API Docs
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@daytona.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.21.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DaytonaApiClient
17
+ class IdentityProvider < ApiModelBase
18
+ # Unique identifier
19
+ attr_accessor :id
20
+
21
+ # Organization ID
22
+ attr_accessor :organization_id
23
+
24
+ # Display name for the identity provider
25
+ attr_accessor :name
26
+
27
+ # OIDC configuration (secret redacted)
28
+ attr_accessor :oidc_config
29
+
30
+ # Email domains used for IdP discovery on the login form. May be empty when `allowAnyDomain` is true.
31
+ attr_accessor :email_domains
32
+
33
+ # Whether the IdP accepts any email domain returned by the external provider
34
+ attr_accessor :allow_any_domain
35
+
36
+ # Whether the `email_verified` claim check is skipped on SSO logins through this identity provider
37
+ attr_accessor :trust_email_verified
38
+
39
+ # Organization role IDs assigned to users who join via SSO through this identity provider
40
+ attr_accessor :default_assigned_role_ids
41
+
42
+ # Whether the identity provider is enabled
43
+ attr_accessor :enabled
44
+
45
+ # Creation timestamp
46
+ attr_accessor :created_at
47
+
48
+ # Last update timestamp
49
+ attr_accessor :updated_at
50
+
51
+ # Attribute mapping from ruby-style variable name to JSON key.
52
+ def self.attribute_map
53
+ {
54
+ :'id' => :'id',
55
+ :'organization_id' => :'organizationId',
56
+ :'name' => :'name',
57
+ :'oidc_config' => :'oidcConfig',
58
+ :'email_domains' => :'emailDomains',
59
+ :'allow_any_domain' => :'allowAnyDomain',
60
+ :'trust_email_verified' => :'trustEmailVerified',
61
+ :'default_assigned_role_ids' => :'defaultAssignedRoleIds',
62
+ :'enabled' => :'enabled',
63
+ :'created_at' => :'createdAt',
64
+ :'updated_at' => :'updatedAt'
65
+ }
66
+ end
67
+
68
+ # Returns attribute mapping this model knows about
69
+ def self.acceptable_attribute_map
70
+ attribute_map
71
+ end
72
+
73
+ # Returns all the JSON keys this model knows about
74
+ def self.acceptable_attributes
75
+ acceptable_attribute_map.values
76
+ end
77
+
78
+ # Attribute type mapping.
79
+ def self.openapi_types
80
+ {
81
+ :'id' => :'String',
82
+ :'organization_id' => :'String',
83
+ :'name' => :'String',
84
+ :'oidc_config' => :'OidcIdPConfigResponse',
85
+ :'email_domains' => :'Array<String>',
86
+ :'allow_any_domain' => :'Boolean',
87
+ :'trust_email_verified' => :'Boolean',
88
+ :'default_assigned_role_ids' => :'Array<String>',
89
+ :'enabled' => :'Boolean',
90
+ :'created_at' => :'Time',
91
+ :'updated_at' => :'Time'
92
+ }
93
+ end
94
+
95
+ # List of attributes with nullable: true
96
+ def self.openapi_nullable
97
+ Set.new([
98
+ ])
99
+ end
100
+
101
+ # Initializes the object
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ def initialize(attributes = {})
104
+ if (!attributes.is_a?(Hash))
105
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::IdentityProvider` initialize method"
106
+ end
107
+
108
+ # check to see if the attribute exists and convert string to symbol for hash key
109
+ acceptable_attribute_map = self.class.acceptable_attribute_map
110
+ attributes = attributes.each_with_object({}) { |(k, v), h|
111
+ if (!acceptable_attribute_map.key?(k.to_sym))
112
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::IdentityProvider`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
113
+ end
114
+ h[k.to_sym] = v
115
+ }
116
+
117
+ if attributes.key?(:'id')
118
+ self.id = attributes[:'id']
119
+ else
120
+ self.id = nil
121
+ end
122
+
123
+ if attributes.key?(:'organization_id')
124
+ self.organization_id = attributes[:'organization_id']
125
+ else
126
+ self.organization_id = nil
127
+ end
128
+
129
+ if attributes.key?(:'name')
130
+ self.name = attributes[:'name']
131
+ else
132
+ self.name = nil
133
+ end
134
+
135
+ if attributes.key?(:'oidc_config')
136
+ self.oidc_config = attributes[:'oidc_config']
137
+ else
138
+ self.oidc_config = nil
139
+ end
140
+
141
+ if attributes.key?(:'email_domains')
142
+ if (value = attributes[:'email_domains']).is_a?(Array)
143
+ self.email_domains = value
144
+ end
145
+ else
146
+ self.email_domains = nil
147
+ end
148
+
149
+ if attributes.key?(:'allow_any_domain')
150
+ self.allow_any_domain = attributes[:'allow_any_domain']
151
+ else
152
+ self.allow_any_domain = nil
153
+ end
154
+
155
+ if attributes.key?(:'trust_email_verified')
156
+ self.trust_email_verified = attributes[:'trust_email_verified']
157
+ else
158
+ self.trust_email_verified = nil
159
+ end
160
+
161
+ if attributes.key?(:'default_assigned_role_ids')
162
+ if (value = attributes[:'default_assigned_role_ids']).is_a?(Array)
163
+ self.default_assigned_role_ids = value
164
+ end
165
+ else
166
+ self.default_assigned_role_ids = nil
167
+ end
168
+
169
+ if attributes.key?(:'enabled')
170
+ self.enabled = attributes[:'enabled']
171
+ else
172
+ self.enabled = nil
173
+ end
174
+
175
+ if attributes.key?(:'created_at')
176
+ self.created_at = attributes[:'created_at']
177
+ else
178
+ self.created_at = nil
179
+ end
180
+
181
+ if attributes.key?(:'updated_at')
182
+ self.updated_at = attributes[:'updated_at']
183
+ else
184
+ self.updated_at = nil
185
+ end
186
+ end
187
+
188
+ # Show invalid properties with the reasons. Usually used together with valid?
189
+ # @return Array for valid properties with the reasons
190
+ def list_invalid_properties
191
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
192
+ invalid_properties = Array.new
193
+ if @id.nil?
194
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
195
+ end
196
+
197
+ if @organization_id.nil?
198
+ invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
199
+ end
200
+
201
+ if @name.nil?
202
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
203
+ end
204
+
205
+ if @oidc_config.nil?
206
+ invalid_properties.push('invalid value for "oidc_config", oidc_config cannot be nil.')
207
+ end
208
+
209
+ if @email_domains.nil?
210
+ invalid_properties.push('invalid value for "email_domains", email_domains cannot be nil.')
211
+ end
212
+
213
+ if @allow_any_domain.nil?
214
+ invalid_properties.push('invalid value for "allow_any_domain", allow_any_domain cannot be nil.')
215
+ end
216
+
217
+ if @trust_email_verified.nil?
218
+ invalid_properties.push('invalid value for "trust_email_verified", trust_email_verified cannot be nil.')
219
+ end
220
+
221
+ if @default_assigned_role_ids.nil?
222
+ invalid_properties.push('invalid value for "default_assigned_role_ids", default_assigned_role_ids cannot be nil.')
223
+ end
224
+
225
+ if @enabled.nil?
226
+ invalid_properties.push('invalid value for "enabled", enabled cannot be nil.')
227
+ end
228
+
229
+ if @created_at.nil?
230
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
231
+ end
232
+
233
+ if @updated_at.nil?
234
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
235
+ end
236
+
237
+ invalid_properties
238
+ end
239
+
240
+ # Check to see if the all the properties in the model are valid
241
+ # @return true if the model is valid
242
+ def valid?
243
+ warn '[DEPRECATED] the `valid?` method is obsolete'
244
+ return false if @id.nil?
245
+ return false if @organization_id.nil?
246
+ return false if @name.nil?
247
+ return false if @oidc_config.nil?
248
+ return false if @email_domains.nil?
249
+ return false if @allow_any_domain.nil?
250
+ return false if @trust_email_verified.nil?
251
+ return false if @default_assigned_role_ids.nil?
252
+ return false if @enabled.nil?
253
+ return false if @created_at.nil?
254
+ return false if @updated_at.nil?
255
+ true
256
+ end
257
+
258
+ # Custom attribute writer method with validation
259
+ # @param [Object] id Value to be assigned
260
+ def id=(id)
261
+ if id.nil?
262
+ fail ArgumentError, 'id cannot be nil'
263
+ end
264
+
265
+ @id = id
266
+ end
267
+
268
+ # Custom attribute writer method with validation
269
+ # @param [Object] organization_id Value to be assigned
270
+ def organization_id=(organization_id)
271
+ if organization_id.nil?
272
+ fail ArgumentError, 'organization_id cannot be nil'
273
+ end
274
+
275
+ @organization_id = organization_id
276
+ end
277
+
278
+ # Custom attribute writer method with validation
279
+ # @param [Object] name Value to be assigned
280
+ def name=(name)
281
+ if name.nil?
282
+ fail ArgumentError, 'name cannot be nil'
283
+ end
284
+
285
+ @name = name
286
+ end
287
+
288
+ # Custom attribute writer method with validation
289
+ # @param [Object] oidc_config Value to be assigned
290
+ def oidc_config=(oidc_config)
291
+ if oidc_config.nil?
292
+ fail ArgumentError, 'oidc_config cannot be nil'
293
+ end
294
+
295
+ @oidc_config = oidc_config
296
+ end
297
+
298
+ # Custom attribute writer method with validation
299
+ # @param [Object] email_domains Value to be assigned
300
+ def email_domains=(email_domains)
301
+ if email_domains.nil?
302
+ fail ArgumentError, 'email_domains cannot be nil'
303
+ end
304
+
305
+ @email_domains = email_domains
306
+ end
307
+
308
+ # Custom attribute writer method with validation
309
+ # @param [Object] allow_any_domain Value to be assigned
310
+ def allow_any_domain=(allow_any_domain)
311
+ if allow_any_domain.nil?
312
+ fail ArgumentError, 'allow_any_domain cannot be nil'
313
+ end
314
+
315
+ @allow_any_domain = allow_any_domain
316
+ end
317
+
318
+ # Custom attribute writer method with validation
319
+ # @param [Object] trust_email_verified Value to be assigned
320
+ def trust_email_verified=(trust_email_verified)
321
+ if trust_email_verified.nil?
322
+ fail ArgumentError, 'trust_email_verified cannot be nil'
323
+ end
324
+
325
+ @trust_email_verified = trust_email_verified
326
+ end
327
+
328
+ # Custom attribute writer method with validation
329
+ # @param [Object] default_assigned_role_ids Value to be assigned
330
+ def default_assigned_role_ids=(default_assigned_role_ids)
331
+ if default_assigned_role_ids.nil?
332
+ fail ArgumentError, 'default_assigned_role_ids cannot be nil'
333
+ end
334
+
335
+ @default_assigned_role_ids = default_assigned_role_ids
336
+ end
337
+
338
+ # Custom attribute writer method with validation
339
+ # @param [Object] enabled Value to be assigned
340
+ def enabled=(enabled)
341
+ if enabled.nil?
342
+ fail ArgumentError, 'enabled cannot be nil'
343
+ end
344
+
345
+ @enabled = enabled
346
+ end
347
+
348
+ # Custom attribute writer method with validation
349
+ # @param [Object] created_at Value to be assigned
350
+ def created_at=(created_at)
351
+ if created_at.nil?
352
+ fail ArgumentError, 'created_at cannot be nil'
353
+ end
354
+
355
+ @created_at = created_at
356
+ end
357
+
358
+ # Custom attribute writer method with validation
359
+ # @param [Object] updated_at Value to be assigned
360
+ def updated_at=(updated_at)
361
+ if updated_at.nil?
362
+ fail ArgumentError, 'updated_at cannot be nil'
363
+ end
364
+
365
+ @updated_at = updated_at
366
+ end
367
+
368
+ # Checks equality by comparing each attribute.
369
+ # @param [Object] Object to be compared
370
+ def ==(o)
371
+ return true if self.equal?(o)
372
+ self.class == o.class &&
373
+ id == o.id &&
374
+ organization_id == o.organization_id &&
375
+ name == o.name &&
376
+ oidc_config == o.oidc_config &&
377
+ email_domains == o.email_domains &&
378
+ allow_any_domain == o.allow_any_domain &&
379
+ trust_email_verified == o.trust_email_verified &&
380
+ default_assigned_role_ids == o.default_assigned_role_ids &&
381
+ enabled == o.enabled &&
382
+ created_at == o.created_at &&
383
+ updated_at == o.updated_at
384
+ end
385
+
386
+ # @see the `==` method
387
+ # @param [Object] Object to be compared
388
+ def eql?(o)
389
+ self == o
390
+ end
391
+
392
+ # Calculates hash code according to all attributes.
393
+ # @return [Integer] Hash code
394
+ def hash
395
+ [id, organization_id, name, oidc_config, email_domains, allow_any_domain, trust_email_verified, default_assigned_role_ids, enabled, created_at, updated_at].hash
396
+ end
397
+
398
+ # Builds the object from hash
399
+ # @param [Hash] attributes Model attributes in the form of hash
400
+ # @return [Object] Returns the model itself
401
+ def self.build_from_hash(attributes)
402
+ return nil unless attributes.is_a?(Hash)
403
+ attributes = attributes.transform_keys(&:to_sym)
404
+ transformed_hash = {}
405
+ openapi_types.each_pair do |key, type|
406
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
407
+ transformed_hash["#{key}"] = nil
408
+ elsif type =~ /\AArray<(.*)>/i
409
+ # check to ensure the input is an array given that the attribute
410
+ # is documented as an array but the input is not
411
+ if attributes[attribute_map[key]].is_a?(Array)
412
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
413
+ end
414
+ elsif !attributes[attribute_map[key]].nil?
415
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
416
+ end
417
+ end
418
+ new(transformed_hash)
419
+ end
420
+
421
+ # Returns the object in the form of hash
422
+ # @return [Hash] Returns the object in the form of hash
423
+ def to_hash
424
+ hash = {}
425
+ self.class.attribute_map.each_pair do |attr, param|
426
+ value = self.send(attr)
427
+ if value.nil?
428
+ is_nullable = self.class.openapi_nullable.include?(attr)
429
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
430
+ end
431
+
432
+ hash[param] = _to_hash(value)
433
+ end
434
+ hash
435
+ end
436
+
437
+ end
438
+
439
+ end
@@ -0,0 +1,229 @@
1
+ =begin
2
+ #Daytona
3
+
4
+ #Daytona AI platform API Docs
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@daytona.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.21.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DaytonaApiClient
17
+ class OidcIdPConfig < ApiModelBase
18
+ # OIDC Issuer URL
19
+ attr_accessor :issuer_url
20
+
21
+ # OAuth Client ID
22
+ attr_accessor :client_id
23
+
24
+ # OAuth Client Secret
25
+ attr_accessor :client_secret
26
+
27
+ # OAuth scopes
28
+ attr_accessor :scope
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'issuer_url' => :'issuerUrl',
34
+ :'client_id' => :'clientId',
35
+ :'client_secret' => :'clientSecret',
36
+ :'scope' => :'scope'
37
+ }
38
+ end
39
+
40
+ # Returns attribute mapping this model knows about
41
+ def self.acceptable_attribute_map
42
+ attribute_map
43
+ end
44
+
45
+ # Returns all the JSON keys this model knows about
46
+ def self.acceptable_attributes
47
+ acceptable_attribute_map.values
48
+ end
49
+
50
+ # Attribute type mapping.
51
+ def self.openapi_types
52
+ {
53
+ :'issuer_url' => :'String',
54
+ :'client_id' => :'String',
55
+ :'client_secret' => :'String',
56
+ :'scope' => :'String'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
63
+ ])
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::OidcIdPConfig` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ acceptable_attribute_map = self.class.acceptable_attribute_map
75
+ attributes = attributes.each_with_object({}) { |(k, v), h|
76
+ if (!acceptable_attribute_map.key?(k.to_sym))
77
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::OidcIdPConfig`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
78
+ end
79
+ h[k.to_sym] = v
80
+ }
81
+
82
+ if attributes.key?(:'issuer_url')
83
+ self.issuer_url = attributes[:'issuer_url']
84
+ else
85
+ self.issuer_url = nil
86
+ end
87
+
88
+ if attributes.key?(:'client_id')
89
+ self.client_id = attributes[:'client_id']
90
+ else
91
+ self.client_id = nil
92
+ end
93
+
94
+ if attributes.key?(:'client_secret')
95
+ self.client_secret = attributes[:'client_secret']
96
+ else
97
+ self.client_secret = nil
98
+ end
99
+
100
+ if attributes.key?(:'scope')
101
+ self.scope = attributes[:'scope']
102
+ end
103
+ end
104
+
105
+ # Show invalid properties with the reasons. Usually used together with valid?
106
+ # @return Array for valid properties with the reasons
107
+ def list_invalid_properties
108
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
109
+ invalid_properties = Array.new
110
+ if @issuer_url.nil?
111
+ invalid_properties.push('invalid value for "issuer_url", issuer_url cannot be nil.')
112
+ end
113
+
114
+ if @client_id.nil?
115
+ invalid_properties.push('invalid value for "client_id", client_id cannot be nil.')
116
+ end
117
+
118
+ if @client_secret.nil?
119
+ invalid_properties.push('invalid value for "client_secret", client_secret cannot be nil.')
120
+ end
121
+
122
+ invalid_properties
123
+ end
124
+
125
+ # Check to see if the all the properties in the model are valid
126
+ # @return true if the model is valid
127
+ def valid?
128
+ warn '[DEPRECATED] the `valid?` method is obsolete'
129
+ return false if @issuer_url.nil?
130
+ return false if @client_id.nil?
131
+ return false if @client_secret.nil?
132
+ true
133
+ end
134
+
135
+ # Custom attribute writer method with validation
136
+ # @param [Object] issuer_url Value to be assigned
137
+ def issuer_url=(issuer_url)
138
+ if issuer_url.nil?
139
+ fail ArgumentError, 'issuer_url cannot be nil'
140
+ end
141
+
142
+ @issuer_url = issuer_url
143
+ end
144
+
145
+ # Custom attribute writer method with validation
146
+ # @param [Object] client_id Value to be assigned
147
+ def client_id=(client_id)
148
+ if client_id.nil?
149
+ fail ArgumentError, 'client_id cannot be nil'
150
+ end
151
+
152
+ @client_id = client_id
153
+ end
154
+
155
+ # Custom attribute writer method with validation
156
+ # @param [Object] client_secret Value to be assigned
157
+ def client_secret=(client_secret)
158
+ if client_secret.nil?
159
+ fail ArgumentError, 'client_secret cannot be nil'
160
+ end
161
+
162
+ @client_secret = client_secret
163
+ end
164
+
165
+ # Checks equality by comparing each attribute.
166
+ # @param [Object] Object to be compared
167
+ def ==(o)
168
+ return true if self.equal?(o)
169
+ self.class == o.class &&
170
+ issuer_url == o.issuer_url &&
171
+ client_id == o.client_id &&
172
+ client_secret == o.client_secret &&
173
+ scope == o.scope
174
+ end
175
+
176
+ # @see the `==` method
177
+ # @param [Object] Object to be compared
178
+ def eql?(o)
179
+ self == o
180
+ end
181
+
182
+ # Calculates hash code according to all attributes.
183
+ # @return [Integer] Hash code
184
+ def hash
185
+ [issuer_url, client_id, client_secret, scope].hash
186
+ end
187
+
188
+ # Builds the object from hash
189
+ # @param [Hash] attributes Model attributes in the form of hash
190
+ # @return [Object] Returns the model itself
191
+ def self.build_from_hash(attributes)
192
+ return nil unless attributes.is_a?(Hash)
193
+ attributes = attributes.transform_keys(&:to_sym)
194
+ transformed_hash = {}
195
+ openapi_types.each_pair do |key, type|
196
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
197
+ transformed_hash["#{key}"] = nil
198
+ elsif type =~ /\AArray<(.*)>/i
199
+ # check to ensure the input is an array given that the attribute
200
+ # is documented as an array but the input is not
201
+ if attributes[attribute_map[key]].is_a?(Array)
202
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
203
+ end
204
+ elsif !attributes[attribute_map[key]].nil?
205
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
206
+ end
207
+ end
208
+ new(transformed_hash)
209
+ end
210
+
211
+ # Returns the object in the form of hash
212
+ # @return [Hash] Returns the object in the form of hash
213
+ def to_hash
214
+ hash = {}
215
+ self.class.attribute_map.each_pair do |attr, param|
216
+ value = self.send(attr)
217
+ if value.nil?
218
+ is_nullable = self.class.openapi_nullable.include?(attr)
219
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
220
+ end
221
+
222
+ hash[param] = _to_hash(value)
223
+ end
224
+ hash
225
+ end
226
+
227
+ end
228
+
229
+ end