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 mapping rules that are used to convert the external account providers account information to the local Redfish role.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct RoleMapping {
    /// The name of the local Redfish role to which to map the remote user or group.
    #[serde(rename = "LocalRole")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub local_role: Option<String>,
    #[serde(rename = "MFABypass")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub mfa_bypass: Option<models::account_service::MFABypass>,
    #[serde(rename = "Oem")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub oem: Option<models::resource::Oem>,
    /// The name of the remote group, or the remote role in the case of a Redfish service, that maps to the local Redfish role to which this entity links.
    #[serde(rename = "RemoteGroup")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub remote_group: Option<String>,
    /// The name of the remote user that maps to the local Redfish role to which this entity links.
    #[serde(rename = "RemoteUser")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub remote_user: Option<String>,
}

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