nautobot_openapi/models/
bulk_writable_config_context_request.rs1#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct BulkWritableConfigContextRequest {
15 #[serde(rename = "id")]
16 pub id: uuid::Uuid,
17 #[serde(
18 rename = "owner_content_type",
19 default,
20 with = "::serde_with::rust::double_option",
21 skip_serializing_if = "Option::is_none"
22 )]
23 pub owner_content_type: Option<Option<String>>,
24 #[serde(rename = "name")]
25 pub name: String,
26 #[serde(
27 rename = "owner_object_id",
28 default,
29 with = "::serde_with::rust::double_option",
30 skip_serializing_if = "Option::is_none"
31 )]
32 pub owner_object_id: Option<Option<uuid::Uuid>>,
33 #[serde(rename = "weight", skip_serializing_if = "Option::is_none")]
34 pub weight: Option<i32>,
35 #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
36 pub description: Option<String>,
37 #[serde(rename = "is_active", skip_serializing_if = "Option::is_none")]
38 pub is_active: Option<bool>,
39 #[serde(rename = "data", deserialize_with = "Option::deserialize")]
40 pub data: Option<serde_json::Value>,
41 #[serde(
42 rename = "config_context_schema",
43 default,
44 with = "::serde_with::rust::double_option",
45 skip_serializing_if = "Option::is_none"
46 )]
47 pub config_context_schema:
48 Option<Option<Box<crate::models::BulkWritableConfigContextRequestConfigContextSchema>>>,
49 #[serde(rename = "locations", skip_serializing_if = "Option::is_none")]
50 pub locations: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
51 #[serde(rename = "roles", skip_serializing_if = "Option::is_none")]
52 pub roles: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
53 #[serde(rename = "device_types", skip_serializing_if = "Option::is_none")]
54 pub device_types:
55 Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
56 #[serde(
57 rename = "device_redundancy_groups",
58 skip_serializing_if = "Option::is_none"
59 )]
60 pub device_redundancy_groups:
61 Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
62 #[serde(rename = "platforms", skip_serializing_if = "Option::is_none")]
63 pub platforms: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
64 #[serde(rename = "cluster_groups", skip_serializing_if = "Option::is_none")]
65 pub cluster_groups:
66 Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
67 #[serde(rename = "clusters", skip_serializing_if = "Option::is_none")]
68 pub clusters: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
69 #[serde(rename = "tenant_groups", skip_serializing_if = "Option::is_none")]
70 pub tenant_groups:
71 Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
72 #[serde(rename = "tenants", skip_serializing_if = "Option::is_none")]
73 pub tenants: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
74 #[serde(rename = "device_families", skip_serializing_if = "Option::is_none")]
75 pub device_families:
76 Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
77 #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
78 pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
79}
80
81impl BulkWritableConfigContextRequest {
82 pub fn new(
84 id: uuid::Uuid,
85 name: String,
86 data: Option<serde_json::Value>,
87 ) -> BulkWritableConfigContextRequest {
88 BulkWritableConfigContextRequest {
89 id,
90 owner_content_type: None,
91 name,
92 owner_object_id: None,
93 weight: None,
94 description: None,
95 is_active: None,
96 data,
97 config_context_schema: None,
98 locations: None,
99 roles: None,
100 device_types: None,
101 device_redundancy_groups: None,
102 platforms: None,
103 cluster_groups: None,
104 clusters: None,
105 tenant_groups: None,
106 tenants: None,
107 device_families: None,
108 tags: None,
109 }
110 }
111}