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

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

            if (data.hasOwnProperty('exchange_id')) {
                obj['exchange_id'] = ApiClient.convertToType(data['exchange_id'], 'String');
            }
            if (data.hasOwnProperty('last_datapoint_date')) {
                obj['last_datapoint_date'] = ApiClient.convertToType(data['last_datapoint_date'], 'String');
            }
            if (data.hasOwnProperty('mic')) {
                obj['mic'] = ApiClient.convertToType(data['mic'], 'String');
            }
            if (data.hasOwnProperty('operating_mic')) {
                obj['operating_mic'] = ApiClient.convertToType(data['operating_mic'], 'String');
            }
            if (data.hasOwnProperty('oprt_sgmt')) {
                obj['oprt_sgmt'] = ApiClient.convertToType(data['oprt_sgmt'], 'String');
            }
            if (data.hasOwnProperty('market_name_institution_description')) {
                obj['market_name_institution_description'] = ApiClient.convertToType(data['market_name_institution_description'], 'String');
            }
            if (data.hasOwnProperty('legal_entity_name')) {
                obj['legal_entity_name'] = ApiClient.convertToType(data['legal_entity_name'], 'String');
            }
            if (data.hasOwnProperty('lei')) {
                obj['lei'] = ApiClient.convertToType(data['lei'], 'String');
            }
            if (data.hasOwnProperty('market_category_code')) {
                obj['market_category_code'] = ApiClient.convertToType(data['market_category_code'], 'String');
            }
            if (data.hasOwnProperty('acronym')) {
                obj['acronym'] = ApiClient.convertToType(data['acronym'], 'String');
            }
            if (data.hasOwnProperty('iso_country_code')) {
                obj['iso_country_code'] = ApiClient.convertToType(data['iso_country_code'], 'String');
            }
            if (data.hasOwnProperty('city')) {
                obj['city'] = ApiClient.convertToType(data['city'], 'String');
            }
            if (data.hasOwnProperty('website')) {
                obj['website'] = ApiClient.convertToType(data['website'], 'String');
            }
            if (data.hasOwnProperty('status')) {
                obj['status'] = ApiClient.convertToType(data['status'], 'String');
            }
            if (data.hasOwnProperty('creation_date')) {
                obj['creation_date'] = ApiClient.convertToType(data['creation_date'], 'Date');
            }
            if (data.hasOwnProperty('last_update_date')) {
                obj['last_update_date'] = ApiClient.convertToType(data['last_update_date'], 'Date');
            }
            if (data.hasOwnProperty('last_validation_date')) {
                obj['last_validation_date'] = ApiClient.convertToType(data['last_validation_date'], 'Date');
            }
            if (data.hasOwnProperty('expiry_date')) {
                obj['expiry_date'] = ApiClient.convertToType(data['expiry_date'], 'Date');
            }
            if (data.hasOwnProperty('comments')) {
                obj['comments'] = ApiClient.convertToType(data['comments'], 'String');
            }
        }
        return obj;
    }

    /**
     * Validates the JSON data with respect to <code>FinFeedAPIExchangeModel</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>FinFeedAPIExchangeModel</code>.
     */
    static validateJSON(data) {
        // 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['last_datapoint_date'] && !(typeof data['last_datapoint_date'] === 'string' || data['last_datapoint_date'] instanceof String)) {
            throw new Error("Expected the field `last_datapoint_date` to be a primitive type in the JSON string but got " + data['last_datapoint_date']);
        }
        // ensure the json data is a string
        if (data['mic'] && !(typeof data['mic'] === 'string' || data['mic'] instanceof String)) {
            throw new Error("Expected the field `mic` to be a primitive type in the JSON string but got " + data['mic']);
        }
        // ensure the json data is a string
        if (data['operating_mic'] && !(typeof data['operating_mic'] === 'string' || data['operating_mic'] instanceof String)) {
            throw new Error("Expected the field `operating_mic` to be a primitive type in the JSON string but got " + data['operating_mic']);
        }
        // ensure the json data is a string
        if (data['oprt_sgmt'] && !(typeof data['oprt_sgmt'] === 'string' || data['oprt_sgmt'] instanceof String)) {
            throw new Error("Expected the field `oprt_sgmt` to be a primitive type in the JSON string but got " + data['oprt_sgmt']);
        }
        // ensure the json data is a string
        if (data['market_name_institution_description'] && !(typeof data['market_name_institution_description'] === 'string' || data['market_name_institution_description'] instanceof String)) {
            throw new Error("Expected the field `market_name_institution_description` to be a primitive type in the JSON string but got " + data['market_name_institution_description']);
        }
        // ensure the json data is a string
        if (data['legal_entity_name'] && !(typeof data['legal_entity_name'] === 'string' || data['legal_entity_name'] instanceof String)) {
            throw new Error("Expected the field `legal_entity_name` to be a primitive type in the JSON string but got " + data['legal_entity_name']);
        }
        // ensure the json data is a string
        if (data['lei'] && !(typeof data['lei'] === 'string' || data['lei'] instanceof String)) {
            throw new Error("Expected the field `lei` to be a primitive type in the JSON string but got " + data['lei']);
        }
        // ensure the json data is a string
        if (data['market_category_code'] && !(typeof data['market_category_code'] === 'string' || data['market_category_code'] instanceof String)) {
            throw new Error("Expected the field `market_category_code` to be a primitive type in the JSON string but got " + data['market_category_code']);
        }
        // ensure the json data is a string
        if (data['acronym'] && !(typeof data['acronym'] === 'string' || data['acronym'] instanceof String)) {
            throw new Error("Expected the field `acronym` to be a primitive type in the JSON string but got " + data['acronym']);
        }
        // ensure the json data is a string
        if (data['iso_country_code'] && !(typeof data['iso_country_code'] === 'string' || data['iso_country_code'] instanceof String)) {
            throw new Error("Expected the field `iso_country_code` to be a primitive type in the JSON string but got " + data['iso_country_code']);
        }
        // ensure the json data is a string
        if (data['city'] && !(typeof data['city'] === 'string' || data['city'] instanceof String)) {
            throw new Error("Expected the field `city` to be a primitive type in the JSON string but got " + data['city']);
        }
        // ensure the json data is a string
        if (data['website'] && !(typeof data['website'] === 'string' || data['website'] instanceof String)) {
            throw new Error("Expected the field `website` to be a primitive type in the JSON string but got " + data['website']);
        }
        // ensure the json data is a string
        if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) {
            throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']);
        }
        // ensure the json data is a string
        if (data['comments'] && !(typeof data['comments'] === 'string' || data['comments'] instanceof String)) {
            throw new Error("Expected the field `comments` to be a primitive type in the JSON string but got " + data['comments']);
        }

        return true;
    }


}



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

/**
 * @member {String} last_datapoint_date
 */
FinFeedAPIExchangeModel.prototype['last_datapoint_date'] = undefined;

/**
 * @member {String} mic
 */
FinFeedAPIExchangeModel.prototype['mic'] = undefined;

/**
 * @member {String} operating_mic
 */
FinFeedAPIExchangeModel.prototype['operating_mic'] = undefined;

/**
 * @member {String} oprt_sgmt
 */
FinFeedAPIExchangeModel.prototype['oprt_sgmt'] = undefined;

/**
 * @member {String} market_name_institution_description
 */
FinFeedAPIExchangeModel.prototype['market_name_institution_description'] = undefined;

/**
 * @member {String} legal_entity_name
 */
FinFeedAPIExchangeModel.prototype['legal_entity_name'] = undefined;

/**
 * @member {String} lei
 */
FinFeedAPIExchangeModel.prototype['lei'] = undefined;

/**
 * @member {String} market_category_code
 */
FinFeedAPIExchangeModel.prototype['market_category_code'] = undefined;

/**
 * @member {String} acronym
 */
FinFeedAPIExchangeModel.prototype['acronym'] = undefined;

/**
 * @member {String} iso_country_code
 */
FinFeedAPIExchangeModel.prototype['iso_country_code'] = undefined;

/**
 * @member {String} city
 */
FinFeedAPIExchangeModel.prototype['city'] = undefined;

/**
 * @member {String} website
 */
FinFeedAPIExchangeModel.prototype['website'] = undefined;

/**
 * @member {String} status
 */
FinFeedAPIExchangeModel.prototype['status'] = undefined;

/**
 * @member {Date} creation_date
 */
FinFeedAPIExchangeModel.prototype['creation_date'] = undefined;

/**
 * @member {Date} last_update_date
 */
FinFeedAPIExchangeModel.prototype['last_update_date'] = undefined;

/**
 * @member {Date} last_validation_date
 */
FinFeedAPIExchangeModel.prototype['last_validation_date'] = undefined;

/**
 * @member {Date} expiry_date
 */
FinFeedAPIExchangeModel.prototype['expiry_date'] = undefined;

/**
 * @member {String} comments
 */
FinFeedAPIExchangeModel.prototype['comments'] = undefined;






export default FinFeedAPIExchangeModel;

