'''
 Generated by EZX Code Generator  
Date: 02/24/22 
'''


from iserver.EzxMsg import EzxMsg, EzxMsgMeta
from iserver.msgs import *
from iserver.enums import api

from .OrderRequestInfo import OrderRequestInfo


class Reject(EzxMsg, metaclass=EzxMsgMeta):

	__block_fields__ = {
		'ORB' : Field('rejectedRequest', 'ORB', noop_decode_func, ), 
	}

	def __init__(self, **kwargs):
		self.REJECT_NO_MEMORY = None
		self.REJECT_DECODE_FAILURE = None
		self.REJECT_UNKNOWN_FIXID = None
		self.REJECT_UNKNOWN_ROID = None
		self.REJECT_UNKNOWN_CLOID = None
		self.REJECT_UNKNOWN_EVENT = None
		self.REJECT_SE_FAILURE = None
		self.REJECT_UPDATE_FAILURE = None
		self.REJECT_FIX_FAILURE = None
		self.REJECT_ENCODE_FAILURE = None
		self.REJECT_SYSTEM_EXCEPTION = None
		self.REJECT_USER_NOT_ACTIVE = None
		self.REJECT_ROUTER_FAILURE = None
		self.REJECT_INVALID_REQUEST = None
		self.REJECT_DATABASE_ERROR = None
		self.REJECT_COMMUNICATION_ERROR = None
		self.REJECT_MISSSING_ORDERID = None
		self.REJECT_FAILED_RISK_CHECK = None
		self.REJECT_BAD_INBOUND_ORDER_HANDLING = None
		self.REJECT_BUYING_POWER_EXCEEDED = None
		self.REJECT_DESTINATION_DOWN = None
		self.REJECT_FAILED_RISK_DUPLICATE_CHECK = None
		self.REJECT_FAILED_RISK_ETB_CHECK = None
		self.REJECT_FAILED_RISK_PENDING_ORDER_CHECK = None
		self.REJECT_FAILED_RISK_AGGREGATE_EXECUTED_CHECK = None
		self.REJECT_FAILED_RISK_SELF_TRADE_CHECK = None
		self.REJECT_FAILED_RISK_ORDER_MARKING_CHECK = None
		self.REJECT_FAILED_RISK_ERRONEOUS_PRICE_CHECK = None
		self.REJECT_FAILED_RISK_INVALID_SIDE_CHECK = None
		self.REJECT_FAILED_RISK_MAX_SHARES_CHECK = None
		self.REJECT_FAILED_RISK_MAX_VALUE_CHECK = None
		self.REJECT_FAILED_RISK_ON_CLOSE_CHECK = None
		self.REJECT_CROSSING_ENGINE_REJECT = None
		self.REJECT_POSITION_LIMIT_REACHED = None
		self.REJECT_IPO_MKT_ORDER = None
		self.REJECT_NOT_ENOUGH_LOCATES = None
		self.REJECT_UNKNOWN_ACCOUNT = None
		self.REJECT_MAX_LOSS_REACHED = None
		self.REJECT_POSITION_OR_OPEN_LIMIT_REACHED = None
		self.REJECT_MAX_ORDERS_PER_SECOND = None
		self.REJECT_MAX_UNIQUE_POSITIONS = None
		self.REJECT_MAX_EXECUTED_LIMIT = None
		self.REJECT_MAX_OPEN_AND_EXECUTED_LIMIT = None
		self.REJECT_ADV_PCT_EXCEEDED = None
		self.REJECT_NYSE_TPA_NO_PARENT_ORDER = None
		self.REJECT_FAILED_RISK_MAX_OPEN_ORDERS_CHECK = None
		self.REJECT_FAILED_TICKSIZEPILOT_PRICE_CHECK = None
		self.REJECT_CLIENT_POSITION_LIMIT_REACHED = None
		self.REJECT_CLIENT_MAX_LOSS_REACHED = None
		self.REJECT_CLIENT_MAX_OPEN_ORDERS_PER_SYMBOL = None
		self.REJECT_EXCEEDS_UNROUTEDQTY = None
		self.REJECT_MAX_SHARES_TRADED_LIMIT = None
		self.REJECT_TRADING_NOT_ALLOWED = None
		self.REJECT_CXL_REPLACE_CLOSED_ORDER = None
		self.REJECT_USER_NOT_ALLOWED_TO_TRADE_SYMBOL = None
		self.msgType : int = None
		self.routerOrderID : int = None
		self.myID : str = None
		self.parentKey : str = None
		self.side : int = None
		self.symbol : str = None
		self.price : float = None
		self.orderQty : float = None
		self.returnCode : int = None
		self.returnDesc : str = None
		self.userName : str = None
		self.state : str = None
		self.leavesQty : float = None
		self.cumQty : float = None
		self.avgPrice : float = None
		self.unroutedQty : float = None
		self.rejectedRequest : OrderRequestInfo = None
		super(Reject, self).__init__(**kwargs)
		self.msg_type = api.IserverMsgType.APPLICATION.value
		self.msg_subtype = api.IserverMsgSubType.REJECT.value

