/* 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::qos::Qos;
use super::retain::Retain;

/// The destination configuration.
#[derive(Serialize, Deserialize, Debug, Clone, Builder)]
pub struct DestinationConfiguration {
    /// The BrokerStateStore destination configuration key.
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub key: Option<String>,

    /// The Storage destination configuration path.
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub path: Option<String>,

    /// The MQTT QoS setting.
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub qos: Option<Qos>,

    /// When set to 'Keep', messages published to an MQTT broker will have the retain flag set.
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub retain: Option<Retain>,

    /// The MQTT topic.
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub topic: Option<String>,

    /// The MQTT TTL setting.
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub ttl: Option<u64>,
}
