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

            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('short_sale_price_test_status')) {
                obj['short_sale_price_test_status'] = ApiClient.convertToType(data['short_sale_price_test_status'], 'Number');
            }
            if (data.hasOwnProperty('short_sale_price_test_status_code')) {
                obj['short_sale_price_test_status_code'] = ApiClient.convertToType(data['short_sale_price_test_status_code'], 'String');
            }
            if (data.hasOwnProperty('short_sale_price_test_status_text')) {
                obj['short_sale_price_test_status_text'] = ApiClient.convertToType(data['short_sale_price_test_status_text'], 'String');
            }
            if (data.hasOwnProperty('is_short_sale_price_test_not_in_effect')) {
                obj['is_short_sale_price_test_not_in_effect'] = ApiClient.convertToType(data['is_short_sale_price_test_not_in_effect'], 'Boolean');
            }
            if (data.hasOwnProperty('is_short_sale_price_test_in_effect')) {
                obj['is_short_sale_price_test_in_effect'] = ApiClient.convertToType(data['is_short_sale_price_test_in_effect'], 'Boolean');
            }
            if (data.hasOwnProperty('detail')) {
                obj['detail'] = ApiClient.convertToType(data['detail'], 'Number');
            }
            if (data.hasOwnProperty('detail_code')) {
                obj['detail_code'] = ApiClient.convertToType(data['detail_code'], 'String');
            }
            if (data.hasOwnProperty('detail_text')) {
                obj['detail_text'] = ApiClient.convertToType(data['detail_text'], 'String');
            }
            if (data.hasOwnProperty('is_detail_no_price_test')) {
                obj['is_detail_no_price_test'] = ApiClient.convertToType(data['is_detail_no_price_test'], 'Boolean');
            }
            if (data.hasOwnProperty('is_detail_activated')) {
                obj['is_detail_activated'] = ApiClient.convertToType(data['is_detail_activated'], 'Boolean');
            }
            if (data.hasOwnProperty('is_detail_continued')) {
                obj['is_detail_continued'] = ApiClient.convertToType(data['is_detail_continued'], 'Boolean');
            }
            if (data.hasOwnProperty('is_detail_deactivated')) {
                obj['is_detail_deactivated'] = ApiClient.convertToType(data['is_detail_deactivated'], 'Boolean');
            }
            if (data.hasOwnProperty('is_detail_not_available')) {
                obj['is_detail_not_available'] = ApiClient.convertToType(data['is_detail_not_available'], 'Boolean');
            }
        }
        return obj;
    }

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

        return true;
    }


}



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

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

/**
 * Time when the short sale price test status was recorded as DateTime
 * @member {Date} timestamp
 */
AdminShortSalePriceTestStatusModel.prototype['timestamp'] = undefined;

/**
 * Short sale price test status as byte value
 * @member {Number} short_sale_price_test_status
 */
AdminShortSalePriceTestStatusModel.prototype['short_sale_price_test_status'] = undefined;

/**
 * Short sale price test status as hex string
 * @member {String} short_sale_price_test_status_code
 */
AdminShortSalePriceTestStatusModel.prototype['short_sale_price_test_status_code'] = undefined;

/**
 * Human-readable description of the short sale price test status
 * @member {String} short_sale_price_test_status_text
 */
AdminShortSalePriceTestStatusModel.prototype['short_sale_price_test_status_text'] = undefined;

/**
 * Indicates if the short sale price test is not in effect
 * @member {Boolean} is_short_sale_price_test_not_in_effect
 */
AdminShortSalePriceTestStatusModel.prototype['is_short_sale_price_test_not_in_effect'] = undefined;

/**
 * Indicates if the short sale price test is in effect
 * @member {Boolean} is_short_sale_price_test_in_effect
 */
AdminShortSalePriceTestStatusModel.prototype['is_short_sale_price_test_in_effect'] = undefined;

/**
 * Detail of the short sale price test as byte value
 * @member {Number} detail
 */
AdminShortSalePriceTestStatusModel.prototype['detail'] = undefined;

/**
 * Detail of the short sale price test as character string
 * @member {String} detail_code
 */
AdminShortSalePriceTestStatusModel.prototype['detail_code'] = undefined;

/**
 * Human-readable description of the short sale price test detail
 * @member {String} detail_text
 */
AdminShortSalePriceTestStatusModel.prototype['detail_text'] = undefined;

/**
 * Indicates if there is no price test in place
 * @member {Boolean} is_detail_no_price_test
 */
AdminShortSalePriceTestStatusModel.prototype['is_detail_no_price_test'] = undefined;

/**
 * Indicates if the short sale price test restriction is in effect due to an intraday price drop
 * @member {Boolean} is_detail_activated
 */
AdminShortSalePriceTestStatusModel.prototype['is_detail_activated'] = undefined;

/**
 * Indicates if the short sale price test restriction remains in effect from prior day
 * @member {Boolean} is_detail_continued
 */
AdminShortSalePriceTestStatusModel.prototype['is_detail_continued'] = undefined;

/**
 * Indicates if the short sale price test restriction is deactivated
 * @member {Boolean} is_detail_deactivated
 */
AdminShortSalePriceTestStatusModel.prototype['is_detail_deactivated'] = undefined;

/**
 * Indicates if the detail is not available
 * @member {Boolean} is_detail_not_available
 */
AdminShortSalePriceTestStatusModel.prototype['is_detail_not_available'] = undefined;






export default AdminShortSalePriceTestStatusModel;

