/* 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::event_stream_destination::EventStreamDestination;

#[derive(Serialize, Deserialize, Debug, Clone, Builder)]
pub struct DiscoveredAssetStream {
    /// Destinations for a stream.
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub destinations: Option<Vec<EventStreamDestination>>,

    /// Timestamp (in UTC) indicating when the stream was added or modified.
    #[serde(rename = "lastUpdatedOn")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub last_updated_on: Option<DateTime<Utc>>,

    /// Name of the stream definition.
    pub name: String,

    /// Stringified JSON that contains connector-specific configuration that describes configuration for the specific stream.
    #[serde(rename = "streamConfiguration")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub stream_configuration: Option<String>,

    /// URI or type definition ID.
    #[serde(rename = "typeRef")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub type_ref: Option<String>,
}
