/* Code generated by Azure.Iot.Operations.ProtocolCompilerLib v0.10.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};
use super::config_error::ConfigError;

#[derive(Serialize, Deserialize, Debug, Clone, Builder)]
pub struct ConfigStatus {
    /// The last error that occurred while processing the configuration.
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub error: Option<ConfigError>,

    /// A read only timestamp indicating the last time the configuration has been modified from the perspective of the current actual (Edge) state of the CRD. Edge would be the only writer of this value and would sync back up to the cloud.
    #[serde(rename = "lastTransitionTime")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub last_transition_time: Option<DateTime<Utc>>,

    /// A read only incremental counter indicating the number of times the configuration has been modified from the perspective of the current actual (Edge) state of the CRD. Edge would be the only writer of this value and would sync back up to the cloud. In steady state, this should equal version.
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub version: Option<u64>,
}
