//! This code was AUTOGENERATED using the Codama library.
use crate::types::EmodeConfig;
/// Controls the bank's e-mode configuration, allowing certain collateral
/// sources to be treated more favorably as collateral when used to borrow from
/// this bank.
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone, borsh::BorshSerialize, borsh::BorshDeserialize, PartialEq)]
pub struct EmodeSettings {
/// This bank's NON-unique id that other banks will use to determine what
/// emode rate to use when this bank is offered as collateral.
/// For example, all stablecoin banks might share the same emode_tag, and in
/// their entries, each such stablecoin bank will recognize that
/// collateral sources with this "stable" tag get preferential weights.
/// When a new stablecoin is added that is considered riskier, it may get
/// a new, less favorable emode tag, and eventually get upgraded to the same
/// one as the other stables
/// * 0 is in an invalid tag and will do nothing.
pub emode_tag: u16,
pub pad0: [u8; 6],
/// Unix timestamp from the system clock when emode state was last updated
pub timestamp: i64,
/// EMODE_ON (1) - If set, at least one entry is configured
/// 2, 4, 8, etc, Reserved for future use
pub flags: u64,
pub emode_config: EmodeConfig,
}