'''
 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 .ExecutionStatus import ExecutionStatus
from .OrderRequestInfo import OrderRequestInfo
from .OrderStatus import OrderStatus


class OrderInfoResponse(EzxMsg, metaclass=EzxMsgMeta):

	__block_fields__ = {
		'EB' : Field('executionList', 'EB', noop_decode_func, update_list_item), 
		'ORB' : Field('orderRequestList', 'ORB', noop_decode_func, update_list_item), 
		'OB' : Field('orderStatusList', 'OB', noop_decode_func, update_list_item), 
	}

	def __init__(self, **kwargs):
		self.myID : str = None
		self.routerOrderID : int = None
		self.executionList : list[ExecutionStatus] = None
		self.orderRequestList : list[OrderRequestInfo] = None
		self.orderStatusList : list[OrderStatus] = None
		super(OrderInfoResponse, self).__init__(**kwargs)
		self.msg_type = api.IserverMsgType.APPLICATION.value
		self.msg_subtype = api.IserverMsgSubType.ORDERINFO_RESPONSE.value

