UNPKG

@vrspace/babylonjs

Version:

vrspace.org babylonjs client

93 lines (72 loc) 2.84 kB
/** * 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 AttachRequest model module. * @module model/AttachRequest * @version v0 */ export class AttachRequest { /** * Constructs a new <code>AttachRequest</code>. * @alias AttachRequest * @param fileData {File} */ constructor(fileData) { /** fileData * @type {File} */ this.fileData = undefined; AttachRequest.initialize(this, fileData); } /** * 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, fileData) { obj['fileData'] = fileData; } /** * Constructs a <code>AttachRequest</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 {AttachRequest} obj Optional instance to populate. * @return {AttachRequest} The populated <code>AttachRequest</code> instance. */ static constructFromObject(data, obj) { if (data) { obj = obj || new AttachRequest(); if (data.hasOwnProperty('fileData')) { obj['fileData'] = ApiClient.convertToType(data['fileData'], File); } } return obj; } /** * Validates the JSON data with respect to <code>AttachRequest</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>AttachRequest</code>. */ static validateJSON(data) { // check to make sure all required properties are present in the JSON string for (const property of AttachRequest.RequiredProperties) { if (!data.hasOwnProperty(property)) { throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); } } return true; } } AttachRequest.RequiredProperties = ["fileData"]; export default AttachRequest;