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