speechmatics 0.4.0

An async rust SDK for the Speechmatics API
Documentation
/*
 * 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};

/// RecognitionMetadata : Summary information about the output from an ASR job, comprising the job type and configuration parameters used when generating the output
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RecognitionMetadata {
    /// The UTC date time the transcription output was created.
    #[serde(rename = "created_at")]
    pub created_at: String,
    #[serde(rename = "type")]
    pub type_value: models::JobType,
    #[serde(rename = "transcription_config", skip_serializing_if = "Option::is_none")]
    pub transcription_config: Option<Box<models::TranscriptionConfig>>,
    #[serde(rename = "alignment_config", skip_serializing_if = "Option::is_none")]
    pub alignment_config: Option<Box<models::AlignmentConfig>>,
    #[serde(rename = "output_config", skip_serializing_if = "Option::is_none")]
    pub output_config: Option<Box<models::OutputConfig>>,
}

impl RecognitionMetadata {
    /// Summary information about the output from an ASR job, comprising the job type and configuration parameters used when generating the output
    pub fn new(created_at: String, type_value: models::JobType) -> RecognitionMetadata {
        RecognitionMetadata {
            created_at,
            type_value,
            transcription_config: None,
            alignment_config: None,
            output_config: None,
        }
    }
}