/* Code generated by Azure.Iot.Operations.ProtocolCompilerLib v0.10.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::dataset_destination::DatasetDestination;
use super::discovered_asset_dataset_data_point::DiscoveredAssetDatasetDataPoint;

#[derive(Serialize, Deserialize, Debug, Clone, Builder)]
pub struct DiscoveredAssetDataset {
    /// Array of data points that are part of the dataset. Each data point can have per-data-point configuration.
    #[serde(rename = "dataPoints")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub data_points: Option<Vec<DiscoveredAssetDatasetDataPoint>>,

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

    /// Name of the data source within a dataset.
    #[serde(rename = "dataSource")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub data_source: Option<String>,

    /// Destinations for a dataset.
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub destinations: Option<Vec<DatasetDestination>>,

    /// Timestamp (in UTC) indicating when the dataset 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 dataset.
    pub name: String,

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