#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Cable {
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<uuid::Uuid>,
#[serde(rename = "object_type", skip_serializing_if = "Option::is_none")]
pub object_type: Option<String>,
#[serde(rename = "display", skip_serializing_if = "Option::is_none")]
pub display: Option<String>,
#[serde(rename = "url", skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
#[serde(rename = "natural_slug", skip_serializing_if = "Option::is_none")]
pub natural_slug: Option<String>,
#[serde(rename = "termination_a_type")]
pub termination_a_type: String,
#[serde(rename = "termination_b_type")]
pub termination_b_type: String,
#[serde(rename = "termination_a", skip_serializing_if = "Option::is_none")]
pub termination_a: Option<Box<crate::models::CableTermination>>,
#[serde(rename = "termination_b", skip_serializing_if = "Option::is_none")]
pub termination_b: Option<Box<crate::models::CableTermination>>,
#[serde(rename = "length_unit", skip_serializing_if = "Option::is_none")]
pub length_unit: Option<Box<crate::models::CableLengthUnit>>,
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
pub r#type: Option<Box<crate::models::CableType>>,
#[serde(rename = "termination_a_id")]
pub termination_a_id: uuid::Uuid,
#[serde(rename = "termination_b_id")]
pub termination_b_id: uuid::Uuid,
#[serde(rename = "label", skip_serializing_if = "Option::is_none")]
pub label: Option<String>,
#[serde(rename = "color", skip_serializing_if = "Option::is_none")]
pub color: Option<String>,
#[serde(
rename = "length",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub length: Option<Option<i32>>,
#[serde(rename = "status")]
pub status: Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>,
#[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>>,
#[serde(rename = "notes_url", skip_serializing_if = "Option::is_none")]
pub notes_url: Option<String>,
#[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
#[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
}
impl Cable {
pub fn new(
termination_a_type: String,
termination_b_type: String,
termination_a_id: uuid::Uuid,
termination_b_id: uuid::Uuid,
status: crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage,
) -> Cable {
Cable {
id: None,
object_type: None,
display: None,
url: None,
natural_slug: None,
termination_a_type,
termination_b_type,
termination_a: None,
termination_b: None,
length_unit: None,
r#type: None,
termination_a_id,
termination_b_id,
label: None,
color: None,
length: None,
status: Box::new(status),
created: None,
last_updated: None,
notes_url: None,
custom_fields: None,
tags: None,
}
}
}