voicevox_api 0.14.4

VOICEVOX API binding
Documentation
/*
 * VOICEVOX Engine
 *
 * VOICEVOXの音声合成エンジンです。
 *
 * The version of the OpenAPI document: 0.14.4
 *
 * Generated by: https://openapi-generator.tech
 */

/// Speaker : スピーカー情報

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Speaker {
    #[serde(rename = "supported_features", skip_serializing_if = "Option::is_none")]
    pub supported_features: Option<Box<crate::models::SpeakerSupportedFeatures>>,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "speaker_uuid")]
    pub speaker_uuid: String,
    #[serde(rename = "styles")]
    pub styles: Vec<crate::models::SpeakerStyle>,
    #[serde(rename = "version", skip_serializing_if = "Option::is_none")]
    pub version: Option<String>,
}

impl Speaker {
    /// スピーカー情報
    pub fn new(
        name: String,
        speaker_uuid: String,
        styles: Vec<crate::models::SpeakerStyle>,
    ) -> Speaker {
        Speaker {
            supported_features: None,
            name,
            speaker_uuid,
            styles,
            version: None,
        }
    }
}