'''
 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 .OrderStatus import OrderStatus
from .ParentOrderStatus import ParentOrderStatus
from .AllocationStatus import AllocationStatus



class GetOrdersResponse(EzxMsg, metaclass=EzxMsgMeta):

	__block_fields__ = {
		'OB' : Field('orderStatusList', 'OB', noop_decode_func, update_list_item), 
		'PB' : Field('parentOrderStatusList', 'PB', noop_decode_func, update_list_item), 
		'ALLOCSTATBLOCK' : Field('allocStatusList', 'ALLOCSTATBLOCK', noop_decode_func, update_list_item), 
	}

	def __init__(self, **kwargs):
		self.myID : str = None
		self.orderStatusList : list[OrderStatus] = None
		self.parentOrderStatusList : list[ParentOrderStatus] = None
		self.allocStatusList : list[AllocationStatus] = None
		super(GetOrdersResponse, self).__init__(**kwargs)
		self.msg_type = api.IserverMsgType.APPLICATION.value
		self.msg_subtype = api.IserverMsgSubType.GET_ORDERS_RESPONSE.value

