nautobot_openapi/models/
bulk_writable_prefix_request.rs1#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct BulkWritablePrefixRequest {
15 #[serde(rename = "id")]
16 pub id: uuid::Uuid,
17 #[serde(rename = "prefix")]
18 pub prefix: String,
19 #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
20 pub r#type: Option<crate::models::PrefixTypeChoices>,
21 #[serde(
22 rename = "location",
23 default,
24 with = "::serde_with::rust::double_option",
25 skip_serializing_if = "Option::is_none"
26 )]
27 pub location: Option<Option<Box<crate::models::BulkWritablePrefixRequestLocation>>>,
28 #[serde(
30 rename = "date_allocated",
31 default,
32 with = "::serde_with::rust::double_option",
33 skip_serializing_if = "Option::is_none"
34 )]
35 pub date_allocated: Option<Option<String>>,
36 #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
37 pub description: Option<String>,
38 #[serde(rename = "status")]
39 pub status: Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>,
40 #[serde(
41 rename = "role",
42 default,
43 with = "::serde_with::rust::double_option",
44 skip_serializing_if = "Option::is_none"
45 )]
46 pub role: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
47 #[serde(
48 rename = "parent",
49 default,
50 with = "::serde_with::rust::double_option",
51 skip_serializing_if = "Option::is_none"
52 )]
53 pub parent: Option<Option<Box<crate::models::BulkWritablePrefixRequestParent>>>,
54 #[serde(rename = "namespace", skip_serializing_if = "Option::is_none")]
55 pub namespace: Option<Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
56 #[serde(
57 rename = "tenant",
58 default,
59 with = "::serde_with::rust::double_option",
60 skip_serializing_if = "Option::is_none"
61 )]
62 pub tenant: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
63 #[serde(
64 rename = "vlan",
65 default,
66 with = "::serde_with::rust::double_option",
67 skip_serializing_if = "Option::is_none"
68 )]
69 pub vlan: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
70 #[serde(
71 rename = "rir",
72 default,
73 with = "::serde_with::rust::double_option",
74 skip_serializing_if = "Option::is_none"
75 )]
76 pub rir: Option<Option<Box<crate::models::BulkWritablePrefixRequestRir>>>,
77 #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
78 pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
79 #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
80 pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
81 #[serde(rename = "relationships", skip_serializing_if = "Option::is_none")]
82 pub relationships: Option<
83 ::std::collections::HashMap<
84 String,
85 crate::models::ApprovalWorkflowDefinitionRequestRelationshipsValue,
86 >,
87 >,
88}
89
90impl BulkWritablePrefixRequest {
91 pub fn new(
93 id: uuid::Uuid,
94 prefix: String,
95 status: crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage,
96 ) -> BulkWritablePrefixRequest {
97 BulkWritablePrefixRequest {
98 id,
99 prefix,
100 r#type: None,
101 location: None,
102 date_allocated: None,
103 description: None,
104 status: Box::new(status),
105 role: None,
106 parent: None,
107 namespace: None,
108 tenant: None,
109 vlan: None,
110 rir: None,
111 tags: None,
112 custom_fields: None,
113 relationships: None,
114 }
115 }
116}