/* 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};

/// Information about the deprecation status of an entity.
#[derive(Serialize, Deserialize, Debug, Clone, Builder)]
pub struct DeprecatedInfo {
    /// Indicates the time when the entity entered, or will enter, a deprecated state. The date MAY be in the past or future. If this property is not present the entity is already in a deprecated state.
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub effective: Option<DateTime<Utc>>,

    /// Indicates the time when the entity will be removed. The entity MUST NOT be removed before this time. If this property is not present, the client cannot make any assumptions as to when the entity might be removed. This MUST NOT be sooner than the `effective` time, if that is present.
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub removal: Option<DateTime<Utc>>,

    /// The URL to an alternative entity the client can consider as a replacement for this entity. There is no guarantee that the referenced entity is an exact replacement.
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub alternative: Option<String>,

    /// The URL to additional information about the deprecation of this entity.
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub documentation: Option<String>,
}
