Source: client/openapi/model/Animation.js

/**
 * OpenAPI definition
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: v0
 * 
 *
 * 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.js';

/**
 * The Animation model module.
 * @module model/Animation
 * @version v0
 */
export class Animation {
    /**
     * Constructs a new <code>Animation</code>.
     * A shared animation, embedded into VRObject. TODO more shared properties to  come.
     * @alias Animation
     */
    constructor() { 
        
        Animation.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>Animation</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 {Animation} obj Optional instance to populate.
     * @return {Animation} The populated <code>Animation</code> instance.
     */
    static constructFromObject(data, obj) {
        if (data) {
            obj = obj || new Animation();

            if (data.hasOwnProperty('name')) {
                obj['name'] = ApiClient.convertToType(data['name'], 'String');
            }
            if (data.hasOwnProperty('loop')) {
                obj['loop'] = ApiClient.convertToType(data['loop'], 'Boolean');
            }
            if (data.hasOwnProperty('speedRatio')) {
                obj['speedRatio'] = ApiClient.convertToType(data['speedRatio'], 'Number');
            }
        }
        return obj;
    }

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

        return true;
    }


}



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

/**
 * @member {Boolean} loop
 */
Animation.prototype['loop'] = undefined;

/**
 * @member {Number} speedRatio
 */
Animation.prototype['speedRatio'] = undefined;






export default Animation;