/* 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};
use super::deprecated_info::DeprecatedInfo;
use super::label::Label;

/// Mutable attributes for creating or updating a Resource (its `meta` sub-entity).
#[derive(Serialize, Deserialize, Debug, Clone, Builder)]
pub struct ResourceMetaAttributes {
    /// Indicates that this Resource is a reference to another Resource within the same Registry. The XID path of the referenced Resource.
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub xref: Option<String>,

    /// A mechanism in which additional metadata about the entity can be stored without changing the model definition of the entity. Labels can be used for querying.
    #[builder(default)]
    pub labels: Vec<Label>,

    /// States that Versions of this Resource adhere to a certain compatibility rule.
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub compatibility: Option<String>,

    /// Information about deprecation status of the entity, if applicable.
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub deprecated: Option<DeprecatedInfo>,

    /// Extension-specific attributes (e.g., `format` and `content_type` for schemas).
    #[builder(default)]
    pub extensions: HashMap<String, Bytes>,
}
