/*
 * API Documentation
 *
 * Source of truth and network automation platform
 *
 * The version of the OpenAPI document: 3.1.0 (3.1)
 *
 * Generated by: https://openapi-generator.tech
 */

/// DataCompliance : Serializer for DataCompliance.

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct DataCompliance {
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<uuid::Uuid>,
    #[serde(rename = "object_type", skip_serializing_if = "Option::is_none")]
    pub object_type: Option<String>,
    /// Human friendly display value
    #[serde(rename = "display", skip_serializing_if = "Option::is_none")]
    pub display: Option<String>,
    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
    pub url: Option<String>,
    #[serde(rename = "natural_slug", skip_serializing_if = "Option::is_none")]
    pub natural_slug: Option<String>,
    #[serde(rename = "compliance_class_name")]
    pub compliance_class_name: String,
    #[serde(
        rename = "last_validation_date",
        skip_serializing_if = "Option::is_none"
    )]
    pub last_validation_date: Option<String>,
    #[serde(rename = "object_id")]
    pub object_id: uuid::Uuid,
    #[serde(
        rename = "validated_object_str",
        skip_serializing_if = "Option::is_none"
    )]
    pub validated_object_str: Option<String>,
    #[serde(
        rename = "validated_attribute",
        skip_serializing_if = "Option::is_none"
    )]
    pub validated_attribute: Option<String>,
    #[serde(
        rename = "validated_attribute_value",
        skip_serializing_if = "Option::is_none"
    )]
    pub validated_attribute_value: Option<String>,
    #[serde(rename = "valid")]
    pub valid: bool,
    #[serde(rename = "message", skip_serializing_if = "Option::is_none")]
    pub message: Option<String>,
    #[serde(rename = "content_type")]
    pub content_type: Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>,
    #[serde(rename = "notes_url", skip_serializing_if = "Option::is_none")]
    pub notes_url: Option<String>,
    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
}

impl DataCompliance {
    /// Serializer for DataCompliance.
    pub fn new(
        compliance_class_name: String,
        object_id: uuid::Uuid,
        valid: bool,
        content_type: crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage,
    ) -> DataCompliance {
        DataCompliance {
            id: None,
            object_type: None,
            display: None,
            url: None,
            natural_slug: None,
            compliance_class_name,
            last_validation_date: None,
            object_id,
            validated_object_str: None,
            validated_attribute: None,
            validated_attribute_value: None,
            valid,
            message: None,
            content_type: Box::new(content_type),
            notes_url: None,
            custom_fields: None,
        }
    }
}
