Class: SparteraApiSdk::AssetsInput

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

Overview

Input schema for creating Asset

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 = {}) ⇒ AssetsInput

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
367
368
369
370
371
372
373
374
375
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
# File 'lib/spartera_api_sdk/models/assets_input.rb', line 341

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `SparteraApiSdk::AssetsInput` 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::AssetsInput`. 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?(:'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?(:'industry_id')
    self.industry_id = attributes[:'industry_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?(:'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']
  end

  if attributes.key?(:'require_customization')
    self.require_customization = attributes[:'require_customization']
  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']
  end

  if attributes.key?(:'accept_terms')
    self.accept_terms = attributes[:'accept_terms']
  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.



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

def accept_terms
  @accept_terms
end

#allow_paramsObject

Required.



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

def allow_params
  @allow_params
end

#approval_statusObject

Approval status for AI-generated assets



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

def approval_status
  @approval_status
end

#approved_atObject

When this asset was approved for marketplace



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

def approved_at
  @approved_at
end

#approved_by_user_idObject

User who approved this asset for marketplace



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

def approved_by_user_id
  @approved_by_user_id
end

#asset_schemaObject

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



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

def asset_schema
  @asset_schema
end

#asset_typeObject

Optional. One of: CALCULATION, VISUALIZATION, DATA.



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

def asset_type
  @asset_type
end

#auc_idObject

Primary use case for this asset, from clustering analysis



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

def auc_id
  @auc_id
end

#cachedObject

Optional.



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

def cached
  @cached
end

#company_idObject

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



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

def company_id
  @company_id
end

#connection_idObject

Optional.



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

def connection_id
  @connection_id
end

#data_source_last_refreshedObject

When the source data was last refreshed



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

def data_source_last_refreshed
  @data_source_last_refreshed
end

#data_source_refresh_frequencyObject

How often the source data is refreshed



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

def data_source_refresh_frequency
  @data_source_refresh_frequency
end

#data_time_period_endObject

End date of the data time period covered



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

def data_time_period_end
  @data_time_period_end
end

#data_time_period_startObject

Start date of the data time period covered



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

def data_time_period_start
  @data_time_period_start
end

#descriptionObject

Optional.



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

def description
  @description
end

#detailed_descriptionObject

Long-form HTML description for product pages and SEO



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

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.



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

def function_id
  @function_id
end

#geographic_coverage_detailsObject

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



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

def geographic_coverage_details
  @geographic_coverage_details
end

#geographic_coverage_typeObject

Type of geographic coverage



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

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.



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

def industry_id
  @industry_id
end

#nameObject

Required.



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

def name
  @name
end

#next_runObject

Optional.



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

def next_run
  @next_run
end

#rate_limit_granularityObject

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



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

def rate_limit_granularity
  @rate_limit_granularity
end

#rate_limit_numberObject

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



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

def rate_limit_number
  @rate_limit_number
end

#rate_limit_periodObject

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



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

def rate_limit_period
  @rate_limit_period
end

#require_customizationObject

Whether this asset requires customization before use



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

def require_customization
  @require_customization
end

#restricted_domainsObject

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



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

def restricted_domains
  @restricted_domains
end

#scheduleObject

Optional.



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

def schedule
  @schedule
end

#sell_in_marketplaceObject

Required.



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

def sell_in_marketplace
  @sell_in_marketplace
end

#short_codeObject

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



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

def short_code
  @short_code
end

#slugObject

Optional.



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

def slug
  @slug
end

#sourceObject

Required. One of: MANUAL, AUTOMATIC.



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

def source
  @source
end

#source_schema_nameObject

Optional.



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

def source_schema_name
  @source_schema_name
end

#source_table_nameObject

Optional.



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

def source_table_name
  @source_table_name
end

#sql_logicObject

Optional.



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

def sql_logic
  @sql_logic
end

#tagsObject

Optional.



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

def tags
  @tags
end

#user_idObject

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



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

def user_id
  @user_id
end

#viz_bar_stackedObject

Stack bars instead of grouping



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

def viz_bar_stacked
  @viz_bar_stacked
end

#viz_chart_libraryObject

Optional. One of: PLOTLY, MATPLOTLIB, SEABORN.



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

def viz_chart_library
  @viz_chart_library
end

#viz_chart_typeObject

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



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

def viz_chart_type
  @viz_chart_type
end

#viz_color_col_nameObject

Optional.



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

def viz_color_col_name
  @viz_color_col_name
end

#viz_color_schemeObject

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



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

def viz_color_scheme
  @viz_color_scheme
end

#viz_data_aggregationObject

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



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

def viz_data_aggregation
  @viz_data_aggregation
end

#viz_data_limitObject

Optional.



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

def viz_data_limit
  @viz_data_limit
end

#viz_dep_var_col_nameObject

Optional.



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

def viz_dep_var_col_name
  @viz_dep_var_col_name
end

#viz_filter_directionObject

Whether data_limit shows TOP or BOTTOM N



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

def viz_filter_direction
  @viz_filter_direction
end

#viz_indep_var_col_nameObject

Optional.



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

def viz_indep_var_col_name
  @viz_indep_var_col_name
end

#viz_line_smoothingObject

Enable smoothing for line charts



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

def viz_line_smoothing
  @viz_line_smoothing
end

#viz_show_gridObject

Show/hide grid lines



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

def viz_show_grid
  @viz_show_grid
end

#viz_show_legendObject

Show/hide chart legend



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

def viz_show_legend
  @viz_show_legend
end

#viz_show_trendlineObject

Show trendline for scatter/line charts



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

def viz_show_trendline
  @viz_show_trendline
end

#viz_size_col_nameObject

Optional.



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

def viz_size_col_name
  @viz_size_col_name
end

#viz_sort_directionObject

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



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

def viz_sort_direction
  @viz_sort_direction
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



264
265
266
# File 'lib/spartera_api_sdk/models/assets_input.rb', line 264

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



269
270
271
# File 'lib/spartera_api_sdk/models/assets_input.rb', line 269

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

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



204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
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
# File 'lib/spartera_api_sdk/models/assets_input.rb', line 204

def self.attribute_map
  {
    :'user_id' => :'user_id',
    :'company_id' => :'company_id',
    :'connection_id' => :'connection_id',
    :'industry_id' => :'industry_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',
    :'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



860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
# File 'lib/spartera_api_sdk/models/assets_input.rb', line 860

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



334
335
336
337
# File 'lib/spartera_api_sdk/models/assets_input.rb', line 334

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

.openapi_typesObject

Attribute type mapping.



274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
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
# File 'lib/spartera_api_sdk/models/assets_input.rb', line 274

def self.openapi_types
  {
    :'user_id' => :'String',
    :'company_id' => :'String',
    :'connection_id' => :'String',
    :'industry_id' => :'Integer',
    :'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',
    :'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



786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
# File 'lib/spartera_api_sdk/models/assets_input.rb', line 786

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      user_id == o.user_id &&
      company_id == o.company_id &&
      connection_id == o.connection_id &&
      industry_id == o.industry_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 &&
      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


847
848
849
# File 'lib/spartera_api_sdk/models/assets_input.rb', line 847

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



853
854
855
# File 'lib/spartera_api_sdk/models/assets_input.rb', line 853

def hash
  [user_id, company_id, connection_id, industry_id, auc_id, function_id, approval_status, approved_by_user_id, approved_at, name, slug, description, detailed_description, source, asset_type, asset_schema, 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



580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
# File 'lib/spartera_api_sdk/models/assets_input.rb', line 580

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

  invalid_properties
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



882
883
884
885
886
887
888
889
890
891
892
893
894
# File 'lib/spartera_api_sdk/models/assets_input.rb', line 882

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



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
# File 'lib/spartera_api_sdk/models/assets_input.rb', line 600

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)
  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)
  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