/**
 * 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 FinFeedAPISymbolModel model module.
 * @module model/FinFeedAPISymbolModel
 * @version v1
 */
class FinFeedAPISymbolModel {
    /**
     * Constructs a new <code>FinFeedAPISymbolModel</code>.
     * @alias module:model/FinFeedAPISymbolModel
     * @extends Object
     */
    constructor() { 
        
        FinFeedAPISymbolModel.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>FinFeedAPISymbolModel</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/FinFeedAPISymbolModel} obj Optional instance to populate.
     * @return {module:model/FinFeedAPISymbolModel} The populated <code>FinFeedAPISymbolModel</code> instance.
     */
    static constructFromObject(data, obj) {
        if (data) {
            obj = obj || new FinFeedAPISymbolModel();

            ApiClient.constructFromObject(data, obj, 'Object');
            

            if (data.hasOwnProperty('symbol_id')) {
                obj['symbol_id'] = ApiClient.convertToType(data['symbol_id'], 'String');
            }
            if (data.hasOwnProperty('exchange_id')) {
                obj['exchange_id'] = ApiClient.convertToType(data['exchange_id'], 'String');
            }
            if (data.hasOwnProperty('security_category')) {
                obj['security_category'] = ApiClient.convertToType(data['security_category'], 'String');
            }
            if (data.hasOwnProperty('name')) {
                obj['name'] = ApiClient.convertToType(data['name'], 'String');
            }
            if (data.hasOwnProperty('date')) {
                obj['date'] = ApiClient.convertToType(data['date'], 'String');
            }
            if (data.hasOwnProperty('asset_class')) {
                obj['asset_class'] = ApiClient.convertToType(data['asset_class'], 'String');
            }
            if (data.hasOwnProperty('cfi_code')) {
                obj['cfi_code'] = ApiClient.convertToType(data['cfi_code'], 'String');
            }
            if (data.hasOwnProperty('cfi_category')) {
                obj['cfi_category'] = ApiClient.convertToType(data['cfi_category'], 'String');
            }
            if (data.hasOwnProperty('cfi_group')) {
                obj['cfi_group'] = ApiClient.convertToType(data['cfi_group'], 'String');
            }
            if (data.hasOwnProperty('cfi_attribute1')) {
                obj['cfi_attribute1'] = ApiClient.convertToType(data['cfi_attribute1'], 'String');
            }
            if (data.hasOwnProperty('cfi_attribute2')) {
                obj['cfi_attribute2'] = ApiClient.convertToType(data['cfi_attribute2'], 'String');
            }
            if (data.hasOwnProperty('cfi_attribute3')) {
                obj['cfi_attribute3'] = ApiClient.convertToType(data['cfi_attribute3'], 'String');
            }
            if (data.hasOwnProperty('cfi_attribute4')) {
                obj['cfi_attribute4'] = ApiClient.convertToType(data['cfi_attribute4'], 'String');
            }
            if (data.hasOwnProperty('cfi_category_desc')) {
                obj['cfi_category_desc'] = ApiClient.convertToType(data['cfi_category_desc'], 'String');
            }
            if (data.hasOwnProperty('cfi_group_desc')) {
                obj['cfi_group_desc'] = ApiClient.convertToType(data['cfi_group_desc'], 'String');
            }
            if (data.hasOwnProperty('cfi_attribute1_desc')) {
                obj['cfi_attribute1_desc'] = ApiClient.convertToType(data['cfi_attribute1_desc'], 'String');
            }
            if (data.hasOwnProperty('cfi_attribute2_desc')) {
                obj['cfi_attribute2_desc'] = ApiClient.convertToType(data['cfi_attribute2_desc'], 'String');
            }
            if (data.hasOwnProperty('cfi_attribute3_desc')) {
                obj['cfi_attribute3_desc'] = ApiClient.convertToType(data['cfi_attribute3_desc'], 'String');
            }
            if (data.hasOwnProperty('cfi_attribute4_desc')) {
                obj['cfi_attribute4_desc'] = ApiClient.convertToType(data['cfi_attribute4_desc'], 'String');
            }
        }
        return obj;
    }

    /**
     * Validates the JSON data with respect to <code>FinFeedAPISymbolModel</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>FinFeedAPISymbolModel</code>.
     */
    static validateJSON(data) {
        // ensure the json data is a string
        if (data['symbol_id'] && !(typeof data['symbol_id'] === 'string' || data['symbol_id'] instanceof String)) {
            throw new Error("Expected the field `symbol_id` to be a primitive type in the JSON string but got " + data['symbol_id']);
        }
        // ensure the json data is a string
        if (data['exchange_id'] && !(typeof data['exchange_id'] === 'string' || data['exchange_id'] instanceof String)) {
            throw new Error("Expected the field `exchange_id` to be a primitive type in the JSON string but got " + data['exchange_id']);
        }
        // ensure the json data is a string
        if (data['security_category'] && !(typeof data['security_category'] === 'string' || data['security_category'] instanceof String)) {
            throw new Error("Expected the field `security_category` to be a primitive type in the JSON string but got " + data['security_category']);
        }
        // ensure the json data is a string
        if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
            throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
        }
        // ensure the json data is a string
        if (data['date'] && !(typeof data['date'] === 'string' || data['date'] instanceof String)) {
            throw new Error("Expected the field `date` to be a primitive type in the JSON string but got " + data['date']);
        }
        // ensure the json data is a string
        if (data['asset_class'] && !(typeof data['asset_class'] === 'string' || data['asset_class'] instanceof String)) {
            throw new Error("Expected the field `asset_class` to be a primitive type in the JSON string but got " + data['asset_class']);
        }
        // ensure the json data is a string
        if (data['cfi_code'] && !(typeof data['cfi_code'] === 'string' || data['cfi_code'] instanceof String)) {
            throw new Error("Expected the field `cfi_code` to be a primitive type in the JSON string but got " + data['cfi_code']);
        }
        // ensure the json data is a string
        if (data['cfi_category'] && !(typeof data['cfi_category'] === 'string' || data['cfi_category'] instanceof String)) {
            throw new Error("Expected the field `cfi_category` to be a primitive type in the JSON string but got " + data['cfi_category']);
        }
        // ensure the json data is a string
        if (data['cfi_group'] && !(typeof data['cfi_group'] === 'string' || data['cfi_group'] instanceof String)) {
            throw new Error("Expected the field `cfi_group` to be a primitive type in the JSON string but got " + data['cfi_group']);
        }
        // ensure the json data is a string
        if (data['cfi_attribute1'] && !(typeof data['cfi_attribute1'] === 'string' || data['cfi_attribute1'] instanceof String)) {
            throw new Error("Expected the field `cfi_attribute1` to be a primitive type in the JSON string but got " + data['cfi_attribute1']);
        }
        // ensure the json data is a string
        if (data['cfi_attribute2'] && !(typeof data['cfi_attribute2'] === 'string' || data['cfi_attribute2'] instanceof String)) {
            throw new Error("Expected the field `cfi_attribute2` to be a primitive type in the JSON string but got " + data['cfi_attribute2']);
        }
        // ensure the json data is a string
        if (data['cfi_attribute3'] && !(typeof data['cfi_attribute3'] === 'string' || data['cfi_attribute3'] instanceof String)) {
            throw new Error("Expected the field `cfi_attribute3` to be a primitive type in the JSON string but got " + data['cfi_attribute3']);
        }
        // ensure the json data is a string
        if (data['cfi_attribute4'] && !(typeof data['cfi_attribute4'] === 'string' || data['cfi_attribute4'] instanceof String)) {
            throw new Error("Expected the field `cfi_attribute4` to be a primitive type in the JSON string but got " + data['cfi_attribute4']);
        }
        // ensure the json data is a string
        if (data['cfi_category_desc'] && !(typeof data['cfi_category_desc'] === 'string' || data['cfi_category_desc'] instanceof String)) {
            throw new Error("Expected the field `cfi_category_desc` to be a primitive type in the JSON string but got " + data['cfi_category_desc']);
        }
        // ensure the json data is a string
        if (data['cfi_group_desc'] && !(typeof data['cfi_group_desc'] === 'string' || data['cfi_group_desc'] instanceof String)) {
            throw new Error("Expected the field `cfi_group_desc` to be a primitive type in the JSON string but got " + data['cfi_group_desc']);
        }
        // ensure the json data is a string
        if (data['cfi_attribute1_desc'] && !(typeof data['cfi_attribute1_desc'] === 'string' || data['cfi_attribute1_desc'] instanceof String)) {
            throw new Error("Expected the field `cfi_attribute1_desc` to be a primitive type in the JSON string but got " + data['cfi_attribute1_desc']);
        }
        // ensure the json data is a string
        if (data['cfi_attribute2_desc'] && !(typeof data['cfi_attribute2_desc'] === 'string' || data['cfi_attribute2_desc'] instanceof String)) {
            throw new Error("Expected the field `cfi_attribute2_desc` to be a primitive type in the JSON string but got " + data['cfi_attribute2_desc']);
        }
        // ensure the json data is a string
        if (data['cfi_attribute3_desc'] && !(typeof data['cfi_attribute3_desc'] === 'string' || data['cfi_attribute3_desc'] instanceof String)) {
            throw new Error("Expected the field `cfi_attribute3_desc` to be a primitive type in the JSON string but got " + data['cfi_attribute3_desc']);
        }
        // ensure the json data is a string
        if (data['cfi_attribute4_desc'] && !(typeof data['cfi_attribute4_desc'] === 'string' || data['cfi_attribute4_desc'] instanceof String)) {
            throw new Error("Expected the field `cfi_attribute4_desc` to be a primitive type in the JSON string but got " + data['cfi_attribute4_desc']);
        }

        return true;
    }


}



/**
 * @member {String} symbol_id
 */
FinFeedAPISymbolModel.prototype['symbol_id'] = undefined;

/**
 * @member {String} exchange_id
 */
FinFeedAPISymbolModel.prototype['exchange_id'] = undefined;

/**
 * @member {String} security_category
 */
FinFeedAPISymbolModel.prototype['security_category'] = undefined;

/**
 * @member {String} name
 */
FinFeedAPISymbolModel.prototype['name'] = undefined;

/**
 * @member {String} date
 */
FinFeedAPISymbolModel.prototype['date'] = undefined;

/**
 * @member {String} asset_class
 */
FinFeedAPISymbolModel.prototype['asset_class'] = undefined;

/**
 * @member {String} cfi_code
 */
FinFeedAPISymbolModel.prototype['cfi_code'] = undefined;

/**
 * @member {String} cfi_category
 */
FinFeedAPISymbolModel.prototype['cfi_category'] = undefined;

/**
 * @member {String} cfi_group
 */
FinFeedAPISymbolModel.prototype['cfi_group'] = undefined;

/**
 * @member {String} cfi_attribute1
 */
FinFeedAPISymbolModel.prototype['cfi_attribute1'] = undefined;

/**
 * @member {String} cfi_attribute2
 */
FinFeedAPISymbolModel.prototype['cfi_attribute2'] = undefined;

/**
 * @member {String} cfi_attribute3
 */
FinFeedAPISymbolModel.prototype['cfi_attribute3'] = undefined;

/**
 * @member {String} cfi_attribute4
 */
FinFeedAPISymbolModel.prototype['cfi_attribute4'] = undefined;

/**
 * @member {String} cfi_category_desc
 */
FinFeedAPISymbolModel.prototype['cfi_category_desc'] = undefined;

/**
 * @member {String} cfi_group_desc
 */
FinFeedAPISymbolModel.prototype['cfi_group_desc'] = undefined;

/**
 * @member {String} cfi_attribute1_desc
 */
FinFeedAPISymbolModel.prototype['cfi_attribute1_desc'] = undefined;

/**
 * @member {String} cfi_attribute2_desc
 */
FinFeedAPISymbolModel.prototype['cfi_attribute2_desc'] = undefined;

/**
 * @member {String} cfi_attribute3_desc
 */
FinFeedAPISymbolModel.prototype['cfi_attribute3_desc'] = undefined;

/**
 * @member {String} cfi_attribute4_desc
 */
FinFeedAPISymbolModel.prototype['cfi_attribute4_desc'] = undefined;






export default FinFeedAPISymbolModel;

