/**
 * FinFeedAPI Stock REST API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: v1
 * Contact: support@apibricks.io
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 *
 */

import ApiClient from '../ApiClient';
import Level3AddOrderModel from './Level3AddOrderModel';
import Level3ClearBookModel from './Level3ClearBookModel';
import Level3DeleteOrderModel from './Level3DeleteOrderModel';
import Level3ExecutedOrderModel from './Level3ExecutedOrderModel';
import Level3ModifyOrderModel from './Level3ModifyOrderModel';

/**
 * The Level3OrderBookModel model module.
 * @module model/Level3OrderBookModel
 * @version v1
 */
class Level3OrderBookModel {
    /**
     * Constructs a new <code>Level3OrderBookModel</code>.
     * Represents the response DTO for Level-3 order book information
     * @alias module:model/Level3OrderBookModel
     */
    constructor() { 
        
        Level3OrderBookModel.initialize(this);
    }

    /**
     * Initializes the fields of this object.
     * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
     * Only for internal use.
     */
    static initialize(obj) { 
    }

    /**
     * Constructs a <code>Level3OrderBookModel</code> from a plain JavaScript object, optionally creating a new instance.
     * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
     * @param {Object} data The plain JavaScript object bearing properties of interest.
     * @param {module:model/Level3OrderBookModel} obj Optional instance to populate.
     * @return {module:model/Level3OrderBookModel} The populated <code>Level3OrderBookModel</code> instance.
     */
    static constructFromObject(data, obj) {
        if (data) {
            obj = obj || new Level3OrderBookModel();

            if (data.hasOwnProperty('add_order')) {
                obj['add_order'] = Level3AddOrderModel.constructFromObject(data['add_order']);
            }
            if (data.hasOwnProperty('delete_order')) {
                obj['delete_order'] = Level3DeleteOrderModel.constructFromObject(data['delete_order']);
            }
            if (data.hasOwnProperty('modify_order')) {
                obj['modify_order'] = Level3ModifyOrderModel.constructFromObject(data['modify_order']);
            }
            if (data.hasOwnProperty('executed_order')) {
                obj['executed_order'] = Level3ExecutedOrderModel.constructFromObject(data['executed_order']);
            }
            if (data.hasOwnProperty('clear_book')) {
                obj['clear_book'] = Level3ClearBookModel.constructFromObject(data['clear_book']);
            }
        }
        return obj;
    }

    /**
     * Validates the JSON data with respect to <code>Level3OrderBookModel</code>.
     * @param {Object} data The plain JavaScript object bearing properties of interest.
     * @return {boolean} to indicate whether the JSON data is valid with respect to <code>Level3OrderBookModel</code>.
     */
    static validateJSON(data) {
        // validate the optional field `add_order`
        if (data['add_order']) { // data not null
          Level3AddOrderModel.validateJSON(data['add_order']);
        }
        // validate the optional field `delete_order`
        if (data['delete_order']) { // data not null
          Level3DeleteOrderModel.validateJSON(data['delete_order']);
        }
        // validate the optional field `modify_order`
        if (data['modify_order']) { // data not null
          Level3ModifyOrderModel.validateJSON(data['modify_order']);
        }
        // validate the optional field `executed_order`
        if (data['executed_order']) { // data not null
          Level3ExecutedOrderModel.validateJSON(data['executed_order']);
        }
        // validate the optional field `clear_book`
        if (data['clear_book']) { // data not null
          Level3ClearBookModel.validateJSON(data['clear_book']);
        }

        return true;
    }


}



/**
 * @member {module:model/Level3AddOrderModel} add_order
 */
Level3OrderBookModel.prototype['add_order'] = undefined;

/**
 * @member {module:model/Level3DeleteOrderModel} delete_order
 */
Level3OrderBookModel.prototype['delete_order'] = undefined;

/**
 * @member {module:model/Level3ModifyOrderModel} modify_order
 */
Level3OrderBookModel.prototype['modify_order'] = undefined;

/**
 * @member {module:model/Level3ExecutedOrderModel} executed_order
 */
Level3OrderBookModel.prototype['executed_order'] = undefined;

/**
 * @member {module:model/Level3ClearBookModel} clear_book
 */
Level3OrderBookModel.prototype['clear_book'] = undefined;






export default Level3OrderBookModel;

