/**
 * 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';

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

            if (data.hasOwnProperty('symbol')) {
                obj['symbol'] = ApiClient.convertToType(data['symbol'], 'String');
            }
            if (data.hasOwnProperty('timestamp_nanos')) {
                obj['timestamp_nanos'] = ApiClient.convertToType(data['timestamp_nanos'], 'Number');
            }
            if (data.hasOwnProperty('timestamp')) {
                obj['timestamp'] = ApiClient.convertToType(data['timestamp'], 'Date');
            }
            if (data.hasOwnProperty('is_trading_live')) {
                obj['is_trading_live'] = ApiClient.convertToType(data['is_trading_live'], 'Boolean');
            }
            if (data.hasOwnProperty('is_trading_halted')) {
                obj['is_trading_halted'] = ApiClient.convertToType(data['is_trading_halted'], 'Boolean');
            }
            if (data.hasOwnProperty('is_trading_in_order_acceptance_period')) {
                obj['is_trading_in_order_acceptance_period'] = ApiClient.convertToType(data['is_trading_in_order_acceptance_period'], 'Boolean');
            }
            if (data.hasOwnProperty('is_trading_paused')) {
                obj['is_trading_paused'] = ApiClient.convertToType(data['is_trading_paused'], 'Boolean');
            }
            if (data.hasOwnProperty('is_reason_halt_news_pending')) {
                obj['is_reason_halt_news_pending'] = ApiClient.convertToType(data['is_reason_halt_news_pending'], 'Boolean');
            }
            if (data.hasOwnProperty('is_reason_ipo_not_yet_trading')) {
                obj['is_reason_ipo_not_yet_trading'] = ApiClient.convertToType(data['is_reason_ipo_not_yet_trading'], 'Boolean');
            }
            if (data.hasOwnProperty('is_reason_ipo_deferred')) {
                obj['is_reason_ipo_deferred'] = ApiClient.convertToType(data['is_reason_ipo_deferred'], 'Boolean');
            }
            if (data.hasOwnProperty('is_reason_halt_news_dissemination')) {
                obj['is_reason_halt_news_dissemination'] = ApiClient.convertToType(data['is_reason_halt_news_dissemination'], 'Boolean');
            }
            if (data.hasOwnProperty('is_reason_ipo_order_acceptance_period')) {
                obj['is_reason_ipo_order_acceptance_period'] = ApiClient.convertToType(data['is_reason_ipo_order_acceptance_period'], 'Boolean');
            }
            if (data.hasOwnProperty('is_reason_ipo_pre_launch_period')) {
                obj['is_reason_ipo_pre_launch_period'] = ApiClient.convertToType(data['is_reason_ipo_pre_launch_period'], 'Boolean');
            }
            if (data.hasOwnProperty('is_reason_market_wide_circuit_breaker_level1')) {
                obj['is_reason_market_wide_circuit_breaker_level1'] = ApiClient.convertToType(data['is_reason_market_wide_circuit_breaker_level1'], 'Boolean');
            }
            if (data.hasOwnProperty('is_reason_market_wide_circuit_breaker_level2')) {
                obj['is_reason_market_wide_circuit_breaker_level2'] = ApiClient.convertToType(data['is_reason_market_wide_circuit_breaker_level2'], 'Boolean');
            }
            if (data.hasOwnProperty('is_reason_market_wide_circuit_breaker_level3')) {
                obj['is_reason_market_wide_circuit_breaker_level3'] = ApiClient.convertToType(data['is_reason_market_wide_circuit_breaker_level3'], 'Boolean');
            }
            if (data.hasOwnProperty('is_reason_not_applicable')) {
                obj['is_reason_not_applicable'] = ApiClient.convertToType(data['is_reason_not_applicable'], 'Boolean');
            }
            if (data.hasOwnProperty('is_reason_not_available')) {
                obj['is_reason_not_available'] = ApiClient.convertToType(data['is_reason_not_available'], 'Boolean');
            }
        }
        return obj;
    }

    /**
     * Validates the JSON data with respect to <code>AdminTradingStatusModel</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>AdminTradingStatusModel</code>.
     */
    static validateJSON(data) {
        // ensure the json data is a string
        if (data['symbol'] && !(typeof data['symbol'] === 'string' || data['symbol'] instanceof String)) {
            throw new Error("Expected the field `symbol` to be a primitive type in the JSON string but got " + data['symbol']);
        }

        return true;
    }


}



/**
 * The stock symbol
 * @member {String} symbol
 */
AdminTradingStatusModel.prototype['symbol'] = undefined;

/**
 * Original timestamp in nanoseconds since epoch
 * @member {Number} timestamp_nanos
 */
AdminTradingStatusModel.prototype['timestamp_nanos'] = undefined;

/**
 * Time when the trading status was recorded as DateTime
 * @member {Date} timestamp
 */
AdminTradingStatusModel.prototype['timestamp'] = undefined;

/**
 * Gets whether the security is currently trading on IEX
 * @member {Boolean} is_trading_live
 */
AdminTradingStatusModel.prototype['is_trading_live'] = undefined;

/**
 * Gets whether the security is halted across all US equity markets
 * @member {Boolean} is_trading_halted
 */
AdminTradingStatusModel.prototype['is_trading_halted'] = undefined;

/**
 * Gets whether the security is in Order Acceptance Period on IEX
 * @member {Boolean} is_trading_in_order_acceptance_period
 */
AdminTradingStatusModel.prototype['is_trading_in_order_acceptance_period'] = undefined;

/**
 * Gets whether the security is paused and in Order Acceptance Period on IEX
 * @member {Boolean} is_trading_paused
 */
AdminTradingStatusModel.prototype['is_trading_paused'] = undefined;

/**
 * Gets whether the halt reason is News Pending
 * @member {Boolean} is_reason_halt_news_pending
 */
AdminTradingStatusModel.prototype['is_reason_halt_news_pending'] = undefined;

/**
 * Gets whether the halt reason is IPO Not Yet Trading
 * @member {Boolean} is_reason_ipo_not_yet_trading
 */
AdminTradingStatusModel.prototype['is_reason_ipo_not_yet_trading'] = undefined;

/**
 * Gets whether the halt reason is IPO Deferred
 * @member {Boolean} is_reason_ipo_deferred
 */
AdminTradingStatusModel.prototype['is_reason_ipo_deferred'] = undefined;

/**
 * Gets whether the order acceptance period reason is Halt News Dissemination
 * @member {Boolean} is_reason_halt_news_dissemination
 */
AdminTradingStatusModel.prototype['is_reason_halt_news_dissemination'] = undefined;

/**
 * Gets whether the order acceptance period reason is IPO Order Acceptance Period
 * @member {Boolean} is_reason_ipo_order_acceptance_period
 */
AdminTradingStatusModel.prototype['is_reason_ipo_order_acceptance_period'] = undefined;

/**
 * Gets whether the order acceptance period reason is IPO Pre-Launch Period
 * @member {Boolean} is_reason_ipo_pre_launch_period
 */
AdminTradingStatusModel.prototype['is_reason_ipo_pre_launch_period'] = undefined;

/**
 * Gets whether the order acceptance period reason is Market-Wide Circuit Breaker Level 1 – Breached
 * @member {Boolean} is_reason_market_wide_circuit_breaker_level1
 */
AdminTradingStatusModel.prototype['is_reason_market_wide_circuit_breaker_level1'] = undefined;

/**
 * Gets whether the order acceptance period reason is Market-Wide Circuit Breaker Level 2 – Breached
 * @member {Boolean} is_reason_market_wide_circuit_breaker_level2
 */
AdminTradingStatusModel.prototype['is_reason_market_wide_circuit_breaker_level2'] = undefined;

/**
 * Gets whether the halt reason is Market-Wide Circuit Breaker Level 3 – Breached
 * @member {Boolean} is_reason_market_wide_circuit_breaker_level3
 */
AdminTradingStatusModel.prototype['is_reason_market_wide_circuit_breaker_level3'] = undefined;

/**
 * Gets whether the reason is Not Applicable
 * @member {Boolean} is_reason_not_applicable
 */
AdminTradingStatusModel.prototype['is_reason_not_applicable'] = undefined;

/**
 * Gets whether the halt reason is Not Available
 * @member {Boolean} is_reason_not_available
 */
AdminTradingStatusModel.prototype['is_reason_not_available'] = undefined;






export default AdminTradingStatusModel;

