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

            if (data.hasOwnProperty('exchangeId')) {
                obj['exchangeId'] = ApiClient.convertToType(data['exchangeId'], 'String');
            }
            if (data.hasOwnProperty('exchangeSymbolId')) {
                obj['exchangeSymbolId'] = ApiClient.convertToType(data['exchangeSymbolId'], 'String');
            }
            if (data.hasOwnProperty('baseAssetId')) {
                obj['baseAssetId'] = ApiClient.convertToType(data['baseAssetId'], 'String');
            }
            if (data.hasOwnProperty('quoteAssetId')) {
                obj['quoteAssetId'] = ApiClient.convertToType(data['quoteAssetId'], 'String');
            }
            if (data.hasOwnProperty('beginDate')) {
                obj['beginDate'] = ApiClient.convertToType(data['beginDate'], 'Date');
            }
            if (data.hasOwnProperty('endDate')) {
                obj['endDate'] = ApiClient.convertToType(data['endDate'], 'Date');
            }
            if (data.hasOwnProperty('status')) {
                obj['status'] = ApiClient.convertToType(data['status'], 'String');
            }
            if (data.hasOwnProperty('statusInfo')) {
                obj['statusInfo'] = ApiClient.convertToType(data['statusInfo'], 'String');
            }
            if (data.hasOwnProperty('lastModificationTime')) {
                obj['lastModificationTime'] = ApiClient.convertToType(data['lastModificationTime'], 'Date');
            }
        }
        return obj;
    }

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

        return true;
    }


}



/**
 * @member {String} exchangeId
 */
IndexesIndexDefinitionInputData.prototype['exchangeId'] = undefined;

/**
 * @member {String} exchangeSymbolId
 */
IndexesIndexDefinitionInputData.prototype['exchangeSymbolId'] = undefined;

/**
 * @member {String} baseAssetId
 */
IndexesIndexDefinitionInputData.prototype['baseAssetId'] = undefined;

/**
 * @member {String} quoteAssetId
 */
IndexesIndexDefinitionInputData.prototype['quoteAssetId'] = undefined;

/**
 * @member {Date} beginDate
 */
IndexesIndexDefinitionInputData.prototype['beginDate'] = undefined;

/**
 * @member {Date} endDate
 */
IndexesIndexDefinitionInputData.prototype['endDate'] = undefined;

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

/**
 * @member {String} statusInfo
 */
IndexesIndexDefinitionInputData.prototype['statusInfo'] = undefined;

/**
 * @member {Date} lastModificationTime
 */
IndexesIndexDefinitionInputData.prototype['lastModificationTime'] = undefined;






export default IndexesIndexDefinitionInputData;

