#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct UserDictWord {
#[serde(rename = "surface")]
pub surface: String,
#[serde(rename = "priority")]
pub priority: i32,
#[serde(rename = "context_id", skip_serializing_if = "Option::is_none")]
pub context_id: Option<i32>,
#[serde(rename = "part_of_speech")]
pub part_of_speech: String,
#[serde(rename = "part_of_speech_detail_1")]
pub part_of_speech_detail_1: String,
#[serde(rename = "part_of_speech_detail_2")]
pub part_of_speech_detail_2: String,
#[serde(rename = "part_of_speech_detail_3")]
pub part_of_speech_detail_3: String,
#[serde(rename = "inflectional_type")]
pub inflectional_type: String,
#[serde(rename = "inflectional_form")]
pub inflectional_form: String,
#[serde(rename = "stem")]
pub stem: String,
#[serde(rename = "yomi")]
pub yomi: String,
#[serde(rename = "pronunciation")]
pub pronunciation: String,
#[serde(rename = "accent_type")]
pub accent_type: i32,
#[serde(rename = "mora_count", skip_serializing_if = "Option::is_none")]
pub mora_count: Option<i32>,
#[serde(rename = "accent_associative_rule")]
pub accent_associative_rule: String,
}
impl UserDictWord {
pub fn new(
surface: String,
priority: i32,
part_of_speech: String,
part_of_speech_detail_1: String,
part_of_speech_detail_2: String,
part_of_speech_detail_3: String,
inflectional_type: String,
inflectional_form: String,
stem: String,
yomi: String,
pronunciation: String,
accent_type: i32,
accent_associative_rule: String,
) -> UserDictWord {
UserDictWord {
surface,
priority,
context_id: None,
part_of_speech,
part_of_speech_detail_1,
part_of_speech_detail_2,
part_of_speech_detail_3,
inflectional_type,
inflectional_form,
stem,
yomi,
pronunciation,
accent_type,
mora_count: None,
accent_associative_rule,
}
}
}