#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CustomFieldChoiceSet {
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<i32>,
#[serde(rename = "url", skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
#[serde(rename = "display_url", skip_serializing_if = "Option::is_none")]
pub display_url: Option<String>,
#[serde(rename = "display", skip_serializing_if = "Option::is_none")]
pub display: Option<String>,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "base_choices", skip_serializing_if = "Option::is_none")]
pub base_choices: Option<Box<crate::models::CustomFieldChoiceSetBaseChoices>>,
#[serde(rename = "extra_choices")]
pub extra_choices: Vec<Vec<serde_json::Value>>,
#[serde(
rename = "order_alphabetically",
skip_serializing_if = "Option::is_none"
)]
pub order_alphabetically: Option<bool>,
#[serde(rename = "choices_count", skip_serializing_if = "Option::is_none")]
pub choices_count: Option<i32>,
#[serde(
rename = "owner",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub owner: Option<Option<Box<crate::models::BriefOwner>>>,
#[serde(
rename = "created",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub created: Option<Option<String>>,
#[serde(
rename = "last_updated",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub last_updated: Option<Option<String>>,
}
impl CustomFieldChoiceSet {
pub fn new(name: String, extra_choices: Vec<Vec<serde_json::Value>>) -> CustomFieldChoiceSet {
CustomFieldChoiceSet {
id: None,
url: None,
display_url: None,
display: None,
name,
description: None,
base_choices: None,
extra_choices,
order_alphabetically: None,
choices_count: None,
owner: None,
created: None,
last_updated: None,
}
}
}