/* 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::label::Label;

/// Request payload for creating a Schema Version.
#[derive(Serialize, Deserialize, Debug, Clone, Builder)]
pub struct CreateSchemaVersionAttributes {
    /// Group identifier. Uses the default if not specified.
    #[serde(rename = "groupId")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub group_id: Option<String>,

    /// Human-readable name.
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub name: Option<String>,

    /// A human-readable summary of the purpose of the entity.
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub description: Option<String>,

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

    /// A URL to a graphical icon for the owning entity.
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub icon: Option<String>,

    /// Queryable Key Value pairs to be added to the Version. Labels can be used to store additional metadata about the Version.
    #[builder(default)]
    pub labels: Vec<Label>,

    /// The versionId of this Version's ancestor if it has an ancestor.
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub ancestor: Option<u64>,

    /// The media type of the entity as defined by RFC9110.
    #[serde(rename = "contentType")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub content_type: Option<String>,

    /// Schema format identifier.
    pub format: String,

    /// Base64-encoded schema document content.
    pub document: Bytes,

    /// Extension-specific attributes.
    #[builder(default)]
    pub extensions: HashMap<String, Bytes>,

    /// Queryable Key Value pairs to be added to the parent Schema. Labels can be used to store additional metadata about the Schema.
    #[serde(rename = "schemaLabels")]
    #[builder(default)]
    pub schema_labels: Vec<Label>,
}
