falaai-api 1.21.51 → 1.21.67
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 -6
- data/docs/AnalysisApi.md +6 -2
- data/docs/DiagnosticParticipant.md +1 -1
- data/docs/DiagnosticRequest.md +2 -2
- data/docs/DiagnosticResponse.md +3 -1
- data/docs/DiagnosticUsage.md +1 -1
- data/docs/Participant.md +1 -1
- data/docs/ParticipantDiagnostic.md +1 -1
- 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/RiskAuditRequest.md +3 -5
- data/docs/RiskAuditSummaryV2.md +0 -4
- data/docs/RiskAuditUsageV2.md +1 -1
- data/docs/RiskAuditVerdictV2.md +1 -7
- data/docs/SpeechApi.md +5 -3
- data/docs/TranscriptionUsage.md +1 -1
- data/docs/WhatsappApi.md +20 -12
- data/docs/WhatsappConversation.md +1 -1
- data/docs/WhatsappMeta.md +7 -3
- 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 +17 -1
- data/docs/index.html +58 -29
- 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 +7 -5
- 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 +1 -1
- data/lib/falaai-api/api/whatsapp_api.rb +27 -24
- 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 +2 -9
- data/lib/falaai-api/models/diagnostic_request.rb +5 -12
- data/lib/falaai-api/models/diagnostic_response.rb +15 -5
- 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 +2 -2
- data/lib/falaai-api/models/participant_diagnostic.rb +2 -19
- 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 +11 -37
- 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 +1 -1
- data/lib/falaai-api/models/usage_log_item.rb +1 -1
- 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 +86 -32
- 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 +220 -4
- data/lib/falaai-api/version.rb +15 -15
- data/lib/falaai-api.rb +9 -1
- metadata +18 -2
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.21.
|
|
6
|
+
The version of the OpenAPI document: 1.21.67
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -42,9 +42,6 @@ module FalaAI
|
|
|
42
42
|
# Minimum messages per conversation
|
|
43
43
|
attr_accessor :min_messages
|
|
44
44
|
|
|
45
|
-
# Chars per minute used to estimate duration
|
|
46
|
-
attr_accessor :chars_per_minute
|
|
47
|
-
|
|
48
45
|
# Total parsed turns
|
|
49
46
|
attr_accessor :turns
|
|
50
47
|
|
|
@@ -63,6 +60,15 @@ module FalaAI
|
|
|
63
60
|
# Final conversations returned
|
|
64
61
|
attr_accessor :conversations_selected
|
|
65
62
|
|
|
63
|
+
# Voice/video medias were transcribed
|
|
64
|
+
attr_accessor :voice_note
|
|
65
|
+
|
|
66
|
+
# Visual expressions were described
|
|
67
|
+
attr_accessor :expression
|
|
68
|
+
|
|
69
|
+
# Explicit windows used (0 = simple start/end range)
|
|
70
|
+
attr_accessor :windows
|
|
71
|
+
|
|
66
72
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
67
73
|
def self.attribute_map
|
|
68
74
|
{
|
|
@@ -75,13 +81,15 @@ module FalaAI
|
|
|
75
81
|
:'_end' => :'end',
|
|
76
82
|
:'gap_minutes' => :'gap_minutes',
|
|
77
83
|
:'min_messages' => :'min_messages',
|
|
78
|
-
:'chars_per_minute' => :'chars_per_minute',
|
|
79
84
|
:'turns' => :'turns',
|
|
80
85
|
:'system_lines' => :'system_lines',
|
|
81
86
|
:'conversations_total' => :'conversations_total',
|
|
82
87
|
:'conversations_in_window' => :'conversations_in_window',
|
|
83
88
|
:'monologues_dropped' => :'monologues_dropped',
|
|
84
|
-
:'conversations_selected' => :'conversations_selected'
|
|
89
|
+
:'conversations_selected' => :'conversations_selected',
|
|
90
|
+
:'voice_note' => :'voice_note',
|
|
91
|
+
:'expression' => :'expression',
|
|
92
|
+
:'windows' => :'windows'
|
|
85
93
|
}
|
|
86
94
|
end
|
|
87
95
|
|
|
@@ -107,13 +115,15 @@ module FalaAI
|
|
|
107
115
|
:'_end' => :'String',
|
|
108
116
|
:'gap_minutes' => :'Float',
|
|
109
117
|
:'min_messages' => :'Integer',
|
|
110
|
-
:'chars_per_minute' => :'Float',
|
|
111
118
|
:'turns' => :'Integer',
|
|
112
119
|
:'system_lines' => :'Integer',
|
|
113
120
|
:'conversations_total' => :'Integer',
|
|
114
121
|
:'conversations_in_window' => :'Integer',
|
|
115
122
|
:'monologues_dropped' => :'Integer',
|
|
116
|
-
:'conversations_selected' => :'Integer'
|
|
123
|
+
:'conversations_selected' => :'Integer',
|
|
124
|
+
:'voice_note' => :'Boolean',
|
|
125
|
+
:'expression' => :'Boolean',
|
|
126
|
+
:'windows' => :'Integer'
|
|
117
127
|
}
|
|
118
128
|
end
|
|
119
129
|
|
|
@@ -193,12 +203,6 @@ module FalaAI
|
|
|
193
203
|
self.min_messages = nil
|
|
194
204
|
end
|
|
195
205
|
|
|
196
|
-
if attributes.key?(:'chars_per_minute')
|
|
197
|
-
self.chars_per_minute = attributes[:'chars_per_minute']
|
|
198
|
-
else
|
|
199
|
-
self.chars_per_minute = nil
|
|
200
|
-
end
|
|
201
|
-
|
|
202
206
|
if attributes.key?(:'turns')
|
|
203
207
|
self.turns = attributes[:'turns']
|
|
204
208
|
else
|
|
@@ -234,6 +238,24 @@ module FalaAI
|
|
|
234
238
|
else
|
|
235
239
|
self.conversations_selected = nil
|
|
236
240
|
end
|
|
241
|
+
|
|
242
|
+
if attributes.key?(:'voice_note')
|
|
243
|
+
self.voice_note = attributes[:'voice_note']
|
|
244
|
+
else
|
|
245
|
+
self.voice_note = nil
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
if attributes.key?(:'expression')
|
|
249
|
+
self.expression = attributes[:'expression']
|
|
250
|
+
else
|
|
251
|
+
self.expression = nil
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
if attributes.key?(:'windows')
|
|
255
|
+
self.windows = attributes[:'windows']
|
|
256
|
+
else
|
|
257
|
+
self.windows = nil
|
|
258
|
+
end
|
|
237
259
|
end
|
|
238
260
|
|
|
239
261
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -277,10 +299,6 @@ module FalaAI
|
|
|
277
299
|
invalid_properties.push('invalid value for "min_messages", min_messages cannot be nil.')
|
|
278
300
|
end
|
|
279
301
|
|
|
280
|
-
if @chars_per_minute.nil?
|
|
281
|
-
invalid_properties.push('invalid value for "chars_per_minute", chars_per_minute cannot be nil.')
|
|
282
|
-
end
|
|
283
|
-
|
|
284
302
|
if @turns.nil?
|
|
285
303
|
invalid_properties.push('invalid value for "turns", turns cannot be nil.')
|
|
286
304
|
end
|
|
@@ -305,6 +323,18 @@ module FalaAI
|
|
|
305
323
|
invalid_properties.push('invalid value for "conversations_selected", conversations_selected cannot be nil.')
|
|
306
324
|
end
|
|
307
325
|
|
|
326
|
+
if @voice_note.nil?
|
|
327
|
+
invalid_properties.push('invalid value for "voice_note", voice_note cannot be nil.')
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
if @expression.nil?
|
|
331
|
+
invalid_properties.push('invalid value for "expression", expression cannot be nil.')
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
if @windows.nil?
|
|
335
|
+
invalid_properties.push('invalid value for "windows", windows cannot be nil.')
|
|
336
|
+
end
|
|
337
|
+
|
|
308
338
|
invalid_properties
|
|
309
339
|
end
|
|
310
340
|
|
|
@@ -321,13 +351,15 @@ module FalaAI
|
|
|
321
351
|
return false if @_end.nil?
|
|
322
352
|
return false if @gap_minutes.nil?
|
|
323
353
|
return false if @min_messages.nil?
|
|
324
|
-
return false if @chars_per_minute.nil?
|
|
325
354
|
return false if @turns.nil?
|
|
326
355
|
return false if @system_lines.nil?
|
|
327
356
|
return false if @conversations_total.nil?
|
|
328
357
|
return false if @conversations_in_window.nil?
|
|
329
358
|
return false if @monologues_dropped.nil?
|
|
330
359
|
return false if @conversations_selected.nil?
|
|
360
|
+
return false if @voice_note.nil?
|
|
361
|
+
return false if @expression.nil?
|
|
362
|
+
return false if @windows.nil?
|
|
331
363
|
true
|
|
332
364
|
end
|
|
333
365
|
|
|
@@ -421,16 +453,6 @@ module FalaAI
|
|
|
421
453
|
@min_messages = min_messages
|
|
422
454
|
end
|
|
423
455
|
|
|
424
|
-
# Custom attribute writer method with validation
|
|
425
|
-
# @param [Object] chars_per_minute Value to be assigned
|
|
426
|
-
def chars_per_minute=(chars_per_minute)
|
|
427
|
-
if chars_per_minute.nil?
|
|
428
|
-
fail ArgumentError, 'chars_per_minute cannot be nil'
|
|
429
|
-
end
|
|
430
|
-
|
|
431
|
-
@chars_per_minute = chars_per_minute
|
|
432
|
-
end
|
|
433
|
-
|
|
434
456
|
# Custom attribute writer method with validation
|
|
435
457
|
# @param [Object] turns Value to be assigned
|
|
436
458
|
def turns=(turns)
|
|
@@ -491,6 +513,36 @@ module FalaAI
|
|
|
491
513
|
@conversations_selected = conversations_selected
|
|
492
514
|
end
|
|
493
515
|
|
|
516
|
+
# Custom attribute writer method with validation
|
|
517
|
+
# @param [Object] voice_note Value to be assigned
|
|
518
|
+
def voice_note=(voice_note)
|
|
519
|
+
if voice_note.nil?
|
|
520
|
+
fail ArgumentError, 'voice_note cannot be nil'
|
|
521
|
+
end
|
|
522
|
+
|
|
523
|
+
@voice_note = voice_note
|
|
524
|
+
end
|
|
525
|
+
|
|
526
|
+
# Custom attribute writer method with validation
|
|
527
|
+
# @param [Object] expression Value to be assigned
|
|
528
|
+
def expression=(expression)
|
|
529
|
+
if expression.nil?
|
|
530
|
+
fail ArgumentError, 'expression cannot be nil'
|
|
531
|
+
end
|
|
532
|
+
|
|
533
|
+
@expression = expression
|
|
534
|
+
end
|
|
535
|
+
|
|
536
|
+
# Custom attribute writer method with validation
|
|
537
|
+
# @param [Object] windows Value to be assigned
|
|
538
|
+
def windows=(windows)
|
|
539
|
+
if windows.nil?
|
|
540
|
+
fail ArgumentError, 'windows cannot be nil'
|
|
541
|
+
end
|
|
542
|
+
|
|
543
|
+
@windows = windows
|
|
544
|
+
end
|
|
545
|
+
|
|
494
546
|
# Checks equality by comparing each attribute.
|
|
495
547
|
# @param [Object] Object to be compared
|
|
496
548
|
def ==(o)
|
|
@@ -505,13 +557,15 @@ module FalaAI
|
|
|
505
557
|
_end == o._end &&
|
|
506
558
|
gap_minutes == o.gap_minutes &&
|
|
507
559
|
min_messages == o.min_messages &&
|
|
508
|
-
chars_per_minute == o.chars_per_minute &&
|
|
509
560
|
turns == o.turns &&
|
|
510
561
|
system_lines == o.system_lines &&
|
|
511
562
|
conversations_total == o.conversations_total &&
|
|
512
563
|
conversations_in_window == o.conversations_in_window &&
|
|
513
564
|
monologues_dropped == o.monologues_dropped &&
|
|
514
|
-
conversations_selected == o.conversations_selected
|
|
565
|
+
conversations_selected == o.conversations_selected &&
|
|
566
|
+
voice_note == o.voice_note &&
|
|
567
|
+
expression == o.expression &&
|
|
568
|
+
windows == o.windows
|
|
515
569
|
end
|
|
516
570
|
|
|
517
571
|
# @see the `==` method
|
|
@@ -523,7 +577,7 @@ module FalaAI
|
|
|
523
577
|
# Calculates hash code according to all attributes.
|
|
524
578
|
# @return [Integer] Hash code
|
|
525
579
|
def hash
|
|
526
|
-
[file, chat_txt, format, date_format, timezone, start, _end, gap_minutes, min_messages,
|
|
580
|
+
[file, chat_txt, format, date_format, timezone, start, _end, gap_minutes, min_messages, turns, system_lines, conversations_total, conversations_in_window, monologues_dropped, conversations_selected, voice_note, expression, windows].hash
|
|
527
581
|
end
|
|
528
582
|
|
|
529
583
|
# Builds the object from hash
|
|
@@ -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: 1.21.67
|
|
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
|