Skip to main content

nautobot_openapi/models/
approval_workflow_definition_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/// ApprovalWorkflowDefinitionRequest : ApprovalWorkflowDefinition Serializer.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct ApprovalWorkflowDefinitionRequest {
15    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
16    pub id: Option<uuid::Uuid>,
17    #[serde(rename = "model_content_type")]
18    pub model_content_type: String,
19    #[serde(rename = "name")]
20    pub name: String,
21    /// Constraints to filter the objects that can be approved using this workflow.
22    #[serde(
23        rename = "model_constraints",
24        default,
25        with = "::serde_with::rust::double_option",
26        skip_serializing_if = "Option::is_none"
27    )]
28    pub model_constraints: Option<Option<serde_json::Value>>,
29    /// Determines workflow relevance when multiple apply. Higher weight wins.
30    #[serde(rename = "weight", skip_serializing_if = "Option::is_none")]
31    pub weight: Option<i32>,
32    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
33    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
34    #[serde(rename = "relationships", skip_serializing_if = "Option::is_none")]
35    pub relationships: Option<
36        ::std::collections::HashMap<
37            String,
38            crate::models::ApprovalWorkflowDefinitionRequestRelationshipsValue,
39        >,
40    >,
41}
42
43impl ApprovalWorkflowDefinitionRequest {
44    /// ApprovalWorkflowDefinition Serializer.
45    pub fn new(model_content_type: String, name: String) -> ApprovalWorkflowDefinitionRequest {
46        ApprovalWorkflowDefinitionRequest {
47            id: None,
48            model_content_type,
49            name,
50            model_constraints: None,
51            weight: None,
52            custom_fields: None,
53            relationships: None,
54        }
55    }
56}