'''
 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 iserver.msgs.OrderRequestInfo import OrderRequestInfo

from .OrderRequestInfo import OrderRequestInfo
from .AllocAccountInfo import AllocAccountInfo


class OrderRequest(OrderRequestInfo, metaclass=EzxMsgMeta):

	__block_fields__ = {
		'ORB' : Field('legList', 'ORB', noop_decode_func, update_list_item), 
		'ALLOCABLK' : Field('allocsList', 'ALLOCABLK', noop_decode_func, update_list_item), 
	}

	def __init__(self, **kwargs):
		self.legList : list[OrderRequestInfo] = None
		self.allocsList : list[AllocAccountInfo] = None
		super(OrderRequest, self).__init__(**kwargs)
		self.msg_type = api.IserverMsgType.APPLICATION.value
		self.msg_subtype = api.IserverMsgSubType.ORDER.value

