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

            if (data.hasOwnProperty('time_period_start')) {
                obj['time_period_start'] = ApiClient.convertToType(data['time_period_start'], 'Date');
            }
            if (data.hasOwnProperty('time_period_end')) {
                obj['time_period_end'] = ApiClient.convertToType(data['time_period_end'], 'Date');
            }
            if (data.hasOwnProperty('time_open')) {
                obj['time_open'] = ApiClient.convertToType(data['time_open'], 'Date');
            }
            if (data.hasOwnProperty('time_close')) {
                obj['time_close'] = ApiClient.convertToType(data['time_close'], 'Date');
            }
            if (data.hasOwnProperty('value_open')) {
                obj['value_open'] = ApiClient.convertToType(data['value_open'], 'Number');
            }
            if (data.hasOwnProperty('value_high')) {
                obj['value_high'] = ApiClient.convertToType(data['value_high'], 'Number');
            }
            if (data.hasOwnProperty('value_low')) {
                obj['value_low'] = ApiClient.convertToType(data['value_low'], 'Number');
            }
            if (data.hasOwnProperty('value_close')) {
                obj['value_close'] = ApiClient.convertToType(data['value_close'], 'Number');
            }
            if (data.hasOwnProperty('value_count')) {
                obj['value_count'] = ApiClient.convertToType(data['value_count'], 'Number');
            }
        }
        return obj;
    }

    /**
     * Validates the JSON data with respect to <code>IndexesIndexTimeseriesItem</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>IndexesIndexTimeseriesItem</code>.
     */
    static validateJSON(data) {

        return true;
    }


}



/**
 * Gets or sets the start time of the time period.
 * @member {Date} time_period_start
 */
IndexesIndexTimeseriesItem.prototype['time_period_start'] = undefined;

/**
 * Gets or sets the end time of the time period.
 * @member {Date} time_period_end
 */
IndexesIndexTimeseriesItem.prototype['time_period_end'] = undefined;

/**
 * Gets or sets the time when the value opened.
 * @member {Date} time_open
 */
IndexesIndexTimeseriesItem.prototype['time_open'] = undefined;

/**
 * Gets or sets the time when the value closed.
 * @member {Date} time_close
 */
IndexesIndexTimeseriesItem.prototype['time_close'] = undefined;

/**
 * Gets or sets the opening value.
 * @member {Number} value_open
 */
IndexesIndexTimeseriesItem.prototype['value_open'] = undefined;

/**
 * Gets or sets the highest value during the time period.
 * @member {Number} value_high
 */
IndexesIndexTimeseriesItem.prototype['value_high'] = undefined;

/**
 * Gets or sets the lowest value during the time period.
 * @member {Number} value_low
 */
IndexesIndexTimeseriesItem.prototype['value_low'] = undefined;

/**
 * Gets or sets the closing value.
 * @member {Number} value_close
 */
IndexesIndexTimeseriesItem.prototype['value_close'] = undefined;

/**
 * Gets or sets the number of values during the time period.
 * @member {Number} value_count
 */
IndexesIndexTimeseriesItem.prototype['value_count'] = undefined;






export default IndexesIndexTimeseriesItem;

