#![allow(clippy::new_without_default)]
#![allow(clippy::needless_pass_by_value)]
#![allow(clippy::too_many_arguments)]
#![allow(unused_imports)]
use fixer::message::Message;
use fixer::fix_string::FIXString;
use fixer::errors::MessageRejectErrorEnum;
use fixer::session::session_id::SessionID;
use rust_decimal::Decimal;
use crate::field;
use crate::tag;
pub struct DerivativeSecurityListRequest {
pub message: Message,
}
impl DerivativeSecurityListRequest {
pub fn new(security_req_id: field::SecurityReqIDField, security_list_request_type: field::SecurityListRequestTypeField) -> Self {
let mut msg = Message::new();
msg.header.set_field(tag::MSG_TYPE, FIXString::from("z".to_string()));
msg.body.set_field(tag::SECURITY_REQ_ID, security_req_id.0);
msg.body.set_field(tag::SECURITY_LIST_REQUEST_TYPE, security_list_request_type.0);
Self { message: msg }
}
pub fn from_message(msg: Message) -> Self {
Self { message: msg }
}
pub fn to_message(self) -> Message {
self.message
}
pub fn set_currency(&mut self, v: String) {
self.message.body.set_field(tag::CURRENCY, FIXString::from(v));
}
pub fn get_currency(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::CurrencyField::new(String::new());
self.message.body.get_field(tag::CURRENCY, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_currency(&self) -> bool {
self.message.body.has(tag::CURRENCY)
}
pub fn set_encoded_text(&mut self, v: String) {
self.message.body.set_field(tag::ENCODED_TEXT, FIXString::from(v));
}
pub fn get_encoded_text(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::EncodedTextField::new(String::new());
self.message.body.get_field(tag::ENCODED_TEXT, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_encoded_text(&self) -> bool {
self.message.body.has(tag::ENCODED_TEXT)
}
pub fn set_encoded_text_len(&mut self, v: isize) {
self.message.body.set_field(tag::ENCODED_TEXT_LEN, fixer::fix_int::FIXInt::from(v));
}
pub fn get_encoded_text_len(&self) -> Result<isize, MessageRejectErrorEnum> {
let mut fld = field::EncodedTextLenField::new(0);
self.message.body.get_field(tag::ENCODED_TEXT_LEN, &mut fld.0)?;
Ok(fld.value())
}
pub fn has_encoded_text_len(&self) -> bool {
self.message.body.has(tag::ENCODED_TEXT_LEN)
}
pub fn set_encoded_underlying_issuer(&mut self, v: String) {
self.message.body.set_field(tag::ENCODED_UNDERLYING_ISSUER, FIXString::from(v));
}
pub fn get_encoded_underlying_issuer(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::EncodedUnderlyingIssuerField::new(String::new());
self.message.body.get_field(tag::ENCODED_UNDERLYING_ISSUER, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_encoded_underlying_issuer(&self) -> bool {
self.message.body.has(tag::ENCODED_UNDERLYING_ISSUER)
}
pub fn set_encoded_underlying_issuer_len(&mut self, v: isize) {
self.message.body.set_field(tag::ENCODED_UNDERLYING_ISSUER_LEN, fixer::fix_int::FIXInt::from(v));
}
pub fn get_encoded_underlying_issuer_len(&self) -> Result<isize, MessageRejectErrorEnum> {
let mut fld = field::EncodedUnderlyingIssuerLenField::new(0);
self.message.body.get_field(tag::ENCODED_UNDERLYING_ISSUER_LEN, &mut fld.0)?;
Ok(fld.value())
}
pub fn has_encoded_underlying_issuer_len(&self) -> bool {
self.message.body.has(tag::ENCODED_UNDERLYING_ISSUER_LEN)
}
pub fn set_encoded_underlying_security_desc(&mut self, v: String) {
self.message.body.set_field(tag::ENCODED_UNDERLYING_SECURITY_DESC, FIXString::from(v));
}
pub fn get_encoded_underlying_security_desc(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::EncodedUnderlyingSecurityDescField::new(String::new());
self.message.body.get_field(tag::ENCODED_UNDERLYING_SECURITY_DESC, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_encoded_underlying_security_desc(&self) -> bool {
self.message.body.has(tag::ENCODED_UNDERLYING_SECURITY_DESC)
}
pub fn set_encoded_underlying_security_desc_len(&mut self, v: isize) {
self.message.body.set_field(tag::ENCODED_UNDERLYING_SECURITY_DESC_LEN, fixer::fix_int::FIXInt::from(v));
}
pub fn get_encoded_underlying_security_desc_len(&self) -> Result<isize, MessageRejectErrorEnum> {
let mut fld = field::EncodedUnderlyingSecurityDescLenField::new(0);
self.message.body.get_field(tag::ENCODED_UNDERLYING_SECURITY_DESC_LEN, &mut fld.0)?;
Ok(fld.value())
}
pub fn has_encoded_underlying_security_desc_len(&self) -> bool {
self.message.body.has(tag::ENCODED_UNDERLYING_SECURITY_DESC_LEN)
}
pub fn set_no_underlying_security_alt_id(&mut self, v: isize) {
self.message.body.set_field(tag::NO_UNDERLYING_SECURITY_ALT_ID, fixer::fix_int::FIXInt::from(v));
}
pub fn get_no_underlying_security_alt_id(&self) -> Result<isize, MessageRejectErrorEnum> {
let mut fld = field::NoUnderlyingSecurityAltIDField::new(0);
self.message.body.get_field(tag::NO_UNDERLYING_SECURITY_ALT_ID, &mut fld.0)?;
Ok(fld.value())
}
pub fn has_no_underlying_security_alt_id(&self) -> bool {
self.message.body.has(tag::NO_UNDERLYING_SECURITY_ALT_ID)
}
pub fn set_no_underlying_stips(&mut self, v: isize) {
self.message.body.set_field(tag::NO_UNDERLYING_STIPS, fixer::fix_int::FIXInt::from(v));
}
pub fn get_no_underlying_stips(&self) -> Result<isize, MessageRejectErrorEnum> {
let mut fld = field::NoUnderlyingStipsField::new(0);
self.message.body.get_field(tag::NO_UNDERLYING_STIPS, &mut fld.0)?;
Ok(fld.value())
}
pub fn has_no_underlying_stips(&self) -> bool {
self.message.body.has(tag::NO_UNDERLYING_STIPS)
}
pub fn set_security_list_request_type(&mut self, v: isize) {
self.message.body.set_field(tag::SECURITY_LIST_REQUEST_TYPE, fixer::fix_int::FIXInt::from(v));
}
pub fn get_security_list_request_type(&self) -> Result<isize, MessageRejectErrorEnum> {
let mut fld = field::SecurityListRequestTypeField::new(0);
self.message.body.get_field(tag::SECURITY_LIST_REQUEST_TYPE, &mut fld.0)?;
Ok(fld.value())
}
pub fn has_security_list_request_type(&self) -> bool {
self.message.body.has(tag::SECURITY_LIST_REQUEST_TYPE)
}
pub fn set_security_req_id(&mut self, v: String) {
self.message.body.set_field(tag::SECURITY_REQ_ID, FIXString::from(v));
}
pub fn get_security_req_id(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::SecurityReqIDField::new(String::new());
self.message.body.get_field(tag::SECURITY_REQ_ID, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_security_req_id(&self) -> bool {
self.message.body.has(tag::SECURITY_REQ_ID)
}
pub fn set_security_sub_type(&mut self, v: String) {
self.message.body.set_field(tag::SECURITY_SUB_TYPE, FIXString::from(v));
}
pub fn get_security_sub_type(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::SecuritySubTypeField::new(String::new());
self.message.body.get_field(tag::SECURITY_SUB_TYPE, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_security_sub_type(&self) -> bool {
self.message.body.has(tag::SECURITY_SUB_TYPE)
}
pub fn set_subscription_request_type(&mut self, v: String) {
self.message.body.set_field(tag::SUBSCRIPTION_REQUEST_TYPE, FIXString::from(v));
}
pub fn get_subscription_request_type(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::SubscriptionRequestTypeField::new(String::new());
self.message.body.get_field(tag::SUBSCRIPTION_REQUEST_TYPE, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_subscription_request_type(&self) -> bool {
self.message.body.has(tag::SUBSCRIPTION_REQUEST_TYPE)
}
pub fn set_text(&mut self, v: String) {
self.message.body.set_field(tag::TEXT, FIXString::from(v));
}
pub fn get_text(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::TextField::new(String::new());
self.message.body.get_field(tag::TEXT, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_text(&self) -> bool {
self.message.body.has(tag::TEXT)
}
pub fn set_trading_session_id(&mut self, v: String) {
self.message.body.set_field(tag::TRADING_SESSION_ID, FIXString::from(v));
}
pub fn get_trading_session_id(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::TradingSessionIDField::new(String::new());
self.message.body.get_field(tag::TRADING_SESSION_ID, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_trading_session_id(&self) -> bool {
self.message.body.has(tag::TRADING_SESSION_ID)
}
pub fn set_trading_session_sub_id(&mut self, v: String) {
self.message.body.set_field(tag::TRADING_SESSION_SUB_ID, FIXString::from(v));
}
pub fn get_trading_session_sub_id(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::TradingSessionSubIDField::new(String::new());
self.message.body.get_field(tag::TRADING_SESSION_SUB_ID, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_trading_session_sub_id(&self) -> bool {
self.message.body.has(tag::TRADING_SESSION_SUB_ID)
}
pub fn set_underlying_cfi_code(&mut self, v: String) {
self.message.body.set_field(tag::UNDERLYING_CFI_CODE, FIXString::from(v));
}
pub fn get_underlying_cfi_code(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingCFICodeField::new(String::new());
self.message.body.get_field(tag::UNDERLYING_CFI_CODE, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_underlying_cfi_code(&self) -> bool {
self.message.body.has(tag::UNDERLYING_CFI_CODE)
}
pub fn set_underlying_cp_program(&mut self, v: String) {
self.message.body.set_field(tag::UNDERLYING_CP_PROGRAM, FIXString::from(v));
}
pub fn get_underlying_cp_program(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingCPProgramField::new(String::new());
self.message.body.get_field(tag::UNDERLYING_CP_PROGRAM, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_underlying_cp_program(&self) -> bool {
self.message.body.has(tag::UNDERLYING_CP_PROGRAM)
}
pub fn set_underlying_cp_reg_type(&mut self, v: String) {
self.message.body.set_field(tag::UNDERLYING_CP_REG_TYPE, FIXString::from(v));
}
pub fn get_underlying_cp_reg_type(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingCPRegTypeField::new(String::new());
self.message.body.get_field(tag::UNDERLYING_CP_REG_TYPE, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_underlying_cp_reg_type(&self) -> bool {
self.message.body.has(tag::UNDERLYING_CP_REG_TYPE)
}
pub fn set_underlying_contract_multiplier(&mut self, val: Decimal, scale: i32) {
self.message.body.set_field(tag::UNDERLYING_CONTRACT_MULTIPLIER, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
}
pub fn get_underlying_contract_multiplier(&self) -> Result<Decimal, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingContractMultiplierField::new(Decimal::ZERO, 0);
self.message.body.get_field(tag::UNDERLYING_CONTRACT_MULTIPLIER, &mut fld.0)?;
Ok(fld.value())
}
pub fn has_underlying_contract_multiplier(&self) -> bool {
self.message.body.has(tag::UNDERLYING_CONTRACT_MULTIPLIER)
}
pub fn set_underlying_country_of_issue(&mut self, v: String) {
self.message.body.set_field(tag::UNDERLYING_COUNTRY_OF_ISSUE, FIXString::from(v));
}
pub fn get_underlying_country_of_issue(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingCountryOfIssueField::new(String::new());
self.message.body.get_field(tag::UNDERLYING_COUNTRY_OF_ISSUE, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_underlying_country_of_issue(&self) -> bool {
self.message.body.has(tag::UNDERLYING_COUNTRY_OF_ISSUE)
}
pub fn set_underlying_coupon_payment_date(&mut self, v: String) {
self.message.body.set_field(tag::UNDERLYING_COUPON_PAYMENT_DATE, FIXString::from(v));
}
pub fn get_underlying_coupon_payment_date(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingCouponPaymentDateField::new(String::new());
self.message.body.get_field(tag::UNDERLYING_COUPON_PAYMENT_DATE, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_underlying_coupon_payment_date(&self) -> bool {
self.message.body.has(tag::UNDERLYING_COUPON_PAYMENT_DATE)
}
pub fn set_underlying_coupon_rate(&mut self, val: Decimal, scale: i32) {
self.message.body.set_field(tag::UNDERLYING_COUPON_RATE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
}
pub fn get_underlying_coupon_rate(&self) -> Result<Decimal, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingCouponRateField::new(Decimal::ZERO, 0);
self.message.body.get_field(tag::UNDERLYING_COUPON_RATE, &mut fld.0)?;
Ok(fld.value())
}
pub fn has_underlying_coupon_rate(&self) -> bool {
self.message.body.has(tag::UNDERLYING_COUPON_RATE)
}
pub fn set_underlying_credit_rating(&mut self, v: String) {
self.message.body.set_field(tag::UNDERLYING_CREDIT_RATING, FIXString::from(v));
}
pub fn get_underlying_credit_rating(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingCreditRatingField::new(String::new());
self.message.body.get_field(tag::UNDERLYING_CREDIT_RATING, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_underlying_credit_rating(&self) -> bool {
self.message.body.has(tag::UNDERLYING_CREDIT_RATING)
}
pub fn set_underlying_currency(&mut self, v: String) {
self.message.body.set_field(tag::UNDERLYING_CURRENCY, FIXString::from(v));
}
pub fn get_underlying_currency(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingCurrencyField::new(String::new());
self.message.body.get_field(tag::UNDERLYING_CURRENCY, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_underlying_currency(&self) -> bool {
self.message.body.has(tag::UNDERLYING_CURRENCY)
}
pub fn set_underlying_current_value(&mut self, val: Decimal, scale: i32) {
self.message.body.set_field(tag::UNDERLYING_CURRENT_VALUE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
}
pub fn get_underlying_current_value(&self) -> Result<Decimal, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingCurrentValueField::new(Decimal::ZERO, 0);
self.message.body.get_field(tag::UNDERLYING_CURRENT_VALUE, &mut fld.0)?;
Ok(fld.value())
}
pub fn has_underlying_current_value(&self) -> bool {
self.message.body.has(tag::UNDERLYING_CURRENT_VALUE)
}
pub fn set_underlying_dirty_price(&mut self, val: Decimal, scale: i32) {
self.message.body.set_field(tag::UNDERLYING_DIRTY_PRICE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
}
pub fn get_underlying_dirty_price(&self) -> Result<Decimal, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingDirtyPriceField::new(Decimal::ZERO, 0);
self.message.body.get_field(tag::UNDERLYING_DIRTY_PRICE, &mut fld.0)?;
Ok(fld.value())
}
pub fn has_underlying_dirty_price(&self) -> bool {
self.message.body.has(tag::UNDERLYING_DIRTY_PRICE)
}
pub fn set_underlying_end_price(&mut self, val: Decimal, scale: i32) {
self.message.body.set_field(tag::UNDERLYING_END_PRICE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
}
pub fn get_underlying_end_price(&self) -> Result<Decimal, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingEndPriceField::new(Decimal::ZERO, 0);
self.message.body.get_field(tag::UNDERLYING_END_PRICE, &mut fld.0)?;
Ok(fld.value())
}
pub fn has_underlying_end_price(&self) -> bool {
self.message.body.has(tag::UNDERLYING_END_PRICE)
}
pub fn set_underlying_end_value(&mut self, val: Decimal, scale: i32) {
self.message.body.set_field(tag::UNDERLYING_END_VALUE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
}
pub fn get_underlying_end_value(&self) -> Result<Decimal, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingEndValueField::new(Decimal::ZERO, 0);
self.message.body.get_field(tag::UNDERLYING_END_VALUE, &mut fld.0)?;
Ok(fld.value())
}
pub fn has_underlying_end_value(&self) -> bool {
self.message.body.has(tag::UNDERLYING_END_VALUE)
}
pub fn set_underlying_factor(&mut self, val: Decimal, scale: i32) {
self.message.body.set_field(tag::UNDERLYING_FACTOR, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
}
pub fn get_underlying_factor(&self) -> Result<Decimal, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingFactorField::new(Decimal::ZERO, 0);
self.message.body.get_field(tag::UNDERLYING_FACTOR, &mut fld.0)?;
Ok(fld.value())
}
pub fn has_underlying_factor(&self) -> bool {
self.message.body.has(tag::UNDERLYING_FACTOR)
}
pub fn set_underlying_instr_registry(&mut self, v: String) {
self.message.body.set_field(tag::UNDERLYING_INSTR_REGISTRY, FIXString::from(v));
}
pub fn get_underlying_instr_registry(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingInstrRegistryField::new(String::new());
self.message.body.get_field(tag::UNDERLYING_INSTR_REGISTRY, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_underlying_instr_registry(&self) -> bool {
self.message.body.has(tag::UNDERLYING_INSTR_REGISTRY)
}
pub fn set_underlying_issue_date(&mut self, v: String) {
self.message.body.set_field(tag::UNDERLYING_ISSUE_DATE, FIXString::from(v));
}
pub fn get_underlying_issue_date(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingIssueDateField::new(String::new());
self.message.body.get_field(tag::UNDERLYING_ISSUE_DATE, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_underlying_issue_date(&self) -> bool {
self.message.body.has(tag::UNDERLYING_ISSUE_DATE)
}
pub fn set_underlying_issuer(&mut self, v: String) {
self.message.body.set_field(tag::UNDERLYING_ISSUER, FIXString::from(v));
}
pub fn get_underlying_issuer(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingIssuerField::new(String::new());
self.message.body.get_field(tag::UNDERLYING_ISSUER, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_underlying_issuer(&self) -> bool {
self.message.body.has(tag::UNDERLYING_ISSUER)
}
pub fn set_underlying_locale_of_issue(&mut self, v: String) {
self.message.body.set_field(tag::UNDERLYING_LOCALE_OF_ISSUE, FIXString::from(v));
}
pub fn get_underlying_locale_of_issue(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingLocaleOfIssueField::new(String::new());
self.message.body.get_field(tag::UNDERLYING_LOCALE_OF_ISSUE, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_underlying_locale_of_issue(&self) -> bool {
self.message.body.has(tag::UNDERLYING_LOCALE_OF_ISSUE)
}
pub fn set_underlying_maturity_date(&mut self, v: String) {
self.message.body.set_field(tag::UNDERLYING_MATURITY_DATE, FIXString::from(v));
}
pub fn get_underlying_maturity_date(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingMaturityDateField::new(String::new());
self.message.body.get_field(tag::UNDERLYING_MATURITY_DATE, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_underlying_maturity_date(&self) -> bool {
self.message.body.has(tag::UNDERLYING_MATURITY_DATE)
}
pub fn set_underlying_maturity_month_year(&mut self, v: String) {
self.message.body.set_field(tag::UNDERLYING_MATURITY_MONTH_YEAR, FIXString::from(v));
}
pub fn get_underlying_maturity_month_year(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingMaturityMonthYearField::new(String::new());
self.message.body.get_field(tag::UNDERLYING_MATURITY_MONTH_YEAR, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_underlying_maturity_month_year(&self) -> bool {
self.message.body.has(tag::UNDERLYING_MATURITY_MONTH_YEAR)
}
pub fn set_underlying_opt_attribute(&mut self, v: String) {
self.message.body.set_field(tag::UNDERLYING_OPT_ATTRIBUTE, FIXString::from(v));
}
pub fn get_underlying_opt_attribute(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingOptAttributeField::new(String::new());
self.message.body.get_field(tag::UNDERLYING_OPT_ATTRIBUTE, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_underlying_opt_attribute(&self) -> bool {
self.message.body.has(tag::UNDERLYING_OPT_ATTRIBUTE)
}
pub fn set_underlying_product(&mut self, v: isize) {
self.message.body.set_field(tag::UNDERLYING_PRODUCT, fixer::fix_int::FIXInt::from(v));
}
pub fn get_underlying_product(&self) -> Result<isize, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingProductField::new(0);
self.message.body.get_field(tag::UNDERLYING_PRODUCT, &mut fld.0)?;
Ok(fld.value())
}
pub fn has_underlying_product(&self) -> bool {
self.message.body.has(tag::UNDERLYING_PRODUCT)
}
pub fn set_underlying_px(&mut self, val: Decimal, scale: i32) {
self.message.body.set_field(tag::UNDERLYING_PX, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
}
pub fn get_underlying_px(&self) -> Result<Decimal, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingPxField::new(Decimal::ZERO, 0);
self.message.body.get_field(tag::UNDERLYING_PX, &mut fld.0)?;
Ok(fld.value())
}
pub fn has_underlying_px(&self) -> bool {
self.message.body.has(tag::UNDERLYING_PX)
}
pub fn set_underlying_qty(&mut self, val: Decimal, scale: i32) {
self.message.body.set_field(tag::UNDERLYING_QTY, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
}
pub fn get_underlying_qty(&self) -> Result<Decimal, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingQtyField::new(Decimal::ZERO, 0);
self.message.body.get_field(tag::UNDERLYING_QTY, &mut fld.0)?;
Ok(fld.value())
}
pub fn has_underlying_qty(&self) -> bool {
self.message.body.has(tag::UNDERLYING_QTY)
}
pub fn set_underlying_redemption_date(&mut self, v: String) {
self.message.body.set_field(tag::UNDERLYING_REDEMPTION_DATE, FIXString::from(v));
}
pub fn get_underlying_redemption_date(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingRedemptionDateField::new(String::new());
self.message.body.get_field(tag::UNDERLYING_REDEMPTION_DATE, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_underlying_redemption_date(&self) -> bool {
self.message.body.has(tag::UNDERLYING_REDEMPTION_DATE)
}
pub fn set_underlying_repo_collateral_security_type(&mut self, v: isize) {
self.message.body.set_field(tag::UNDERLYING_REPO_COLLATERAL_SECURITY_TYPE, fixer::fix_int::FIXInt::from(v));
}
pub fn get_underlying_repo_collateral_security_type(&self) -> Result<isize, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingRepoCollateralSecurityTypeField::new(0);
self.message.body.get_field(tag::UNDERLYING_REPO_COLLATERAL_SECURITY_TYPE, &mut fld.0)?;
Ok(fld.value())
}
pub fn has_underlying_repo_collateral_security_type(&self) -> bool {
self.message.body.has(tag::UNDERLYING_REPO_COLLATERAL_SECURITY_TYPE)
}
pub fn set_underlying_repurchase_rate(&mut self, val: Decimal, scale: i32) {
self.message.body.set_field(tag::UNDERLYING_REPURCHASE_RATE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
}
pub fn get_underlying_repurchase_rate(&self) -> Result<Decimal, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingRepurchaseRateField::new(Decimal::ZERO, 0);
self.message.body.get_field(tag::UNDERLYING_REPURCHASE_RATE, &mut fld.0)?;
Ok(fld.value())
}
pub fn has_underlying_repurchase_rate(&self) -> bool {
self.message.body.has(tag::UNDERLYING_REPURCHASE_RATE)
}
pub fn set_underlying_repurchase_term(&mut self, v: isize) {
self.message.body.set_field(tag::UNDERLYING_REPURCHASE_TERM, fixer::fix_int::FIXInt::from(v));
}
pub fn get_underlying_repurchase_term(&self) -> Result<isize, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingRepurchaseTermField::new(0);
self.message.body.get_field(tag::UNDERLYING_REPURCHASE_TERM, &mut fld.0)?;
Ok(fld.value())
}
pub fn has_underlying_repurchase_term(&self) -> bool {
self.message.body.has(tag::UNDERLYING_REPURCHASE_TERM)
}
pub fn set_underlying_security_desc(&mut self, v: String) {
self.message.body.set_field(tag::UNDERLYING_SECURITY_DESC, FIXString::from(v));
}
pub fn get_underlying_security_desc(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingSecurityDescField::new(String::new());
self.message.body.get_field(tag::UNDERLYING_SECURITY_DESC, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_underlying_security_desc(&self) -> bool {
self.message.body.has(tag::UNDERLYING_SECURITY_DESC)
}
pub fn set_underlying_security_exchange(&mut self, v: String) {
self.message.body.set_field(tag::UNDERLYING_SECURITY_EXCHANGE, FIXString::from(v));
}
pub fn get_underlying_security_exchange(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingSecurityExchangeField::new(String::new());
self.message.body.get_field(tag::UNDERLYING_SECURITY_EXCHANGE, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_underlying_security_exchange(&self) -> bool {
self.message.body.has(tag::UNDERLYING_SECURITY_EXCHANGE)
}
pub fn set_underlying_security_id(&mut self, v: String) {
self.message.body.set_field(tag::UNDERLYING_SECURITY_ID, FIXString::from(v));
}
pub fn get_underlying_security_id(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingSecurityIDField::new(String::new());
self.message.body.get_field(tag::UNDERLYING_SECURITY_ID, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_underlying_security_id(&self) -> bool {
self.message.body.has(tag::UNDERLYING_SECURITY_ID)
}
pub fn set_underlying_security_id_source(&mut self, v: String) {
self.message.body.set_field(tag::UNDERLYING_SECURITY_ID_SOURCE, FIXString::from(v));
}
pub fn get_underlying_security_id_source(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingSecurityIDSourceField::new(String::new());
self.message.body.get_field(tag::UNDERLYING_SECURITY_ID_SOURCE, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_underlying_security_id_source(&self) -> bool {
self.message.body.has(tag::UNDERLYING_SECURITY_ID_SOURCE)
}
pub fn set_underlying_security_sub_type(&mut self, v: String) {
self.message.body.set_field(tag::UNDERLYING_SECURITY_SUB_TYPE, FIXString::from(v));
}
pub fn get_underlying_security_sub_type(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingSecuritySubTypeField::new(String::new());
self.message.body.get_field(tag::UNDERLYING_SECURITY_SUB_TYPE, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_underlying_security_sub_type(&self) -> bool {
self.message.body.has(tag::UNDERLYING_SECURITY_SUB_TYPE)
}
pub fn set_underlying_security_type(&mut self, v: String) {
self.message.body.set_field(tag::UNDERLYING_SECURITY_TYPE, FIXString::from(v));
}
pub fn get_underlying_security_type(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingSecurityTypeField::new(String::new());
self.message.body.get_field(tag::UNDERLYING_SECURITY_TYPE, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_underlying_security_type(&self) -> bool {
self.message.body.has(tag::UNDERLYING_SECURITY_TYPE)
}
pub fn set_underlying_start_value(&mut self, val: Decimal, scale: i32) {
self.message.body.set_field(tag::UNDERLYING_START_VALUE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
}
pub fn get_underlying_start_value(&self) -> Result<Decimal, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingStartValueField::new(Decimal::ZERO, 0);
self.message.body.get_field(tag::UNDERLYING_START_VALUE, &mut fld.0)?;
Ok(fld.value())
}
pub fn has_underlying_start_value(&self) -> bool {
self.message.body.has(tag::UNDERLYING_START_VALUE)
}
pub fn set_underlying_state_or_province_of_issue(&mut self, v: String) {
self.message.body.set_field(tag::UNDERLYING_STATE_OR_PROVINCE_OF_ISSUE, FIXString::from(v));
}
pub fn get_underlying_state_or_province_of_issue(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingStateOrProvinceOfIssueField::new(String::new());
self.message.body.get_field(tag::UNDERLYING_STATE_OR_PROVINCE_OF_ISSUE, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_underlying_state_or_province_of_issue(&self) -> bool {
self.message.body.has(tag::UNDERLYING_STATE_OR_PROVINCE_OF_ISSUE)
}
pub fn set_underlying_strike_currency(&mut self, v: String) {
self.message.body.set_field(tag::UNDERLYING_STRIKE_CURRENCY, FIXString::from(v));
}
pub fn get_underlying_strike_currency(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingStrikeCurrencyField::new(String::new());
self.message.body.get_field(tag::UNDERLYING_STRIKE_CURRENCY, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_underlying_strike_currency(&self) -> bool {
self.message.body.has(tag::UNDERLYING_STRIKE_CURRENCY)
}
pub fn set_underlying_strike_price(&mut self, val: Decimal, scale: i32) {
self.message.body.set_field(tag::UNDERLYING_STRIKE_PRICE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
}
pub fn get_underlying_strike_price(&self) -> Result<Decimal, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingStrikePriceField::new(Decimal::ZERO, 0);
self.message.body.get_field(tag::UNDERLYING_STRIKE_PRICE, &mut fld.0)?;
Ok(fld.value())
}
pub fn has_underlying_strike_price(&self) -> bool {
self.message.body.has(tag::UNDERLYING_STRIKE_PRICE)
}
pub fn set_underlying_symbol(&mut self, v: String) {
self.message.body.set_field(tag::UNDERLYING_SYMBOL, FIXString::from(v));
}
pub fn get_underlying_symbol(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingSymbolField::new(String::new());
self.message.body.get_field(tag::UNDERLYING_SYMBOL, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_underlying_symbol(&self) -> bool {
self.message.body.has(tag::UNDERLYING_SYMBOL)
}
pub fn set_underlying_symbol_sfx(&mut self, v: String) {
self.message.body.set_field(tag::UNDERLYING_SYMBOL_SFX, FIXString::from(v));
}
pub fn get_underlying_symbol_sfx(&self) -> Result<String, MessageRejectErrorEnum> {
let mut fld = field::UnderlyingSymbolSfxField::new(String::new());
self.message.body.get_field(tag::UNDERLYING_SYMBOL_SFX, &mut fld.0)?;
Ok(fld.value().to_string())
}
pub fn has_underlying_symbol_sfx(&self) -> bool {
self.message.body.has(tag::UNDERLYING_SYMBOL_SFX)
}
}
pub type RouteOut = fn(msg: DerivativeSecurityListRequest, session_id: SessionID) -> Result<(), MessageRejectErrorEnum>;
pub type Route = (&'static str, &'static str, Box<dyn Fn(&Message, SessionID) -> Result<(), MessageRejectErrorEnum> + Send>);
pub fn route(router: RouteOut) -> Route {
let r = move |msg: &Message, session_id: SessionID| -> Result<(), MessageRejectErrorEnum> {
router(DerivativeSecurityListRequest::from_message(msg.clone()), session_id)
};
("FIX.4.4", "z", Box::new(r))
}