falaai-api 1.21.54 → 2.21.273

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 (114) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -7
  3. data/docs/AnalysisApi.md +4 -0
  4. data/docs/DiagnosticParticipant.md +1 -1
  5. data/docs/DiagnosticUsage.md +1 -1
  6. data/docs/Participant.md +1 -1
  7. data/docs/ParticipantDiagnostic.md +7 -3
  8. data/docs/ResponseExtractConversationsV1WhatsappExtractconversationsPost.md +42 -0
  9. data/docs/RiskAuditAppliedActionV2.md +0 -4
  10. data/docs/RiskAuditAuditDecisionsV2.md +1 -3
  11. data/docs/RiskAuditConversationScoresV2.md +0 -2
  12. data/docs/RiskAuditDetectionItemV2.md +5 -75
  13. data/docs/RiskAuditSummaryV2.md +0 -4
  14. data/docs/RiskAuditUsageV2.md +1 -1
  15. data/docs/RiskAuditVerdictV2.md +1 -7
  16. data/docs/SpeechApi.md +2 -0
  17. data/docs/TranscriptionUsage.md +1 -1
  18. data/docs/UsageByKeyItem.md +1 -1
  19. data/docs/UsageLogItem.md +1 -1
  20. data/docs/WebhooksApi.md +1 -1
  21. data/docs/WhatsappApi.md +16 -10
  22. data/docs/WhatsappConversation.md +1 -1
  23. data/docs/WhatsappMeta.md +3 -1
  24. data/docs/WhatsappPreviewItem.md +32 -0
  25. data/docs/WhatsappPreviewItemBreakdown.md +26 -0
  26. data/docs/WhatsappPreviewItemCredits.md +20 -0
  27. data/docs/WhatsappPreviewItemMedia.md +30 -0
  28. data/docs/WhatsappPreviewParams.md +32 -0
  29. data/docs/WhatsappPreviewResponse.md +32 -0
  30. data/docs/WhatsappPreviewWindow.md +22 -0
  31. data/docs/WhatsappUsage.md +11 -5
  32. data/docs/index.html +37 -9
  33. data/lib/falaai-api/api/analysis_api.rb +5 -1
  34. data/lib/falaai-api/api/email_alerts_api.rb +1 -1
  35. data/lib/falaai-api/api/health_api.rb +1 -1
  36. data/lib/falaai-api/api/speech_api.rb +3 -1
  37. data/lib/falaai-api/api/usage_api.rb +1 -1
  38. data/lib/falaai-api/api/version_api.rb +1 -1
  39. data/lib/falaai-api/api/webhooks_api.rb +3 -3
  40. data/lib/falaai-api/api/whatsapp_api.rb +21 -21
  41. data/lib/falaai-api/api_client.rb +1 -1
  42. data/lib/falaai-api/api_error.rb +1 -1
  43. data/lib/falaai-api/api_model_base.rb +1 -1
  44. data/lib/falaai-api/configuration.rb +1 -1
  45. data/lib/falaai-api/models/audio_event.rb +1 -1
  46. data/lib/falaai-api/models/audio_input_meta.rb +1 -1
  47. data/lib/falaai-api/models/create_email_alert_request.rb +1 -1
  48. data/lib/falaai-api/models/create_webhook_request.rb +1 -1
  49. data/lib/falaai-api/models/diagnostic_analysis_map.rb +1 -1
  50. data/lib/falaai-api/models/diagnostic_audio_event.rb +1 -1
  51. data/lib/falaai-api/models/diagnostic_categorical_analysis.rb +1 -1
  52. data/lib/falaai-api/models/diagnostic_participant.rb +4 -4
  53. data/lib/falaai-api/models/diagnostic_request.rb +3 -3
  54. data/lib/falaai-api/models/diagnostic_response.rb +1 -1
  55. data/lib/falaai-api/models/diagnostic_text_analysis.rb +1 -1
  56. data/lib/falaai-api/models/diagnostic_usage.rb +3 -3
  57. data/lib/falaai-api/models/email_alert_item.rb +1 -1
  58. data/lib/falaai-api/models/email_alert_list_response.rb +1 -1
  59. data/lib/falaai-api/models/email_alert_message_response.rb +1 -1
  60. data/lib/falaai-api/models/email_event.rb +1 -1
  61. data/lib/falaai-api/models/health_response.rb +1 -1
  62. data/lib/falaai-api/models/http_validation_error.rb +1 -1
  63. data/lib/falaai-api/models/location_inner.rb +1 -1
  64. data/lib/falaai-api/models/message_response.rb +1 -1
  65. data/lib/falaai-api/models/participant.rb +4 -4
  66. data/lib/falaai-api/models/participant_diagnostic.rb +63 -7
  67. data/lib/falaai-api/models/response_extract_conversations_v1_whatsapp_extractconversations_post.rb +103 -0
  68. data/lib/falaai-api/models/risk_audit_analysis_v2.rb +1 -1
  69. data/lib/falaai-api/models/risk_audit_applied_action_v2.rb +2 -26
  70. data/lib/falaai-api/models/risk_audit_audio_event_model_v2.rb +1 -1
  71. data/lib/falaai-api/models/risk_audit_audit_decisions_v2.rb +5 -17
  72. data/lib/falaai-api/models/risk_audit_conversation_scores_v2.rb +2 -12
  73. data/lib/falaai-api/models/risk_audit_detection_item_v2.rb +19 -393
  74. data/lib/falaai-api/models/risk_audit_detections_v2.rb +1 -1
  75. data/lib/falaai-api/models/risk_audit_indexer_v2.rb +1 -1
  76. data/lib/falaai-api/models/risk_audit_meta_v2.rb +1 -1
  77. data/lib/falaai-api/models/risk_audit_participant_v2.rb +1 -1
  78. data/lib/falaai-api/models/risk_audit_participants_v2.rb +1 -1
  79. data/lib/falaai-api/models/risk_audit_request.rb +3 -3
  80. data/lib/falaai-api/models/risk_audit_scores_v2.rb +1 -1
  81. data/lib/falaai-api/models/risk_audit_scoring_explanation_v2.rb +1 -1
  82. data/lib/falaai-api/models/risk_audit_summary_v2.rb +2 -24
  83. data/lib/falaai-api/models/risk_audit_timeline_v2.rb +1 -1
  84. data/lib/falaai-api/models/risk_audit_usage_v2.rb +2 -2
  85. data/lib/falaai-api/models/risk_audit_v2.rb +1 -1
  86. data/lib/falaai-api/models/risk_audit_v2_response.rb +1 -1
  87. data/lib/falaai-api/models/risk_audit_verdict_v2.rb +5 -36
  88. data/lib/falaai-api/models/transcription_response.rb +1 -1
  89. data/lib/falaai-api/models/transcription_usage.rb +2 -2
  90. data/lib/falaai-api/models/update_email_alert_request.rb +1 -1
  91. data/lib/falaai-api/models/update_webhook_request.rb +1 -1
  92. data/lib/falaai-api/models/usage_by_key_item.rb +2 -2
  93. data/lib/falaai-api/models/usage_log_item.rb +2 -2
  94. data/lib/falaai-api/models/usage_log_response.rb +1 -1
  95. data/lib/falaai-api/models/validation_error.rb +1 -1
  96. data/lib/falaai-api/models/version_response.rb +1 -1
  97. data/lib/falaai-api/models/webhook_event.rb +1 -1
  98. data/lib/falaai-api/models/webhook_item.rb +1 -1
  99. data/lib/falaai-api/models/webhook_list_response.rb +1 -1
  100. data/lib/falaai-api/models/whatsapp_conversation.rb +2 -2
  101. data/lib/falaai-api/models/whatsapp_conversations_response.rb +30 -6
  102. data/lib/falaai-api/models/whatsapp_meta.rb +32 -5
  103. data/lib/falaai-api/models/whatsapp_preview_item.rb +354 -0
  104. data/lib/falaai-api/models/whatsapp_preview_item_breakdown.rb +273 -0
  105. data/lib/falaai-api/models/whatsapp_preview_item_credits.rb +192 -0
  106. data/lib/falaai-api/models/whatsapp_preview_item_media.rb +329 -0
  107. data/lib/falaai-api/models/whatsapp_preview_params.rb +354 -0
  108. data/lib/falaai-api/models/whatsapp_preview_response.rb +384 -0
  109. data/lib/falaai-api/models/whatsapp_preview_window.rb +219 -0
  110. data/lib/falaai-api/models/whatsapp_speaker.rb +1 -1
  111. data/lib/falaai-api/models/whatsapp_usage.rb +90 -9
  112. data/lib/falaai-api/version.rb +2 -2
  113. data/lib/falaai-api.rb +9 -1
  114. metadata +18 -2
@@ -0,0 +1,192 @@
1
+ =begin
2
+ #FalaAI API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 2.21.273
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.25.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FalaAI
17
+ class WhatsappPreviewItemCredits < ApiModelBase
18
+ # Credits of THIS conversation (2 decimals, exact fraction — the charge is ONE ceil on the batch total)
19
+ attr_accessor :total
20
+
21
+ # Credits by component for THIS conversation
22
+ attr_accessor :breakdown
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'total' => :'total',
28
+ :'breakdown' => :'breakdown'
29
+ }
30
+ end
31
+
32
+ # Returns attribute mapping this model knows about
33
+ def self.acceptable_attribute_map
34
+ attribute_map
35
+ end
36
+
37
+ # Returns all the JSON keys this model knows about
38
+ def self.acceptable_attributes
39
+ acceptable_attribute_map.values
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.openapi_types
44
+ {
45
+ :'total' => :'Float',
46
+ :'breakdown' => :'WhatsappPreviewItemBreakdown'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FalaAI::WhatsappPreviewItemCredits` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ acceptable_attribute_map = self.class.acceptable_attribute_map
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!acceptable_attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FalaAI::WhatsappPreviewItemCredits`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'total')
73
+ self.total = attributes[:'total']
74
+ else
75
+ self.total = nil
76
+ end
77
+
78
+ if attributes.key?(:'breakdown')
79
+ self.breakdown = attributes[:'breakdown']
80
+ else
81
+ self.breakdown = nil
82
+ end
83
+ end
84
+
85
+ # Show invalid properties with the reasons. Usually used together with valid?
86
+ # @return Array for valid properties with the reasons
87
+ def list_invalid_properties
88
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
89
+ invalid_properties = Array.new
90
+ if @total.nil?
91
+ invalid_properties.push('invalid value for "total", total cannot be nil.')
92
+ end
93
+
94
+ if @breakdown.nil?
95
+ invalid_properties.push('invalid value for "breakdown", breakdown cannot be nil.')
96
+ end
97
+
98
+ invalid_properties
99
+ end
100
+
101
+ # Check to see if the all the properties in the model are valid
102
+ # @return true if the model is valid
103
+ def valid?
104
+ warn '[DEPRECATED] the `valid?` method is obsolete'
105
+ return false if @total.nil?
106
+ return false if @breakdown.nil?
107
+ true
108
+ end
109
+
110
+ # Custom attribute writer method with validation
111
+ # @param [Object] total Value to be assigned
112
+ def total=(total)
113
+ if total.nil?
114
+ fail ArgumentError, 'total cannot be nil'
115
+ end
116
+
117
+ @total = total
118
+ end
119
+
120
+ # Custom attribute writer method with validation
121
+ # @param [Object] breakdown Value to be assigned
122
+ def breakdown=(breakdown)
123
+ if breakdown.nil?
124
+ fail ArgumentError, 'breakdown cannot be nil'
125
+ end
126
+
127
+ @breakdown = breakdown
128
+ end
129
+
130
+ # Checks equality by comparing each attribute.
131
+ # @param [Object] Object to be compared
132
+ def ==(o)
133
+ return true if self.equal?(o)
134
+ self.class == o.class &&
135
+ total == o.total &&
136
+ breakdown == o.breakdown
137
+ end
138
+
139
+ # @see the `==` method
140
+ # @param [Object] Object to be compared
141
+ def eql?(o)
142
+ self == o
143
+ end
144
+
145
+ # Calculates hash code according to all attributes.
146
+ # @return [Integer] Hash code
147
+ def hash
148
+ [total, breakdown].hash
149
+ end
150
+
151
+ # Builds the object from hash
152
+ # @param [Hash] attributes Model attributes in the form of hash
153
+ # @return [Object] Returns the model itself
154
+ def self.build_from_hash(attributes)
155
+ return nil unless attributes.is_a?(Hash)
156
+ attributes = attributes.transform_keys(&:to_sym)
157
+ transformed_hash = {}
158
+ openapi_types.each_pair do |key, type|
159
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
160
+ transformed_hash["#{key}"] = nil
161
+ elsif type =~ /\AArray<(.*)>/i
162
+ # check to ensure the input is an array given that the attribute
163
+ # is documented as an array but the input is not
164
+ if attributes[attribute_map[key]].is_a?(Array)
165
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
166
+ end
167
+ elsif !attributes[attribute_map[key]].nil?
168
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
169
+ end
170
+ end
171
+ new(transformed_hash)
172
+ end
173
+
174
+ # Returns the object in the form of hash
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_hash
177
+ hash = {}
178
+ self.class.attribute_map.each_pair do |attr, param|
179
+ value = self.send(attr)
180
+ if value.nil?
181
+ is_nullable = self.class.openapi_nullable.include?(attr)
182
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
183
+ end
184
+
185
+ hash[param] = _to_hash(value)
186
+ end
187
+ hash
188
+ end
189
+
190
+ end
191
+
192
+ end
@@ -0,0 +1,329 @@
1
+ =begin
2
+ #FalaAI API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 2.21.273
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.25.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FalaAI
17
+ class WhatsappPreviewItemMedia < ApiModelBase
18
+ # Figurinha occurrences in this conversation (0 quando expression=false)
19
+ attr_accessor :figurinha
20
+
21
+ # GIF occurrences in this conversation (0 quando expression=false)
22
+ attr_accessor :gif
23
+
24
+ # Emoji occurrences in this conversation (0 quando expression=false)
25
+ attr_accessor :emoji
26
+
27
+ # Voice/audio/video turns in this conversation (cobra 1.6/segundo SO quando voice_note=true, piso 5 s)
28
+ attr_accessor :ptt
29
+
30
+ # Voice/video SECONDS counted in this conversation (0 quando voice_note=false)
31
+ attr_accessor :ptt_seconds
32
+
33
+ # Image/document turns in this conversation (ANEXO: nunca cobrado)
34
+ attr_accessor :anexos
35
+
36
+ # Media turns by type in THIS conversation (voz/audio/video/imagem/figurinha/gif/arquivo/oculta/chamada)
37
+ attr_accessor :by_type
38
+
39
+ # Attribute mapping from ruby-style variable name to JSON key.
40
+ def self.attribute_map
41
+ {
42
+ :'figurinha' => :'figurinha',
43
+ :'gif' => :'gif',
44
+ :'emoji' => :'emoji',
45
+ :'ptt' => :'ptt',
46
+ :'ptt_seconds' => :'ptt_seconds',
47
+ :'anexos' => :'anexos',
48
+ :'by_type' => :'by_type'
49
+ }
50
+ end
51
+
52
+ # Returns attribute mapping this model knows about
53
+ def self.acceptable_attribute_map
54
+ attribute_map
55
+ end
56
+
57
+ # Returns all the JSON keys this model knows about
58
+ def self.acceptable_attributes
59
+ acceptable_attribute_map.values
60
+ end
61
+
62
+ # Attribute type mapping.
63
+ def self.openapi_types
64
+ {
65
+ :'figurinha' => :'Integer',
66
+ :'gif' => :'Integer',
67
+ :'emoji' => :'Integer',
68
+ :'ptt' => :'Integer',
69
+ :'ptt_seconds' => :'Float',
70
+ :'anexos' => :'Integer',
71
+ :'by_type' => :'Hash<String, Integer>'
72
+ }
73
+ end
74
+
75
+ # List of attributes with nullable: true
76
+ def self.openapi_nullable
77
+ Set.new([
78
+ ])
79
+ end
80
+
81
+ # Initializes the object
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ def initialize(attributes = {})
84
+ if (!attributes.is_a?(Hash))
85
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FalaAI::WhatsappPreviewItemMedia` initialize method"
86
+ end
87
+
88
+ # check to see if the attribute exists and convert string to symbol for hash key
89
+ acceptable_attribute_map = self.class.acceptable_attribute_map
90
+ attributes = attributes.each_with_object({}) { |(k, v), h|
91
+ if (!acceptable_attribute_map.key?(k.to_sym))
92
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FalaAI::WhatsappPreviewItemMedia`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
93
+ end
94
+ h[k.to_sym] = v
95
+ }
96
+
97
+ if attributes.key?(:'figurinha')
98
+ self.figurinha = attributes[:'figurinha']
99
+ else
100
+ self.figurinha = nil
101
+ end
102
+
103
+ if attributes.key?(:'gif')
104
+ self.gif = attributes[:'gif']
105
+ else
106
+ self.gif = nil
107
+ end
108
+
109
+ if attributes.key?(:'emoji')
110
+ self.emoji = attributes[:'emoji']
111
+ else
112
+ self.emoji = nil
113
+ end
114
+
115
+ if attributes.key?(:'ptt')
116
+ self.ptt = attributes[:'ptt']
117
+ else
118
+ self.ptt = nil
119
+ end
120
+
121
+ if attributes.key?(:'ptt_seconds')
122
+ self.ptt_seconds = attributes[:'ptt_seconds']
123
+ else
124
+ self.ptt_seconds = nil
125
+ end
126
+
127
+ if attributes.key?(:'anexos')
128
+ self.anexos = attributes[:'anexos']
129
+ else
130
+ self.anexos = nil
131
+ end
132
+
133
+ if attributes.key?(:'by_type')
134
+ if (value = attributes[:'by_type']).is_a?(Hash)
135
+ self.by_type = value
136
+ end
137
+ else
138
+ self.by_type = nil
139
+ end
140
+ end
141
+
142
+ # Show invalid properties with the reasons. Usually used together with valid?
143
+ # @return Array for valid properties with the reasons
144
+ def list_invalid_properties
145
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
146
+ invalid_properties = Array.new
147
+ if @figurinha.nil?
148
+ invalid_properties.push('invalid value for "figurinha", figurinha cannot be nil.')
149
+ end
150
+
151
+ if @gif.nil?
152
+ invalid_properties.push('invalid value for "gif", gif cannot be nil.')
153
+ end
154
+
155
+ if @emoji.nil?
156
+ invalid_properties.push('invalid value for "emoji", emoji cannot be nil.')
157
+ end
158
+
159
+ if @ptt.nil?
160
+ invalid_properties.push('invalid value for "ptt", ptt cannot be nil.')
161
+ end
162
+
163
+ if @ptt_seconds.nil?
164
+ invalid_properties.push('invalid value for "ptt_seconds", ptt_seconds cannot be nil.')
165
+ end
166
+
167
+ if @anexos.nil?
168
+ invalid_properties.push('invalid value for "anexos", anexos cannot be nil.')
169
+ end
170
+
171
+ if @by_type.nil?
172
+ invalid_properties.push('invalid value for "by_type", by_type cannot be nil.')
173
+ end
174
+
175
+ invalid_properties
176
+ end
177
+
178
+ # Check to see if the all the properties in the model are valid
179
+ # @return true if the model is valid
180
+ def valid?
181
+ warn '[DEPRECATED] the `valid?` method is obsolete'
182
+ return false if @figurinha.nil?
183
+ return false if @gif.nil?
184
+ return false if @emoji.nil?
185
+ return false if @ptt.nil?
186
+ return false if @ptt_seconds.nil?
187
+ return false if @anexos.nil?
188
+ return false if @by_type.nil?
189
+ true
190
+ end
191
+
192
+ # Custom attribute writer method with validation
193
+ # @param [Object] figurinha Value to be assigned
194
+ def figurinha=(figurinha)
195
+ if figurinha.nil?
196
+ fail ArgumentError, 'figurinha cannot be nil'
197
+ end
198
+
199
+ @figurinha = figurinha
200
+ end
201
+
202
+ # Custom attribute writer method with validation
203
+ # @param [Object] gif Value to be assigned
204
+ def gif=(gif)
205
+ if gif.nil?
206
+ fail ArgumentError, 'gif cannot be nil'
207
+ end
208
+
209
+ @gif = gif
210
+ end
211
+
212
+ # Custom attribute writer method with validation
213
+ # @param [Object] emoji Value to be assigned
214
+ def emoji=(emoji)
215
+ if emoji.nil?
216
+ fail ArgumentError, 'emoji cannot be nil'
217
+ end
218
+
219
+ @emoji = emoji
220
+ end
221
+
222
+ # Custom attribute writer method with validation
223
+ # @param [Object] ptt Value to be assigned
224
+ def ptt=(ptt)
225
+ if ptt.nil?
226
+ fail ArgumentError, 'ptt cannot be nil'
227
+ end
228
+
229
+ @ptt = ptt
230
+ end
231
+
232
+ # Custom attribute writer method with validation
233
+ # @param [Object] ptt_seconds Value to be assigned
234
+ def ptt_seconds=(ptt_seconds)
235
+ if ptt_seconds.nil?
236
+ fail ArgumentError, 'ptt_seconds cannot be nil'
237
+ end
238
+
239
+ @ptt_seconds = ptt_seconds
240
+ end
241
+
242
+ # Custom attribute writer method with validation
243
+ # @param [Object] anexos Value to be assigned
244
+ def anexos=(anexos)
245
+ if anexos.nil?
246
+ fail ArgumentError, 'anexos cannot be nil'
247
+ end
248
+
249
+ @anexos = anexos
250
+ end
251
+
252
+ # Custom attribute writer method with validation
253
+ # @param [Object] by_type Value to be assigned
254
+ def by_type=(by_type)
255
+ if by_type.nil?
256
+ fail ArgumentError, 'by_type cannot be nil'
257
+ end
258
+
259
+ @by_type = by_type
260
+ end
261
+
262
+ # Checks equality by comparing each attribute.
263
+ # @param [Object] Object to be compared
264
+ def ==(o)
265
+ return true if self.equal?(o)
266
+ self.class == o.class &&
267
+ figurinha == o.figurinha &&
268
+ gif == o.gif &&
269
+ emoji == o.emoji &&
270
+ ptt == o.ptt &&
271
+ ptt_seconds == o.ptt_seconds &&
272
+ anexos == o.anexos &&
273
+ by_type == o.by_type
274
+ end
275
+
276
+ # @see the `==` method
277
+ # @param [Object] Object to be compared
278
+ def eql?(o)
279
+ self == o
280
+ end
281
+
282
+ # Calculates hash code according to all attributes.
283
+ # @return [Integer] Hash code
284
+ def hash
285
+ [figurinha, gif, emoji, ptt, ptt_seconds, anexos, by_type].hash
286
+ end
287
+
288
+ # Builds the object from hash
289
+ # @param [Hash] attributes Model attributes in the form of hash
290
+ # @return [Object] Returns the model itself
291
+ def self.build_from_hash(attributes)
292
+ return nil unless attributes.is_a?(Hash)
293
+ attributes = attributes.transform_keys(&:to_sym)
294
+ transformed_hash = {}
295
+ openapi_types.each_pair do |key, type|
296
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
297
+ transformed_hash["#{key}"] = nil
298
+ elsif type =~ /\AArray<(.*)>/i
299
+ # check to ensure the input is an array given that the attribute
300
+ # is documented as an array but the input is not
301
+ if attributes[attribute_map[key]].is_a?(Array)
302
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
303
+ end
304
+ elsif !attributes[attribute_map[key]].nil?
305
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
306
+ end
307
+ end
308
+ new(transformed_hash)
309
+ end
310
+
311
+ # Returns the object in the form of hash
312
+ # @return [Hash] Returns the object in the form of hash
313
+ def to_hash
314
+ hash = {}
315
+ self.class.attribute_map.each_pair do |attr, param|
316
+ value = self.send(attr)
317
+ if value.nil?
318
+ is_nullable = self.class.openapi_nullable.include?(attr)
319
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
320
+ end
321
+
322
+ hash[param] = _to_hash(value)
323
+ end
324
+ hash
325
+ end
326
+
327
+ end
328
+
329
+ end