nautobot_openapi/models/
config_context_request.rs1#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct ConfigContextRequest {
15 #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
16 pub id: Option<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 ConfigContextRequest {
82 pub fn new(name: String, data: Option<serde_json::Value>) -> ConfigContextRequest {
84 ConfigContextRequest {
85 id: None,
86 owner_content_type: None,
87 name,
88 owner_object_id: None,
89 weight: None,
90 description: None,
91 is_active: None,
92 data,
93 config_context_schema: None,
94 locations: None,
95 roles: None,
96 device_types: None,
97 device_redundancy_groups: None,
98 platforms: None,
99 cluster_groups: None,
100 clusters: None,
101 tenant_groups: None,
102 tenants: None,
103 device_families: None,
104 tags: None,
105 }
106 }
107}