Class: AylienNewsApi::Parameter

Inherits:
Object
  • Object
show all
Defined in:
lib/aylien_news_api/models/parameter.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Parameter

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
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
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
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
# File 'lib/aylien_news_api/models/parameter.rb', line 261

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#author_idObject

Returns the value of attribute author_id.



17
18
19
# File 'lib/aylien_news_api/models/parameter.rb', line 17

def author_id
  @author_id
end

#author_nameObject

Returns the value of attribute author_name.



19
20
21
# File 'lib/aylien_news_api/models/parameter.rb', line 19

def author_name
  @author_name
end

#bodyObject

Returns the value of attribute body.



21
22
23
# File 'lib/aylien_news_api/models/parameter.rb', line 21

def body
  @body
end

#categories_confidentObject

Returns the value of attribute categories_confident.



23
24
25
# File 'lib/aylien_news_api/models/parameter.rb', line 23

def categories_confident
  @categories_confident
end

#categories_idObject

Returns the value of attribute categories_id.



25
26
27
# File 'lib/aylien_news_api/models/parameter.rb', line 25

def categories_id
  @categories_id
end

#categories_levelObject

Returns the value of attribute categories_level.



27
28
29
# File 'lib/aylien_news_api/models/parameter.rb', line 27

def categories_level
  @categories_level
end

#categories_taxonomyObject

Returns the value of attribute categories_taxonomy.



29
30
31
# File 'lib/aylien_news_api/models/parameter.rb', line 29

def categories_taxonomy
  @categories_taxonomy
end

#clustersObject

Returns the value of attribute clusters.



31
32
33
# File 'lib/aylien_news_api/models/parameter.rb', line 31

def clusters
  @clusters
end

#entities_body_surface_forms_textObject

Returns the value of attribute entities_body_surface_forms_text.



45
46
47
# File 'lib/aylien_news_api/models/parameter.rb', line 45

def entities_body_surface_forms_text
  @entities_body_surface_forms_text
end

#entities_idObject

Returns the value of attribute entities_id.



35
36
37
# File 'lib/aylien_news_api/models/parameter.rb', line 35

def entities_id
  @entities_id
end

Returns the value of attribute entities_links_wikidata.



41
42
43
# File 'lib/aylien_news_api/models/parameter.rb', line 41

def entities_links_wikidata
  @entities_links_wikidata
end

Returns the value of attribute entities_links_wikipedia.



39
40
41
# File 'lib/aylien_news_api/models/parameter.rb', line 39

def entities_links_wikipedia
  @entities_links_wikipedia
end

#entities_surface_forms_textObject

Returns the value of attribute entities_surface_forms_text.



37
38
39
# File 'lib/aylien_news_api/models/parameter.rb', line 37

def entities_surface_forms_text
  @entities_surface_forms_text
end

#entities_title_surface_forms_textObject

Returns the value of attribute entities_title_surface_forms_text.



43
44
45
# File 'lib/aylien_news_api/models/parameter.rb', line 43

def entities_title_surface_forms_text
  @entities_title_surface_forms_text
end

#entityObject

Returns the value of attribute entity.



127
128
129
# File 'lib/aylien_news_api/models/parameter.rb', line 127

def entity
  @entity
end

#idObject

Returns the value of attribute id.



47
48
49
# File 'lib/aylien_news_api/models/parameter.rb', line 47

def id
  @id
end

#languageObject

Returns the value of attribute language.



49
50
51
# File 'lib/aylien_news_api/models/parameter.rb', line 49

def language
  @language
end

Returns the value of attribute links_permalink.



33
34
35
# File 'lib/aylien_news_api/models/parameter.rb', line 33

def links_permalink
  @links_permalink
end

#media_images_content_length_maxObject

Returns the value of attribute media_images_content_length_max.



51
52
53
# File 'lib/aylien_news_api/models/parameter.rb', line 51

def media_images_content_length_max
  @media_images_content_length_max
end

#media_images_content_length_minObject

Returns the value of attribute media_images_content_length_min.



53
54
55
# File 'lib/aylien_news_api/models/parameter.rb', line 53

def media_images_content_length_min
  @media_images_content_length_min
end

#media_images_count_maxObject

Returns the value of attribute media_images_count_max.



55
56
57
# File 'lib/aylien_news_api/models/parameter.rb', line 55

def media_images_count_max
  @media_images_count_max
end

#media_images_count_minObject

Returns the value of attribute media_images_count_min.



57
58
59
# File 'lib/aylien_news_api/models/parameter.rb', line 57

def media_images_count_min
  @media_images_count_min
end

#media_images_formatObject

Returns the value of attribute media_images_format.



59
60
61
# File 'lib/aylien_news_api/models/parameter.rb', line 59

def media_images_format
  @media_images_format
end

#media_images_height_maxObject

Returns the value of attribute media_images_height_max.



61
62
63
# File 'lib/aylien_news_api/models/parameter.rb', line 61

def media_images_height_max
  @media_images_height_max
end

#media_images_height_minObject

Returns the value of attribute media_images_height_min.



63
64
65
# File 'lib/aylien_news_api/models/parameter.rb', line 63

def media_images_height_min
  @media_images_height_min
end

#media_images_width_maxObject

Returns the value of attribute media_images_width_max.



65
66
67
# File 'lib/aylien_news_api/models/parameter.rb', line 65

def media_images_width_max
  @media_images_width_max
end

#media_images_width_minObject

Returns the value of attribute media_images_width_min.



67
68
69
# File 'lib/aylien_news_api/models/parameter.rb', line 67

def media_images_width_min
  @media_images_width_min
end

#media_videos_count_maxObject

Returns the value of attribute media_videos_count_max.



69
70
71
# File 'lib/aylien_news_api/models/parameter.rb', line 69

def media_videos_count_max
  @media_videos_count_max
end

#media_videos_count_minObject

Returns the value of attribute media_videos_count_min.



71
72
73
# File 'lib/aylien_news_api/models/parameter.rb', line 71

def media_videos_count_min
  @media_videos_count_min
end

#sentiment_body_polarityObject

Returns the value of attribute sentiment_body_polarity.



73
74
75
# File 'lib/aylien_news_api/models/parameter.rb', line 73

def sentiment_body_polarity
  @sentiment_body_polarity
end

#sentiment_title_polarityObject

Returns the value of attribute sentiment_title_polarity.



75
76
77
# File 'lib/aylien_news_api/models/parameter.rb', line 75

def sentiment_title_polarity
  @sentiment_title_polarity
end

#social_shares_count_facebook_maxObject

Returns the value of attribute social_shares_count_facebook_max.



77
78
79
# File 'lib/aylien_news_api/models/parameter.rb', line 77

def social_shares_count_facebook_max
  @social_shares_count_facebook_max
end

#social_shares_count_facebook_minObject

Returns the value of attribute social_shares_count_facebook_min.



79
80
81
# File 'lib/aylien_news_api/models/parameter.rb', line 79

def social_shares_count_facebook_min
  @social_shares_count_facebook_min
end

#social_shares_count_reddit_maxObject

Returns the value of attribute social_shares_count_reddit_max.



81
82
83
# File 'lib/aylien_news_api/models/parameter.rb', line 81

def social_shares_count_reddit_max
  @social_shares_count_reddit_max
end

#social_shares_count_reddit_minObject

Returns the value of attribute social_shares_count_reddit_min.



83
84
85
# File 'lib/aylien_news_api/models/parameter.rb', line 83

def social_shares_count_reddit_min
  @social_shares_count_reddit_min
end

#source_domainObject

Returns the value of attribute source_domain.



85
86
87
# File 'lib/aylien_news_api/models/parameter.rb', line 85

def source_domain
  @source_domain
end

#source_idObject

Returns the value of attribute source_id.



87
88
89
# File 'lib/aylien_news_api/models/parameter.rb', line 87

def source_id
  @source_id
end

Returns the value of attribute source_links_in_count_max.



89
90
91
# File 'lib/aylien_news_api/models/parameter.rb', line 89

def source_links_in_count_max
  @source_links_in_count_max
end

Returns the value of attribute source_links_in_count_min.



91
92
93
# File 'lib/aylien_news_api/models/parameter.rb', line 91

def source_links_in_count_min
  @source_links_in_count_min
end

#source_locations_cityObject

Returns the value of attribute source_locations_city.



93
94
95
# File 'lib/aylien_news_api/models/parameter.rb', line 93

def source_locations_city
  @source_locations_city
end

#source_locations_countryObject

Returns the value of attribute source_locations_country.



95
96
97
# File 'lib/aylien_news_api/models/parameter.rb', line 95

def source_locations_country
  @source_locations_country
end

#source_locations_stateObject

Returns the value of attribute source_locations_state.



97
98
99
# File 'lib/aylien_news_api/models/parameter.rb', line 97

def source_locations_state
  @source_locations_state
end

#source_rankings_alexa_countryObject

Returns the value of attribute source_rankings_alexa_country.



99
100
101
# File 'lib/aylien_news_api/models/parameter.rb', line 99

def source_rankings_alexa_country
  @source_rankings_alexa_country
end

#source_rankings_alexa_rank_maxObject

Returns the value of attribute source_rankings_alexa_rank_max.



101
102
103
# File 'lib/aylien_news_api/models/parameter.rb', line 101

def source_rankings_alexa_rank_max
  @source_rankings_alexa_rank_max
end

#source_rankings_alexa_rank_minObject

Returns the value of attribute source_rankings_alexa_rank_min.



103
104
105
# File 'lib/aylien_news_api/models/parameter.rb', line 103

def source_rankings_alexa_rank_min
  @source_rankings_alexa_rank_min
end

#source_scopes_cityObject

Returns the value of attribute source_scopes_city.



105
106
107
# File 'lib/aylien_news_api/models/parameter.rb', line 105

def source_scopes_city
  @source_scopes_city
end

#source_scopes_countryObject

Returns the value of attribute source_scopes_country.



107
108
109
# File 'lib/aylien_news_api/models/parameter.rb', line 107

def source_scopes_country
  @source_scopes_country
end

#source_scopes_levelObject

Returns the value of attribute source_scopes_level.



109
110
111
# File 'lib/aylien_news_api/models/parameter.rb', line 109

def source_scopes_level
  @source_scopes_level
end

#source_scopes_stateObject

Returns the value of attribute source_scopes_state.



111
112
113
# File 'lib/aylien_news_api/models/parameter.rb', line 111

def source_scopes_state
  @source_scopes_state
end

#story_languageObject

Returns the value of attribute story_language.



115
116
117
# File 'lib/aylien_news_api/models/parameter.rb', line 115

def story_language
  @story_language
end

#story_urlObject

Returns the value of attribute story_url.



113
114
115
# File 'lib/aylien_news_api/models/parameter.rb', line 113

def story_url
  @story_url
end

#textObject

Returns the value of attribute text.



117
118
119
# File 'lib/aylien_news_api/models/parameter.rb', line 117

def text
  @text
end

#titleObject

Returns the value of attribute title.



119
120
121
# File 'lib/aylien_news_api/models/parameter.rb', line 119

def title
  @title
end

#translations_en_bodyObject

Returns the value of attribute translations_en_body.



121
122
123
# File 'lib/aylien_news_api/models/parameter.rb', line 121

def translations_en_body
  @translations_en_body
end

#translations_en_textObject

Returns the value of attribute translations_en_text.



123
124
125
# File 'lib/aylien_news_api/models/parameter.rb', line 123

def translations_en_text
  @translations_en_text
end

#translations_en_titleObject

Returns the value of attribute translations_en_title.



125
126
127
# File 'lib/aylien_news_api/models/parameter.rb', line 125

def translations_en_title
  @translations_en_title
end

Class Method Details

.attribute_mapObject

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



130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
# File 'lib/aylien_news_api/models/parameter.rb', line 130

def self.attribute_map
  {
    :'author_id' => :'author.id',
    :'author_name' => :'author.name',
    :'body' => :'body',
    :'categories_confident' => :'categories.confident',
    :'categories_id' => :'categories.id',
    :'categories_level' => :'categories.level',
    :'categories_taxonomy' => :'categories.taxonomy',
    :'clusters' => :'clusters',
    :'links_permalink' => :'links.permalink',
    :'entities_id' => :'entities.id',
    :'entities_surface_forms_text' => :'entities.surface_forms.text',
    :'entities_links_wikipedia' => :'entities.links.wikipedia',
    :'entities_links_wikidata' => :'entities.links.wikidata',
    :'entities_title_surface_forms_text' => :'entities.title.surface_forms.text',
    :'entities_body_surface_forms_text' => :'entities.body.surface_forms.text',
    :'id' => :'id',
    :'language' => :'language',
    :'media_images_content_length_max' => :'media.images.content.length.max',
    :'media_images_content_length_min' => :'media.images.content.length.min',
    :'media_images_count_max' => :'media.images.count.max',
    :'media_images_count_min' => :'media.images.count.min',
    :'media_images_format' => :'media.images.format',
    :'media_images_height_max' => :'media.images.height.max',
    :'media_images_height_min' => :'media.images.height.min',
    :'media_images_width_max' => :'media.images.width.max',
    :'media_images_width_min' => :'media.images.width.min',
    :'media_videos_count_max' => :'media.videos.count.max',
    :'media_videos_count_min' => :'media.videos.count.min',
    :'sentiment_body_polarity' => :'sentiment.body.polarity',
    :'sentiment_title_polarity' => :'sentiment.title.polarity',
    :'social_shares_count_facebook_max' => :'social.shares.count.facebook.max',
    :'social_shares_count_facebook_min' => :'social.shares.count.facebook.min',
    :'social_shares_count_reddit_max' => :'social.shares.count.reddit.max',
    :'social_shares_count_reddit_min' => :'social.shares.count.reddit.min',
    :'source_domain' => :'source.domain',
    :'source_id' => :'source.id',
    :'source_links_in_count_max' => :'source.links.in.count.max',
    :'source_links_in_count_min' => :'source.links.in.count.min',
    :'source_locations_city' => :'source.locations.city',
    :'source_locations_country' => :'source.locations.country',
    :'source_locations_state' => :'source.locations.state',
    :'source_rankings_alexa_country' => :'source.rankings.alexa.country',
    :'source_rankings_alexa_rank_max' => :'source.rankings.alexa.rank.max',
    :'source_rankings_alexa_rank_min' => :'source.rankings.alexa.rank.min',
    :'source_scopes_city' => :'source.scopes.city',
    :'source_scopes_country' => :'source.scopes.country',
    :'source_scopes_level' => :'source.scopes.level',
    :'source_scopes_state' => :'source.scopes.state',
    :'story_url' => :'story_url',
    :'story_language' => :'story_language',
    :'text' => :'text',
    :'title' => :'title',
    :'translations_en_body' => :'translations.en.body',
    :'translations_en_text' => :'translations.en.text',
    :'translations_en_title' => :'translations.en.title',
    :'entity' => :'entity'
  }
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



590
591
592
# File 'lib/aylien_news_api/models/parameter.rb', line 590

def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end

.openapi_nullableObject

List of attributes with nullable: true



254
255
256
257
# File 'lib/aylien_news_api/models/parameter.rb', line 254

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

.openapi_typesObject

Attribute type mapping.



192
193
194
195
196
197
198
199
200
201
202
203
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
# File 'lib/aylien_news_api/models/parameter.rb', line 192

def self.openapi_types
  {
    :'author_id' => :'Query',
    :'author_name' => :'Query',
    :'body' => :'Query',
    :'categories_confident' => :'Query',
    :'categories_id' => :'Query',
    :'categories_level' => :'Query',
    :'categories_taxonomy' => :'Query',
    :'clusters' => :'Query',
    :'links_permalink' => :'Query',
    :'entities_id' => :'Query',
    :'entities_surface_forms_text' => :'Query',
    :'entities_links_wikipedia' => :'Query',
    :'entities_links_wikidata' => :'Query',
    :'entities_title_surface_forms_text' => :'Query',
    :'entities_body_surface_forms_text' => :'Query',
    :'id' => :'Query',
    :'language' => :'Query',
    :'media_images_content_length_max' => :'Query',
    :'media_images_content_length_min' => :'Query',
    :'media_images_count_max' => :'Query',
    :'media_images_count_min' => :'Query',
    :'media_images_format' => :'Query',
    :'media_images_height_max' => :'Query',
    :'media_images_height_min' => :'Query',
    :'media_images_width_max' => :'Query',
    :'media_images_width_min' => :'Query',
    :'media_videos_count_max' => :'Query',
    :'media_videos_count_min' => :'Query',
    :'sentiment_body_polarity' => :'Query',
    :'sentiment_title_polarity' => :'Query',
    :'social_shares_count_facebook_max' => :'Query',
    :'social_shares_count_facebook_min' => :'Query',
    :'social_shares_count_reddit_max' => :'Query',
    :'social_shares_count_reddit_min' => :'Query',
    :'source_domain' => :'Query',
    :'source_id' => :'Query',
    :'source_links_in_count_max' => :'Query',
    :'source_links_in_count_min' => :'Query',
    :'source_locations_city' => :'Query',
    :'source_locations_country' => :'Query',
    :'source_locations_state' => :'Query',
    :'source_rankings_alexa_country' => :'Query',
    :'source_rankings_alexa_rank_max' => :'Query',
    :'source_rankings_alexa_rank_min' => :'Query',
    :'source_scopes_city' => :'Query',
    :'source_scopes_country' => :'Query',
    :'source_scopes_level' => :'Query',
    :'source_scopes_state' => :'Query',
    :'story_url' => :'Query',
    :'story_language' => :'Query',
    :'text' => :'Query',
    :'title' => :'Query',
    :'translations_en_body' => :'Query',
    :'translations_en_text' => :'Query',
    :'translations_en_title' => :'Query',
    :'entity' => :'OneOfNestedEntityLogicals'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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
# File 'lib/aylien_news_api/models/parameter.rb', line 514

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      author_id == o.author_id &&
      author_name == o.author_name &&
      body == o.body &&
      categories_confident == o.categories_confident &&
      categories_id == o.categories_id &&
      categories_level == o.categories_level &&
      categories_taxonomy == o.categories_taxonomy &&
      clusters == o.clusters &&
      links_permalink == o.links_permalink &&
      entities_id == o.entities_id &&
      entities_surface_forms_text == o.entities_surface_forms_text &&
      entities_links_wikipedia == o.entities_links_wikipedia &&
      entities_links_wikidata == o.entities_links_wikidata &&
      entities_title_surface_forms_text == o.entities_title_surface_forms_text &&
      entities_body_surface_forms_text == o.entities_body_surface_forms_text &&
      id == o.id &&
      language == o.language &&
      media_images_content_length_max == o.media_images_content_length_max &&
      media_images_content_length_min == o.media_images_content_length_min &&
      media_images_count_max == o.media_images_count_max &&
      media_images_count_min == o.media_images_count_min &&
      media_images_format == o.media_images_format &&
      media_images_height_max == o.media_images_height_max &&
      media_images_height_min == o.media_images_height_min &&
      media_images_width_max == o.media_images_width_max &&
      media_images_width_min == o.media_images_width_min &&
      media_videos_count_max == o.media_videos_count_max &&
      media_videos_count_min == o.media_videos_count_min &&
      sentiment_body_polarity == o.sentiment_body_polarity &&
      sentiment_title_polarity == o.sentiment_title_polarity &&
      social_shares_count_facebook_max == o.social_shares_count_facebook_max &&
      social_shares_count_facebook_min == o.social_shares_count_facebook_min &&
      social_shares_count_reddit_max == o.social_shares_count_reddit_max &&
      social_shares_count_reddit_min == o.social_shares_count_reddit_min &&
      source_domain == o.source_domain &&
      source_id == o.source_id &&
      source_links_in_count_max == o.source_links_in_count_max &&
      source_links_in_count_min == o.source_links_in_count_min &&
      source_locations_city == o.source_locations_city &&
      source_locations_country == o.source_locations_country &&
      source_locations_state == o.source_locations_state &&
      source_rankings_alexa_country == o.source_rankings_alexa_country &&
      source_rankings_alexa_rank_max == o.source_rankings_alexa_rank_max &&
      source_rankings_alexa_rank_min == o.source_rankings_alexa_rank_min &&
      source_scopes_city == o.source_scopes_city &&
      source_scopes_country == o.source_scopes_country &&
      source_scopes_level == o.source_scopes_level &&
      source_scopes_state == o.source_scopes_state &&
      story_url == o.story_url &&
      story_language == o.story_language &&
      text == o.text &&
      title == o.title &&
      translations_en_body == o.translations_en_body &&
      translations_en_text == o.translations_en_text &&
      translations_en_title == o.translations_en_title &&
      entity == o.entity
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



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
648
649
650
651
652
653
# File 'lib/aylien_news_api/models/parameter.rb', line 618

def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :Boolean
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    AylienNewsApi.const_get(type).build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



687
688
689
690
691
692
693
694
695
696
697
698
699
# File 'lib/aylien_news_api/models/parameter.rb', line 687

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
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



597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
# File 'lib/aylien_news_api/models/parameter.rb', line 597

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.openapi_types.each_pair do |key, type|
    if 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[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


577
578
579
# File 'lib/aylien_news_api/models/parameter.rb', line 577

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



583
584
585
# File 'lib/aylien_news_api/models/parameter.rb', line 583

def hash
  [author_id, author_name, body, categories_confident, categories_id, categories_level, categories_taxonomy, clusters, links_permalink, entities_id, entities_surface_forms_text, entities_links_wikipedia, entities_links_wikidata, entities_title_surface_forms_text, entities_body_surface_forms_text, id, language, media_images_content_length_max, media_images_content_length_min, media_images_count_max, media_images_count_min, media_images_format, media_images_height_max, media_images_height_min, media_images_width_max, media_images_width_min, media_videos_count_max, media_videos_count_min, sentiment_body_polarity, sentiment_title_polarity, social_shares_count_facebook_max, social_shares_count_facebook_min, social_shares_count_reddit_max, social_shares_count_reddit_min, source_domain, source_id, source_links_in_count_max, source_links_in_count_min, source_locations_city, source_locations_country, source_locations_state, source_rankings_alexa_country, source_rankings_alexa_rank_max, source_rankings_alexa_rank_min, source_scopes_city, source_scopes_country, source_scopes_level, source_scopes_state, story_url, story_language, text, title, translations_en_body, translations_en_text, translations_en_title, entity].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



501
502
503
504
# File 'lib/aylien_news_api/models/parameter.rb', line 501

def list_invalid_properties
  invalid_properties = Array.new
  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



663
664
665
# File 'lib/aylien_news_api/models/parameter.rb', line 663

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



669
670
671
672
673
674
675
676
677
678
679
680
681
# File 'lib/aylien_news_api/models/parameter.rb', line 669

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

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



657
658
659
# File 'lib/aylien_news_api/models/parameter.rb', line 657

def to_s
  to_hash.to_s
end

#valid?Boolean

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

Returns:

  • (Boolean)

    true if the model is valid



508
509
510
# File 'lib/aylien_news_api/models/parameter.rb', line 508

def valid?
  true
end