1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* Speechmatics ASR REST API
*
* The Speechmatics Automatic Speech Recognition REST API is used to submit ASR jobs and receive the results.
*
* The version of the OpenAPI document: 2.0.0
* Contact: support@speechmatics.com
* Generated by: https://openapi-generator.tech
*/
use crate::batch::models;
use serde::{Deserialize, Serialize};
/// JobInfo : Summary information about an ASR job, to support identification and tracking
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct JobInfo {
/// The UTC date time the job was created.
#[serde(rename = "created_at")]
pub created_at: String,
/// Name of data file submitted for job.
#[serde(rename = "data_name")]
pub data_name: String,
/// The data file audio duration (in seconds).
#[serde(rename = "duration")]
pub duration: i32,
/// The unique id assigned to the job.
#[serde(rename = "id")]
pub id: String,
/// Name of the text file submitted to be aligned to audio.
#[serde(rename = "text_name", skip_serializing_if = "Option::is_none")]
pub text_name: Option<String>,
#[serde(rename = "tracking", skip_serializing_if = "Option::is_none")]
pub tracking: Option<Box<models::TrackingData>>,
}
impl JobInfo {
/// Summary information about an ASR job, to support identification and tracking
pub fn new(created_at: String, data_name: String, duration: i32, id: String) -> JobInfo {
JobInfo {
created_at,
data_name,
duration,
id,
text_name: None,
tracking: None,
}
}
}