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

            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('flags')) {
                obj['flags'] = ApiClient.convertToType(data['flags'], 'Number');
            }
            if (data.hasOwnProperty('round_lot_size')) {
                obj['round_lot_size'] = ApiClient.convertToType(data['round_lot_size'], 'Number');
            }
            if (data.hasOwnProperty('adjusted_poc_price')) {
                obj['adjusted_poc_price'] = ApiClient.convertToType(data['adjusted_poc_price'], 'Number');
            }
            if (data.hasOwnProperty('luld_tier')) {
                obj['luld_tier'] = ApiClient.convertToType(data['luld_tier'], 'Number');
            }
            if (data.hasOwnProperty('luld_tier_code')) {
                obj['luld_tier_code'] = ApiClient.convertToType(data['luld_tier_code'], 'String');
            }
            if (data.hasOwnProperty('luld_tier_text')) {
                obj['luld_tier_text'] = ApiClient.convertToType(data['luld_tier_text'], 'String');
            }
            if (data.hasOwnProperty('is_luld_tier_not_applicable')) {
                obj['is_luld_tier_not_applicable'] = ApiClient.convertToType(data['is_luld_tier_not_applicable'], 'Boolean');
            }
            if (data.hasOwnProperty('is_luld_tier1')) {
                obj['is_luld_tier1'] = ApiClient.convertToType(data['is_luld_tier1'], 'Boolean');
            }
            if (data.hasOwnProperty('is_luld_tier2')) {
                obj['is_luld_tier2'] = ApiClient.convertToType(data['is_luld_tier2'], 'Boolean');
            }
        }
        return obj;
    }

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

        return true;
    }


}



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

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

/**
 * Time when the security directory information was recorded as DateTime
 * @member {Date} timestamp
 */
AdminSecurityDirectoryModel.prototype['timestamp'] = undefined;

/**
 * Flags for the security
 * @member {Number} flags
 */
AdminSecurityDirectoryModel.prototype['flags'] = undefined;

/**
 * Number of shares that represent a round lot
 * @member {Number} round_lot_size
 */
AdminSecurityDirectoryModel.prototype['round_lot_size'] = undefined;

/**
 * Adjusted previous official closing price as decimal
 * @member {Number} adjusted_poc_price
 */
AdminSecurityDirectoryModel.prototype['adjusted_poc_price'] = undefined;

/**
 * LULD tier as byte value
 * @member {Number} luld_tier
 */
AdminSecurityDirectoryModel.prototype['luld_tier'] = undefined;

/**
 * LULD tier as numeric string
 * @member {String} luld_tier_code
 */
AdminSecurityDirectoryModel.prototype['luld_tier_code'] = undefined;

/**
 * Human-readable description of the LULD tier
 * @member {String} luld_tier_text
 */
AdminSecurityDirectoryModel.prototype['luld_tier_text'] = undefined;

/**
 * Indicates if LULD Tier is 'Not applicable' (0x0).
 * @member {Boolean} is_luld_tier_not_applicable
 */
AdminSecurityDirectoryModel.prototype['is_luld_tier_not_applicable'] = undefined;

/**
 * Indicates if LULD Tier is 'Tier 1 NMS Stock' (0x1).
 * @member {Boolean} is_luld_tier1
 */
AdminSecurityDirectoryModel.prototype['is_luld_tier1'] = undefined;

/**
 * Indicates if LULD Tier is 'Tier 2 NMS Stock' (0x2).
 * @member {Boolean} is_luld_tier2
 */
AdminSecurityDirectoryModel.prototype['is_luld_tier2'] = undefined;






export default AdminSecurityDirectoryModel;

