voicevox_api/models/
speaker.rs

1/*
2 * VOICEVOX Engine
3 *
4 * VOICEVOXの音声合成エンジンです。
5 *
6 * The version of the OpenAPI document: 0.14.4
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// Speaker : スピーカー情報
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct Speaker {
15    #[serde(rename = "supported_features", skip_serializing_if = "Option::is_none")]
16    pub supported_features: Option<Box<crate::models::SpeakerSupportedFeatures>>,
17    #[serde(rename = "name")]
18    pub name: String,
19    #[serde(rename = "speaker_uuid")]
20    pub speaker_uuid: String,
21    #[serde(rename = "styles")]
22    pub styles: Vec<crate::models::SpeakerStyle>,
23    #[serde(rename = "version", skip_serializing_if = "Option::is_none")]
24    pub version: Option<String>,
25}
26
27impl Speaker {
28    /// スピーカー情報
29    pub fn new(
30        name: String,
31        speaker_uuid: String,
32        styles: Vec<crate::models::SpeakerStyle>,
33    ) -> Speaker {
34        Speaker {
35            supported_features: None,
36            name,
37            speaker_uuid,
38            styles,
39            version: None,
40        }
41    }
42}