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 ManagerAccount schema defines the user accounts that are owned by a manager.  Changes to a manager account might affect the current Redfish service connection if this manager is responsible for the Redfish service.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct ManagerAccount {
    #[serde(rename = "@odata.context")]
    #[serde(skip_deserializing)]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub odata_context: Option<models::odata_v4::Context>,
    #[serde(rename = "@odata.etag")]
    #[serde(skip_deserializing)]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub odata_etag: Option<models::odata_v4::Etag>,
    #[serde(rename = "@odata.id")]
    #[serde(skip_deserializing)]
    pub odata_id: models::odata_v4::Id,
    #[serde(rename = "@odata.type")]
    #[serde(skip_deserializing)]
    #[derivative(Default(value = "models::odata_v4::Type(\"#ManagerAccount.v1_10_0.ManagerAccount\".to_string())"))]
    pub odata_type: models::odata_v4::Type,
    /// Indicates the date and time when this account expires.  If `null`, the account never expires.
    #[serde(rename = "AccountExpiration")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub account_expiration: Option<String>,
    /// The list of services in the manager that the account is allowed to access.
    #[serde(rename = "AccountTypes")]
    pub account_types: Vec<models::manager_account::AccountTypes>,
    #[serde(rename = "Actions")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub actions: Option<models::manager_account::v1_10_0::Actions>,
    #[serde(rename = "Certificates")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub certificates: Option<models::odata_v4::IdRef>,
    #[serde(rename = "Description")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<models::resource::Description>,
    /// An indication of whether an account is enabled.  An administrator can disable it without deleting the user information.  If `true`, the account is enabled and the user can log in.  If `false`, the account is disabled and, in the future, the user cannot log in.
    #[serde(rename = "Enabled")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
    /// An indication of whether this account is a bootstrap account for the host interface.
    #[serde(rename = "HostBootstrapAccount")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub host_bootstrap_account: Option<bool>,
    #[serde(rename = "Id")]
    #[serde(skip_deserializing)]
    pub id: models::resource::Id,
    #[serde(rename = "Keys")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub keys: Option<models::odata_v4::IdRef>,
    #[serde(rename = "Links")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub links: Option<models::manager_account::v1_10_0::Links>,
    /// An indication of whether the account service automatically locked the account because the lockout threshold was exceeded.  To manually unlock the account before the lockout duration period, an administrator can change the property to `false` to clear the lockout condition.
    #[serde(rename = "Locked")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub locked: Option<bool>,
    #[serde(rename = "MFABypass")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub mfa_bypass: Option<models::account_service::MFABypass>,
    #[serde(rename = "Name")]
    #[serde(skip_deserializing)]
    pub name: models::resource::Name,
    /// The OEM account types.
    #[serde(rename = "OEMAccountTypes")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub oem_account_types: Option<Vec<String>>,
    #[serde(rename = "Oem")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub oem: Option<models::resource::Oem>,
    /// The password.  Use this property with a PATCH or PUT to write the password for the account.  This property is `null` in responses.
    #[serde(rename = "Password")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub password: Option<String>,
    /// An indication of whether the service requires that the password for this account be changed before further access to the account is allowed.
    #[serde(rename = "PasswordChangeRequired")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub password_change_required: Option<bool>,
    /// Indicates the date and time when this account password expires.  If `null`, the account password never expires.
    #[serde(rename = "PasswordExpiration")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub password_expiration: Option<String>,
    /// The role for this account.
    #[serde(rename = "RoleId")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub role_id: Option<String>,
    #[serde(rename = "SNMP")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub snmp: Option<models::manager_account::v1_10_0::SNMPUserInfo>,
    /// Indicates if the service needs to use the account types exactly as specified when the account is created or updated.
    #[serde(rename = "StrictAccountTypes")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub strict_account_types: Option<bool>,
    /// The user name for the account.
    #[serde(rename = "UserName")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub user_name: Option<String>,
}

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