nautobot_openapi/models/
bulk_writable_cable_request.rs1#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct BulkWritableCableRequest {
15 #[serde(rename = "id")]
16 pub id: uuid::Uuid,
17 #[serde(rename = "termination_a_type")]
18 pub termination_a_type: String,
19 #[serde(rename = "termination_b_type")]
20 pub termination_b_type: String,
21 #[serde(rename = "length_unit", skip_serializing_if = "Option::is_none")]
22 pub length_unit: Option<crate::models::LengthUnitEnum>,
23 #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
24 pub r#type: Option<crate::models::CableTypeChoices>,
25 #[serde(rename = "termination_a_id")]
26 pub termination_a_id: uuid::Uuid,
27 #[serde(rename = "termination_b_id")]
28 pub termination_b_id: uuid::Uuid,
29 #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
30 pub label: Option<String>,
31 #[serde(rename = "color", skip_serializing_if = "Option::is_none")]
33 pub color: Option<String>,
34 #[serde(
35 rename = "length",
36 default,
37 with = "::serde_with::rust::double_option",
38 skip_serializing_if = "Option::is_none"
39 )]
40 pub length: Option<Option<i32>>,
41 #[serde(rename = "status")]
42 pub status: Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>,
43 #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
44 pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
45 #[serde(rename = "relationships", skip_serializing_if = "Option::is_none")]
46 pub relationships: Option<
47 ::std::collections::HashMap<
48 String,
49 crate::models::ApprovalWorkflowDefinitionRequestRelationshipsValue,
50 >,
51 >,
52 #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
53 pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
54}
55
56impl BulkWritableCableRequest {
57 pub fn new(
59 id: uuid::Uuid,
60 termination_a_type: String,
61 termination_b_type: String,
62 termination_a_id: uuid::Uuid,
63 termination_b_id: uuid::Uuid,
64 status: crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage,
65 ) -> BulkWritableCableRequest {
66 BulkWritableCableRequest {
67 id,
68 termination_a_type,
69 termination_b_type,
70 length_unit: None,
71 r#type: None,
72 termination_a_id,
73 termination_b_id,
74 label: None,
75 color: None,
76 length: None,
77 status: Box::new(status),
78 custom_fields: None,
79 relationships: None,
80 tags: None,
81 }
82 }
83}