/* 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::discovered_device_endpoints::DiscoveredDeviceEndpoints;

/// The discovered device resource to create or update. Fields omitted in the request will be removed. The specified inbound endpoint will be added or updated in the inbound endpoints map.
#[derive(Serialize, Deserialize, Debug, Clone, Builder)]
pub struct DiscoveredDevice {
    /// A set of key-value pairs that contain custom attributes set by the customer.
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub attributes: Option<HashMap<String, String>>,

    /// Connection endpoint URL a device can use to connect to a service.
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub endpoints: Option<DiscoveredDeviceEndpoints>,

    /// The unique identifier of the device.
    #[serde(rename = "externalDeviceId")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub external_device_id: Option<String>,

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

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

    /// Device operating system name.
    #[serde(rename = "operatingSystem")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub operating_system: Option<String>,

    /// Device operating system version.
    #[serde(rename = "operatingSystemVersion")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[builder(default = "None")]
    pub operating_system_version: Option<String>,
}
