redfish-codegen 0.3.1

An unopinionated translation of the Redfish specification into Rust.
Documentation
// Generated by redfish-codegen. Do not modify.

use crate::models;

/// Settings for SMTP event delivery.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct SMTP {
    #[serde(rename = "Authentication")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub authentication: Option<models::event_service::v1_10_0::SMTPAuthenticationMethods>,
    #[serde(rename = "ConnectionProtocol")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub connection_protocol: Option<models::event_service::v1_10_0::SMTPConnectionProtocol>,
    /// The 'from' email address of the outgoing email.
    #[serde(rename = "FromAddress")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub from_address: Option<String>,
    /// The password for authentication with the SMTP server.  The value is `null` in responses.
    #[serde(rename = "Password")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub password: Option<String>,
    /// Indicates if the Password property is set.
    #[serde(rename = "PasswordSet")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub password_set: Option<bool>,
    /// The destination SMTP port.
    #[serde(rename = "Port")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub port: Option<i64>,
    /// The address of the SMTP server.
    #[serde(rename = "ServerAddress")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub server_address: Option<String>,
    /// An indication if SMTP for event delivery is enabled.
    #[serde(rename = "ServiceEnabled")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub service_enabled: Option<bool>,
    /// The username for authentication with the SMTP server.
    #[serde(rename = "Username")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub username: Option<String>,
}

impl crate::Metadata<'static> for SMTP {
    const JSON_SCHEMA: &'static str = "EventService.v1_10_0.json";
}