'''
 Generated by EZX Code Generator  
Date: 04/18/22 
'''


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

from .ParentOrderStatus import ParentOrderStatus
from .ExecutionStatus import ExecutionStatus
from .OrderRequestStatus import OrderRequestStatus
from .StrategyInfo import StrategyInfo



class OrderResponse(OrderStatus, metaclass=EzxMsgMeta):

	__block_fields__ = {
		'PB' : Field('parents', 'PB', noop_decode_func, update_list_item), 
		'EB' : Field('executions', 'EB', noop_decode_func, update_list_item), 
		'ORSB' : Field('orderRequests', 'ORSB', noop_decode_func, update_list_item), 
		'STGBLK' : Field('strategyInfo', 'STGBLK', noop_decode_func, ), 
	}

	def __init__(self, **kwargs):
		self.parents : list[ParentOrderStatus] = None
		self.executions : list[ExecutionStatus] = None
		self.orderRequests : list[OrderRequestStatus] = None
		self.strategyInfo : StrategyInfo = None
		super(OrderResponse, self).__init__(**kwargs)
		self.msg_type = api.IserverMsgType.APPLICATION.value
		self.msg_subtype = api.IserverMsgSubType.ORDERRESPONSE.value

