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,259 @@
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 CampaignResultsUploadRowsInner < ApiModelBase
18
+ attr_accessor :date
19
+
20
+ attr_accessor :campaign_id
21
+
22
+ attr_accessor :utm_campaign
23
+
24
+ attr_accessor :campaign_name
25
+
26
+ attr_accessor :ad_account_id
27
+
28
+ attr_accessor :platform
29
+
30
+ attr_accessor :currency
31
+
32
+ attr_accessor :values
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ def self.attribute_map
36
+ {
37
+ :'date' => :'date',
38
+ :'campaign_id' => :'campaign_id',
39
+ :'utm_campaign' => :'utm_campaign',
40
+ :'campaign_name' => :'campaign_name',
41
+ :'ad_account_id' => :'ad_account_id',
42
+ :'platform' => :'platform',
43
+ :'currency' => :'currency',
44
+ :'values' => :'values'
45
+ }
46
+ end
47
+
48
+ # Returns attribute mapping this model knows about
49
+ def self.acceptable_attribute_map
50
+ attribute_map
51
+ end
52
+
53
+ # Returns all the JSON keys this model knows about
54
+ def self.acceptable_attributes
55
+ acceptable_attribute_map.values
56
+ end
57
+
58
+ # Attribute type mapping.
59
+ def self.openapi_types
60
+ {
61
+ :'date' => :'String',
62
+ :'campaign_id' => :'String',
63
+ :'utm_campaign' => :'String',
64
+ :'campaign_name' => :'String',
65
+ :'ad_account_id' => :'String',
66
+ :'platform' => :'String',
67
+ :'currency' => :'String',
68
+ :'values' => :'Hash<String, Float>'
69
+ }
70
+ end
71
+
72
+ # List of attributes with nullable: true
73
+ def self.openapi_nullable
74
+ Set.new([
75
+ ])
76
+ end
77
+
78
+ # Returns attribute type mapping
79
+ def self.acceptable_openapi_types
80
+ openapi_types
81
+ end
82
+
83
+ # Returns the nullable attributes
84
+ def self.acceptable_openapi_nullable
85
+ openapi_nullable
86
+ end
87
+
88
+ # Initializes the object
89
+ # @param [Hash] attributes Model attributes in the form of hash
90
+ def initialize(attributes = {})
91
+ if (!attributes.is_a?(Hash))
92
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hermoso::CampaignResultsUploadRowsInner` initialize method"
93
+ end
94
+
95
+ # check to see if the attribute exists and convert string to symbol for hash key
96
+ acceptable_attribute_map = self.class.acceptable_attribute_map
97
+ attributes = attributes.each_with_object({}) { |(k, v), h|
98
+ if (!acceptable_attribute_map.key?(k.to_sym))
99
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hermoso::CampaignResultsUploadRowsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
100
+ end
101
+ h[k.to_sym] = v
102
+ }
103
+
104
+ if attributes.key?(:'date')
105
+ self.date = attributes[:'date']
106
+ else
107
+ self.date = nil
108
+ end
109
+
110
+ if attributes.key?(:'campaign_id')
111
+ self.campaign_id = attributes[:'campaign_id']
112
+ end
113
+
114
+ if attributes.key?(:'utm_campaign')
115
+ self.utm_campaign = attributes[:'utm_campaign']
116
+ end
117
+
118
+ if attributes.key?(:'campaign_name')
119
+ self.campaign_name = attributes[:'campaign_name']
120
+ end
121
+
122
+ if attributes.key?(:'ad_account_id')
123
+ self.ad_account_id = attributes[:'ad_account_id']
124
+ end
125
+
126
+ if attributes.key?(:'platform')
127
+ self.platform = attributes[:'platform']
128
+ end
129
+
130
+ if attributes.key?(:'currency')
131
+ self.currency = attributes[:'currency']
132
+ end
133
+
134
+ if attributes.key?(:'values')
135
+ if (value = attributes[:'values']).is_a?(Hash)
136
+ self.values = value
137
+ end
138
+ else
139
+ self.values = nil
140
+ end
141
+ end
142
+
143
+ # Show invalid properties with the reasons. Usually used together with valid?
144
+ # @return Array for valid properties with the reasons
145
+ def list_invalid_properties
146
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
147
+ invalid_properties = Array.new
148
+ if @date.nil?
149
+ invalid_properties.push('invalid value for "date", date cannot be nil.')
150
+ end
151
+
152
+ if @values.nil?
153
+ invalid_properties.push('invalid value for "values", values cannot be nil.')
154
+ end
155
+
156
+ invalid_properties
157
+ end
158
+
159
+ # Check to see if the all the properties in the model are valid
160
+ # @return true if the model is valid
161
+ def valid?
162
+ warn '[DEPRECATED] the `valid?` method is obsolete'
163
+ return false if @date.nil?
164
+ return false if @values.nil?
165
+ true
166
+ end
167
+
168
+ # Custom attribute writer method with validation
169
+ # @param [Object] date Value to be assigned
170
+ def date=(date)
171
+ if date.nil?
172
+ fail ArgumentError, 'date cannot be nil'
173
+ end
174
+
175
+ @date = date
176
+ end
177
+
178
+ # Custom attribute writer method with validation
179
+ # @param [Object] values Value to be assigned
180
+ def values=(values)
181
+ if values.nil?
182
+ fail ArgumentError, 'values cannot be nil'
183
+ end
184
+
185
+ @values = values
186
+ end
187
+
188
+ # Checks equality by comparing each attribute.
189
+ # @param [Object] Object to be compared
190
+ def ==(o)
191
+ return true if self.equal?(o)
192
+ self.class == o.class &&
193
+ date == o.date &&
194
+ campaign_id == o.campaign_id &&
195
+ utm_campaign == o.utm_campaign &&
196
+ campaign_name == o.campaign_name &&
197
+ ad_account_id == o.ad_account_id &&
198
+ platform == o.platform &&
199
+ currency == o.currency &&
200
+ values == o.values
201
+ end
202
+
203
+ # @see the `==` method
204
+ # @param [Object] Object to be compared
205
+ def eql?(o)
206
+ self == o
207
+ end
208
+
209
+ # Calculates hash code according to all attributes.
210
+ # @return [Integer] Hash code
211
+ def hash
212
+ [date, campaign_id, utm_campaign, campaign_name, ad_account_id, platform, currency, values].hash
213
+ end
214
+
215
+ # Builds the object from hash
216
+ # @param [Hash] attributes Model attributes in the form of hash
217
+ # @return [Object] Returns the model itself
218
+ def self.build_from_hash(attributes)
219
+ return nil unless attributes.is_a?(Hash)
220
+ attributes = attributes.transform_keys(&:to_sym)
221
+ # include attributes inherited from allOf parents (the nearest declaration wins)
222
+ map = acceptable_attribute_map
223
+ transformed_hash = {}
224
+ acceptable_openapi_types.each_pair do |key, type|
225
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
226
+ transformed_hash["#{key}"] = nil
227
+ elsif type =~ /\AArray<(.*)>/i
228
+ # check to ensure the input is an array given that the attribute
229
+ # is documented as an array but the input is not
230
+ if attributes[map[key]].is_a?(Array)
231
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
232
+ end
233
+ elsif !attributes[map[key]].nil?
234
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
235
+ end
236
+ end
237
+ new(transformed_hash)
238
+ end
239
+
240
+ # Returns the object in the form of hash
241
+ # @return [Hash] Returns the object in the form of hash
242
+ def to_hash
243
+ hash = {}
244
+ # include attributes inherited from allOf parents (the nearest declaration wins)
245
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
246
+ value = self.send(attr)
247
+ if value.nil?
248
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
249
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
250
+ end
251
+
252
+ hash[param] = _to_hash(value)
253
+ end
254
+ hash
255
+ end
256
+
257
+ end
258
+
259
+ end
@@ -0,0 +1,326 @@
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 Channel < ApiModelBase
18
+ attr_accessor :object
19
+
20
+ attr_accessor :id
21
+
22
+ attr_accessor :name
23
+
24
+ # The connection this channel is reached through. Several channels can share one — Facebook and Instagram both ride the Meta connection.
25
+ attr_accessor :connector
26
+
27
+ # Whether this channel can be connected AT ALL on this deployment. False while a platform approval is outstanding — a different answer from \"you have not connected it yet\", and collapsing the two would send you to build a connect flow that cannot succeed.
28
+ attr_accessor :available
29
+
30
+ # Why, when `available` is false.
31
+ attr_accessor :unavailable_reason
32
+
33
+ attr_accessor :connected
34
+
35
+ # A row exists but holds no usable credential. Reconnect in the app, or send the account holder a link from POST /v1/connect-links.
36
+ attr_accessor :needs_reconnect
37
+
38
+ # Which account is connected, where the provider tells us.
39
+ attr_accessor :account
40
+
41
+ attr_accessor :visibilities
42
+
43
+ attr_accessor :visibility_notes
44
+
45
+ attr_accessor :carousel
46
+
47
+ attr_accessor :carousel_unsupported_reason
48
+
49
+ attr_accessor :caption_max
50
+
51
+ # The key inside `targets` that names WHICH account on this channel to post to.
52
+ attr_accessor :target_field
53
+
54
+ class EnumAttributeValidator
55
+ attr_reader :datatype
56
+ attr_reader :allowable_values
57
+
58
+ def initialize(datatype, allowable_values)
59
+ @allowable_values = allowable_values.map do |value|
60
+ case datatype.to_s
61
+ when /Integer/i
62
+ value.to_i
63
+ when /Float/i
64
+ value.to_f
65
+ else
66
+ value
67
+ end
68
+ end
69
+ end
70
+
71
+ def valid?(value)
72
+ !value || allowable_values.include?(value)
73
+ end
74
+ end
75
+
76
+ # Attribute mapping from ruby-style variable name to JSON key.
77
+ def self.attribute_map
78
+ {
79
+ :'object' => :'object',
80
+ :'id' => :'id',
81
+ :'name' => :'name',
82
+ :'connector' => :'connector',
83
+ :'available' => :'available',
84
+ :'unavailable_reason' => :'unavailable_reason',
85
+ :'connected' => :'connected',
86
+ :'needs_reconnect' => :'needs_reconnect',
87
+ :'account' => :'account',
88
+ :'visibilities' => :'visibilities',
89
+ :'visibility_notes' => :'visibility_notes',
90
+ :'carousel' => :'carousel',
91
+ :'carousel_unsupported_reason' => :'carousel_unsupported_reason',
92
+ :'caption_max' => :'caption_max',
93
+ :'target_field' => :'target_field'
94
+ }
95
+ end
96
+
97
+ # Returns attribute mapping this model knows about
98
+ def self.acceptable_attribute_map
99
+ attribute_map
100
+ end
101
+
102
+ # Returns all the JSON keys this model knows about
103
+ def self.acceptable_attributes
104
+ acceptable_attribute_map.values
105
+ end
106
+
107
+ # Attribute type mapping.
108
+ def self.openapi_types
109
+ {
110
+ :'object' => :'String',
111
+ :'id' => :'String',
112
+ :'name' => :'String',
113
+ :'connector' => :'String',
114
+ :'available' => :'Boolean',
115
+ :'unavailable_reason' => :'String',
116
+ :'connected' => :'Boolean',
117
+ :'needs_reconnect' => :'Boolean',
118
+ :'account' => :'String',
119
+ :'visibilities' => :'Array<String>',
120
+ :'visibility_notes' => :'String',
121
+ :'carousel' => :'ChannelCarousel',
122
+ :'carousel_unsupported_reason' => :'String',
123
+ :'caption_max' => :'Integer',
124
+ :'target_field' => :'String'
125
+ }
126
+ end
127
+
128
+ # List of attributes with nullable: true
129
+ def self.openapi_nullable
130
+ Set.new([
131
+ ])
132
+ end
133
+
134
+ # Returns attribute type mapping
135
+ def self.acceptable_openapi_types
136
+ openapi_types
137
+ end
138
+
139
+ # Returns the nullable attributes
140
+ def self.acceptable_openapi_nullable
141
+ openapi_nullable
142
+ end
143
+
144
+ # Initializes the object
145
+ # @param [Hash] attributes Model attributes in the form of hash
146
+ def initialize(attributes = {})
147
+ if (!attributes.is_a?(Hash))
148
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hermoso::Channel` initialize method"
149
+ end
150
+
151
+ # check to see if the attribute exists and convert string to symbol for hash key
152
+ acceptable_attribute_map = self.class.acceptable_attribute_map
153
+ attributes = attributes.each_with_object({}) { |(k, v), h|
154
+ if (!acceptable_attribute_map.key?(k.to_sym))
155
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hermoso::Channel`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
156
+ end
157
+ h[k.to_sym] = v
158
+ }
159
+
160
+ if attributes.key?(:'object')
161
+ self.object = attributes[:'object']
162
+ end
163
+
164
+ if attributes.key?(:'id')
165
+ self.id = attributes[:'id']
166
+ end
167
+
168
+ if attributes.key?(:'name')
169
+ self.name = attributes[:'name']
170
+ end
171
+
172
+ if attributes.key?(:'connector')
173
+ self.connector = attributes[:'connector']
174
+ end
175
+
176
+ if attributes.key?(:'available')
177
+ self.available = attributes[:'available']
178
+ end
179
+
180
+ if attributes.key?(:'unavailable_reason')
181
+ self.unavailable_reason = attributes[:'unavailable_reason']
182
+ end
183
+
184
+ if attributes.key?(:'connected')
185
+ self.connected = attributes[:'connected']
186
+ end
187
+
188
+ if attributes.key?(:'needs_reconnect')
189
+ self.needs_reconnect = attributes[:'needs_reconnect']
190
+ end
191
+
192
+ if attributes.key?(:'account')
193
+ self.account = attributes[:'account']
194
+ end
195
+
196
+ if attributes.key?(:'visibilities')
197
+ if (value = attributes[:'visibilities']).is_a?(Array)
198
+ self.visibilities = value
199
+ end
200
+ end
201
+
202
+ if attributes.key?(:'visibility_notes')
203
+ self.visibility_notes = attributes[:'visibility_notes']
204
+ end
205
+
206
+ if attributes.key?(:'carousel')
207
+ self.carousel = attributes[:'carousel']
208
+ end
209
+
210
+ if attributes.key?(:'carousel_unsupported_reason')
211
+ self.carousel_unsupported_reason = attributes[:'carousel_unsupported_reason']
212
+ end
213
+
214
+ if attributes.key?(:'caption_max')
215
+ self.caption_max = attributes[:'caption_max']
216
+ end
217
+
218
+ if attributes.key?(:'target_field')
219
+ self.target_field = attributes[:'target_field']
220
+ end
221
+ end
222
+
223
+ # Show invalid properties with the reasons. Usually used together with valid?
224
+ # @return Array for valid properties with the reasons
225
+ def list_invalid_properties
226
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
227
+ invalid_properties = Array.new
228
+ invalid_properties
229
+ end
230
+
231
+ # Check to see if the all the properties in the model are valid
232
+ # @return true if the model is valid
233
+ def valid?
234
+ warn '[DEPRECATED] the `valid?` method is obsolete'
235
+ object_validator = EnumAttributeValidator.new('String', ["channel", "unknown_default_open_api"])
236
+ return false unless object_validator.valid?(@object)
237
+ true
238
+ end
239
+
240
+ # Custom attribute writer method checking allowed values (enum).
241
+ # @param [Object] object Object to be assigned
242
+ def object=(object)
243
+ validator = EnumAttributeValidator.new('String', ["channel", "unknown_default_open_api"])
244
+ object = 'unknown_default_open_api' unless validator.valid?(object)
245
+ @object = object
246
+ end
247
+
248
+ # Checks equality by comparing each attribute.
249
+ # @param [Object] Object to be compared
250
+ def ==(o)
251
+ return true if self.equal?(o)
252
+ self.class == o.class &&
253
+ object == o.object &&
254
+ id == o.id &&
255
+ name == o.name &&
256
+ connector == o.connector &&
257
+ available == o.available &&
258
+ unavailable_reason == o.unavailable_reason &&
259
+ connected == o.connected &&
260
+ needs_reconnect == o.needs_reconnect &&
261
+ account == o.account &&
262
+ visibilities == o.visibilities &&
263
+ visibility_notes == o.visibility_notes &&
264
+ carousel == o.carousel &&
265
+ carousel_unsupported_reason == o.carousel_unsupported_reason &&
266
+ caption_max == o.caption_max &&
267
+ target_field == o.target_field
268
+ end
269
+
270
+ # @see the `==` method
271
+ # @param [Object] Object to be compared
272
+ def eql?(o)
273
+ self == o
274
+ end
275
+
276
+ # Calculates hash code according to all attributes.
277
+ # @return [Integer] Hash code
278
+ def hash
279
+ [object, id, name, connector, available, unavailable_reason, connected, needs_reconnect, account, visibilities, visibility_notes, carousel, carousel_unsupported_reason, caption_max, target_field].hash
280
+ end
281
+
282
+ # Builds the object from hash
283
+ # @param [Hash] attributes Model attributes in the form of hash
284
+ # @return [Object] Returns the model itself
285
+ def self.build_from_hash(attributes)
286
+ return nil unless attributes.is_a?(Hash)
287
+ attributes = attributes.transform_keys(&:to_sym)
288
+ # include attributes inherited from allOf parents (the nearest declaration wins)
289
+ map = acceptable_attribute_map
290
+ transformed_hash = {}
291
+ acceptable_openapi_types.each_pair do |key, type|
292
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
293
+ transformed_hash["#{key}"] = nil
294
+ elsif type =~ /\AArray<(.*)>/i
295
+ # check to ensure the input is an array given that the attribute
296
+ # is documented as an array but the input is not
297
+ if attributes[map[key]].is_a?(Array)
298
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
299
+ end
300
+ elsif !attributes[map[key]].nil?
301
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
302
+ end
303
+ end
304
+ new(transformed_hash)
305
+ end
306
+
307
+ # Returns the object in the form of hash
308
+ # @return [Hash] Returns the object in the form of hash
309
+ def to_hash
310
+ hash = {}
311
+ # include attributes inherited from allOf parents (the nearest declaration wins)
312
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
313
+ value = self.send(attr)
314
+ if value.nil?
315
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
316
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
317
+ end
318
+
319
+ hash[param] = _to_hash(value)
320
+ end
321
+ hash
322
+ end
323
+
324
+ end
325
+
326
+ end