speechmatics 0.4.0

An async rust SDK for the Speechmatics API
Documentation
/*
 * OpenAPI Template
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::realtime::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Warning {
    #[serde(rename = "code", skip_serializing_if = "Option::is_none")]
    pub code: Option<i32>,
    #[serde(rename = "duration_limit", skip_serializing_if = "Option::is_none")]
    pub duration_limit: Option<f64>,
    #[serde(rename = "message")]
    pub message: Message,
    #[serde(rename = "reason")]
    pub reason: String,
    #[serde(rename = "seq_no", skip_serializing_if = "Option::is_none")]
    pub seq_no: Option<i32>,
    #[serde(rename = "type")]
    pub type_value: Type,
}

impl Warning {
    pub fn new(message: Message, reason: String, type_value: Type) -> Warning {
        Warning {
            code: None,
            duration_limit: None,
            message,
            reason,
            seq_no: None,
            type_value,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Message {
    #[serde(rename = "Warning")]
    Warning,
}

impl Default for Message {
    fn default() -> Message {
        Self::Warning
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
    #[serde(rename = "duration_limit_exceeded")]
    DurationLimitExceeded,
}

impl Default for Type {
    fn default() -> Type {
        Self::DurationLimitExceeded
    }
}