/* Code generated by Azure.Iot.Operations.ProtocolCompilerLib v1.0.0.0; DO NOT EDIT. */
#![allow(unused_imports)]

use std::collections::HashMap;

use chrono::{DateTime, Utc};
use derive_builder::Builder;
use iso8601_duration::Duration;
use serde::{Deserialize, Serialize};
use uuid::Uuid;

use super::super::common_types::{b64::Bytes, date_only::Date, decimal::Decimal, time_only::Time};

/// Indicates whether validation was performed, and if not, the reason why not (e.g., "unsupported format", "validation disabled").
#[derive(Serialize, Deserialize, Debug, Clone, Builder)]
pub struct ValidationStatus {
    /// True if validation was performed and the entity adheres to the rules; false if validation was not performed.
    pub validated: bool,

    /// If validation was not performed, the reason why not. MUST be present if validated is false. MUST NOT be present if validated is true.
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub reason: Option<String>,
}
