hermoso 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +53 -0
  4. data/lib/hermoso/api/account_api.rb +156 -0
  5. data/lib/hermoso/api/analytics_api.rb +400 -0
  6. data/lib/hermoso/api/brands_api.rb +82 -0
  7. data/lib/hermoso/api/campaign_profit_api.rb +103 -0
  8. data/lib/hermoso/api/campaign_results_api.rb +289 -0
  9. data/lib/hermoso/api/channels_api.rb +82 -0
  10. data/lib/hermoso/api/clones_api.rb +93 -0
  11. data/lib/hermoso/api/connect_links_api.rb +228 -0
  12. data/lib/hermoso/api/connect_redirects_api.rb +153 -0
  13. data/lib/hermoso/api/connections_api.rb +151 -0
  14. data/lib/hermoso/api/credits_api.rb +85 -0
  15. data/lib/hermoso/api/edits_api.rb +102 -0
  16. data/lib/hermoso/api/events_api.rb +932 -0
  17. data/lib/hermoso/api/generations_api.rb +173 -0
  18. data/lib/hermoso/api/jobs_api.rb +226 -0
  19. data/lib/hermoso/api/library_api.rb +88 -0
  20. data/lib/hermoso/api/media_api.rb +158 -0
  21. data/lib/hermoso/api/models_api.rb +88 -0
  22. data/lib/hermoso/api/posts_api.rb +377 -0
  23. data/lib/hermoso/api/recasts_api.rb +102 -0
  24. data/lib/hermoso/api/signup_api.rb +164 -0
  25. data/lib/hermoso/api/tag_api.rb +570 -0
  26. data/lib/hermoso/api/tools_api.rb +252 -0
  27. data/lib/hermoso/api_client.rb +441 -0
  28. data/lib/hermoso/api_error.rb +58 -0
  29. data/lib/hermoso/api_model_base.rb +92 -0
  30. data/lib/hermoso/configuration.rb +400 -0
  31. data/lib/hermoso/helpers.rb +116 -0
  32. data/lib/hermoso/models/asset.rb +241 -0
  33. data/lib/hermoso/models/asset_list.rb +203 -0
  34. data/lib/hermoso/models/best_time.rb +250 -0
  35. data/lib/hermoso/models/best_time_slots_inner.rb +205 -0
  36. data/lib/hermoso/models/brand.rb +273 -0
  37. data/lib/hermoso/models/brand_list.rb +203 -0
  38. data/lib/hermoso/models/campaign_profit.rb +261 -0
  39. data/lib/hermoso/models/campaign_results.rb +250 -0
  40. data/lib/hermoso/models/campaign_results_upload.rb +171 -0
  41. data/lib/hermoso/models/campaign_results_upload_rows_inner.rb +259 -0
  42. data/lib/hermoso/models/channel.rb +326 -0
  43. data/lib/hermoso/models/channel_carousel.rb +188 -0
  44. data/lib/hermoso/models/channel_list.rb +203 -0
  45. data/lib/hermoso/models/clone_quote.rb +243 -0
  46. data/lib/hermoso/models/clone_quote_request.rb +227 -0
  47. data/lib/hermoso/models/clone_quote_step.rb +201 -0
  48. data/lib/hermoso/models/connect_link.rb +321 -0
  49. data/lib/hermoso/models/connect_link_account.rb +178 -0
  50. data/lib/hermoso/models/connect_link_create.rb +236 -0
  51. data/lib/hermoso/models/connect_link_error.rb +169 -0
  52. data/lib/hermoso/models/connect_redirects.rb +203 -0
  53. data/lib/hermoso/models/connect_redirects_set.rb +180 -0
  54. data/lib/hermoso/models/connection.rb +250 -0
  55. data/lib/hermoso/models/connection_accounts_inner.rb +178 -0
  56. data/lib/hermoso/models/connection_deleted.rb +228 -0
  57. data/lib/hermoso/models/connection_list.rb +203 -0
  58. data/lib/hermoso/models/contact_email.rb +189 -0
  59. data/lib/hermoso/models/contact_email_resend.rb +161 -0
  60. data/lib/hermoso/models/content_decay.rb +223 -0
  61. data/lib/hermoso/models/content_decay_buckets_inner.rb +187 -0
  62. data/lib/hermoso/models/conversion_destination_create.rb +317 -0
  63. data/lib/hermoso/models/conversion_destination_list.rb +223 -0
  64. data/lib/hermoso/models/conversion_destination_result.rb +221 -0
  65. data/lib/hermoso/models/conversion_event_list.rb +230 -0
  66. data/lib/hermoso/models/conversion_event_update.rb +195 -0
  67. data/lib/hermoso/models/conversion_events_send.rb +236 -0
  68. data/lib/hermoso/models/conversion_events_send_events_inner.rb +314 -0
  69. data/lib/hermoso/models/conversion_insights.rb +265 -0
  70. data/lib/hermoso/models/conversion_send_result.rb +257 -0
  71. data/lib/hermoso/models/conversion_send_result_destinations_inner.rb +286 -0
  72. data/lib/hermoso/models/credits.rb +240 -0
  73. data/lib/hermoso/models/credits_limits.rb +234 -0
  74. data/lib/hermoso/models/credits_limits_brands_inner.rb +218 -0
  75. data/lib/hermoso/models/credits_limits_brands_inner_members_inner.rb +196 -0
  76. data/lib/hermoso/models/deleted.rb +210 -0
  77. data/lib/hermoso/models/edit.rb +278 -0
  78. data/lib/hermoso/models/edit_create.rb +317 -0
  79. data/lib/hermoso/models/edit_preview.rb +199 -0
  80. data/lib/hermoso/models/edit_quote.rb +231 -0
  81. data/lib/hermoso/models/error.rb +198 -0
  82. data/lib/hermoso/models/error_error.rb +335 -0
  83. data/lib/hermoso/models/error_error_unknown_arguments_inner.rb +171 -0
  84. data/lib/hermoso/models/follower_history.rb +239 -0
  85. data/lib/hermoso/models/follower_history_accounts_inner.rb +207 -0
  86. data/lib/hermoso/models/follower_history_accounts_inner_points_inner.rb +178 -0
  87. data/lib/hermoso/models/follower_history_date_range.rb +169 -0
  88. data/lib/hermoso/models/generation_create.rb +435 -0
  89. data/lib/hermoso/models/generation_quote.rb +263 -0
  90. data/lib/hermoso/models/hermoso_tag.rb +230 -0
  91. data/lib/hermoso/models/hermoso_tag_audience_action.rb +325 -0
  92. data/lib/hermoso/models/hermoso_tag_audiences.rb +241 -0
  93. data/lib/hermoso/models/hermoso_tag_events.rb +223 -0
  94. data/lib/hermoso/models/hermoso_tag_events_send.rb +179 -0
  95. data/lib/hermoso/models/hermoso_tag_events_sent.rb +221 -0
  96. data/lib/hermoso/models/hermoso_tag_install.rb +246 -0
  97. data/lib/hermoso/models/hermoso_tag_install_result.rb +255 -0
  98. data/lib/hermoso/models/hermoso_tag_report.rb +261 -0
  99. data/lib/hermoso/models/hermoso_tag_tag.rb +211 -0
  100. data/lib/hermoso/models/hermoso_tag_update.rb +356 -0
  101. data/lib/hermoso/models/inbox_stats.rb +315 -0
  102. data/lib/hermoso/models/job.rb +359 -0
  103. data/lib/hermoso/models/job_cancel.rb +221 -0
  104. data/lib/hermoso/models/job_list.rb +232 -0
  105. data/lib/hermoso/models/media.rb +230 -0
  106. data/lib/hermoso/models/model.rb +327 -0
  107. data/lib/hermoso/models/model_list.rb +203 -0
  108. data/lib/hermoso/models/post.rb +382 -0
  109. data/lib/hermoso/models/post_create.rb +318 -0
  110. data/lib/hermoso/models/post_create_media_inner.rb +104 -0
  111. data/lib/hermoso/models/post_create_media_inner_one_of.rb +201 -0
  112. data/lib/hermoso/models/post_list.rb +221 -0
  113. data/lib/hermoso/models/post_media_inner.rb +169 -0
  114. data/lib/hermoso/models/post_results_inner.rb +205 -0
  115. data/lib/hermoso/models/post_results_inner_first_comment.rb +188 -0
  116. data/lib/hermoso/models/posting_frequency.rb +241 -0
  117. data/lib/hermoso/models/posting_frequency_frequency_inner.rb +205 -0
  118. data/lib/hermoso/models/profit_settings.rb +230 -0
  119. data/lib/hermoso/models/recast.rb +308 -0
  120. data/lib/hermoso/models/recast_create.rb +274 -0
  121. data/lib/hermoso/models/recast_person.rb +182 -0
  122. data/lib/hermoso/models/recast_quote.rb +232 -0
  123. data/lib/hermoso/models/recast_step.rb +201 -0
  124. data/lib/hermoso/models/recast_subject.rb +170 -0
  125. data/lib/hermoso/models/recast_voice.rb +178 -0
  126. data/lib/hermoso/models/recast_window.rb +179 -0
  127. data/lib/hermoso/models/signup.rb +329 -0
  128. data/lib/hermoso/models/signup_claim.rb +178 -0
  129. data/lib/hermoso/models/signup_create.rb +247 -0
  130. data/lib/hermoso/models/tool.rb +360 -0
  131. data/lib/hermoso/models/tool_invoke.rb +169 -0
  132. data/lib/hermoso/models/tool_job.rb +262 -0
  133. data/lib/hermoso/models/tool_list.rb +273 -0
  134. data/lib/hermoso/models/tool_list_areas_inner.rb +219 -0
  135. data/lib/hermoso/models/tool_list_search.rb +181 -0
  136. data/lib/hermoso/models/tool_result.rb +245 -0
  137. data/lib/hermoso/models/tool_result_images_inner.rb +170 -0
  138. data/lib/hermoso/models/warning.rb +244 -0
  139. data/lib/hermoso/spec.rb +8 -0
  140. data/lib/hermoso/version.rb +15 -0
  141. data/lib/hermoso.rb +174 -0
  142. metadata +237 -0
@@ -0,0 +1,317 @@
1
+ =begin
2
+ #Hermoso API
3
+
4
+ #The Hermoso public API. Guide: https://hermoso.ai/docs/api/ · OpenAPI: https://app.hermoso.ai/openapi.json
5
+
6
+ The version of the OpenAPI document: 2026-08-26
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.27.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Hermoso
17
+ class ConversionDestinationCreate < ApiModelBase
18
+ # meta, tiktok, linkedin, snapchat, reddit, pinterest, x, microsoft, chatgpt, applovin or amazon.
19
+ attr_accessor :platform
20
+
21
+ attr_accessor :label
22
+
23
+ attr_accessor :pixel_id
24
+
25
+ attr_accessor :ad_account_id
26
+
27
+ attr_accessor :advertiser_id
28
+
29
+ attr_accessor :event_source_id
30
+
31
+ attr_accessor :event_source
32
+
33
+ attr_accessor :conversion_id
34
+
35
+ attr_accessor :conversion_name
36
+
37
+ attr_accessor :event_id
38
+
39
+ attr_accessor :pixel_snippet_id
40
+
41
+ attr_accessor :api_key
42
+
43
+ attr_accessor :amazon_profile_id
44
+
45
+ attr_accessor :country_code
46
+
47
+ attr_accessor :event_names
48
+
49
+ attr_accessor :event_map
50
+
51
+ # Attribute mapping from ruby-style variable name to JSON key.
52
+ def self.attribute_map
53
+ {
54
+ :'platform' => :'platform',
55
+ :'label' => :'label',
56
+ :'pixel_id' => :'pixel_id',
57
+ :'ad_account_id' => :'ad_account_id',
58
+ :'advertiser_id' => :'advertiser_id',
59
+ :'event_source_id' => :'event_source_id',
60
+ :'event_source' => :'event_source',
61
+ :'conversion_id' => :'conversion_id',
62
+ :'conversion_name' => :'conversion_name',
63
+ :'event_id' => :'event_id',
64
+ :'pixel_snippet_id' => :'pixel_snippet_id',
65
+ :'api_key' => :'api_key',
66
+ :'amazon_profile_id' => :'amazon_profile_id',
67
+ :'country_code' => :'country_code',
68
+ :'event_names' => :'event_names',
69
+ :'event_map' => :'event_map'
70
+ }
71
+ end
72
+
73
+ # Returns attribute mapping this model knows about
74
+ def self.acceptable_attribute_map
75
+ attribute_map
76
+ end
77
+
78
+ # Returns all the JSON keys this model knows about
79
+ def self.acceptable_attributes
80
+ acceptable_attribute_map.values
81
+ end
82
+
83
+ # Attribute type mapping.
84
+ def self.openapi_types
85
+ {
86
+ :'platform' => :'String',
87
+ :'label' => :'String',
88
+ :'pixel_id' => :'String',
89
+ :'ad_account_id' => :'String',
90
+ :'advertiser_id' => :'String',
91
+ :'event_source_id' => :'String',
92
+ :'event_source' => :'String',
93
+ :'conversion_id' => :'String',
94
+ :'conversion_name' => :'String',
95
+ :'event_id' => :'String',
96
+ :'pixel_snippet_id' => :'String',
97
+ :'api_key' => :'String',
98
+ :'amazon_profile_id' => :'String',
99
+ :'country_code' => :'String',
100
+ :'event_names' => :'Array<String>',
101
+ :'event_map' => :'Hash<String, String>'
102
+ }
103
+ end
104
+
105
+ # List of attributes with nullable: true
106
+ def self.openapi_nullable
107
+ Set.new([
108
+ ])
109
+ end
110
+
111
+ # Returns attribute type mapping
112
+ def self.acceptable_openapi_types
113
+ openapi_types
114
+ end
115
+
116
+ # Returns the nullable attributes
117
+ def self.acceptable_openapi_nullable
118
+ openapi_nullable
119
+ end
120
+
121
+ # Initializes the object
122
+ # @param [Hash] attributes Model attributes in the form of hash
123
+ def initialize(attributes = {})
124
+ if (!attributes.is_a?(Hash))
125
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hermoso::ConversionDestinationCreate` initialize method"
126
+ end
127
+
128
+ # check to see if the attribute exists and convert string to symbol for hash key
129
+ acceptable_attribute_map = self.class.acceptable_attribute_map
130
+ attributes = attributes.each_with_object({}) { |(k, v), h|
131
+ if (!acceptable_attribute_map.key?(k.to_sym))
132
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hermoso::ConversionDestinationCreate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
133
+ end
134
+ h[k.to_sym] = v
135
+ }
136
+
137
+ if attributes.key?(:'platform')
138
+ self.platform = attributes[:'platform']
139
+ else
140
+ self.platform = nil
141
+ end
142
+
143
+ if attributes.key?(:'label')
144
+ self.label = attributes[:'label']
145
+ end
146
+
147
+ if attributes.key?(:'pixel_id')
148
+ self.pixel_id = attributes[:'pixel_id']
149
+ end
150
+
151
+ if attributes.key?(:'ad_account_id')
152
+ self.ad_account_id = attributes[:'ad_account_id']
153
+ end
154
+
155
+ if attributes.key?(:'advertiser_id')
156
+ self.advertiser_id = attributes[:'advertiser_id']
157
+ end
158
+
159
+ if attributes.key?(:'event_source_id')
160
+ self.event_source_id = attributes[:'event_source_id']
161
+ end
162
+
163
+ if attributes.key?(:'event_source')
164
+ self.event_source = attributes[:'event_source']
165
+ end
166
+
167
+ if attributes.key?(:'conversion_id')
168
+ self.conversion_id = attributes[:'conversion_id']
169
+ end
170
+
171
+ if attributes.key?(:'conversion_name')
172
+ self.conversion_name = attributes[:'conversion_name']
173
+ end
174
+
175
+ if attributes.key?(:'event_id')
176
+ self.event_id = attributes[:'event_id']
177
+ end
178
+
179
+ if attributes.key?(:'pixel_snippet_id')
180
+ self.pixel_snippet_id = attributes[:'pixel_snippet_id']
181
+ end
182
+
183
+ if attributes.key?(:'api_key')
184
+ self.api_key = attributes[:'api_key']
185
+ end
186
+
187
+ if attributes.key?(:'amazon_profile_id')
188
+ self.amazon_profile_id = attributes[:'amazon_profile_id']
189
+ end
190
+
191
+ if attributes.key?(:'country_code')
192
+ self.country_code = attributes[:'country_code']
193
+ end
194
+
195
+ if attributes.key?(:'event_names')
196
+ if (value = attributes[:'event_names']).is_a?(Array)
197
+ self.event_names = value
198
+ end
199
+ end
200
+
201
+ if attributes.key?(:'event_map')
202
+ if (value = attributes[:'event_map']).is_a?(Hash)
203
+ self.event_map = value
204
+ end
205
+ end
206
+ end
207
+
208
+ # Show invalid properties with the reasons. Usually used together with valid?
209
+ # @return Array for valid properties with the reasons
210
+ def list_invalid_properties
211
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
212
+ invalid_properties = Array.new
213
+ if @platform.nil?
214
+ invalid_properties.push('invalid value for "platform", platform cannot be nil.')
215
+ end
216
+
217
+ invalid_properties
218
+ end
219
+
220
+ # Check to see if the all the properties in the model are valid
221
+ # @return true if the model is valid
222
+ def valid?
223
+ warn '[DEPRECATED] the `valid?` method is obsolete'
224
+ return false if @platform.nil?
225
+ true
226
+ end
227
+
228
+ # Custom attribute writer method with validation
229
+ # @param [Object] platform Value to be assigned
230
+ def platform=(platform)
231
+ if platform.nil?
232
+ fail ArgumentError, 'platform cannot be nil'
233
+ end
234
+
235
+ @platform = platform
236
+ end
237
+
238
+ # Checks equality by comparing each attribute.
239
+ # @param [Object] Object to be compared
240
+ def ==(o)
241
+ return true if self.equal?(o)
242
+ self.class == o.class &&
243
+ platform == o.platform &&
244
+ label == o.label &&
245
+ pixel_id == o.pixel_id &&
246
+ ad_account_id == o.ad_account_id &&
247
+ advertiser_id == o.advertiser_id &&
248
+ event_source_id == o.event_source_id &&
249
+ event_source == o.event_source &&
250
+ conversion_id == o.conversion_id &&
251
+ conversion_name == o.conversion_name &&
252
+ event_id == o.event_id &&
253
+ pixel_snippet_id == o.pixel_snippet_id &&
254
+ api_key == o.api_key &&
255
+ amazon_profile_id == o.amazon_profile_id &&
256
+ country_code == o.country_code &&
257
+ event_names == o.event_names &&
258
+ event_map == o.event_map
259
+ end
260
+
261
+ # @see the `==` method
262
+ # @param [Object] Object to be compared
263
+ def eql?(o)
264
+ self == o
265
+ end
266
+
267
+ # Calculates hash code according to all attributes.
268
+ # @return [Integer] Hash code
269
+ def hash
270
+ [platform, label, pixel_id, ad_account_id, advertiser_id, event_source_id, event_source, conversion_id, conversion_name, event_id, pixel_snippet_id, api_key, amazon_profile_id, country_code, event_names, event_map].hash
271
+ end
272
+
273
+ # Builds the object from hash
274
+ # @param [Hash] attributes Model attributes in the form of hash
275
+ # @return [Object] Returns the model itself
276
+ def self.build_from_hash(attributes)
277
+ return nil unless attributes.is_a?(Hash)
278
+ attributes = attributes.transform_keys(&:to_sym)
279
+ # include attributes inherited from allOf parents (the nearest declaration wins)
280
+ map = acceptable_attribute_map
281
+ transformed_hash = {}
282
+ acceptable_openapi_types.each_pair do |key, type|
283
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
284
+ transformed_hash["#{key}"] = nil
285
+ elsif type =~ /\AArray<(.*)>/i
286
+ # check to ensure the input is an array given that the attribute
287
+ # is documented as an array but the input is not
288
+ if attributes[map[key]].is_a?(Array)
289
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
290
+ end
291
+ elsif !attributes[map[key]].nil?
292
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
293
+ end
294
+ end
295
+ new(transformed_hash)
296
+ end
297
+
298
+ # Returns the object in the form of hash
299
+ # @return [Hash] Returns the object in the form of hash
300
+ def to_hash
301
+ hash = {}
302
+ # include attributes inherited from allOf parents (the nearest declaration wins)
303
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
304
+ value = self.send(attr)
305
+ if value.nil?
306
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
307
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
308
+ end
309
+
310
+ hash[param] = _to_hash(value)
311
+ end
312
+ hash
313
+ end
314
+
315
+ end
316
+
317
+ end
@@ -0,0 +1,223 @@
1
+ =begin
2
+ #Hermoso API
3
+
4
+ #The Hermoso public API. Guide: https://hermoso.ai/docs/api/ · OpenAPI: https://app.hermoso.ai/openapi.json
5
+
6
+ The version of the OpenAPI document: 2026-08-26
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.27.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Hermoso
17
+ class ConversionDestinationList < ApiModelBase
18
+ attr_accessor :object
19
+
20
+ attr_accessor :data
21
+
22
+ attr_accessor :platforms
23
+
24
+ attr_accessor :note
25
+
26
+ class EnumAttributeValidator
27
+ attr_reader :datatype
28
+ attr_reader :allowable_values
29
+
30
+ def initialize(datatype, allowable_values)
31
+ @allowable_values = allowable_values.map do |value|
32
+ case datatype.to_s
33
+ when /Integer/i
34
+ value.to_i
35
+ when /Float/i
36
+ value.to_f
37
+ else
38
+ value
39
+ end
40
+ end
41
+ end
42
+
43
+ def valid?(value)
44
+ !value || allowable_values.include?(value)
45
+ end
46
+ end
47
+
48
+ # Attribute mapping from ruby-style variable name to JSON key.
49
+ def self.attribute_map
50
+ {
51
+ :'object' => :'object',
52
+ :'data' => :'data',
53
+ :'platforms' => :'platforms',
54
+ :'note' => :'note'
55
+ }
56
+ end
57
+
58
+ # Returns attribute mapping this model knows about
59
+ def self.acceptable_attribute_map
60
+ attribute_map
61
+ end
62
+
63
+ # Returns all the JSON keys this model knows about
64
+ def self.acceptable_attributes
65
+ acceptable_attribute_map.values
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.openapi_types
70
+ {
71
+ :'object' => :'String',
72
+ :'data' => :'Array<Hash<String, Object>>',
73
+ :'platforms' => :'Array<Hash<String, Object>>',
74
+ :'note' => :'String'
75
+ }
76
+ end
77
+
78
+ # List of attributes with nullable: true
79
+ def self.openapi_nullable
80
+ Set.new([
81
+ ])
82
+ end
83
+
84
+ # Returns attribute type mapping
85
+ def self.acceptable_openapi_types
86
+ openapi_types
87
+ end
88
+
89
+ # Returns the nullable attributes
90
+ def self.acceptable_openapi_nullable
91
+ openapi_nullable
92
+ end
93
+
94
+ # Initializes the object
95
+ # @param [Hash] attributes Model attributes in the form of hash
96
+ def initialize(attributes = {})
97
+ if (!attributes.is_a?(Hash))
98
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hermoso::ConversionDestinationList` initialize method"
99
+ end
100
+
101
+ # check to see if the attribute exists and convert string to symbol for hash key
102
+ acceptable_attribute_map = self.class.acceptable_attribute_map
103
+ attributes = attributes.each_with_object({}) { |(k, v), h|
104
+ if (!acceptable_attribute_map.key?(k.to_sym))
105
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hermoso::ConversionDestinationList`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
106
+ end
107
+ h[k.to_sym] = v
108
+ }
109
+
110
+ if attributes.key?(:'object')
111
+ self.object = attributes[:'object']
112
+ end
113
+
114
+ if attributes.key?(:'data')
115
+ if (value = attributes[:'data']).is_a?(Array)
116
+ self.data = value
117
+ end
118
+ end
119
+
120
+ if attributes.key?(:'platforms')
121
+ if (value = attributes[:'platforms']).is_a?(Array)
122
+ self.platforms = value
123
+ end
124
+ end
125
+
126
+ if attributes.key?(:'note')
127
+ self.note = attributes[:'note']
128
+ end
129
+ end
130
+
131
+ # Show invalid properties with the reasons. Usually used together with valid?
132
+ # @return Array for valid properties with the reasons
133
+ def list_invalid_properties
134
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
135
+ invalid_properties = Array.new
136
+ invalid_properties
137
+ end
138
+
139
+ # Check to see if the all the properties in the model are valid
140
+ # @return true if the model is valid
141
+ def valid?
142
+ warn '[DEPRECATED] the `valid?` method is obsolete'
143
+ object_validator = EnumAttributeValidator.new('String', ["list", "unknown_default_open_api"])
144
+ return false unless object_validator.valid?(@object)
145
+ true
146
+ end
147
+
148
+ # Custom attribute writer method checking allowed values (enum).
149
+ # @param [Object] object Object to be assigned
150
+ def object=(object)
151
+ validator = EnumAttributeValidator.new('String', ["list", "unknown_default_open_api"])
152
+ object = 'unknown_default_open_api' unless validator.valid?(object)
153
+ @object = object
154
+ end
155
+
156
+ # Checks equality by comparing each attribute.
157
+ # @param [Object] Object to be compared
158
+ def ==(o)
159
+ return true if self.equal?(o)
160
+ self.class == o.class &&
161
+ object == o.object &&
162
+ data == o.data &&
163
+ platforms == o.platforms &&
164
+ note == o.note
165
+ end
166
+
167
+ # @see the `==` method
168
+ # @param [Object] Object to be compared
169
+ def eql?(o)
170
+ self == o
171
+ end
172
+
173
+ # Calculates hash code according to all attributes.
174
+ # @return [Integer] Hash code
175
+ def hash
176
+ [object, data, platforms, note].hash
177
+ end
178
+
179
+ # Builds the object from hash
180
+ # @param [Hash] attributes Model attributes in the form of hash
181
+ # @return [Object] Returns the model itself
182
+ def self.build_from_hash(attributes)
183
+ return nil unless attributes.is_a?(Hash)
184
+ attributes = attributes.transform_keys(&:to_sym)
185
+ # include attributes inherited from allOf parents (the nearest declaration wins)
186
+ map = acceptable_attribute_map
187
+ transformed_hash = {}
188
+ acceptable_openapi_types.each_pair do |key, type|
189
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
190
+ transformed_hash["#{key}"] = nil
191
+ elsif type =~ /\AArray<(.*)>/i
192
+ # check to ensure the input is an array given that the attribute
193
+ # is documented as an array but the input is not
194
+ if attributes[map[key]].is_a?(Array)
195
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
196
+ end
197
+ elsif !attributes[map[key]].nil?
198
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
199
+ end
200
+ end
201
+ new(transformed_hash)
202
+ end
203
+
204
+ # Returns the object in the form of hash
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_hash
207
+ hash = {}
208
+ # include attributes inherited from allOf parents (the nearest declaration wins)
209
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
210
+ value = self.send(attr)
211
+ if value.nil?
212
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
213
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
214
+ end
215
+
216
+ hash[param] = _to_hash(value)
217
+ end
218
+ hash
219
+ end
220
+
221
+ end
222
+
223
+ end