spartera_api_sdk 1.0.58

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 (87) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +11 -0
  3. data/Gemfile.lock +69 -0
  4. data/LICENSE +21 -0
  5. data/README.md +360 -0
  6. data/Rakefile +10 -0
  7. data/config.json +10 -0
  8. data/docs/APIKeysApi.md +353 -0
  9. data/docs/Alert.md +36 -0
  10. data/docs/AlertsApi.md +511 -0
  11. data/docs/Apikey.md +36 -0
  12. data/docs/Asset.md +110 -0
  13. data/docs/AssetPriceHistoryApi.md +573 -0
  14. data/docs/Assetpricehistory.md +38 -0
  15. data/docs/AssetsApi.md +1131 -0
  16. data/docs/CloudProvidersApi.md +341 -0
  17. data/docs/Cloudprovider.md +30 -0
  18. data/docs/CompaniesApi.md +619 -0
  19. data/docs/Company.md +44 -0
  20. data/docs/Connection.md +54 -0
  21. data/docs/ConnectionsApi.md +497 -0
  22. data/docs/Error.md +24 -0
  23. data/docs/Favorite.md +36 -0
  24. data/docs/FavoritesApi.md +581 -0
  25. data/docs/InlineObject.md +22 -0
  26. data/docs/InlineObject1.md +20 -0
  27. data/docs/InlineObject2.md +20 -0
  28. data/docs/InlineObject3.md +20 -0
  29. data/docs/User.md +34 -0
  30. data/docs/UsersApi.md +357 -0
  31. data/example.rb +51 -0
  32. data/git_push.sh +57 -0
  33. data/lib/spartera_api_sdk/api/alerts_api.rb +543 -0
  34. data/lib/spartera_api_sdk/api/api_keys_api.rb +345 -0
  35. data/lib/spartera_api_sdk/api/asset_price_history_api.rb +576 -0
  36. data/lib/spartera_api_sdk/api/assets_api.rb +1106 -0
  37. data/lib/spartera_api_sdk/api/cloud_providers_api.rb +315 -0
  38. data/lib/spartera_api_sdk/api/companies_api.rb +571 -0
  39. data/lib/spartera_api_sdk/api/connections_api.rb +501 -0
  40. data/lib/spartera_api_sdk/api/favorites_api.rb +610 -0
  41. data/lib/spartera_api_sdk/api/users_api.rb +367 -0
  42. data/lib/spartera_api_sdk/api_client.rb +393 -0
  43. data/lib/spartera_api_sdk/api_error.rb +58 -0
  44. data/lib/spartera_api_sdk/configuration.rb +320 -0
  45. data/lib/spartera_api_sdk/models/alert.rb +353 -0
  46. data/lib/spartera_api_sdk/models/apikey.rb +370 -0
  47. data/lib/spartera_api_sdk/models/asset.rb +686 -0
  48. data/lib/spartera_api_sdk/models/assetpricehistory.rb +345 -0
  49. data/lib/spartera_api_sdk/models/cloudprovider.rb +292 -0
  50. data/lib/spartera_api_sdk/models/company.rb +389 -0
  51. data/lib/spartera_api_sdk/models/connection.rb +434 -0
  52. data/lib/spartera_api_sdk/models/error.rb +285 -0
  53. data/lib/spartera_api_sdk/models/favorite.rb +353 -0
  54. data/lib/spartera_api_sdk/models/inline_object.rb +240 -0
  55. data/lib/spartera_api_sdk/models/inline_object1.rb +229 -0
  56. data/lib/spartera_api_sdk/models/inline_object2.rb +229 -0
  57. data/lib/spartera_api_sdk/models/inline_object3.rb +229 -0
  58. data/lib/spartera_api_sdk/models/user.rb +327 -0
  59. data/lib/spartera_api_sdk/version.rb +15 -0
  60. data/lib/spartera_api_sdk.rb +62 -0
  61. data/spartera_api_sdk.gemspec +28 -0
  62. data/spec/api/alerts_api_spec.rb +126 -0
  63. data/spec/api/api_keys_api_spec.rb +93 -0
  64. data/spec/api/asset_price_history_api_spec.rb +134 -0
  65. data/spec/api/assets_api_spec.rb +228 -0
  66. data/spec/api/cloud_providers_api_spec.rb +88 -0
  67. data/spec/api/companies_api_spec.rb +134 -0
  68. data/spec/api/connections_api_spec.rb +119 -0
  69. data/spec/api/favorites_api_spec.rb +138 -0
  70. data/spec/api/users_api_spec.rb +95 -0
  71. data/spec/models/alert_spec.rb +90 -0
  72. data/spec/models/apikey_spec.rb +90 -0
  73. data/spec/models/asset_spec.rb +312 -0
  74. data/spec/models/assetpricehistory_spec.rb +96 -0
  75. data/spec/models/cloudprovider_spec.rb +72 -0
  76. data/spec/models/company_spec.rb +114 -0
  77. data/spec/models/connection_spec.rb +144 -0
  78. data/spec/models/error_spec.rb +54 -0
  79. data/spec/models/favorite_spec.rb +90 -0
  80. data/spec/models/inline_object1_spec.rb +42 -0
  81. data/spec/models/inline_object2_spec.rb +42 -0
  82. data/spec/models/inline_object3_spec.rb +42 -0
  83. data/spec/models/inline_object_spec.rb +48 -0
  84. data/spec/models/user_spec.rb +84 -0
  85. data/spec/spec_helper.rb +111 -0
  86. data/test.sh +42 -0
  87. metadata +204 -0
@@ -0,0 +1,686 @@
1
+ =begin
2
+ #Spartera API Documentation
3
+
4
+ #Auto-generated API documentation for REST services of the Spartera platform
5
+
6
+ The version of the OpenAPI document: 0.0.0
7
+ Contact: support@spartera.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.13.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module SparteraApiSdk
17
+ # Asset model for every asset (insight/visualization/feed/etc.) customer creates
18
+ class Asset
19
+ attr_accessor :asset_id
20
+
21
+ attr_accessor :user_id
22
+
23
+ attr_accessor :company_id
24
+
25
+ attr_accessor :connection_id
26
+
27
+ attr_accessor :llm_connection_id
28
+
29
+ attr_accessor :snippet_id
30
+
31
+ attr_accessor :industry_id
32
+
33
+ attr_accessor :ai_job_id
34
+
35
+ attr_accessor :approval_status
36
+
37
+ attr_accessor :approved_by_user_id
38
+
39
+ attr_accessor :approved_at
40
+
41
+ attr_accessor :name
42
+
43
+ attr_accessor :slug
44
+
45
+ attr_accessor :description
46
+
47
+ attr_accessor :source
48
+
49
+ attr_accessor :asset_type
50
+
51
+ attr_accessor :asset_schema
52
+
53
+ attr_accessor :visibility
54
+
55
+ attr_accessor :tags
56
+
57
+ attr_accessor :sql_logic
58
+
59
+ attr_accessor :source_schema_name
60
+
61
+ attr_accessor :source_table_name
62
+
63
+ attr_accessor :sell_in_marketplace
64
+
65
+ attr_accessor :viz_chart_library
66
+
67
+ attr_accessor :viz_chart_type
68
+
69
+ attr_accessor :viz_dep_var_col_name
70
+
71
+ attr_accessor :viz_indep_var_col_name
72
+
73
+ attr_accessor :viz_size_col_name
74
+
75
+ attr_accessor :viz_color_col_name
76
+
77
+ attr_accessor :viz_data_aggregation
78
+
79
+ attr_accessor :viz_sort_direction
80
+
81
+ attr_accessor :viz_data_limit
82
+
83
+ attr_accessor :viz_color_scheme
84
+
85
+ attr_accessor :allow_params
86
+
87
+ attr_accessor :accept_terms
88
+
89
+ attr_accessor :cached
90
+
91
+ attr_accessor :schedule
92
+
93
+ attr_accessor :next_run
94
+
95
+ attr_accessor :data_time_period_start
96
+
97
+ attr_accessor :data_time_period_end
98
+
99
+ attr_accessor :geographic_coverage_type
100
+
101
+ attr_accessor :geographic_coverage_details
102
+
103
+ attr_accessor :data_source_refresh_frequency
104
+
105
+ attr_accessor :data_source_last_refreshed
106
+
107
+ attr_accessor :date_created
108
+
109
+ attr_accessor :last_updated
110
+
111
+ attr_accessor :active
112
+
113
+ # Attribute mapping from ruby-style variable name to JSON key.
114
+ def self.attribute_map
115
+ {
116
+ :'asset_id' => :'asset_id',
117
+ :'user_id' => :'user_id',
118
+ :'company_id' => :'company_id',
119
+ :'connection_id' => :'connection_id',
120
+ :'llm_connection_id' => :'llm_connection_id',
121
+ :'snippet_id' => :'snippet_id',
122
+ :'industry_id' => :'industry_id',
123
+ :'ai_job_id' => :'ai_job_id',
124
+ :'approval_status' => :'approval_status',
125
+ :'approved_by_user_id' => :'approved_by_user_id',
126
+ :'approved_at' => :'approved_at',
127
+ :'name' => :'name',
128
+ :'slug' => :'slug',
129
+ :'description' => :'description',
130
+ :'source' => :'source',
131
+ :'asset_type' => :'asset_type',
132
+ :'asset_schema' => :'asset_schema',
133
+ :'visibility' => :'visibility',
134
+ :'tags' => :'tags',
135
+ :'sql_logic' => :'sql_logic',
136
+ :'source_schema_name' => :'source_schema_name',
137
+ :'source_table_name' => :'source_table_name',
138
+ :'sell_in_marketplace' => :'sell_in_marketplace',
139
+ :'viz_chart_library' => :'viz_chart_library',
140
+ :'viz_chart_type' => :'viz_chart_type',
141
+ :'viz_dep_var_col_name' => :'viz_dep_var_col_name',
142
+ :'viz_indep_var_col_name' => :'viz_indep_var_col_name',
143
+ :'viz_size_col_name' => :'viz_size_col_name',
144
+ :'viz_color_col_name' => :'viz_color_col_name',
145
+ :'viz_data_aggregation' => :'viz_data_aggregation',
146
+ :'viz_sort_direction' => :'viz_sort_direction',
147
+ :'viz_data_limit' => :'viz_data_limit',
148
+ :'viz_color_scheme' => :'viz_color_scheme',
149
+ :'allow_params' => :'allow_params',
150
+ :'accept_terms' => :'accept_terms',
151
+ :'cached' => :'cached',
152
+ :'schedule' => :'schedule',
153
+ :'next_run' => :'next_run',
154
+ :'data_time_period_start' => :'data_time_period_start',
155
+ :'data_time_period_end' => :'data_time_period_end',
156
+ :'geographic_coverage_type' => :'geographic_coverage_type',
157
+ :'geographic_coverage_details' => :'geographic_coverage_details',
158
+ :'data_source_refresh_frequency' => :'data_source_refresh_frequency',
159
+ :'data_source_last_refreshed' => :'data_source_last_refreshed',
160
+ :'date_created' => :'date_created',
161
+ :'last_updated' => :'last_updated',
162
+ :'active' => :'active'
163
+ }
164
+ end
165
+
166
+ # Returns attribute mapping this model knows about
167
+ def self.acceptable_attribute_map
168
+ attribute_map
169
+ end
170
+
171
+ # Returns all the JSON keys this model knows about
172
+ def self.acceptable_attributes
173
+ acceptable_attribute_map.values
174
+ end
175
+
176
+ # Attribute type mapping.
177
+ def self.openapi_types
178
+ {
179
+ :'asset_id' => :'String',
180
+ :'user_id' => :'String',
181
+ :'company_id' => :'String',
182
+ :'connection_id' => :'String',
183
+ :'llm_connection_id' => :'String',
184
+ :'snippet_id' => :'String',
185
+ :'industry_id' => :'String',
186
+ :'ai_job_id' => :'String',
187
+ :'approval_status' => :'String',
188
+ :'approved_by_user_id' => :'String',
189
+ :'approved_at' => :'String',
190
+ :'name' => :'String',
191
+ :'slug' => :'String',
192
+ :'description' => :'String',
193
+ :'source' => :'String',
194
+ :'asset_type' => :'String',
195
+ :'asset_schema' => :'String',
196
+ :'visibility' => :'String',
197
+ :'tags' => :'String',
198
+ :'sql_logic' => :'String',
199
+ :'source_schema_name' => :'String',
200
+ :'source_table_name' => :'String',
201
+ :'sell_in_marketplace' => :'String',
202
+ :'viz_chart_library' => :'String',
203
+ :'viz_chart_type' => :'String',
204
+ :'viz_dep_var_col_name' => :'String',
205
+ :'viz_indep_var_col_name' => :'String',
206
+ :'viz_size_col_name' => :'String',
207
+ :'viz_color_col_name' => :'String',
208
+ :'viz_data_aggregation' => :'String',
209
+ :'viz_sort_direction' => :'String',
210
+ :'viz_data_limit' => :'String',
211
+ :'viz_color_scheme' => :'String',
212
+ :'allow_params' => :'String',
213
+ :'accept_terms' => :'String',
214
+ :'cached' => :'String',
215
+ :'schedule' => :'String',
216
+ :'next_run' => :'String',
217
+ :'data_time_period_start' => :'String',
218
+ :'data_time_period_end' => :'String',
219
+ :'geographic_coverage_type' => :'String',
220
+ :'geographic_coverage_details' => :'String',
221
+ :'data_source_refresh_frequency' => :'String',
222
+ :'data_source_last_refreshed' => :'String',
223
+ :'date_created' => :'String',
224
+ :'last_updated' => :'String',
225
+ :'active' => :'String'
226
+ }
227
+ end
228
+
229
+ # List of attributes with nullable: true
230
+ def self.openapi_nullable
231
+ Set.new([
232
+ ])
233
+ end
234
+
235
+ # Initializes the object
236
+ # @param [Hash] attributes Model attributes in the form of hash
237
+ def initialize(attributes = {})
238
+ if (!attributes.is_a?(Hash))
239
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SparteraApiSdk::Asset` initialize method"
240
+ end
241
+
242
+ # check to see if the attribute exists and convert string to symbol for hash key
243
+ acceptable_attribute_map = self.class.acceptable_attribute_map
244
+ attributes = attributes.each_with_object({}) { |(k, v), h|
245
+ if (!acceptable_attribute_map.key?(k.to_sym))
246
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SparteraApiSdk::Asset`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
247
+ end
248
+ h[k.to_sym] = v
249
+ }
250
+
251
+ if attributes.key?(:'asset_id')
252
+ self.asset_id = attributes[:'asset_id']
253
+ end
254
+
255
+ if attributes.key?(:'user_id')
256
+ self.user_id = attributes[:'user_id']
257
+ end
258
+
259
+ if attributes.key?(:'company_id')
260
+ self.company_id = attributes[:'company_id']
261
+ else
262
+ self.company_id = nil
263
+ end
264
+
265
+ if attributes.key?(:'connection_id')
266
+ self.connection_id = attributes[:'connection_id']
267
+ end
268
+
269
+ if attributes.key?(:'llm_connection_id')
270
+ self.llm_connection_id = attributes[:'llm_connection_id']
271
+ end
272
+
273
+ if attributes.key?(:'snippet_id')
274
+ self.snippet_id = attributes[:'snippet_id']
275
+ end
276
+
277
+ if attributes.key?(:'industry_id')
278
+ self.industry_id = attributes[:'industry_id']
279
+ end
280
+
281
+ if attributes.key?(:'ai_job_id')
282
+ self.ai_job_id = attributes[:'ai_job_id']
283
+ end
284
+
285
+ if attributes.key?(:'approval_status')
286
+ self.approval_status = attributes[:'approval_status']
287
+ end
288
+
289
+ if attributes.key?(:'approved_by_user_id')
290
+ self.approved_by_user_id = attributes[:'approved_by_user_id']
291
+ end
292
+
293
+ if attributes.key?(:'approved_at')
294
+ self.approved_at = attributes[:'approved_at']
295
+ end
296
+
297
+ if attributes.key?(:'name')
298
+ self.name = attributes[:'name']
299
+ else
300
+ self.name = nil
301
+ end
302
+
303
+ if attributes.key?(:'slug')
304
+ self.slug = attributes[:'slug']
305
+ end
306
+
307
+ if attributes.key?(:'description')
308
+ self.description = attributes[:'description']
309
+ end
310
+
311
+ if attributes.key?(:'source')
312
+ self.source = attributes[:'source']
313
+ else
314
+ self.source = nil
315
+ end
316
+
317
+ if attributes.key?(:'asset_type')
318
+ self.asset_type = attributes[:'asset_type']
319
+ end
320
+
321
+ if attributes.key?(:'asset_schema')
322
+ self.asset_schema = attributes[:'asset_schema']
323
+ end
324
+
325
+ if attributes.key?(:'visibility')
326
+ self.visibility = attributes[:'visibility']
327
+ end
328
+
329
+ if attributes.key?(:'tags')
330
+ self.tags = attributes[:'tags']
331
+ end
332
+
333
+ if attributes.key?(:'sql_logic')
334
+ self.sql_logic = attributes[:'sql_logic']
335
+ end
336
+
337
+ if attributes.key?(:'source_schema_name')
338
+ self.source_schema_name = attributes[:'source_schema_name']
339
+ end
340
+
341
+ if attributes.key?(:'source_table_name')
342
+ self.source_table_name = attributes[:'source_table_name']
343
+ end
344
+
345
+ if attributes.key?(:'sell_in_marketplace')
346
+ self.sell_in_marketplace = attributes[:'sell_in_marketplace']
347
+ end
348
+
349
+ if attributes.key?(:'viz_chart_library')
350
+ self.viz_chart_library = attributes[:'viz_chart_library']
351
+ end
352
+
353
+ if attributes.key?(:'viz_chart_type')
354
+ self.viz_chart_type = attributes[:'viz_chart_type']
355
+ end
356
+
357
+ if attributes.key?(:'viz_dep_var_col_name')
358
+ self.viz_dep_var_col_name = attributes[:'viz_dep_var_col_name']
359
+ end
360
+
361
+ if attributes.key?(:'viz_indep_var_col_name')
362
+ self.viz_indep_var_col_name = attributes[:'viz_indep_var_col_name']
363
+ end
364
+
365
+ if attributes.key?(:'viz_size_col_name')
366
+ self.viz_size_col_name = attributes[:'viz_size_col_name']
367
+ end
368
+
369
+ if attributes.key?(:'viz_color_col_name')
370
+ self.viz_color_col_name = attributes[:'viz_color_col_name']
371
+ end
372
+
373
+ if attributes.key?(:'viz_data_aggregation')
374
+ self.viz_data_aggregation = attributes[:'viz_data_aggregation']
375
+ end
376
+
377
+ if attributes.key?(:'viz_sort_direction')
378
+ self.viz_sort_direction = attributes[:'viz_sort_direction']
379
+ end
380
+
381
+ if attributes.key?(:'viz_data_limit')
382
+ self.viz_data_limit = attributes[:'viz_data_limit']
383
+ end
384
+
385
+ if attributes.key?(:'viz_color_scheme')
386
+ self.viz_color_scheme = attributes[:'viz_color_scheme']
387
+ end
388
+
389
+ if attributes.key?(:'allow_params')
390
+ self.allow_params = attributes[:'allow_params']
391
+ end
392
+
393
+ if attributes.key?(:'accept_terms')
394
+ self.accept_terms = attributes[:'accept_terms']
395
+ end
396
+
397
+ if attributes.key?(:'cached')
398
+ self.cached = attributes[:'cached']
399
+ end
400
+
401
+ if attributes.key?(:'schedule')
402
+ self.schedule = attributes[:'schedule']
403
+ end
404
+
405
+ if attributes.key?(:'next_run')
406
+ self.next_run = attributes[:'next_run']
407
+ end
408
+
409
+ if attributes.key?(:'data_time_period_start')
410
+ self.data_time_period_start = attributes[:'data_time_period_start']
411
+ end
412
+
413
+ if attributes.key?(:'data_time_period_end')
414
+ self.data_time_period_end = attributes[:'data_time_period_end']
415
+ end
416
+
417
+ if attributes.key?(:'geographic_coverage_type')
418
+ self.geographic_coverage_type = attributes[:'geographic_coverage_type']
419
+ end
420
+
421
+ if attributes.key?(:'geographic_coverage_details')
422
+ self.geographic_coverage_details = attributes[:'geographic_coverage_details']
423
+ end
424
+
425
+ if attributes.key?(:'data_source_refresh_frequency')
426
+ self.data_source_refresh_frequency = attributes[:'data_source_refresh_frequency']
427
+ end
428
+
429
+ if attributes.key?(:'data_source_last_refreshed')
430
+ self.data_source_last_refreshed = attributes[:'data_source_last_refreshed']
431
+ end
432
+
433
+ if attributes.key?(:'date_created')
434
+ self.date_created = attributes[:'date_created']
435
+ end
436
+
437
+ if attributes.key?(:'last_updated')
438
+ self.last_updated = attributes[:'last_updated']
439
+ end
440
+
441
+ if attributes.key?(:'active')
442
+ self.active = attributes[:'active']
443
+ end
444
+ end
445
+
446
+ # Show invalid properties with the reasons. Usually used together with valid?
447
+ # @return Array for valid properties with the reasons
448
+ def list_invalid_properties
449
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
450
+ invalid_properties = Array.new
451
+ if @company_id.nil?
452
+ invalid_properties.push('invalid value for "company_id", company_id cannot be nil.')
453
+ end
454
+
455
+ if @name.nil?
456
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
457
+ end
458
+
459
+ if @source.nil?
460
+ invalid_properties.push('invalid value for "source", source cannot be nil.')
461
+ end
462
+
463
+ invalid_properties
464
+ end
465
+
466
+ # Check to see if the all the properties in the model are valid
467
+ # @return true if the model is valid
468
+ def valid?
469
+ warn '[DEPRECATED] the `valid?` method is obsolete'
470
+ return false if @company_id.nil?
471
+ return false if @name.nil?
472
+ return false if @source.nil?
473
+ true
474
+ end
475
+
476
+ # Custom attribute writer method with validation
477
+ # @param [Object] company_id Value to be assigned
478
+ def company_id=(company_id)
479
+ if company_id.nil?
480
+ fail ArgumentError, 'company_id cannot be nil'
481
+ end
482
+
483
+ @company_id = company_id
484
+ end
485
+
486
+ # Custom attribute writer method with validation
487
+ # @param [Object] name Value to be assigned
488
+ def name=(name)
489
+ if name.nil?
490
+ fail ArgumentError, 'name cannot be nil'
491
+ end
492
+
493
+ @name = name
494
+ end
495
+
496
+ # Custom attribute writer method with validation
497
+ # @param [Object] source Value to be assigned
498
+ def source=(source)
499
+ if source.nil?
500
+ fail ArgumentError, 'source cannot be nil'
501
+ end
502
+
503
+ @source = source
504
+ end
505
+
506
+ # Checks equality by comparing each attribute.
507
+ # @param [Object] Object to be compared
508
+ def ==(o)
509
+ return true if self.equal?(o)
510
+ self.class == o.class &&
511
+ asset_id == o.asset_id &&
512
+ user_id == o.user_id &&
513
+ company_id == o.company_id &&
514
+ connection_id == o.connection_id &&
515
+ llm_connection_id == o.llm_connection_id &&
516
+ snippet_id == o.snippet_id &&
517
+ industry_id == o.industry_id &&
518
+ ai_job_id == o.ai_job_id &&
519
+ approval_status == o.approval_status &&
520
+ approved_by_user_id == o.approved_by_user_id &&
521
+ approved_at == o.approved_at &&
522
+ name == o.name &&
523
+ slug == o.slug &&
524
+ description == o.description &&
525
+ source == o.source &&
526
+ asset_type == o.asset_type &&
527
+ asset_schema == o.asset_schema &&
528
+ visibility == o.visibility &&
529
+ tags == o.tags &&
530
+ sql_logic == o.sql_logic &&
531
+ source_schema_name == o.source_schema_name &&
532
+ source_table_name == o.source_table_name &&
533
+ sell_in_marketplace == o.sell_in_marketplace &&
534
+ viz_chart_library == o.viz_chart_library &&
535
+ viz_chart_type == o.viz_chart_type &&
536
+ viz_dep_var_col_name == o.viz_dep_var_col_name &&
537
+ viz_indep_var_col_name == o.viz_indep_var_col_name &&
538
+ viz_size_col_name == o.viz_size_col_name &&
539
+ viz_color_col_name == o.viz_color_col_name &&
540
+ viz_data_aggregation == o.viz_data_aggregation &&
541
+ viz_sort_direction == o.viz_sort_direction &&
542
+ viz_data_limit == o.viz_data_limit &&
543
+ viz_color_scheme == o.viz_color_scheme &&
544
+ allow_params == o.allow_params &&
545
+ accept_terms == o.accept_terms &&
546
+ cached == o.cached &&
547
+ schedule == o.schedule &&
548
+ next_run == o.next_run &&
549
+ data_time_period_start == o.data_time_period_start &&
550
+ data_time_period_end == o.data_time_period_end &&
551
+ geographic_coverage_type == o.geographic_coverage_type &&
552
+ geographic_coverage_details == o.geographic_coverage_details &&
553
+ data_source_refresh_frequency == o.data_source_refresh_frequency &&
554
+ data_source_last_refreshed == o.data_source_last_refreshed &&
555
+ date_created == o.date_created &&
556
+ last_updated == o.last_updated &&
557
+ active == o.active
558
+ end
559
+
560
+ # @see the `==` method
561
+ # @param [Object] Object to be compared
562
+ def eql?(o)
563
+ self == o
564
+ end
565
+
566
+ # Calculates hash code according to all attributes.
567
+ # @return [Integer] Hash code
568
+ def hash
569
+ [asset_id, user_id, company_id, connection_id, llm_connection_id, snippet_id, industry_id, ai_job_id, approval_status, approved_by_user_id, approved_at, name, slug, description, source, asset_type, asset_schema, visibility, tags, sql_logic, source_schema_name, source_table_name, sell_in_marketplace, viz_chart_library, viz_chart_type, viz_dep_var_col_name, viz_indep_var_col_name, viz_size_col_name, viz_color_col_name, viz_data_aggregation, viz_sort_direction, viz_data_limit, viz_color_scheme, allow_params, accept_terms, cached, schedule, next_run, data_time_period_start, data_time_period_end, geographic_coverage_type, geographic_coverage_details, data_source_refresh_frequency, data_source_last_refreshed, date_created, last_updated, active].hash
570
+ end
571
+
572
+ # Builds the object from hash
573
+ # @param [Hash] attributes Model attributes in the form of hash
574
+ # @return [Object] Returns the model itself
575
+ def self.build_from_hash(attributes)
576
+ return nil unless attributes.is_a?(Hash)
577
+ attributes = attributes.transform_keys(&:to_sym)
578
+ transformed_hash = {}
579
+ openapi_types.each_pair do |key, type|
580
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
581
+ transformed_hash["#{key}"] = nil
582
+ elsif type =~ /\AArray<(.*)>/i
583
+ # check to ensure the input is an array given that the attribute
584
+ # is documented as an array but the input is not
585
+ if attributes[attribute_map[key]].is_a?(Array)
586
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
587
+ end
588
+ elsif !attributes[attribute_map[key]].nil?
589
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
590
+ end
591
+ end
592
+ new(transformed_hash)
593
+ end
594
+
595
+ # Deserializes the data based on type
596
+ # @param string type Data type
597
+ # @param string value Value to be deserialized
598
+ # @return [Object] Deserialized data
599
+ def self._deserialize(type, value)
600
+ case type.to_sym
601
+ when :Time
602
+ Time.parse(value)
603
+ when :Date
604
+ Date.parse(value)
605
+ when :String
606
+ value.to_s
607
+ when :Integer
608
+ value.to_i
609
+ when :Float
610
+ value.to_f
611
+ when :Boolean
612
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
613
+ true
614
+ else
615
+ false
616
+ end
617
+ when :Object
618
+ # generic object (usually a Hash), return directly
619
+ value
620
+ when /\AArray<(?<inner_type>.+)>\z/
621
+ inner_type = Regexp.last_match[:inner_type]
622
+ value.map { |v| _deserialize(inner_type, v) }
623
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
624
+ k_type = Regexp.last_match[:k_type]
625
+ v_type = Regexp.last_match[:v_type]
626
+ {}.tap do |hash|
627
+ value.each do |k, v|
628
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
629
+ end
630
+ end
631
+ else # model
632
+ # models (e.g. Pet) or oneOf
633
+ klass = SparteraApiSdk.const_get(type)
634
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
635
+ end
636
+ end
637
+
638
+ # Returns the string representation of the object
639
+ # @return [String] String presentation of the object
640
+ def to_s
641
+ to_hash.to_s
642
+ end
643
+
644
+ # to_body is an alias to to_hash (backward compatibility)
645
+ # @return [Hash] Returns the object in the form of hash
646
+ def to_body
647
+ to_hash
648
+ end
649
+
650
+ # Returns the object in the form of hash
651
+ # @return [Hash] Returns the object in the form of hash
652
+ def to_hash
653
+ hash = {}
654
+ self.class.attribute_map.each_pair do |attr, param|
655
+ value = self.send(attr)
656
+ if value.nil?
657
+ is_nullable = self.class.openapi_nullable.include?(attr)
658
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
659
+ end
660
+
661
+ hash[param] = _to_hash(value)
662
+ end
663
+ hash
664
+ end
665
+
666
+ # Outputs non-array value in the form of hash
667
+ # For object, use to_hash. Otherwise, just return the value
668
+ # @param [Object] value Any valid value
669
+ # @return [Hash] Returns the value in the form of hash
670
+ def _to_hash(value)
671
+ if value.is_a?(Array)
672
+ value.compact.map { |v| _to_hash(v) }
673
+ elsif value.is_a?(Hash)
674
+ {}.tap do |hash|
675
+ value.each { |k, v| hash[k] = _to_hash(v) }
676
+ end
677
+ elsif value.respond_to? :to_hash
678
+ value.to_hash
679
+ else
680
+ value
681
+ end
682
+ end
683
+
684
+ end
685
+
686
+ end