falaai-api 1.21.47

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 (130) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +205 -0
  4. data/docs/AnalysisApi.md +147 -0
  5. data/docs/AudioEvent.md +26 -0
  6. data/docs/AudioInputMeta.md +26 -0
  7. data/docs/AuditoriaRiscoAnalysisV2.md +22 -0
  8. data/docs/AuditoriaRiscoAppliedActionV2.md +32 -0
  9. data/docs/AuditoriaRiscoAudioEventModelV2.md +22 -0
  10. data/docs/AuditoriaRiscoAuditDecisionsV2.md +22 -0
  11. data/docs/AuditoriaRiscoConversationScoresV2.md +38 -0
  12. data/docs/AuditoriaRiscoDetectionItemV2.md +110 -0
  13. data/docs/AuditoriaRiscoDetectionsV2.md +26 -0
  14. data/docs/AuditoriaRiscoIndexerV2.md +18 -0
  15. data/docs/AuditoriaRiscoMetaV2.md +28 -0
  16. data/docs/AuditoriaRiscoParticipantV2.md +22 -0
  17. data/docs/AuditoriaRiscoParticipantsV2.md +26 -0
  18. data/docs/AuditoriaRiscoRequest.md +38 -0
  19. data/docs/AuditoriaRiscoScoresV2.md +20 -0
  20. data/docs/AuditoriaRiscoScoringExplanationV2.md +20 -0
  21. data/docs/AuditoriaRiscoSummaryV2.md +48 -0
  22. data/docs/AuditoriaRiscoTimelineV2.md +22 -0
  23. data/docs/AuditoriaRiscoUsageV2.md +22 -0
  24. data/docs/AuditoriaRiscoV2.md +46 -0
  25. data/docs/AuditoriaRiscoV2Response.md +18 -0
  26. data/docs/AuditoriaRiscoVerdictV2.md +30 -0
  27. data/docs/CreateEmailAlertRequest.md +22 -0
  28. data/docs/CreateWebhookRequest.md +24 -0
  29. data/docs/DiagnosticAnalysisMap.md +28 -0
  30. data/docs/DiagnosticAudioEvent.md +26 -0
  31. data/docs/DiagnosticCategoricalAnalysis.md +22 -0
  32. data/docs/DiagnosticRequest.md +30 -0
  33. data/docs/DiagnosticResponse.md +28 -0
  34. data/docs/DiagnosticTextAnalysis.md +18 -0
  35. data/docs/DiagnosticUsage.md +22 -0
  36. data/docs/EmailAlertItem.md +32 -0
  37. data/docs/EmailAlertListResponse.md +22 -0
  38. data/docs/EmailAlertMessageResponse.md +18 -0
  39. data/docs/EmailAlertsApi.md +285 -0
  40. data/docs/EmailEvent.md +15 -0
  41. data/docs/HTTPValidationError.md +18 -0
  42. data/docs/HealthApi.md +137 -0
  43. data/docs/HealthResponse.md +28 -0
  44. data/docs/LocationInner.md +15 -0
  45. data/docs/MessageResponse.md +18 -0
  46. data/docs/Participant.md +22 -0
  47. data/docs/ParticipantDiagnostic.md +26 -0
  48. data/docs/SpeechApi.md +85 -0
  49. data/docs/TranscriptionResponse.md +49 -0
  50. data/docs/TranscriptionUsage.md +22 -0
  51. data/docs/UpdateEmailAlertRequest.md +24 -0
  52. data/docs/UpdateWebhookRequest.md +26 -0
  53. data/docs/UsageApi.md +151 -0
  54. data/docs/UsageByKeyItem.md +26 -0
  55. data/docs/UsageLogItem.md +28 -0
  56. data/docs/UsageLogResponse.md +22 -0
  57. data/docs/ValidationError.md +26 -0
  58. data/docs/VersionApi.md +72 -0
  59. data/docs/VersionResponse.md +22 -0
  60. data/docs/WebhookEvent.md +15 -0
  61. data/docs/WebhookItem.md +42 -0
  62. data/docs/WebhookListResponse.md +22 -0
  63. data/docs/WebhooksApi.md +293 -0
  64. data/lib/falaai-api/api/analysis_api.rb +158 -0
  65. data/lib/falaai-api/api/email_alerts_api.rb +294 -0
  66. data/lib/falaai-api/api/health_api.rb +132 -0
  67. data/lib/falaai-api/api/speech_api.rb +100 -0
  68. data/lib/falaai-api/api/usage_api.rb +156 -0
  69. data/lib/falaai-api/api/version_api.rb +77 -0
  70. data/lib/falaai-api/api/webhooks_api.rb +302 -0
  71. data/lib/falaai-api/api_client.rb +397 -0
  72. data/lib/falaai-api/api_error.rb +58 -0
  73. data/lib/falaai-api/api_model_base.rb +88 -0
  74. data/lib/falaai-api/configuration.rb +309 -0
  75. data/lib/falaai-api/models/audio_event.rb +273 -0
  76. data/lib/falaai-api/models/audio_input_meta.rb +273 -0
  77. data/lib/falaai-api/models/auditoria_risco_analysis_v2.rb +174 -0
  78. data/lib/falaai-api/models/auditoria_risco_applied_action_v2.rb +292 -0
  79. data/lib/falaai-api/models/auditoria_risco_audio_event_model_v2.rb +174 -0
  80. data/lib/falaai-api/models/auditoria_risco_audit_decisions_v2.rb +170 -0
  81. data/lib/falaai-api/models/auditoria_risco_conversation_scores_v2.rb +251 -0
  82. data/lib/falaai-api/models/auditoria_risco_detection_item_v2.rb +651 -0
  83. data/lib/falaai-api/models/auditoria_risco_detections_v2.rb +198 -0
  84. data/lib/falaai-api/models/auditoria_risco_indexer_v2.rb +150 -0
  85. data/lib/falaai-api/models/auditoria_risco_meta_v2.rb +234 -0
  86. data/lib/falaai-api/models/auditoria_risco_participant_v2.rb +168 -0
  87. data/lib/falaai-api/models/auditoria_risco_participants_v2.rb +196 -0
  88. data/lib/falaai-api/models/auditoria_risco_request.rb +451 -0
  89. data/lib/falaai-api/models/auditoria_risco_scores_v2.rb +177 -0
  90. data/lib/falaai-api/models/auditoria_risco_scoring_explanation_v2.rb +160 -0
  91. data/lib/falaai-api/models/auditoria_risco_summary_v2.rb +300 -0
  92. data/lib/falaai-api/models/auditoria_risco_timeline_v2.rb +174 -0
  93. data/lib/falaai-api/models/auditoria_risco_usage_v2.rb +219 -0
  94. data/lib/falaai-api/models/auditoria_risco_v2.rb +548 -0
  95. data/lib/falaai-api/models/auditoria_risco_v2_response.rb +165 -0
  96. data/lib/falaai-api/models/auditoria_risco_verdict_v2.rb +213 -0
  97. data/lib/falaai-api/models/create_email_alert_request.rb +221 -0
  98. data/lib/falaai-api/models/create_webhook_request.rb +233 -0
  99. data/lib/falaai-api/models/diagnostic_analysis_map.rb +285 -0
  100. data/lib/falaai-api/models/diagnostic_audio_event.rb +205 -0
  101. data/lib/falaai-api/models/diagnostic_categorical_analysis.rb +170 -0
  102. data/lib/falaai-api/models/diagnostic_request.rb +316 -0
  103. data/lib/falaai-api/models/diagnostic_response.rb +283 -0
  104. data/lib/falaai-api/models/diagnostic_text_analysis.rb +148 -0
  105. data/lib/falaai-api/models/diagnostic_usage.rb +219 -0
  106. data/lib/falaai-api/models/email_alert_item.rb +356 -0
  107. data/lib/falaai-api/models/email_alert_list_response.rb +218 -0
  108. data/lib/falaai-api/models/email_alert_message_response.rb +165 -0
  109. data/lib/falaai-api/models/email_event.rb +47 -0
  110. data/lib/falaai-api/models/health_response.rb +300 -0
  111. data/lib/falaai-api/models/http_validation_error.rb +149 -0
  112. data/lib/falaai-api/models/location_inner.rb +103 -0
  113. data/lib/falaai-api/models/message_response.rb +165 -0
  114. data/lib/falaai-api/models/participant.rb +226 -0
  115. data/lib/falaai-api/models/participant_diagnostic.rb +222 -0
  116. data/lib/falaai-api/models/transcription_response.rb +540 -0
  117. data/lib/falaai-api/models/transcription_usage.rb +219 -0
  118. data/lib/falaai-api/models/update_email_alert_request.rb +176 -0
  119. data/lib/falaai-api/models/update_webhook_request.rb +190 -0
  120. data/lib/falaai-api/models/usage_by_key_item.rb +256 -0
  121. data/lib/falaai-api/models/usage_log_item.rb +300 -0
  122. data/lib/falaai-api/models/usage_log_response.rb +218 -0
  123. data/lib/falaai-api/models/validation_error.rb +237 -0
  124. data/lib/falaai-api/models/version_response.rb +219 -0
  125. data/lib/falaai-api/models/webhook_event.rb +48 -0
  126. data/lib/falaai-api/models/webhook_item.rb +442 -0
  127. data/lib/falaai-api/models/webhook_list_response.rb +218 -0
  128. data/lib/falaai-api/version.rb +15 -0
  129. data/lib/falaai-api.rb +100 -0
  130. metadata +229 -0
@@ -0,0 +1,548 @@
1
+ =begin
2
+ #FalaAI API
3
+
4
+ #Transcribe, diagnose and score calls with 3 simple endpoints. **Endpoints:** - `POST /v1/audio/transcriptions` — Audio to text - `POST /v1/analyze/diagnostic` — Conversation analysis - `POST /v1/analyze/auditoriaRisco` — Compliance audit **Complete flow (Python):** ```python import httpx API = 'https://api.fala.ai' KEY = 'fai_xxx' HD = {'Authorization': f'Bearer {KEY}'} # 1. Transcribe files = {'file': open('call.mp3', 'rb')} resp = httpx.post(f'{API}/v1/audio/transcriptions', headers=HD, files=files, data={'model': 'falaai-transcribe-1', 'language': 'pt'}) tr = resp.json() print(f'Text: {tr[\"text\"][:100]}...') # 2. Diagnose resp = httpx.post(f'{API}/v1/analyze/diagnostic', headers=HD, json={'dialog': tr['dialog'], 'language': 'pt-BR', 'duration_seconds': tr['duration_seconds']}) diag = resp.json() print(f'Sentiment: {diag[\"analysis\"][\"sentiment\"][\"list_choice\"]}') print(f'Summary: {diag[\"analysis\"][\"dialogue_summary\"][\"explanation\"][:100]}...') # 3. Audit resp = httpx.post(f'{API}/v1/analyze/auditoriaRisco', headers=HD, json={'dialogo': tr['dialog'], 'duration_seconds': tr['duration_seconds']}) audit = resp.json() print(f'Score: {audit[\"audit_score\"]} | Verdict: {audit[\"verdict\"]}') print(f'Detections: {audit[\"total_detections\"]} | Violations: {len(audit[\"violations\"])} | Positives: {len(audit[\"positives\"])}') ``` **Authentication:** All endpoints require an API Key in the `Authorization` header: `Bearer fai_xxx` Get your API Key at [falaai.action.tec.br/api](https://falaai.action.tec.br/api)
5
+
6
+ The version of the OpenAPI document: 1.21.47
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
+ # Response V2 (build_public_response_v2) — blocos logicos EN-US. Fonte: response_builder.py.
18
+ class AuditoriaRiscoV2 < ApiModelBase
19
+ # Identification + usage
20
+ attr_accessor :meta
21
+
22
+ # Participants/roles/direction
23
+ attr_accessor :participants
24
+
25
+ # Verdict + level + applied actions
26
+ attr_accessor :verdict
27
+
28
+ # Consolidated + per-participant scores
29
+ attr_accessor :scores
30
+
31
+ # violations/positives/client alerts
32
+ attr_accessor :detections
33
+
34
+ # global_metrics + final_analysis + frameworks
35
+ attr_accessor :analysis
36
+
37
+ # turns_sentiment + audio_events + groups
38
+ attr_accessor :timeline
39
+
40
+ # MAC audio event semantics
41
+ attr_accessor :audio_event_model
42
+
43
+ # Per-category summary (keyed by category)
44
+ attr_accessor :categories_summary
45
+
46
+ # Suggested terms for bank
47
+ attr_accessor :indexer
48
+
49
+ # Executive summary counts
50
+ attr_accessor :summary
51
+
52
+ # Used actions i18n catalog (keyed by action)
53
+ attr_accessor :acoes_i18n
54
+
55
+ # Risk origin + validator changes
56
+ attr_accessor :audit_decisions
57
+
58
+ # Score composition explanation
59
+ attr_accessor :scoring_explanation
60
+
61
+ # HTML report (base64 gzip)
62
+ attr_accessor :html_report
63
+
64
+ # Attribute mapping from ruby-style variable name to JSON key.
65
+ def self.attribute_map
66
+ {
67
+ :'meta' => :'meta',
68
+ :'participants' => :'participants',
69
+ :'verdict' => :'verdict',
70
+ :'scores' => :'scores',
71
+ :'detections' => :'detections',
72
+ :'analysis' => :'analysis',
73
+ :'timeline' => :'timeline',
74
+ :'audio_event_model' => :'audio_event_model',
75
+ :'categories_summary' => :'categories_summary',
76
+ :'indexer' => :'indexer',
77
+ :'summary' => :'summary',
78
+ :'acoes_i18n' => :'acoes_i18n',
79
+ :'audit_decisions' => :'audit_decisions',
80
+ :'scoring_explanation' => :'scoring_explanation',
81
+ :'html_report' => :'html_report'
82
+ }
83
+ end
84
+
85
+ # Returns attribute mapping this model knows about
86
+ def self.acceptable_attribute_map
87
+ attribute_map
88
+ end
89
+
90
+ # Returns all the JSON keys this model knows about
91
+ def self.acceptable_attributes
92
+ acceptable_attribute_map.values
93
+ end
94
+
95
+ # Attribute type mapping.
96
+ def self.openapi_types
97
+ {
98
+ :'meta' => :'AuditoriaRiscoMetaV2',
99
+ :'participants' => :'AuditoriaRiscoParticipantsV2',
100
+ :'verdict' => :'AuditoriaRiscoVerdictV2',
101
+ :'scores' => :'AuditoriaRiscoScoresV2',
102
+ :'detections' => :'AuditoriaRiscoDetectionsV2',
103
+ :'analysis' => :'AuditoriaRiscoAnalysisV2',
104
+ :'timeline' => :'AuditoriaRiscoTimelineV2',
105
+ :'audio_event_model' => :'AuditoriaRiscoAudioEventModelV2',
106
+ :'categories_summary' => :'Hash<String, Object>',
107
+ :'indexer' => :'AuditoriaRiscoIndexerV2',
108
+ :'summary' => :'AuditoriaRiscoSummaryV2',
109
+ :'acoes_i18n' => :'Hash<String, Object>',
110
+ :'audit_decisions' => :'AuditoriaRiscoAuditDecisionsV2',
111
+ :'scoring_explanation' => :'AuditoriaRiscoScoringExplanationV2',
112
+ :'html_report' => :'String'
113
+ }
114
+ end
115
+
116
+ # List of attributes with nullable: true
117
+ def self.openapi_nullable
118
+ Set.new([
119
+ ])
120
+ end
121
+
122
+ # Initializes the object
123
+ # @param [Hash] attributes Model attributes in the form of hash
124
+ def initialize(attributes = {})
125
+ if (!attributes.is_a?(Hash))
126
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FalaAI::AuditoriaRiscoV2` initialize method"
127
+ end
128
+
129
+ # check to see if the attribute exists and convert string to symbol for hash key
130
+ acceptable_attribute_map = self.class.acceptable_attribute_map
131
+ attributes = attributes.each_with_object({}) { |(k, v), h|
132
+ if (!acceptable_attribute_map.key?(k.to_sym))
133
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FalaAI::AuditoriaRiscoV2`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
134
+ end
135
+ h[k.to_sym] = v
136
+ }
137
+
138
+ if attributes.key?(:'meta')
139
+ self.meta = attributes[:'meta']
140
+ else
141
+ self.meta = nil
142
+ end
143
+
144
+ if attributes.key?(:'participants')
145
+ self.participants = attributes[:'participants']
146
+ else
147
+ self.participants = nil
148
+ end
149
+
150
+ if attributes.key?(:'verdict')
151
+ self.verdict = attributes[:'verdict']
152
+ else
153
+ self.verdict = nil
154
+ end
155
+
156
+ if attributes.key?(:'scores')
157
+ self.scores = attributes[:'scores']
158
+ else
159
+ self.scores = nil
160
+ end
161
+
162
+ if attributes.key?(:'detections')
163
+ self.detections = attributes[:'detections']
164
+ else
165
+ self.detections = nil
166
+ end
167
+
168
+ if attributes.key?(:'analysis')
169
+ self.analysis = attributes[:'analysis']
170
+ else
171
+ self.analysis = nil
172
+ end
173
+
174
+ if attributes.key?(:'timeline')
175
+ self.timeline = attributes[:'timeline']
176
+ else
177
+ self.timeline = nil
178
+ end
179
+
180
+ if attributes.key?(:'audio_event_model')
181
+ self.audio_event_model = attributes[:'audio_event_model']
182
+ else
183
+ self.audio_event_model = nil
184
+ end
185
+
186
+ if attributes.key?(:'categories_summary')
187
+ if (value = attributes[:'categories_summary']).is_a?(Hash)
188
+ self.categories_summary = value
189
+ end
190
+ else
191
+ self.categories_summary = nil
192
+ end
193
+
194
+ if attributes.key?(:'indexer')
195
+ self.indexer = attributes[:'indexer']
196
+ else
197
+ self.indexer = nil
198
+ end
199
+
200
+ if attributes.key?(:'summary')
201
+ self.summary = attributes[:'summary']
202
+ else
203
+ self.summary = nil
204
+ end
205
+
206
+ if attributes.key?(:'acoes_i18n')
207
+ if (value = attributes[:'acoes_i18n']).is_a?(Hash)
208
+ self.acoes_i18n = value
209
+ end
210
+ else
211
+ self.acoes_i18n = nil
212
+ end
213
+
214
+ if attributes.key?(:'audit_decisions')
215
+ self.audit_decisions = attributes[:'audit_decisions']
216
+ else
217
+ self.audit_decisions = nil
218
+ end
219
+
220
+ if attributes.key?(:'scoring_explanation')
221
+ self.scoring_explanation = attributes[:'scoring_explanation']
222
+ else
223
+ self.scoring_explanation = nil
224
+ end
225
+
226
+ if attributes.key?(:'html_report')
227
+ self.html_report = attributes[:'html_report']
228
+ else
229
+ self.html_report = nil
230
+ end
231
+ end
232
+
233
+ # Show invalid properties with the reasons. Usually used together with valid?
234
+ # @return Array for valid properties with the reasons
235
+ def list_invalid_properties
236
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
237
+ invalid_properties = Array.new
238
+ if @meta.nil?
239
+ invalid_properties.push('invalid value for "meta", meta cannot be nil.')
240
+ end
241
+
242
+ if @participants.nil?
243
+ invalid_properties.push('invalid value for "participants", participants cannot be nil.')
244
+ end
245
+
246
+ if @verdict.nil?
247
+ invalid_properties.push('invalid value for "verdict", verdict cannot be nil.')
248
+ end
249
+
250
+ if @scores.nil?
251
+ invalid_properties.push('invalid value for "scores", scores cannot be nil.')
252
+ end
253
+
254
+ if @detections.nil?
255
+ invalid_properties.push('invalid value for "detections", detections cannot be nil.')
256
+ end
257
+
258
+ if @analysis.nil?
259
+ invalid_properties.push('invalid value for "analysis", analysis cannot be nil.')
260
+ end
261
+
262
+ if @timeline.nil?
263
+ invalid_properties.push('invalid value for "timeline", timeline cannot be nil.')
264
+ end
265
+
266
+ if @audio_event_model.nil?
267
+ invalid_properties.push('invalid value for "audio_event_model", audio_event_model cannot be nil.')
268
+ end
269
+
270
+ if @categories_summary.nil?
271
+ invalid_properties.push('invalid value for "categories_summary", categories_summary cannot be nil.')
272
+ end
273
+
274
+ if @indexer.nil?
275
+ invalid_properties.push('invalid value for "indexer", indexer cannot be nil.')
276
+ end
277
+
278
+ if @summary.nil?
279
+ invalid_properties.push('invalid value for "summary", summary cannot be nil.')
280
+ end
281
+
282
+ if @acoes_i18n.nil?
283
+ invalid_properties.push('invalid value for "acoes_i18n", acoes_i18n cannot be nil.')
284
+ end
285
+
286
+ if @audit_decisions.nil?
287
+ invalid_properties.push('invalid value for "audit_decisions", audit_decisions cannot be nil.')
288
+ end
289
+
290
+ if @scoring_explanation.nil?
291
+ invalid_properties.push('invalid value for "scoring_explanation", scoring_explanation cannot be nil.')
292
+ end
293
+
294
+ if @html_report.nil?
295
+ invalid_properties.push('invalid value for "html_report", html_report cannot be nil.')
296
+ end
297
+
298
+ invalid_properties
299
+ end
300
+
301
+ # Check to see if the all the properties in the model are valid
302
+ # @return true if the model is valid
303
+ def valid?
304
+ warn '[DEPRECATED] the `valid?` method is obsolete'
305
+ return false if @meta.nil?
306
+ return false if @participants.nil?
307
+ return false if @verdict.nil?
308
+ return false if @scores.nil?
309
+ return false if @detections.nil?
310
+ return false if @analysis.nil?
311
+ return false if @timeline.nil?
312
+ return false if @audio_event_model.nil?
313
+ return false if @categories_summary.nil?
314
+ return false if @indexer.nil?
315
+ return false if @summary.nil?
316
+ return false if @acoes_i18n.nil?
317
+ return false if @audit_decisions.nil?
318
+ return false if @scoring_explanation.nil?
319
+ return false if @html_report.nil?
320
+ true
321
+ end
322
+
323
+ # Custom attribute writer method with validation
324
+ # @param [Object] meta Value to be assigned
325
+ def meta=(meta)
326
+ if meta.nil?
327
+ fail ArgumentError, 'meta cannot be nil'
328
+ end
329
+
330
+ @meta = meta
331
+ end
332
+
333
+ # Custom attribute writer method with validation
334
+ # @param [Object] participants Value to be assigned
335
+ def participants=(participants)
336
+ if participants.nil?
337
+ fail ArgumentError, 'participants cannot be nil'
338
+ end
339
+
340
+ @participants = participants
341
+ end
342
+
343
+ # Custom attribute writer method with validation
344
+ # @param [Object] verdict Value to be assigned
345
+ def verdict=(verdict)
346
+ if verdict.nil?
347
+ fail ArgumentError, 'verdict cannot be nil'
348
+ end
349
+
350
+ @verdict = verdict
351
+ end
352
+
353
+ # Custom attribute writer method with validation
354
+ # @param [Object] scores Value to be assigned
355
+ def scores=(scores)
356
+ if scores.nil?
357
+ fail ArgumentError, 'scores cannot be nil'
358
+ end
359
+
360
+ @scores = scores
361
+ end
362
+
363
+ # Custom attribute writer method with validation
364
+ # @param [Object] detections Value to be assigned
365
+ def detections=(detections)
366
+ if detections.nil?
367
+ fail ArgumentError, 'detections cannot be nil'
368
+ end
369
+
370
+ @detections = detections
371
+ end
372
+
373
+ # Custom attribute writer method with validation
374
+ # @param [Object] analysis Value to be assigned
375
+ def analysis=(analysis)
376
+ if analysis.nil?
377
+ fail ArgumentError, 'analysis cannot be nil'
378
+ end
379
+
380
+ @analysis = analysis
381
+ end
382
+
383
+ # Custom attribute writer method with validation
384
+ # @param [Object] timeline Value to be assigned
385
+ def timeline=(timeline)
386
+ if timeline.nil?
387
+ fail ArgumentError, 'timeline cannot be nil'
388
+ end
389
+
390
+ @timeline = timeline
391
+ end
392
+
393
+ # Custom attribute writer method with validation
394
+ # @param [Object] audio_event_model Value to be assigned
395
+ def audio_event_model=(audio_event_model)
396
+ if audio_event_model.nil?
397
+ fail ArgumentError, 'audio_event_model cannot be nil'
398
+ end
399
+
400
+ @audio_event_model = audio_event_model
401
+ end
402
+
403
+ # Custom attribute writer method with validation
404
+ # @param [Object] categories_summary Value to be assigned
405
+ def categories_summary=(categories_summary)
406
+ if categories_summary.nil?
407
+ fail ArgumentError, 'categories_summary cannot be nil'
408
+ end
409
+
410
+ @categories_summary = categories_summary
411
+ end
412
+
413
+ # Custom attribute writer method with validation
414
+ # @param [Object] indexer Value to be assigned
415
+ def indexer=(indexer)
416
+ if indexer.nil?
417
+ fail ArgumentError, 'indexer cannot be nil'
418
+ end
419
+
420
+ @indexer = indexer
421
+ end
422
+
423
+ # Custom attribute writer method with validation
424
+ # @param [Object] summary Value to be assigned
425
+ def summary=(summary)
426
+ if summary.nil?
427
+ fail ArgumentError, 'summary cannot be nil'
428
+ end
429
+
430
+ @summary = summary
431
+ end
432
+
433
+ # Custom attribute writer method with validation
434
+ # @param [Object] acoes_i18n Value to be assigned
435
+ def acoes_i18n=(acoes_i18n)
436
+ if acoes_i18n.nil?
437
+ fail ArgumentError, 'acoes_i18n cannot be nil'
438
+ end
439
+
440
+ @acoes_i18n = acoes_i18n
441
+ end
442
+
443
+ # Custom attribute writer method with validation
444
+ # @param [Object] audit_decisions Value to be assigned
445
+ def audit_decisions=(audit_decisions)
446
+ if audit_decisions.nil?
447
+ fail ArgumentError, 'audit_decisions cannot be nil'
448
+ end
449
+
450
+ @audit_decisions = audit_decisions
451
+ end
452
+
453
+ # Custom attribute writer method with validation
454
+ # @param [Object] scoring_explanation Value to be assigned
455
+ def scoring_explanation=(scoring_explanation)
456
+ if scoring_explanation.nil?
457
+ fail ArgumentError, 'scoring_explanation cannot be nil'
458
+ end
459
+
460
+ @scoring_explanation = scoring_explanation
461
+ end
462
+
463
+ # Custom attribute writer method with validation
464
+ # @param [Object] html_report Value to be assigned
465
+ def html_report=(html_report)
466
+ if html_report.nil?
467
+ fail ArgumentError, 'html_report cannot be nil'
468
+ end
469
+
470
+ @html_report = html_report
471
+ end
472
+
473
+ # Checks equality by comparing each attribute.
474
+ # @param [Object] Object to be compared
475
+ def ==(o)
476
+ return true if self.equal?(o)
477
+ self.class == o.class &&
478
+ meta == o.meta &&
479
+ participants == o.participants &&
480
+ verdict == o.verdict &&
481
+ scores == o.scores &&
482
+ detections == o.detections &&
483
+ analysis == o.analysis &&
484
+ timeline == o.timeline &&
485
+ audio_event_model == o.audio_event_model &&
486
+ categories_summary == o.categories_summary &&
487
+ indexer == o.indexer &&
488
+ summary == o.summary &&
489
+ acoes_i18n == o.acoes_i18n &&
490
+ audit_decisions == o.audit_decisions &&
491
+ scoring_explanation == o.scoring_explanation &&
492
+ html_report == o.html_report
493
+ end
494
+
495
+ # @see the `==` method
496
+ # @param [Object] Object to be compared
497
+ def eql?(o)
498
+ self == o
499
+ end
500
+
501
+ # Calculates hash code according to all attributes.
502
+ # @return [Integer] Hash code
503
+ def hash
504
+ [meta, participants, verdict, scores, detections, analysis, timeline, audio_event_model, categories_summary, indexer, summary, acoes_i18n, audit_decisions, scoring_explanation, html_report].hash
505
+ end
506
+
507
+ # Builds the object from hash
508
+ # @param [Hash] attributes Model attributes in the form of hash
509
+ # @return [Object] Returns the model itself
510
+ def self.build_from_hash(attributes)
511
+ return nil unless attributes.is_a?(Hash)
512
+ attributes = attributes.transform_keys(&:to_sym)
513
+ transformed_hash = {}
514
+ openapi_types.each_pair do |key, type|
515
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
516
+ transformed_hash["#{key}"] = nil
517
+ elsif type =~ /\AArray<(.*)>/i
518
+ # check to ensure the input is an array given that the attribute
519
+ # is documented as an array but the input is not
520
+ if attributes[attribute_map[key]].is_a?(Array)
521
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
522
+ end
523
+ elsif !attributes[attribute_map[key]].nil?
524
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
525
+ end
526
+ end
527
+ new(transformed_hash)
528
+ end
529
+
530
+ # Returns the object in the form of hash
531
+ # @return [Hash] Returns the object in the form of hash
532
+ def to_hash
533
+ hash = {}
534
+ self.class.attribute_map.each_pair do |attr, param|
535
+ value = self.send(attr)
536
+ if value.nil?
537
+ is_nullable = self.class.openapi_nullable.include?(attr)
538
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
539
+ end
540
+
541
+ hash[param] = _to_hash(value)
542
+ end
543
+ hash
544
+ end
545
+
546
+ end
547
+
548
+ end