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,384 @@
|
|
|
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 WhatsappPreviewResponse < ApiModelBase
|
|
18
|
+
# Object type. Always 'whatsapp_preview'
|
|
19
|
+
attr_accessor :object
|
|
20
|
+
|
|
21
|
+
# Always true (preview: no AI call, no charge)
|
|
22
|
+
attr_accessor :dry_run
|
|
23
|
+
|
|
24
|
+
# Always 0 in preview
|
|
25
|
+
attr_accessor :credits_charged
|
|
26
|
+
|
|
27
|
+
# TOTAL credits = exact SUM of the selected conversations (2 decimals, NO rounding up)
|
|
28
|
+
attr_accessor :credits_total
|
|
29
|
+
|
|
30
|
+
# Filter parameters actually used (reuse them in the extraction)
|
|
31
|
+
attr_accessor :params
|
|
32
|
+
|
|
33
|
+
# Explicit windows used (empty when a single start/end range was used)
|
|
34
|
+
attr_accessor :windows
|
|
35
|
+
|
|
36
|
+
# Per-conversation detail (send back as `windows` to extract only what you want)
|
|
37
|
+
attr_accessor :items
|
|
38
|
+
|
|
39
|
+
# Human-readable notices about what would be ignored
|
|
40
|
+
attr_accessor :warnings
|
|
41
|
+
|
|
42
|
+
class EnumAttributeValidator
|
|
43
|
+
attr_reader :datatype
|
|
44
|
+
attr_reader :allowable_values
|
|
45
|
+
|
|
46
|
+
def initialize(datatype, allowable_values)
|
|
47
|
+
@allowable_values = allowable_values.map do |value|
|
|
48
|
+
case datatype.to_s
|
|
49
|
+
when /Integer/i
|
|
50
|
+
value.to_i
|
|
51
|
+
when /Float/i
|
|
52
|
+
value.to_f
|
|
53
|
+
else
|
|
54
|
+
value
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def valid?(value)
|
|
60
|
+
!value || allowable_values.include?(value)
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
65
|
+
def self.attribute_map
|
|
66
|
+
{
|
|
67
|
+
:'object' => :'object',
|
|
68
|
+
:'dry_run' => :'dry_run',
|
|
69
|
+
:'credits_charged' => :'credits_charged',
|
|
70
|
+
:'credits_total' => :'credits_total',
|
|
71
|
+
:'params' => :'params',
|
|
72
|
+
:'windows' => :'windows',
|
|
73
|
+
:'items' => :'items',
|
|
74
|
+
:'warnings' => :'warnings'
|
|
75
|
+
}
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Returns attribute mapping this model knows about
|
|
79
|
+
def self.acceptable_attribute_map
|
|
80
|
+
attribute_map
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Returns all the JSON keys this model knows about
|
|
84
|
+
def self.acceptable_attributes
|
|
85
|
+
acceptable_attribute_map.values
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Attribute type mapping.
|
|
89
|
+
def self.openapi_types
|
|
90
|
+
{
|
|
91
|
+
:'object' => :'String',
|
|
92
|
+
:'dry_run' => :'Boolean',
|
|
93
|
+
:'credits_charged' => :'Integer',
|
|
94
|
+
:'credits_total' => :'Float',
|
|
95
|
+
:'params' => :'WhatsappPreviewParams',
|
|
96
|
+
:'windows' => :'Array<WhatsappPreviewWindow>',
|
|
97
|
+
:'items' => :'Array<WhatsappPreviewItem>',
|
|
98
|
+
:'warnings' => :'Array<String>'
|
|
99
|
+
}
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# List of attributes with nullable: true
|
|
103
|
+
def self.openapi_nullable
|
|
104
|
+
Set.new([
|
|
105
|
+
])
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Initializes the object
|
|
109
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
110
|
+
def initialize(attributes = {})
|
|
111
|
+
if (!attributes.is_a?(Hash))
|
|
112
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `FalaAI::WhatsappPreviewResponse` initialize method"
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
116
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
117
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
118
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
119
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `FalaAI::WhatsappPreviewResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
120
|
+
end
|
|
121
|
+
h[k.to_sym] = v
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if attributes.key?(:'object')
|
|
125
|
+
self.object = attributes[:'object']
|
|
126
|
+
else
|
|
127
|
+
self.object = nil
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
if attributes.key?(:'dry_run')
|
|
131
|
+
self.dry_run = attributes[:'dry_run']
|
|
132
|
+
else
|
|
133
|
+
self.dry_run = nil
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if attributes.key?(:'credits_charged')
|
|
137
|
+
self.credits_charged = attributes[:'credits_charged']
|
|
138
|
+
else
|
|
139
|
+
self.credits_charged = nil
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
if attributes.key?(:'credits_total')
|
|
143
|
+
self.credits_total = attributes[:'credits_total']
|
|
144
|
+
else
|
|
145
|
+
self.credits_total = nil
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
if attributes.key?(:'params')
|
|
149
|
+
self.params = attributes[:'params']
|
|
150
|
+
else
|
|
151
|
+
self.params = nil
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
if attributes.key?(:'windows')
|
|
155
|
+
if (value = attributes[:'windows']).is_a?(Array)
|
|
156
|
+
self.windows = value
|
|
157
|
+
end
|
|
158
|
+
else
|
|
159
|
+
self.windows = nil
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
if attributes.key?(:'items')
|
|
163
|
+
if (value = attributes[:'items']).is_a?(Array)
|
|
164
|
+
self.items = value
|
|
165
|
+
end
|
|
166
|
+
else
|
|
167
|
+
self.items = nil
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
if attributes.key?(:'warnings')
|
|
171
|
+
if (value = attributes[:'warnings']).is_a?(Array)
|
|
172
|
+
self.warnings = value
|
|
173
|
+
end
|
|
174
|
+
else
|
|
175
|
+
self.warnings = nil
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
180
|
+
# @return Array for valid properties with the reasons
|
|
181
|
+
def list_invalid_properties
|
|
182
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
183
|
+
invalid_properties = Array.new
|
|
184
|
+
if @object.nil?
|
|
185
|
+
invalid_properties.push('invalid value for "object", object cannot be nil.')
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
if @dry_run.nil?
|
|
189
|
+
invalid_properties.push('invalid value for "dry_run", dry_run cannot be nil.')
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
if @credits_charged.nil?
|
|
193
|
+
invalid_properties.push('invalid value for "credits_charged", credits_charged cannot be nil.')
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
if @credits_total.nil?
|
|
197
|
+
invalid_properties.push('invalid value for "credits_total", credits_total cannot be nil.')
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
if @params.nil?
|
|
201
|
+
invalid_properties.push('invalid value for "params", params cannot be nil.')
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
if @windows.nil?
|
|
205
|
+
invalid_properties.push('invalid value for "windows", windows cannot be nil.')
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
if @items.nil?
|
|
209
|
+
invalid_properties.push('invalid value for "items", items cannot be nil.')
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
if @warnings.nil?
|
|
213
|
+
invalid_properties.push('invalid value for "warnings", warnings cannot be nil.')
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
invalid_properties
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Check to see if the all the properties in the model are valid
|
|
220
|
+
# @return true if the model is valid
|
|
221
|
+
def valid?
|
|
222
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
223
|
+
return false if @object.nil?
|
|
224
|
+
object_validator = EnumAttributeValidator.new('String', ["whatsapp_preview"])
|
|
225
|
+
return false unless object_validator.valid?(@object)
|
|
226
|
+
return false if @dry_run.nil?
|
|
227
|
+
return false if @credits_charged.nil?
|
|
228
|
+
return false if @credits_total.nil?
|
|
229
|
+
return false if @params.nil?
|
|
230
|
+
return false if @windows.nil?
|
|
231
|
+
return false if @items.nil?
|
|
232
|
+
return false if @warnings.nil?
|
|
233
|
+
true
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
237
|
+
# @param [Object] object Object to be assigned
|
|
238
|
+
def object=(object)
|
|
239
|
+
validator = EnumAttributeValidator.new('String', ["whatsapp_preview"])
|
|
240
|
+
unless validator.valid?(object)
|
|
241
|
+
fail ArgumentError, "invalid value for \"object\", must be one of #{validator.allowable_values}."
|
|
242
|
+
end
|
|
243
|
+
@object = object
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
# Custom attribute writer method with validation
|
|
247
|
+
# @param [Object] dry_run Value to be assigned
|
|
248
|
+
def dry_run=(dry_run)
|
|
249
|
+
if dry_run.nil?
|
|
250
|
+
fail ArgumentError, 'dry_run cannot be nil'
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
@dry_run = dry_run
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# Custom attribute writer method with validation
|
|
257
|
+
# @param [Object] credits_charged Value to be assigned
|
|
258
|
+
def credits_charged=(credits_charged)
|
|
259
|
+
if credits_charged.nil?
|
|
260
|
+
fail ArgumentError, 'credits_charged cannot be nil'
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
@credits_charged = credits_charged
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
# Custom attribute writer method with validation
|
|
267
|
+
# @param [Object] credits_total Value to be assigned
|
|
268
|
+
def credits_total=(credits_total)
|
|
269
|
+
if credits_total.nil?
|
|
270
|
+
fail ArgumentError, 'credits_total cannot be nil'
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
@credits_total = credits_total
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
# Custom attribute writer method with validation
|
|
277
|
+
# @param [Object] params Value to be assigned
|
|
278
|
+
def params=(params)
|
|
279
|
+
if params.nil?
|
|
280
|
+
fail ArgumentError, 'params cannot be nil'
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
@params = params
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
# Custom attribute writer method with validation
|
|
287
|
+
# @param [Object] windows Value to be assigned
|
|
288
|
+
def windows=(windows)
|
|
289
|
+
if windows.nil?
|
|
290
|
+
fail ArgumentError, 'windows cannot be nil'
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
@windows = windows
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# Custom attribute writer method with validation
|
|
297
|
+
# @param [Object] items Value to be assigned
|
|
298
|
+
def items=(items)
|
|
299
|
+
if items.nil?
|
|
300
|
+
fail ArgumentError, 'items cannot be nil'
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
@items = items
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
# Custom attribute writer method with validation
|
|
307
|
+
# @param [Object] warnings Value to be assigned
|
|
308
|
+
def warnings=(warnings)
|
|
309
|
+
if warnings.nil?
|
|
310
|
+
fail ArgumentError, 'warnings cannot be nil'
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
@warnings = warnings
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
# Checks equality by comparing each attribute.
|
|
317
|
+
# @param [Object] Object to be compared
|
|
318
|
+
def ==(o)
|
|
319
|
+
return true if self.equal?(o)
|
|
320
|
+
self.class == o.class &&
|
|
321
|
+
object == o.object &&
|
|
322
|
+
dry_run == o.dry_run &&
|
|
323
|
+
credits_charged == o.credits_charged &&
|
|
324
|
+
credits_total == o.credits_total &&
|
|
325
|
+
params == o.params &&
|
|
326
|
+
windows == o.windows &&
|
|
327
|
+
items == o.items &&
|
|
328
|
+
warnings == o.warnings
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
# @see the `==` method
|
|
332
|
+
# @param [Object] Object to be compared
|
|
333
|
+
def eql?(o)
|
|
334
|
+
self == o
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
# Calculates hash code according to all attributes.
|
|
338
|
+
# @return [Integer] Hash code
|
|
339
|
+
def hash
|
|
340
|
+
[object, dry_run, credits_charged, credits_total, params, windows, items, warnings].hash
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
# Builds the object from hash
|
|
344
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
345
|
+
# @return [Object] Returns the model itself
|
|
346
|
+
def self.build_from_hash(attributes)
|
|
347
|
+
return nil unless attributes.is_a?(Hash)
|
|
348
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
349
|
+
transformed_hash = {}
|
|
350
|
+
openapi_types.each_pair do |key, type|
|
|
351
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
352
|
+
transformed_hash["#{key}"] = nil
|
|
353
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
354
|
+
# check to ensure the input is an array given that the attribute
|
|
355
|
+
# is documented as an array but the input is not
|
|
356
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
357
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
358
|
+
end
|
|
359
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
360
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
361
|
+
end
|
|
362
|
+
end
|
|
363
|
+
new(transformed_hash)
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
# Returns the object in the form of hash
|
|
367
|
+
# @return [Hash] Returns the object in the form of hash
|
|
368
|
+
def to_hash
|
|
369
|
+
hash = {}
|
|
370
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
371
|
+
value = self.send(attr)
|
|
372
|
+
if value.nil?
|
|
373
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
374
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
375
|
+
end
|
|
376
|
+
|
|
377
|
+
hash[param] = _to_hash(value)
|
|
378
|
+
end
|
|
379
|
+
hash
|
|
380
|
+
end
|
|
381
|
+
|
|
382
|
+
end
|
|
383
|
+
|
|
384
|
+
end
|
|
@@ -0,0 +1,219 @@
|
|
|
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 WhatsappPreviewWindow < ApiModelBase
|
|
18
|
+
# Window start used
|
|
19
|
+
attr_accessor :start
|
|
20
|
+
|
|
21
|
+
# Window end used
|
|
22
|
+
attr_accessor :_end
|
|
23
|
+
|
|
24
|
+
# Conversations matched by THIS window (before the union dedupe)
|
|
25
|
+
attr_accessor :selected
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
:'start' => :'start',
|
|
31
|
+
:'_end' => :'end',
|
|
32
|
+
:'selected' => :'selected'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns attribute mapping this model knows about
|
|
37
|
+
def self.acceptable_attribute_map
|
|
38
|
+
attribute_map
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns all the JSON keys this model knows about
|
|
42
|
+
def self.acceptable_attributes
|
|
43
|
+
acceptable_attribute_map.values
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute type mapping.
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'start' => :'String',
|
|
50
|
+
:'_end' => :'String',
|
|
51
|
+
:'selected' => :'Integer'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# List of attributes with nullable: true
|
|
56
|
+
def self.openapi_nullable
|
|
57
|
+
Set.new([
|
|
58
|
+
])
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Initializes the object
|
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
63
|
+
def initialize(attributes = {})
|
|
64
|
+
if (!attributes.is_a?(Hash))
|
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `FalaAI::WhatsappPreviewWindow` initialize method"
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
69
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
70
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
71
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `FalaAI::WhatsappPreviewWindow`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
73
|
+
end
|
|
74
|
+
h[k.to_sym] = v
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if attributes.key?(:'start')
|
|
78
|
+
self.start = attributes[:'start']
|
|
79
|
+
else
|
|
80
|
+
self.start = nil
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'_end')
|
|
84
|
+
self._end = attributes[:'_end']
|
|
85
|
+
else
|
|
86
|
+
self._end = nil
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
if attributes.key?(:'selected')
|
|
90
|
+
self.selected = attributes[:'selected']
|
|
91
|
+
else
|
|
92
|
+
self.selected = nil
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
97
|
+
# @return Array for valid properties with the reasons
|
|
98
|
+
def list_invalid_properties
|
|
99
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
100
|
+
invalid_properties = Array.new
|
|
101
|
+
if @start.nil?
|
|
102
|
+
invalid_properties.push('invalid value for "start", start cannot be nil.')
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
if @_end.nil?
|
|
106
|
+
invalid_properties.push('invalid value for "_end", _end cannot be nil.')
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
if @selected.nil?
|
|
110
|
+
invalid_properties.push('invalid value for "selected", selected cannot be nil.')
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
invalid_properties
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Check to see if the all the properties in the model are valid
|
|
117
|
+
# @return true if the model is valid
|
|
118
|
+
def valid?
|
|
119
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
120
|
+
return false if @start.nil?
|
|
121
|
+
return false if @_end.nil?
|
|
122
|
+
return false if @selected.nil?
|
|
123
|
+
true
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Custom attribute writer method with validation
|
|
127
|
+
# @param [Object] start Value to be assigned
|
|
128
|
+
def start=(start)
|
|
129
|
+
if start.nil?
|
|
130
|
+
fail ArgumentError, 'start cannot be nil'
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
@start = start
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Custom attribute writer method with validation
|
|
137
|
+
# @param [Object] _end Value to be assigned
|
|
138
|
+
def _end=(_end)
|
|
139
|
+
if _end.nil?
|
|
140
|
+
fail ArgumentError, '_end cannot be nil'
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
@_end = _end
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Custom attribute writer method with validation
|
|
147
|
+
# @param [Object] selected Value to be assigned
|
|
148
|
+
def selected=(selected)
|
|
149
|
+
if selected.nil?
|
|
150
|
+
fail ArgumentError, 'selected cannot be nil'
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
@selected = selected
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Checks equality by comparing each attribute.
|
|
157
|
+
# @param [Object] Object to be compared
|
|
158
|
+
def ==(o)
|
|
159
|
+
return true if self.equal?(o)
|
|
160
|
+
self.class == o.class &&
|
|
161
|
+
start == o.start &&
|
|
162
|
+
_end == o._end &&
|
|
163
|
+
selected == o.selected
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# @see the `==` method
|
|
167
|
+
# @param [Object] Object to be compared
|
|
168
|
+
def eql?(o)
|
|
169
|
+
self == o
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Calculates hash code according to all attributes.
|
|
173
|
+
# @return [Integer] Hash code
|
|
174
|
+
def hash
|
|
175
|
+
[start, _end, selected].hash
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Builds the object from hash
|
|
179
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
180
|
+
# @return [Object] Returns the model itself
|
|
181
|
+
def self.build_from_hash(attributes)
|
|
182
|
+
return nil unless attributes.is_a?(Hash)
|
|
183
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
184
|
+
transformed_hash = {}
|
|
185
|
+
openapi_types.each_pair do |key, type|
|
|
186
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
187
|
+
transformed_hash["#{key}"] = nil
|
|
188
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
189
|
+
# check to ensure the input is an array given that the attribute
|
|
190
|
+
# is documented as an array but the input is not
|
|
191
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
192
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
193
|
+
end
|
|
194
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
195
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
196
|
+
end
|
|
197
|
+
end
|
|
198
|
+
new(transformed_hash)
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Returns the object in the form of hash
|
|
202
|
+
# @return [Hash] Returns the object in the form of hash
|
|
203
|
+
def to_hash
|
|
204
|
+
hash = {}
|
|
205
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
206
|
+
value = self.send(attr)
|
|
207
|
+
if value.nil?
|
|
208
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
209
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
hash[param] = _to_hash(value)
|
|
213
|
+
end
|
|
214
|
+
hash
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
end
|
|
@@ -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:
|
|
6
|
+
The version of the OpenAPI document: 2.21.273
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|