Class: SparteraApiSdk::Assets

Inherits:
ApiModelBase show all
Defined in:
lib/spartera_api_sdk/models/assets.rb

Overview

A published analytics asset — a calculation or visualization built on a data connection

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApiModelBase

_deserialize, #_to_hash, #to_body, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ Assets

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
# File 'lib/spartera_api_sdk/models/assets.rb', line 376

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `SparteraApiSdk::Assets` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  acceptable_attribute_map = self.class.acceptable_attribute_map
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!acceptable_attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `SparteraApiSdk::Assets`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'date_created')
    self.date_created = attributes[:'date_created']
  end

  if attributes.key?(:'last_updated')
    self.last_updated = attributes[:'last_updated']
  end

  if attributes.key?(:'asset_id')
    self.asset_id = attributes[:'asset_id']
  end

  if attributes.key?(:'user_id')
    self.user_id = attributes[:'user_id']
  end

  if attributes.key?(:'company_id')
    self.company_id = attributes[:'company_id']
  else
    self.company_id = nil
  end

  if attributes.key?(:'connection_id')
    self.connection_id = attributes[:'connection_id']
  end

  if attributes.key?(:'llm_connection_id')
    self.llm_connection_id = attributes[:'llm_connection_id']
  end

  if attributes.key?(:'snippet_id')
    self.snippet_id = attributes[:'snippet_id']
  end

  if attributes.key?(:'industry_id')
    self.industry_id = attributes[:'industry_id']
  end

  if attributes.key?(:'ai_job_id')
    self.ai_job_id = attributes[:'ai_job_id']
  end

  if attributes.key?(:'auc_id')
    self.auc_id = attributes[:'auc_id']
  end

  if attributes.key?(:'function_id')
    self.function_id = attributes[:'function_id']
  end

  if attributes.key?(:'approval_status')
    self.approval_status = attributes[:'approval_status']
  end

  if attributes.key?(:'approved_by_user_id')
    self.approved_by_user_id = attributes[:'approved_by_user_id']
  end

  if attributes.key?(:'approved_at')
    self.approved_at = attributes[:'approved_at']
  end

  if attributes.key?(:'name')
    self.name = attributes[:'name']
  else
    self.name = nil
  end

  if attributes.key?(:'slug')
    self.slug = attributes[:'slug']
  end

  if attributes.key?(:'description')
    self.description = attributes[:'description']
  end

  if attributes.key?(:'detailed_description')
    self.detailed_description = attributes[:'detailed_description']
  end

  if attributes.key?(:'source')
    self.source = attributes[:'source']
  else
    self.source = nil
  end

  if attributes.key?(:'asset_type')
    self.asset_type = attributes[:'asset_type']
  end

  if attributes.key?(:'asset_schema')
    self.asset_schema = attributes[:'asset_schema']
  end

  if attributes.key?(:'visibility')
    self.visibility = attributes[:'visibility']
  end

  if attributes.key?(:'tags')
    self.tags = attributes[:'tags']
  end

  if attributes.key?(:'short_code')
    self.short_code = attributes[:'short_code']
  end

  if attributes.key?(:'restricted_domains')
    self.restricted_domains = attributes[:'restricted_domains']
  end

  if attributes.key?(:'sql_logic')
    self.sql_logic = attributes[:'sql_logic']
  end

  if attributes.key?(:'source_schema_name')
    self.source_schema_name = attributes[:'source_schema_name']
  end

  if attributes.key?(:'source_table_name')
    self.source_table_name = attributes[:'source_table_name']
  end

  if attributes.key?(:'sell_in_marketplace')
    self.sell_in_marketplace = attributes[:'sell_in_marketplace']
  else
    self.sell_in_marketplace = nil
  end

  if attributes.key?(:'require_customization')
    self.require_customization = attributes[:'require_customization']
  else
    self.require_customization = nil
  end

  if attributes.key?(:'viz_chart_library')
    self.viz_chart_library = attributes[:'viz_chart_library']
  end

  if attributes.key?(:'viz_chart_type')
    self.viz_chart_type = attributes[:'viz_chart_type']
  end

  if attributes.key?(:'viz_dep_var_col_name')
    self.viz_dep_var_col_name = attributes[:'viz_dep_var_col_name']
  end

  if attributes.key?(:'viz_indep_var_col_name')
    self.viz_indep_var_col_name = attributes[:'viz_indep_var_col_name']
  end

  if attributes.key?(:'viz_size_col_name')
    self.viz_size_col_name = attributes[:'viz_size_col_name']
  end

  if attributes.key?(:'viz_color_col_name')
    self.viz_color_col_name = attributes[:'viz_color_col_name']
  end

  if attributes.key?(:'viz_data_aggregation')
    self.viz_data_aggregation = attributes[:'viz_data_aggregation']
  end

  if attributes.key?(:'viz_sort_direction')
    self.viz_sort_direction = attributes[:'viz_sort_direction']
  end

  if attributes.key?(:'viz_data_limit')
    self.viz_data_limit = attributes[:'viz_data_limit']
  end

  if attributes.key?(:'viz_color_scheme')
    self.viz_color_scheme = attributes[:'viz_color_scheme']
  end

  if attributes.key?(:'viz_show_legend')
    self.viz_show_legend = attributes[:'viz_show_legend']
  end

  if attributes.key?(:'viz_show_grid')
    self.viz_show_grid = attributes[:'viz_show_grid']
  end

  if attributes.key?(:'viz_show_trendline')
    self.viz_show_trendline = attributes[:'viz_show_trendline']
  end

  if attributes.key?(:'viz_line_smoothing')
    self.viz_line_smoothing = attributes[:'viz_line_smoothing']
  end

  if attributes.key?(:'viz_bar_stacked')
    self.viz_bar_stacked = attributes[:'viz_bar_stacked']
  end

  if attributes.key?(:'viz_filter_direction')
    self.viz_filter_direction = attributes[:'viz_filter_direction']
  end

  if attributes.key?(:'allow_params')
    self.allow_params = attributes[:'allow_params']
  else
    self.allow_params = nil
  end

  if attributes.key?(:'accept_terms')
    self.accept_terms = attributes[:'accept_terms']
  else
    self.accept_terms = nil
  end

  if attributes.key?(:'cached')
    self.cached = attributes[:'cached']
  end

  if attributes.key?(:'schedule')
    self.schedule = attributes[:'schedule']
  end

  if attributes.key?(:'next_run')
    self.next_run = attributes[:'next_run']
  end

  if attributes.key?(:'data_time_period_start')
    self.data_time_period_start = attributes[:'data_time_period_start']
  end

  if attributes.key?(:'data_time_period_end')
    self.data_time_period_end = attributes[:'data_time_period_end']
  end

  if attributes.key?(:'geographic_coverage_type')
    self.geographic_coverage_type = attributes[:'geographic_coverage_type']
  end

  if attributes.key?(:'geographic_coverage_details')
    self.geographic_coverage_details = attributes[:'geographic_coverage_details']
  end

  if attributes.key?(:'data_source_refresh_frequency')
    self.data_source_refresh_frequency = attributes[:'data_source_refresh_frequency']
  end

  if attributes.key?(:'data_source_last_refreshed')
    self.data_source_last_refreshed = attributes[:'data_source_last_refreshed']
  end

  if attributes.key?(:'rate_limit_number')
    self.rate_limit_number = attributes[:'rate_limit_number']
  end

  if attributes.key?(:'rate_limit_period')
    self.rate_limit_period = attributes[:'rate_limit_period']
  end

  if attributes.key?(:'rate_limit_granularity')
    self.rate_limit_granularity = attributes[:'rate_limit_granularity']
  end
end

Instance Attribute Details

#accept_termsObject

Required.



164
165
166
# File 'lib/spartera_api_sdk/models/assets.rb', line 164

def accept_terms
  @accept_terms
end

#ai_job_idObject

Links to the AutoInsights job that created this asset



47
48
49
# File 'lib/spartera_api_sdk/models/assets.rb', line 47

def ai_job_id
  @ai_job_id
end

#allow_paramsObject

Required.



161
162
163
# File 'lib/spartera_api_sdk/models/assets.rb', line 161

def allow_params
  @allow_params
end

#approval_statusObject

Approval status for AI-generated assets



56
57
58
# File 'lib/spartera_api_sdk/models/assets.rb', line 56

def approval_status
  @approval_status
end

#approved_atObject

When this asset was approved for marketplace



62
63
64
# File 'lib/spartera_api_sdk/models/assets.rb', line 62

def approved_at
  @approved_at
end

#approved_by_user_idObject

User who approved this asset for marketplace



59
60
61
# File 'lib/spartera_api_sdk/models/assets.rb', line 59

def approved_by_user_id
  @approved_by_user_id
end

#asset_idObject

Unique identifier.



26
27
28
# File 'lib/spartera_api_sdk/models/assets.rb', line 26

def asset_id
  @asset_id
end

#asset_schemaObject

Stores database table schema data including columns, types, and metadata



83
84
85
# File 'lib/spartera_api_sdk/models/assets.rb', line 83

def asset_schema
  @asset_schema
end

#asset_typeObject

Optional. One of: CALCULATION, VISUALIZATION, DATA.



80
81
82
# File 'lib/spartera_api_sdk/models/assets.rb', line 80

def asset_type
  @asset_type
end

#auc_idObject

Primary use case for this asset, from clustering analysis



50
51
52
# File 'lib/spartera_api_sdk/models/assets.rb', line 50

def auc_id
  @auc_id
end

#cachedObject

Optional.



167
168
169
# File 'lib/spartera_api_sdk/models/assets.rb', line 167

def cached
  @cached
end

#company_idObject

References companies.company_id — A Spartera seller or buyer company account. See GET /companies for valid values. Required.



32
33
34
# File 'lib/spartera_api_sdk/models/assets.rb', line 32

def company_id
  @company_id
end

#connection_idObject

Optional.



35
36
37
# File 'lib/spartera_api_sdk/models/assets.rb', line 35

def connection_id
  @connection_id
end

#data_source_last_refreshedObject

When the source data was last refreshed



191
192
193
# File 'lib/spartera_api_sdk/models/assets.rb', line 191

def data_source_last_refreshed
  @data_source_last_refreshed
end

#data_source_refresh_frequencyObject

How often the source data is refreshed



188
189
190
# File 'lib/spartera_api_sdk/models/assets.rb', line 188

def data_source_refresh_frequency
  @data_source_refresh_frequency
end

#data_time_period_endObject

End date of the data time period covered



179
180
181
# File 'lib/spartera_api_sdk/models/assets.rb', line 179

def data_time_period_end
  @data_time_period_end
end

#data_time_period_startObject

Start date of the data time period covered



176
177
178
# File 'lib/spartera_api_sdk/models/assets.rb', line 176

def data_time_period_start
  @data_time_period_start
end

#date_createdObject

Optional.



20
21
22
# File 'lib/spartera_api_sdk/models/assets.rb', line 20

def date_created
  @date_created
end

#descriptionObject

Optional.



71
72
73
# File 'lib/spartera_api_sdk/models/assets.rb', line 71

def description
  @description
end

#detailed_descriptionObject

Long-form HTML description for product pages and SEO



74
75
76
# File 'lib/spartera_api_sdk/models/assets.rb', line 74

def detailed_description
  @detailed_description
end

#function_idObject

Optional identifier for routing to specific functions/models at seller endpoint. For GET: appended to URL path. For POST: included in JSON body.



53
54
55
# File 'lib/spartera_api_sdk/models/assets.rb', line 53

def function_id
  @function_id
end

#geographic_coverage_detailsObject

Specific regions/countries covered (e.g., ‘United States, Canada, Mexico’)



185
186
187
# File 'lib/spartera_api_sdk/models/assets.rb', line 185

def geographic_coverage_details
  @geographic_coverage_details
end

#geographic_coverage_typeObject

Type of geographic coverage



182
183
184
# File 'lib/spartera_api_sdk/models/assets.rb', line 182

def geographic_coverage_type
  @geographic_coverage_type
end

#industry_idObject

References industries.industry_id — Available industry categories for asset classification. Based on US NAISC codes.. See GET /industries for valid values. Optional.



44
45
46
# File 'lib/spartera_api_sdk/models/assets.rb', line 44

def industry_id
  @industry_id
end

#last_updatedObject

Optional.



23
24
25
# File 'lib/spartera_api_sdk/models/assets.rb', line 23

def last_updated
  @last_updated
end

#llm_connection_idObject

References connections.connection_id — Secure connections from Spartera to your databases and data warehouses. See GET /connections for valid values. Optional.



38
39
40
# File 'lib/spartera_api_sdk/models/assets.rb', line 38

def llm_connection_id
  @llm_connection_id
end

#nameObject

Required.



65
66
67
# File 'lib/spartera_api_sdk/models/assets.rb', line 65

def name
  @name
end

#next_runObject

Optional.



173
174
175
# File 'lib/spartera_api_sdk/models/assets.rb', line 173

def next_run
  @next_run
end

#rate_limit_granularityObject

Granularity level for rate limiting (USER, COMPANY, IP)



200
201
202
# File 'lib/spartera_api_sdk/models/assets.rb', line 200

def rate_limit_granularity
  @rate_limit_granularity
end

#rate_limit_numberObject

Number of requests allowed per period (e.g., 100)



194
195
196
# File 'lib/spartera_api_sdk/models/assets.rb', line 194

def rate_limit_number
  @rate_limit_number
end

#rate_limit_periodObject

Time period for rate limiting (second, minute, hour, day)



197
198
199
# File 'lib/spartera_api_sdk/models/assets.rb', line 197

def rate_limit_period
  @rate_limit_period
end

#require_customizationObject

Whether this asset requires customization before use



110
111
112
# File 'lib/spartera_api_sdk/models/assets.rb', line 110

def require_customization
  @require_customization
end

#restricted_domainsObject

Semicolon or comma-separated list of domains restricted from accessing this asset



95
96
97
# File 'lib/spartera_api_sdk/models/assets.rb', line 95

def restricted_domains
  @restricted_domains
end

#scheduleObject

Optional.



170
171
172
# File 'lib/spartera_api_sdk/models/assets.rb', line 170

def schedule
  @schedule
end

#sell_in_marketplaceObject

Required.



107
108
109
# File 'lib/spartera_api_sdk/models/assets.rb', line 107

def sell_in_marketplace
  @sell_in_marketplace
end

#short_codeObject

Short code for tera.ac URL shortener (e.g., ‘f78zq1’)



92
93
94
# File 'lib/spartera_api_sdk/models/assets.rb', line 92

def short_code
  @short_code
end

#slugObject

Optional.



68
69
70
# File 'lib/spartera_api_sdk/models/assets.rb', line 68

def slug
  @slug
end

#snippet_idObject

References snippets.snippet_id — Predefined code snippets to accelerate insight creation. See GET /snippets for valid values. Optional.



41
42
43
# File 'lib/spartera_api_sdk/models/assets.rb', line 41

def snippet_id
  @snippet_id
end

#sourceObject

Required. One of: MANUAL, AUTOMATIC.



77
78
79
# File 'lib/spartera_api_sdk/models/assets.rb', line 77

def source
  @source
end

#source_schema_nameObject

Optional.



101
102
103
# File 'lib/spartera_api_sdk/models/assets.rb', line 101

def source_schema_name
  @source_schema_name
end

#source_table_nameObject

Optional.



104
105
106
# File 'lib/spartera_api_sdk/models/assets.rb', line 104

def source_table_name
  @source_table_name
end

#sql_logicObject

Optional.



98
99
100
# File 'lib/spartera_api_sdk/models/assets.rb', line 98

def sql_logic
  @sql_logic
end

#tagsObject

Optional.



89
90
91
# File 'lib/spartera_api_sdk/models/assets.rb', line 89

def tags
  @tags
end

#user_idObject

References users.user_id — An individual user account within a company. See GET /users for valid values. Optional.



29
30
31
# File 'lib/spartera_api_sdk/models/assets.rb', line 29

def user_id
  @user_id
end

#visibilityObject

Optional. One of: PRIVATE, SHARED.



86
87
88
# File 'lib/spartera_api_sdk/models/assets.rb', line 86

def visibility
  @visibility
end

#viz_bar_stackedObject

Stack bars instead of grouping



155
156
157
# File 'lib/spartera_api_sdk/models/assets.rb', line 155

def viz_bar_stacked
  @viz_bar_stacked
end

#viz_chart_libraryObject

Optional. One of: PLOTLY, MATPLOTLIB, SEABORN.



113
114
115
# File 'lib/spartera_api_sdk/models/assets.rb', line 113

def viz_chart_library
  @viz_chart_library
end

#viz_chart_typeObject

Optional. One of: LINE, BAR, PIE, DOUGHNUT, POLAR, … (8 total).



116
117
118
# File 'lib/spartera_api_sdk/models/assets.rb', line 116

def viz_chart_type
  @viz_chart_type
end

#viz_color_col_nameObject

Optional.



128
129
130
# File 'lib/spartera_api_sdk/models/assets.rb', line 128

def viz_color_col_name
  @viz_color_col_name
end

#viz_color_schemeObject

Optional. One of: Default, Sequential, Diverging, Categorical, Monochrome, … (8 total).



140
141
142
# File 'lib/spartera_api_sdk/models/assets.rb', line 140

def viz_color_scheme
  @viz_color_scheme
end

#viz_data_aggregationObject

Optional. One of: No Aggregation, Sum, Average, Count, Minimum, … (6 total).



131
132
133
# File 'lib/spartera_api_sdk/models/assets.rb', line 131

def viz_data_aggregation
  @viz_data_aggregation
end

#viz_data_limitObject

Optional.



137
138
139
# File 'lib/spartera_api_sdk/models/assets.rb', line 137

def viz_data_limit
  @viz_data_limit
end

#viz_dep_var_col_nameObject

Optional.



119
120
121
# File 'lib/spartera_api_sdk/models/assets.rb', line 119

def viz_dep_var_col_name
  @viz_dep_var_col_name
end

#viz_filter_directionObject

Whether data_limit shows TOP or BOTTOM N



158
159
160
# File 'lib/spartera_api_sdk/models/assets.rb', line 158

def viz_filter_direction
  @viz_filter_direction
end

#viz_indep_var_col_nameObject

Optional.



122
123
124
# File 'lib/spartera_api_sdk/models/assets.rb', line 122

def viz_indep_var_col_name
  @viz_indep_var_col_name
end

#viz_line_smoothingObject

Enable smoothing for line charts



152
153
154
# File 'lib/spartera_api_sdk/models/assets.rb', line 152

def viz_line_smoothing
  @viz_line_smoothing
end

#viz_show_gridObject

Show/hide grid lines



146
147
148
# File 'lib/spartera_api_sdk/models/assets.rb', line 146

def viz_show_grid
  @viz_show_grid
end

#viz_show_legendObject

Show/hide chart legend



143
144
145
# File 'lib/spartera_api_sdk/models/assets.rb', line 143

def viz_show_legend
  @viz_show_legend
end

#viz_show_trendlineObject

Show trendline for scatter/line charts



149
150
151
# File 'lib/spartera_api_sdk/models/assets.rb', line 149

def viz_show_trendline
  @viz_show_trendline
end

#viz_size_col_nameObject

Optional.



125
126
127
# File 'lib/spartera_api_sdk/models/assets.rb', line 125

def viz_size_col_name
  @viz_size_col_name
end

#viz_sort_directionObject

Optional. One of: No Sorting, Ascending, Descending.



134
135
136
# File 'lib/spartera_api_sdk/models/assets.rb', line 134

def viz_sort_direction
  @viz_sort_direction
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



292
293
294
# File 'lib/spartera_api_sdk/models/assets.rb', line 292

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



297
298
299
# File 'lib/spartera_api_sdk/models/assets.rb', line 297

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# File 'lib/spartera_api_sdk/models/assets.rb', line 225

def self.attribute_map
  {
    :'date_created' => :'date_created',
    :'last_updated' => :'last_updated',
    :'asset_id' => :'asset_id',
    :'user_id' => :'user_id',
    :'company_id' => :'company_id',
    :'connection_id' => :'connection_id',
    :'llm_connection_id' => :'llm_connection_id',
    :'snippet_id' => :'snippet_id',
    :'industry_id' => :'industry_id',
    :'ai_job_id' => :'ai_job_id',
    :'auc_id' => :'auc_id',
    :'function_id' => :'function_id',
    :'approval_status' => :'approval_status',
    :'approved_by_user_id' => :'approved_by_user_id',
    :'approved_at' => :'approved_at',
    :'name' => :'name',
    :'slug' => :'slug',
    :'description' => :'description',
    :'detailed_description' => :'detailed_description',
    :'source' => :'source',
    :'asset_type' => :'asset_type',
    :'asset_schema' => :'asset_schema',
    :'visibility' => :'visibility',
    :'tags' => :'tags',
    :'short_code' => :'short_code',
    :'restricted_domains' => :'restricted_domains',
    :'sql_logic' => :'sql_logic',
    :'source_schema_name' => :'source_schema_name',
    :'source_table_name' => :'source_table_name',
    :'sell_in_marketplace' => :'sell_in_marketplace',
    :'require_customization' => :'require_customization',
    :'viz_chart_library' => :'viz_chart_library',
    :'viz_chart_type' => :'viz_chart_type',
    :'viz_dep_var_col_name' => :'viz_dep_var_col_name',
    :'viz_indep_var_col_name' => :'viz_indep_var_col_name',
    :'viz_size_col_name' => :'viz_size_col_name',
    :'viz_color_col_name' => :'viz_color_col_name',
    :'viz_data_aggregation' => :'viz_data_aggregation',
    :'viz_sort_direction' => :'viz_sort_direction',
    :'viz_data_limit' => :'viz_data_limit',
    :'viz_color_scheme' => :'viz_color_scheme',
    :'viz_show_legend' => :'viz_show_legend',
    :'viz_show_grid' => :'viz_show_grid',
    :'viz_show_trendline' => :'viz_show_trendline',
    :'viz_line_smoothing' => :'viz_line_smoothing',
    :'viz_bar_stacked' => :'viz_bar_stacked',
    :'viz_filter_direction' => :'viz_filter_direction',
    :'allow_params' => :'allow_params',
    :'accept_terms' => :'accept_terms',
    :'cached' => :'cached',
    :'schedule' => :'schedule',
    :'next_run' => :'next_run',
    :'data_time_period_start' => :'data_time_period_start',
    :'data_time_period_end' => :'data_time_period_end',
    :'geographic_coverage_type' => :'geographic_coverage_type',
    :'geographic_coverage_details' => :'geographic_coverage_details',
    :'data_source_refresh_frequency' => :'data_source_refresh_frequency',
    :'data_source_last_refreshed' => :'data_source_last_refreshed',
    :'rate_limit_number' => :'rate_limit_number',
    :'rate_limit_period' => :'rate_limit_period',
    :'rate_limit_granularity' => :'rate_limit_granularity'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
# File 'lib/spartera_api_sdk/models/assets.rb', line 1010

def self.build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  attributes = attributes.transform_keys(&:to_sym)
  transformed_hash = {}
  openapi_types.each_pair do |key, type|
    if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = nil
    elsif type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[attribute_map[key]].is_a?(Array)
        transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
      end
    elsif !attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
    end
  end
  new(transformed_hash)
end

.openapi_nullableObject

List of attributes with nullable: true



369
370
371
372
# File 'lib/spartera_api_sdk/models/assets.rb', line 369

def self.openapi_nullable
  Set.new([
  ])
end

.openapi_typesObject

Attribute type mapping.



302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
# File 'lib/spartera_api_sdk/models/assets.rb', line 302

def self.openapi_types
  {
    :'date_created' => :'Time',
    :'last_updated' => :'Time',
    :'asset_id' => :'String',
    :'user_id' => :'String',
    :'company_id' => :'String',
    :'connection_id' => :'String',
    :'llm_connection_id' => :'String',
    :'snippet_id' => :'Integer',
    :'industry_id' => :'Integer',
    :'ai_job_id' => :'String',
    :'auc_id' => :'Integer',
    :'function_id' => :'String',
    :'approval_status' => :'String',
    :'approved_by_user_id' => :'String',
    :'approved_at' => :'Time',
    :'name' => :'String',
    :'slug' => :'String',
    :'description' => :'String',
    :'detailed_description' => :'String',
    :'source' => :'String',
    :'asset_type' => :'String',
    :'asset_schema' => :'Object',
    :'visibility' => :'String',
    :'tags' => :'String',
    :'short_code' => :'String',
    :'restricted_domains' => :'String',
    :'sql_logic' => :'String',
    :'source_schema_name' => :'String',
    :'source_table_name' => :'String',
    :'sell_in_marketplace' => :'Boolean',
    :'require_customization' => :'Boolean',
    :'viz_chart_library' => :'String',
    :'viz_chart_type' => :'String',
    :'viz_dep_var_col_name' => :'String',
    :'viz_indep_var_col_name' => :'String',
    :'viz_size_col_name' => :'String',
    :'viz_color_col_name' => :'String',
    :'viz_data_aggregation' => :'String',
    :'viz_sort_direction' => :'String',
    :'viz_data_limit' => :'Integer',
    :'viz_color_scheme' => :'String',
    :'viz_show_legend' => :'Boolean',
    :'viz_show_grid' => :'Boolean',
    :'viz_show_trendline' => :'Boolean',
    :'viz_line_smoothing' => :'Boolean',
    :'viz_bar_stacked' => :'Boolean',
    :'viz_filter_direction' => :'String',
    :'allow_params' => :'Boolean',
    :'accept_terms' => :'Boolean',
    :'cached' => :'Boolean',
    :'schedule' => :'String',
    :'next_run' => :'Time',
    :'data_time_period_start' => :'Time',
    :'data_time_period_end' => :'Time',
    :'geographic_coverage_type' => :'String',
    :'geographic_coverage_details' => :'String',
    :'data_source_refresh_frequency' => :'String',
    :'data_source_last_refreshed' => :'Time',
    :'rate_limit_number' => :'Integer',
    :'rate_limit_period' => :'String',
    :'rate_limit_granularity' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
# File 'lib/spartera_api_sdk/models/assets.rb', line 929

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      date_created == o.date_created &&
      last_updated == o.last_updated &&
      asset_id == o.asset_id &&
      user_id == o.user_id &&
      company_id == o.company_id &&
      connection_id == o.connection_id &&
      llm_connection_id == o.llm_connection_id &&
      snippet_id == o.snippet_id &&
      industry_id == o.industry_id &&
      ai_job_id == o.ai_job_id &&
      auc_id == o.auc_id &&
      function_id == o.function_id &&
      approval_status == o.approval_status &&
      approved_by_user_id == o.approved_by_user_id &&
      approved_at == o.approved_at &&
      name == o.name &&
      slug == o.slug &&
      description == o.description &&
      detailed_description == o.detailed_description &&
      source == o.source &&
      asset_type == o.asset_type &&
      asset_schema == o.asset_schema &&
      visibility == o.visibility &&
      tags == o.tags &&
      short_code == o.short_code &&
      restricted_domains == o.restricted_domains &&
      sql_logic == o.sql_logic &&
      source_schema_name == o.source_schema_name &&
      source_table_name == o.source_table_name &&
      sell_in_marketplace == o.sell_in_marketplace &&
      require_customization == o.require_customization &&
      viz_chart_library == o.viz_chart_library &&
      viz_chart_type == o.viz_chart_type &&
      viz_dep_var_col_name == o.viz_dep_var_col_name &&
      viz_indep_var_col_name == o.viz_indep_var_col_name &&
      viz_size_col_name == o.viz_size_col_name &&
      viz_color_col_name == o.viz_color_col_name &&
      viz_data_aggregation == o.viz_data_aggregation &&
      viz_sort_direction == o.viz_sort_direction &&
      viz_data_limit == o.viz_data_limit &&
      viz_color_scheme == o.viz_color_scheme &&
      viz_show_legend == o.viz_show_legend &&
      viz_show_grid == o.viz_show_grid &&
      viz_show_trendline == o.viz_show_trendline &&
      viz_line_smoothing == o.viz_line_smoothing &&
      viz_bar_stacked == o.viz_bar_stacked &&
      viz_filter_direction == o.viz_filter_direction &&
      allow_params == o.allow_params &&
      accept_terms == o.accept_terms &&
      cached == o.cached &&
      schedule == o.schedule &&
      next_run == o.next_run &&
      data_time_period_start == o.data_time_period_start &&
      data_time_period_end == o.data_time_period_end &&
      geographic_coverage_type == o.geographic_coverage_type &&
      geographic_coverage_details == o.geographic_coverage_details &&
      data_source_refresh_frequency == o.data_source_refresh_frequency &&
      data_source_last_refreshed == o.data_source_last_refreshed &&
      rate_limit_number == o.rate_limit_number &&
      rate_limit_period == o.rate_limit_period &&
      rate_limit_granularity == o.rate_limit_granularity
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


997
998
999
# File 'lib/spartera_api_sdk/models/assets.rb', line 997

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



1003
1004
1005
# File 'lib/spartera_api_sdk/models/assets.rb', line 1003

def hash
  [date_created, last_updated, asset_id, user_id, company_id, connection_id, llm_connection_id, snippet_id, industry_id, ai_job_id, auc_id, function_id, approval_status, approved_by_user_id, approved_at, name, slug, description, detailed_description, source, asset_type, asset_schema, visibility, tags, short_code, restricted_domains, sql_logic, source_schema_name, source_table_name, sell_in_marketplace, require_customization, 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, viz_show_legend, viz_show_grid, viz_show_trendline, viz_line_smoothing, viz_bar_stacked, viz_filter_direction, 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, rate_limit_number, rate_limit_period, rate_limit_granularity].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
# File 'lib/spartera_api_sdk/models/assets.rb', line 651

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  if @company_id.nil?
    invalid_properties.push('invalid value for "company_id", company_id cannot be nil.')
  end

  if @name.nil?
    invalid_properties.push('invalid value for "name", name cannot be nil.')
  end

  if @source.nil?
    invalid_properties.push('invalid value for "source", source cannot be nil.')
  end

  if @sell_in_marketplace.nil?
    invalid_properties.push('invalid value for "sell_in_marketplace", sell_in_marketplace cannot be nil.')
  end

  if @require_customization.nil?
    invalid_properties.push('invalid value for "require_customization", require_customization cannot be nil.')
  end

  if @allow_params.nil?
    invalid_properties.push('invalid value for "allow_params", allow_params cannot be nil.')
  end

  if @accept_terms.nil?
    invalid_properties.push('invalid value for "accept_terms", accept_terms cannot be nil.')
  end

  invalid_properties
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
# File 'lib/spartera_api_sdk/models/assets.rb', line 1032

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = self.class.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
# File 'lib/spartera_api_sdk/models/assets.rb', line 687

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  return false if @company_id.nil?
  approval_status_validator = EnumAttributeValidator.new('String', ["PENDING", "APPROVED", "REJECTED", "NEEDS_REVISION"])
  return false unless approval_status_validator.valid?(@approval_status)
  return false if @name.nil?
  return false if @source.nil?
  source_validator = EnumAttributeValidator.new('String', ["MANUAL", "AUTOMATIC"])
  return false unless source_validator.valid?(@source)
  asset_type_validator = EnumAttributeValidator.new('String', ["CALCULATION", "VISUALIZATION", "DATA"])
  return false unless asset_type_validator.valid?(@asset_type)
  visibility_validator = EnumAttributeValidator.new('String', ["PRIVATE", "SHARED"])
  return false unless visibility_validator.valid?(@visibility)
  return false if @sell_in_marketplace.nil?
  return false if @require_customization.nil?
  viz_chart_library_validator = EnumAttributeValidator.new('String', ["PLOTLY", "MATPLOTLIB", "SEABORN"])
  return false unless viz_chart_library_validator.valid?(@viz_chart_library)
  viz_chart_type_validator = EnumAttributeValidator.new('String', ["LINE", "BAR", "PIE", "DOUGHNUT", "POLAR", "RADAR", "BUBBLE", "SCATTER"])
  return false unless viz_chart_type_validator.valid?(@viz_chart_type)
  viz_data_aggregation_validator = EnumAttributeValidator.new('String', ["No Aggregation", "Sum", "Average", "Count", "Minimum", "Maximum"])
  return false unless viz_data_aggregation_validator.valid?(@viz_data_aggregation)
  viz_sort_direction_validator = EnumAttributeValidator.new('String', ["No Sorting", "Ascending", "Descending"])
  return false unless viz_sort_direction_validator.valid?(@viz_sort_direction)
  viz_color_scheme_validator = EnumAttributeValidator.new('String', ["Default", "Sequential", "Diverging", "Categorical", "Monochrome", "Pastel", "Dark", "Light"])
  return false unless viz_color_scheme_validator.valid?(@viz_color_scheme)
  viz_filter_direction_validator = EnumAttributeValidator.new('String', ["TOP", "BOTTOM"])
  return false unless viz_filter_direction_validator.valid?(@viz_filter_direction)
  return false if @allow_params.nil?
  return false if @accept_terms.nil?
  geographic_coverage_type_validator = EnumAttributeValidator.new('String', ["GLOBAL", "CONTINENTAL", "REGIONAL", "NATIONAL", "STATE", "LOCAL", "CUSTOM", "UNKNOWN"])
  return false unless geographic_coverage_type_validator.valid?(@geographic_coverage_type)
  data_source_refresh_frequency_validator = EnumAttributeValidator.new('String', ["REAL_TIME", "HOURLY", "DAILY", "WEEKLY", "MONTHLY", "QUARTERLY", "ANNUAL", "ONE_TIME", "CUSTOM", "UNKNOWN"])
  return false unless data_source_refresh_frequency_validator.valid?(@data_source_refresh_frequency)
  rate_limit_period_validator = EnumAttributeValidator.new('String', ["SECOND", "MINUTE", "HOUR", "DAY"])
  return false unless rate_limit_period_validator.valid?(@rate_limit_period)
  rate_limit_granularity_validator = EnumAttributeValidator.new('String', ["USER", "COMPANY", "IP", "GLOBAL"])
  return false unless rate_limit_granularity_validator.valid?(@rate_limit_granularity)
  true
end