/**
 * 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 AdminAuctionInformationModel from './AdminAuctionInformationModel';
import AdminOfficialPriceModel from './AdminOfficialPriceModel';
import AdminOperationalHaltStatusModel from './AdminOperationalHaltStatusModel';
import AdminRetailLiquidityIndicatorModel from './AdminRetailLiquidityIndicatorModel';
import AdminSecurityDirectoryModel from './AdminSecurityDirectoryModel';
import AdminSecurityEventModel from './AdminSecurityEventModel';
import AdminShortSalePriceTestStatusModel from './AdminShortSalePriceTestStatusModel';
import AdminSystemEventModel from './AdminSystemEventModel';
import AdminTradingStatusModel from './AdminTradingStatusModel';

/**
 * The AdminAdminMessageModel model module.
 * @module model/AdminAdminMessageModel
 * @version v1
 */
class AdminAdminMessageModel {
    /**
     * Constructs a new <code>AdminAdminMessageModel</code>.
     * Represents the response DTO for IEX admin information, combining all symbol-based admin message types
     * @alias module:model/AdminAdminMessageModel
     */
    constructor() { 
        
        AdminAdminMessageModel.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>AdminAdminMessageModel</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/AdminAdminMessageModel} obj Optional instance to populate.
     * @return {module:model/AdminAdminMessageModel} The populated <code>AdminAdminMessageModel</code> instance.
     */
    static constructFromObject(data, obj) {
        if (data) {
            obj = obj || new AdminAdminMessageModel();

            if (data.hasOwnProperty('trading_status')) {
                obj['trading_status'] = AdminTradingStatusModel.constructFromObject(data['trading_status']);
            }
            if (data.hasOwnProperty('official_price')) {
                obj['official_price'] = AdminOfficialPriceModel.constructFromObject(data['official_price']);
            }
            if (data.hasOwnProperty('security_event')) {
                obj['security_event'] = AdminSecurityEventModel.constructFromObject(data['security_event']);
            }
            if (data.hasOwnProperty('auction_information')) {
                obj['auction_information'] = AdminAuctionInformationModel.constructFromObject(data['auction_information']);
            }
            if (data.hasOwnProperty('short_sale_price_test')) {
                obj['short_sale_price_test'] = AdminShortSalePriceTestStatusModel.constructFromObject(data['short_sale_price_test']);
            }
            if (data.hasOwnProperty('operational_halt_status')) {
                obj['operational_halt_status'] = AdminOperationalHaltStatusModel.constructFromObject(data['operational_halt_status']);
            }
            if (data.hasOwnProperty('retail_liquidity_indicator')) {
                obj['retail_liquidity_indicator'] = AdminRetailLiquidityIndicatorModel.constructFromObject(data['retail_liquidity_indicator']);
            }
            if (data.hasOwnProperty('system_event')) {
                obj['system_event'] = AdminSystemEventModel.constructFromObject(data['system_event']);
            }
            if (data.hasOwnProperty('security_directory')) {
                obj['security_directory'] = AdminSecurityDirectoryModel.constructFromObject(data['security_directory']);
            }
        }
        return obj;
    }

    /**
     * Validates the JSON data with respect to <code>AdminAdminMessageModel</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>AdminAdminMessageModel</code>.
     */
    static validateJSON(data) {
        // validate the optional field `trading_status`
        if (data['trading_status']) { // data not null
          AdminTradingStatusModel.validateJSON(data['trading_status']);
        }
        // validate the optional field `official_price`
        if (data['official_price']) { // data not null
          AdminOfficialPriceModel.validateJSON(data['official_price']);
        }
        // validate the optional field `security_event`
        if (data['security_event']) { // data not null
          AdminSecurityEventModel.validateJSON(data['security_event']);
        }
        // validate the optional field `auction_information`
        if (data['auction_information']) { // data not null
          AdminAuctionInformationModel.validateJSON(data['auction_information']);
        }
        // validate the optional field `short_sale_price_test`
        if (data['short_sale_price_test']) { // data not null
          AdminShortSalePriceTestStatusModel.validateJSON(data['short_sale_price_test']);
        }
        // validate the optional field `operational_halt_status`
        if (data['operational_halt_status']) { // data not null
          AdminOperationalHaltStatusModel.validateJSON(data['operational_halt_status']);
        }
        // validate the optional field `retail_liquidity_indicator`
        if (data['retail_liquidity_indicator']) { // data not null
          AdminRetailLiquidityIndicatorModel.validateJSON(data['retail_liquidity_indicator']);
        }
        // validate the optional field `system_event`
        if (data['system_event']) { // data not null
          AdminSystemEventModel.validateJSON(data['system_event']);
        }
        // validate the optional field `security_directory`
        if (data['security_directory']) { // data not null
          AdminSecurityDirectoryModel.validateJSON(data['security_directory']);
        }

        return true;
    }


}



/**
 * @member {module:model/AdminTradingStatusModel} trading_status
 */
AdminAdminMessageModel.prototype['trading_status'] = undefined;

/**
 * @member {module:model/AdminOfficialPriceModel} official_price
 */
AdminAdminMessageModel.prototype['official_price'] = undefined;

/**
 * @member {module:model/AdminSecurityEventModel} security_event
 */
AdminAdminMessageModel.prototype['security_event'] = undefined;

/**
 * @member {module:model/AdminAuctionInformationModel} auction_information
 */
AdminAdminMessageModel.prototype['auction_information'] = undefined;

/**
 * @member {module:model/AdminShortSalePriceTestStatusModel} short_sale_price_test
 */
AdminAdminMessageModel.prototype['short_sale_price_test'] = undefined;

/**
 * @member {module:model/AdminOperationalHaltStatusModel} operational_halt_status
 */
AdminAdminMessageModel.prototype['operational_halt_status'] = undefined;

/**
 * @member {module:model/AdminRetailLiquidityIndicatorModel} retail_liquidity_indicator
 */
AdminAdminMessageModel.prototype['retail_liquidity_indicator'] = undefined;

/**
 * @member {module:model/AdminSystemEventModel} system_event
 */
AdminAdminMessageModel.prototype['system_event'] = undefined;

/**
 * @member {module:model/AdminSecurityDirectoryModel} security_directory
 */
AdminAdminMessageModel.prototype['security_directory'] = undefined;






export default AdminAdminMessageModel;

