Skip to main content

nautobot_openapi/models/
bulk_writable_approval_workflow_request.rs

1/*
2 * API Documentation
3 *
4 * Source of truth and network automation platform
5 *
6 * The version of the OpenAPI document: 3.1.0 (3.1)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// BulkWritableApprovalWorkflowRequest : ApprovalWorkflow Serializer.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct BulkWritableApprovalWorkflowRequest {
15    #[serde(rename = "id")]
16    pub id: uuid::Uuid,
17    #[serde(rename = "object_under_review_content_type")]
18    pub object_under_review_content_type: String,
19    #[serde(rename = "object_under_review_object_id")]
20    pub object_under_review_object_id: uuid::Uuid,
21    #[serde(rename = "current_state", skip_serializing_if = "Option::is_none")]
22    pub current_state: Option<crate::models::ApprovalWorkflowStateChoices>,
23    #[serde(
24        rename = "approval_workflow_definition",
25        default,
26        with = "::serde_with::rust::double_option",
27        skip_serializing_if = "Option::is_none"
28    )]
29    pub approval_workflow_definition:
30        Option<Option<Box<crate::models::ApprovalWorkflowApprovalWorkflowDefinition>>>,
31    #[serde(
32        rename = "user",
33        default,
34        with = "::serde_with::rust::double_option",
35        skip_serializing_if = "Option::is_none"
36    )]
37    pub user: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
38    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
39    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
40    #[serde(rename = "relationships", skip_serializing_if = "Option::is_none")]
41    pub relationships: Option<
42        ::std::collections::HashMap<
43            String,
44            crate::models::ApprovalWorkflowDefinitionRequestRelationshipsValue,
45        >,
46    >,
47}
48
49impl BulkWritableApprovalWorkflowRequest {
50    /// ApprovalWorkflow Serializer.
51    pub fn new(
52        id: uuid::Uuid,
53        object_under_review_content_type: String,
54        object_under_review_object_id: uuid::Uuid,
55    ) -> BulkWritableApprovalWorkflowRequest {
56        BulkWritableApprovalWorkflowRequest {
57            id,
58            object_under_review_content_type,
59            object_under_review_object_id,
60            current_state: None,
61            approval_workflow_definition: None,
62            user: None,
63            custom_fields: None,
64            relationships: None,
65        }
66    }
67}