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.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.md +205 -0
- data/docs/AnalysisApi.md +147 -0
- data/docs/AudioEvent.md +26 -0
- data/docs/AudioInputMeta.md +26 -0
- data/docs/AuditoriaRiscoAnalysisV2.md +22 -0
- data/docs/AuditoriaRiscoAppliedActionV2.md +32 -0
- data/docs/AuditoriaRiscoAudioEventModelV2.md +22 -0
- data/docs/AuditoriaRiscoAuditDecisionsV2.md +22 -0
- data/docs/AuditoriaRiscoConversationScoresV2.md +38 -0
- data/docs/AuditoriaRiscoDetectionItemV2.md +110 -0
- data/docs/AuditoriaRiscoDetectionsV2.md +26 -0
- data/docs/AuditoriaRiscoIndexerV2.md +18 -0
- data/docs/AuditoriaRiscoMetaV2.md +28 -0
- data/docs/AuditoriaRiscoParticipantV2.md +22 -0
- data/docs/AuditoriaRiscoParticipantsV2.md +26 -0
- data/docs/AuditoriaRiscoRequest.md +38 -0
- data/docs/AuditoriaRiscoScoresV2.md +20 -0
- data/docs/AuditoriaRiscoScoringExplanationV2.md +20 -0
- data/docs/AuditoriaRiscoSummaryV2.md +48 -0
- data/docs/AuditoriaRiscoTimelineV2.md +22 -0
- data/docs/AuditoriaRiscoUsageV2.md +22 -0
- data/docs/AuditoriaRiscoV2.md +46 -0
- data/docs/AuditoriaRiscoV2Response.md +18 -0
- data/docs/AuditoriaRiscoVerdictV2.md +30 -0
- data/docs/CreateEmailAlertRequest.md +22 -0
- data/docs/CreateWebhookRequest.md +24 -0
- data/docs/DiagnosticAnalysisMap.md +28 -0
- data/docs/DiagnosticAudioEvent.md +26 -0
- data/docs/DiagnosticCategoricalAnalysis.md +22 -0
- data/docs/DiagnosticRequest.md +30 -0
- data/docs/DiagnosticResponse.md +28 -0
- data/docs/DiagnosticTextAnalysis.md +18 -0
- data/docs/DiagnosticUsage.md +22 -0
- data/docs/EmailAlertItem.md +32 -0
- data/docs/EmailAlertListResponse.md +22 -0
- data/docs/EmailAlertMessageResponse.md +18 -0
- data/docs/EmailAlertsApi.md +285 -0
- data/docs/EmailEvent.md +15 -0
- data/docs/HTTPValidationError.md +18 -0
- data/docs/HealthApi.md +137 -0
- data/docs/HealthResponse.md +28 -0
- data/docs/LocationInner.md +15 -0
- data/docs/MessageResponse.md +18 -0
- data/docs/Participant.md +22 -0
- data/docs/ParticipantDiagnostic.md +26 -0
- data/docs/SpeechApi.md +85 -0
- data/docs/TranscriptionResponse.md +49 -0
- data/docs/TranscriptionUsage.md +22 -0
- data/docs/UpdateEmailAlertRequest.md +24 -0
- data/docs/UpdateWebhookRequest.md +26 -0
- data/docs/UsageApi.md +151 -0
- data/docs/UsageByKeyItem.md +26 -0
- data/docs/UsageLogItem.md +28 -0
- data/docs/UsageLogResponse.md +22 -0
- data/docs/ValidationError.md +26 -0
- data/docs/VersionApi.md +72 -0
- data/docs/VersionResponse.md +22 -0
- data/docs/WebhookEvent.md +15 -0
- data/docs/WebhookItem.md +42 -0
- data/docs/WebhookListResponse.md +22 -0
- data/docs/WebhooksApi.md +293 -0
- data/lib/falaai-api/api/analysis_api.rb +158 -0
- data/lib/falaai-api/api/email_alerts_api.rb +294 -0
- data/lib/falaai-api/api/health_api.rb +132 -0
- data/lib/falaai-api/api/speech_api.rb +100 -0
- data/lib/falaai-api/api/usage_api.rb +156 -0
- data/lib/falaai-api/api/version_api.rb +77 -0
- data/lib/falaai-api/api/webhooks_api.rb +302 -0
- data/lib/falaai-api/api_client.rb +397 -0
- data/lib/falaai-api/api_error.rb +58 -0
- data/lib/falaai-api/api_model_base.rb +88 -0
- data/lib/falaai-api/configuration.rb +309 -0
- data/lib/falaai-api/models/audio_event.rb +273 -0
- data/lib/falaai-api/models/audio_input_meta.rb +273 -0
- data/lib/falaai-api/models/auditoria_risco_analysis_v2.rb +174 -0
- data/lib/falaai-api/models/auditoria_risco_applied_action_v2.rb +292 -0
- data/lib/falaai-api/models/auditoria_risco_audio_event_model_v2.rb +174 -0
- data/lib/falaai-api/models/auditoria_risco_audit_decisions_v2.rb +170 -0
- data/lib/falaai-api/models/auditoria_risco_conversation_scores_v2.rb +251 -0
- data/lib/falaai-api/models/auditoria_risco_detection_item_v2.rb +651 -0
- data/lib/falaai-api/models/auditoria_risco_detections_v2.rb +198 -0
- data/lib/falaai-api/models/auditoria_risco_indexer_v2.rb +150 -0
- data/lib/falaai-api/models/auditoria_risco_meta_v2.rb +234 -0
- data/lib/falaai-api/models/auditoria_risco_participant_v2.rb +168 -0
- data/lib/falaai-api/models/auditoria_risco_participants_v2.rb +196 -0
- data/lib/falaai-api/models/auditoria_risco_request.rb +451 -0
- data/lib/falaai-api/models/auditoria_risco_scores_v2.rb +177 -0
- data/lib/falaai-api/models/auditoria_risco_scoring_explanation_v2.rb +160 -0
- data/lib/falaai-api/models/auditoria_risco_summary_v2.rb +300 -0
- data/lib/falaai-api/models/auditoria_risco_timeline_v2.rb +174 -0
- data/lib/falaai-api/models/auditoria_risco_usage_v2.rb +219 -0
- data/lib/falaai-api/models/auditoria_risco_v2.rb +548 -0
- data/lib/falaai-api/models/auditoria_risco_v2_response.rb +165 -0
- data/lib/falaai-api/models/auditoria_risco_verdict_v2.rb +213 -0
- data/lib/falaai-api/models/create_email_alert_request.rb +221 -0
- data/lib/falaai-api/models/create_webhook_request.rb +233 -0
- data/lib/falaai-api/models/diagnostic_analysis_map.rb +285 -0
- data/lib/falaai-api/models/diagnostic_audio_event.rb +205 -0
- data/lib/falaai-api/models/diagnostic_categorical_analysis.rb +170 -0
- data/lib/falaai-api/models/diagnostic_request.rb +316 -0
- data/lib/falaai-api/models/diagnostic_response.rb +283 -0
- data/lib/falaai-api/models/diagnostic_text_analysis.rb +148 -0
- data/lib/falaai-api/models/diagnostic_usage.rb +219 -0
- data/lib/falaai-api/models/email_alert_item.rb +356 -0
- data/lib/falaai-api/models/email_alert_list_response.rb +218 -0
- data/lib/falaai-api/models/email_alert_message_response.rb +165 -0
- data/lib/falaai-api/models/email_event.rb +47 -0
- data/lib/falaai-api/models/health_response.rb +300 -0
- data/lib/falaai-api/models/http_validation_error.rb +149 -0
- data/lib/falaai-api/models/location_inner.rb +103 -0
- data/lib/falaai-api/models/message_response.rb +165 -0
- data/lib/falaai-api/models/participant.rb +226 -0
- data/lib/falaai-api/models/participant_diagnostic.rb +222 -0
- data/lib/falaai-api/models/transcription_response.rb +540 -0
- data/lib/falaai-api/models/transcription_usage.rb +219 -0
- data/lib/falaai-api/models/update_email_alert_request.rb +176 -0
- data/lib/falaai-api/models/update_webhook_request.rb +190 -0
- data/lib/falaai-api/models/usage_by_key_item.rb +256 -0
- data/lib/falaai-api/models/usage_log_item.rb +300 -0
- data/lib/falaai-api/models/usage_log_response.rb +218 -0
- data/lib/falaai-api/models/validation_error.rb +237 -0
- data/lib/falaai-api/models/version_response.rb +219 -0
- data/lib/falaai-api/models/webhook_event.rb +48 -0
- data/lib/falaai-api/models/webhook_item.rb +442 -0
- data/lib/falaai-api/models/webhook_list_response.rb +218 -0
- data/lib/falaai-api/version.rb +15 -0
- data/lib/falaai-api.rb +100 -0
- metadata +229 -0
|
@@ -0,0 +1,540 @@
|
|
|
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
|
+
class TranscriptionResponse < ApiModelBase
|
|
18
|
+
# Unique transcription identifier. Prefix 'tr-' followed by UUID
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
# Returned object type. Always 'transcription'
|
|
22
|
+
attr_accessor :object
|
|
23
|
+
|
|
24
|
+
# Model used for transcription. Ex: 'falaai-transcribe-1'
|
|
25
|
+
attr_accessor :model
|
|
26
|
+
|
|
27
|
+
# Original audio file name uploaded
|
|
28
|
+
attr_accessor :filename
|
|
29
|
+
|
|
30
|
+
# Processing datetime in ISO 8601 UTC format
|
|
31
|
+
attr_accessor :processed_at
|
|
32
|
+
|
|
33
|
+
# Usage and processing information
|
|
34
|
+
attr_accessor :usage
|
|
35
|
+
|
|
36
|
+
# ISO 639-3 language code detected in audio. Ex: 'por' (Portuguese), 'eng' (English), 'spa' (Spanish)
|
|
37
|
+
attr_accessor :language
|
|
38
|
+
|
|
39
|
+
# Language detection confidence level (0.0 to 1.0). Higher is more reliable
|
|
40
|
+
attr_accessor :language_confidence
|
|
41
|
+
|
|
42
|
+
# Total audio duration in seconds
|
|
43
|
+
attr_accessor :duration_seconds
|
|
44
|
+
|
|
45
|
+
# Full transcription as plain text, including audio events in brackets
|
|
46
|
+
attr_accessor :text
|
|
47
|
+
|
|
48
|
+
# Turn-by-turn formatted transcript with speaker identification and start/end timestamps
|
|
49
|
+
attr_accessor :dialog
|
|
50
|
+
|
|
51
|
+
# List of detected audio events (laughs, sighs, pauses, etc) with timestamps and duration
|
|
52
|
+
attr_accessor :audio_events
|
|
53
|
+
|
|
54
|
+
# Unique audio event types found in transcription, alphabetically sorted
|
|
55
|
+
attr_accessor :event_types
|
|
56
|
+
|
|
57
|
+
# Total number of recognized words in transcription
|
|
58
|
+
attr_accessor :word_count
|
|
59
|
+
|
|
60
|
+
# Metadados do arquivo de audio enviado (duracao, formato, codec, sample rate, canais)
|
|
61
|
+
attr_accessor :input
|
|
62
|
+
|
|
63
|
+
# Client-supplied ID echoed verbatim (if provided in request)
|
|
64
|
+
attr_accessor :client_reference_id
|
|
65
|
+
|
|
66
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
67
|
+
def self.attribute_map
|
|
68
|
+
{
|
|
69
|
+
:'id' => :'id',
|
|
70
|
+
:'object' => :'object',
|
|
71
|
+
:'model' => :'model',
|
|
72
|
+
:'filename' => :'filename',
|
|
73
|
+
:'processed_at' => :'processed_at',
|
|
74
|
+
:'usage' => :'usage',
|
|
75
|
+
:'language' => :'language',
|
|
76
|
+
:'language_confidence' => :'language_confidence',
|
|
77
|
+
:'duration_seconds' => :'duration_seconds',
|
|
78
|
+
:'text' => :'text',
|
|
79
|
+
:'dialog' => :'dialog',
|
|
80
|
+
:'audio_events' => :'audio_events',
|
|
81
|
+
:'event_types' => :'event_types',
|
|
82
|
+
:'word_count' => :'word_count',
|
|
83
|
+
:'input' => :'input',
|
|
84
|
+
:'client_reference_id' => :'client_reference_id'
|
|
85
|
+
}
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Returns attribute mapping this model knows about
|
|
89
|
+
def self.acceptable_attribute_map
|
|
90
|
+
attribute_map
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Returns all the JSON keys this model knows about
|
|
94
|
+
def self.acceptable_attributes
|
|
95
|
+
acceptable_attribute_map.values
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Attribute type mapping.
|
|
99
|
+
def self.openapi_types
|
|
100
|
+
{
|
|
101
|
+
:'id' => :'String',
|
|
102
|
+
:'object' => :'String',
|
|
103
|
+
:'model' => :'String',
|
|
104
|
+
:'filename' => :'String',
|
|
105
|
+
:'processed_at' => :'String',
|
|
106
|
+
:'usage' => :'TranscriptionUsage',
|
|
107
|
+
:'language' => :'String',
|
|
108
|
+
:'language_confidence' => :'Float',
|
|
109
|
+
:'duration_seconds' => :'Float',
|
|
110
|
+
:'text' => :'String',
|
|
111
|
+
:'dialog' => :'String',
|
|
112
|
+
:'audio_events' => :'Array<AudioEvent>',
|
|
113
|
+
:'event_types' => :'Array<String>',
|
|
114
|
+
:'word_count' => :'Integer',
|
|
115
|
+
:'input' => :'AudioInputMeta',
|
|
116
|
+
:'client_reference_id' => :'String'
|
|
117
|
+
}
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# List of attributes with nullable: true
|
|
121
|
+
def self.openapi_nullable
|
|
122
|
+
Set.new([
|
|
123
|
+
])
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Initializes the object
|
|
127
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
128
|
+
def initialize(attributes = {})
|
|
129
|
+
if (!attributes.is_a?(Hash))
|
|
130
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `FalaAI::TranscriptionResponse` initialize method"
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
134
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
135
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
136
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
137
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `FalaAI::TranscriptionResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
138
|
+
end
|
|
139
|
+
h[k.to_sym] = v
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
if attributes.key?(:'id')
|
|
143
|
+
self.id = attributes[:'id']
|
|
144
|
+
else
|
|
145
|
+
self.id = nil
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
if attributes.key?(:'object')
|
|
149
|
+
self.object = attributes[:'object']
|
|
150
|
+
else
|
|
151
|
+
self.object = nil
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
if attributes.key?(:'model')
|
|
155
|
+
self.model = attributes[:'model']
|
|
156
|
+
else
|
|
157
|
+
self.model = nil
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
if attributes.key?(:'filename')
|
|
161
|
+
self.filename = attributes[:'filename']
|
|
162
|
+
else
|
|
163
|
+
self.filename = nil
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
if attributes.key?(:'processed_at')
|
|
167
|
+
self.processed_at = attributes[:'processed_at']
|
|
168
|
+
else
|
|
169
|
+
self.processed_at = nil
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
if attributes.key?(:'usage')
|
|
173
|
+
self.usage = attributes[:'usage']
|
|
174
|
+
else
|
|
175
|
+
self.usage = nil
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
if attributes.key?(:'language')
|
|
179
|
+
self.language = attributes[:'language']
|
|
180
|
+
else
|
|
181
|
+
self.language = nil
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
if attributes.key?(:'language_confidence')
|
|
185
|
+
self.language_confidence = attributes[:'language_confidence']
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
if attributes.key?(:'duration_seconds')
|
|
189
|
+
self.duration_seconds = attributes[:'duration_seconds']
|
|
190
|
+
else
|
|
191
|
+
self.duration_seconds = nil
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
if attributes.key?(:'text')
|
|
195
|
+
self.text = attributes[:'text']
|
|
196
|
+
else
|
|
197
|
+
self.text = nil
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
if attributes.key?(:'dialog')
|
|
201
|
+
self.dialog = attributes[:'dialog']
|
|
202
|
+
else
|
|
203
|
+
self.dialog = nil
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
if attributes.key?(:'audio_events')
|
|
207
|
+
if (value = attributes[:'audio_events']).is_a?(Array)
|
|
208
|
+
self.audio_events = value
|
|
209
|
+
end
|
|
210
|
+
else
|
|
211
|
+
self.audio_events = nil
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
if attributes.key?(:'event_types')
|
|
215
|
+
if (value = attributes[:'event_types']).is_a?(Array)
|
|
216
|
+
self.event_types = value
|
|
217
|
+
end
|
|
218
|
+
else
|
|
219
|
+
self.event_types = nil
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
if attributes.key?(:'word_count')
|
|
223
|
+
self.word_count = attributes[:'word_count']
|
|
224
|
+
else
|
|
225
|
+
self.word_count = nil
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
if attributes.key?(:'input')
|
|
229
|
+
self.input = attributes[:'input']
|
|
230
|
+
else
|
|
231
|
+
self.input = nil
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
if attributes.key?(:'client_reference_id')
|
|
235
|
+
self.client_reference_id = attributes[:'client_reference_id']
|
|
236
|
+
end
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
240
|
+
# @return Array for valid properties with the reasons
|
|
241
|
+
def list_invalid_properties
|
|
242
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
243
|
+
invalid_properties = Array.new
|
|
244
|
+
if @id.nil?
|
|
245
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
if @object.nil?
|
|
249
|
+
invalid_properties.push('invalid value for "object", object cannot be nil.')
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
if @model.nil?
|
|
253
|
+
invalid_properties.push('invalid value for "model", model cannot be nil.')
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
if @filename.nil?
|
|
257
|
+
invalid_properties.push('invalid value for "filename", filename cannot be nil.')
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
if @processed_at.nil?
|
|
261
|
+
invalid_properties.push('invalid value for "processed_at", processed_at cannot be nil.')
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
if @usage.nil?
|
|
265
|
+
invalid_properties.push('invalid value for "usage", usage cannot be nil.')
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
if @language.nil?
|
|
269
|
+
invalid_properties.push('invalid value for "language", language cannot be nil.')
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
if @duration_seconds.nil?
|
|
273
|
+
invalid_properties.push('invalid value for "duration_seconds", duration_seconds cannot be nil.')
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
if @text.nil?
|
|
277
|
+
invalid_properties.push('invalid value for "text", text cannot be nil.')
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
if @dialog.nil?
|
|
281
|
+
invalid_properties.push('invalid value for "dialog", dialog cannot be nil.')
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
if @audio_events.nil?
|
|
285
|
+
invalid_properties.push('invalid value for "audio_events", audio_events cannot be nil.')
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
if @event_types.nil?
|
|
289
|
+
invalid_properties.push('invalid value for "event_types", event_types cannot be nil.')
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
if @word_count.nil?
|
|
293
|
+
invalid_properties.push('invalid value for "word_count", word_count cannot be nil.')
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
if @input.nil?
|
|
297
|
+
invalid_properties.push('invalid value for "input", input cannot be nil.')
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
invalid_properties
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
# Check to see if the all the properties in the model are valid
|
|
304
|
+
# @return true if the model is valid
|
|
305
|
+
def valid?
|
|
306
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
307
|
+
return false if @id.nil?
|
|
308
|
+
return false if @object.nil?
|
|
309
|
+
return false if @model.nil?
|
|
310
|
+
return false if @filename.nil?
|
|
311
|
+
return false if @processed_at.nil?
|
|
312
|
+
return false if @usage.nil?
|
|
313
|
+
return false if @language.nil?
|
|
314
|
+
return false if @duration_seconds.nil?
|
|
315
|
+
return false if @text.nil?
|
|
316
|
+
return false if @dialog.nil?
|
|
317
|
+
return false if @audio_events.nil?
|
|
318
|
+
return false if @event_types.nil?
|
|
319
|
+
return false if @word_count.nil?
|
|
320
|
+
return false if @input.nil?
|
|
321
|
+
true
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
# Custom attribute writer method with validation
|
|
325
|
+
# @param [Object] id Value to be assigned
|
|
326
|
+
def id=(id)
|
|
327
|
+
if id.nil?
|
|
328
|
+
fail ArgumentError, 'id cannot be nil'
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
@id = id
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
# Custom attribute writer method with validation
|
|
335
|
+
# @param [Object] object Value to be assigned
|
|
336
|
+
def object=(object)
|
|
337
|
+
if object.nil?
|
|
338
|
+
fail ArgumentError, 'object cannot be nil'
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
@object = object
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
# Custom attribute writer method with validation
|
|
345
|
+
# @param [Object] model Value to be assigned
|
|
346
|
+
def model=(model)
|
|
347
|
+
if model.nil?
|
|
348
|
+
fail ArgumentError, 'model cannot be nil'
|
|
349
|
+
end
|
|
350
|
+
|
|
351
|
+
@model = model
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
# Custom attribute writer method with validation
|
|
355
|
+
# @param [Object] filename Value to be assigned
|
|
356
|
+
def filename=(filename)
|
|
357
|
+
if filename.nil?
|
|
358
|
+
fail ArgumentError, 'filename cannot be nil'
|
|
359
|
+
end
|
|
360
|
+
|
|
361
|
+
@filename = filename
|
|
362
|
+
end
|
|
363
|
+
|
|
364
|
+
# Custom attribute writer method with validation
|
|
365
|
+
# @param [Object] processed_at Value to be assigned
|
|
366
|
+
def processed_at=(processed_at)
|
|
367
|
+
if processed_at.nil?
|
|
368
|
+
fail ArgumentError, 'processed_at cannot be nil'
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
@processed_at = processed_at
|
|
372
|
+
end
|
|
373
|
+
|
|
374
|
+
# Custom attribute writer method with validation
|
|
375
|
+
# @param [Object] usage Value to be assigned
|
|
376
|
+
def usage=(usage)
|
|
377
|
+
if usage.nil?
|
|
378
|
+
fail ArgumentError, 'usage cannot be nil'
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
@usage = usage
|
|
382
|
+
end
|
|
383
|
+
|
|
384
|
+
# Custom attribute writer method with validation
|
|
385
|
+
# @param [Object] language Value to be assigned
|
|
386
|
+
def language=(language)
|
|
387
|
+
if language.nil?
|
|
388
|
+
fail ArgumentError, 'language cannot be nil'
|
|
389
|
+
end
|
|
390
|
+
|
|
391
|
+
@language = language
|
|
392
|
+
end
|
|
393
|
+
|
|
394
|
+
# Custom attribute writer method with validation
|
|
395
|
+
# @param [Object] duration_seconds Value to be assigned
|
|
396
|
+
def duration_seconds=(duration_seconds)
|
|
397
|
+
if duration_seconds.nil?
|
|
398
|
+
fail ArgumentError, 'duration_seconds cannot be nil'
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
@duration_seconds = duration_seconds
|
|
402
|
+
end
|
|
403
|
+
|
|
404
|
+
# Custom attribute writer method with validation
|
|
405
|
+
# @param [Object] text Value to be assigned
|
|
406
|
+
def text=(text)
|
|
407
|
+
if text.nil?
|
|
408
|
+
fail ArgumentError, 'text cannot be nil'
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
@text = text
|
|
412
|
+
end
|
|
413
|
+
|
|
414
|
+
# Custom attribute writer method with validation
|
|
415
|
+
# @param [Object] dialog Value to be assigned
|
|
416
|
+
def dialog=(dialog)
|
|
417
|
+
if dialog.nil?
|
|
418
|
+
fail ArgumentError, 'dialog cannot be nil'
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
@dialog = dialog
|
|
422
|
+
end
|
|
423
|
+
|
|
424
|
+
# Custom attribute writer method with validation
|
|
425
|
+
# @param [Object] audio_events Value to be assigned
|
|
426
|
+
def audio_events=(audio_events)
|
|
427
|
+
if audio_events.nil?
|
|
428
|
+
fail ArgumentError, 'audio_events cannot be nil'
|
|
429
|
+
end
|
|
430
|
+
|
|
431
|
+
@audio_events = audio_events
|
|
432
|
+
end
|
|
433
|
+
|
|
434
|
+
# Custom attribute writer method with validation
|
|
435
|
+
# @param [Object] event_types Value to be assigned
|
|
436
|
+
def event_types=(event_types)
|
|
437
|
+
if event_types.nil?
|
|
438
|
+
fail ArgumentError, 'event_types cannot be nil'
|
|
439
|
+
end
|
|
440
|
+
|
|
441
|
+
@event_types = event_types
|
|
442
|
+
end
|
|
443
|
+
|
|
444
|
+
# Custom attribute writer method with validation
|
|
445
|
+
# @param [Object] word_count Value to be assigned
|
|
446
|
+
def word_count=(word_count)
|
|
447
|
+
if word_count.nil?
|
|
448
|
+
fail ArgumentError, 'word_count cannot be nil'
|
|
449
|
+
end
|
|
450
|
+
|
|
451
|
+
@word_count = word_count
|
|
452
|
+
end
|
|
453
|
+
|
|
454
|
+
# Custom attribute writer method with validation
|
|
455
|
+
# @param [Object] input Value to be assigned
|
|
456
|
+
def input=(input)
|
|
457
|
+
if input.nil?
|
|
458
|
+
fail ArgumentError, 'input cannot be nil'
|
|
459
|
+
end
|
|
460
|
+
|
|
461
|
+
@input = input
|
|
462
|
+
end
|
|
463
|
+
|
|
464
|
+
# Checks equality by comparing each attribute.
|
|
465
|
+
# @param [Object] Object to be compared
|
|
466
|
+
def ==(o)
|
|
467
|
+
return true if self.equal?(o)
|
|
468
|
+
self.class == o.class &&
|
|
469
|
+
id == o.id &&
|
|
470
|
+
object == o.object &&
|
|
471
|
+
model == o.model &&
|
|
472
|
+
filename == o.filename &&
|
|
473
|
+
processed_at == o.processed_at &&
|
|
474
|
+
usage == o.usage &&
|
|
475
|
+
language == o.language &&
|
|
476
|
+
language_confidence == o.language_confidence &&
|
|
477
|
+
duration_seconds == o.duration_seconds &&
|
|
478
|
+
text == o.text &&
|
|
479
|
+
dialog == o.dialog &&
|
|
480
|
+
audio_events == o.audio_events &&
|
|
481
|
+
event_types == o.event_types &&
|
|
482
|
+
word_count == o.word_count &&
|
|
483
|
+
input == o.input &&
|
|
484
|
+
client_reference_id == o.client_reference_id
|
|
485
|
+
end
|
|
486
|
+
|
|
487
|
+
# @see the `==` method
|
|
488
|
+
# @param [Object] Object to be compared
|
|
489
|
+
def eql?(o)
|
|
490
|
+
self == o
|
|
491
|
+
end
|
|
492
|
+
|
|
493
|
+
# Calculates hash code according to all attributes.
|
|
494
|
+
# @return [Integer] Hash code
|
|
495
|
+
def hash
|
|
496
|
+
[id, object, model, filename, processed_at, usage, language, language_confidence, duration_seconds, text, dialog, audio_events, event_types, word_count, input, client_reference_id].hash
|
|
497
|
+
end
|
|
498
|
+
|
|
499
|
+
# Builds the object from hash
|
|
500
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
501
|
+
# @return [Object] Returns the model itself
|
|
502
|
+
def self.build_from_hash(attributes)
|
|
503
|
+
return nil unless attributes.is_a?(Hash)
|
|
504
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
505
|
+
transformed_hash = {}
|
|
506
|
+
openapi_types.each_pair do |key, type|
|
|
507
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
508
|
+
transformed_hash["#{key}"] = nil
|
|
509
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
510
|
+
# check to ensure the input is an array given that the attribute
|
|
511
|
+
# is documented as an array but the input is not
|
|
512
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
513
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
514
|
+
end
|
|
515
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
516
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
517
|
+
end
|
|
518
|
+
end
|
|
519
|
+
new(transformed_hash)
|
|
520
|
+
end
|
|
521
|
+
|
|
522
|
+
# Returns the object in the form of hash
|
|
523
|
+
# @return [Hash] Returns the object in the form of hash
|
|
524
|
+
def to_hash
|
|
525
|
+
hash = {}
|
|
526
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
527
|
+
value = self.send(attr)
|
|
528
|
+
if value.nil?
|
|
529
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
530
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
531
|
+
end
|
|
532
|
+
|
|
533
|
+
hash[param] = _to_hash(value)
|
|
534
|
+
end
|
|
535
|
+
hash
|
|
536
|
+
end
|
|
537
|
+
|
|
538
|
+
end
|
|
539
|
+
|
|
540
|
+
end
|