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;

/// The information required to authenticate to the external service.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct Authentication {
    #[serde(rename = "AuthenticationType")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub authentication_type: Option<models::account_service::v1_12_0::AuthenticationTypes>,
    /// Specifies the encryption key.
    #[serde(rename = "EncryptionKey")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub encryption_key: Option<String>,
    /// Indicates if the EncryptionKey property is set.
    #[serde(rename = "EncryptionKeySet")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub encryption_key_set: Option<bool>,
    /// The Base64-encoded version of the Kerberos keytab for this service.  A PATCH or PUT operation writes the keytab.  This property is `null` in responses.
    #[serde(rename = "KerberosKeytab")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub kerberos_keytab: Option<String>,
    #[serde(rename = "Oem")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub oem: Option<models::resource::Oem>,
    /// The password for this service.  A PATCH or PUT request writes the password.  This property is `null` in responses.
    #[serde(rename = "Password")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub password: Option<String>,
    /// The token for this service.  A PATCH or PUT operation writes the token.  This property is `null` in responses.
    #[serde(rename = "Token")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub token: Option<String>,
    /// The user name for the service.
    #[serde(rename = "Username")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub username: Option<String>,
}

impl crate::Metadata<'static> for Authentication {
    const JSON_SCHEMA: &'static str = "AccountService.v1_12_0.json";
}