Source: client/openapi/model/UploadRequest.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 UploadRequest model module.
 * @module model/UploadRequest
 * @version v0
 */
export class UploadRequest {
    /**
     * Constructs a new <code>UploadRequest</code>.
     * @alias UploadRequest
     * @param fileData {File} 
     */
    constructor(fileData) { 
        
        UploadRequest.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>UploadRequest</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 {UploadRequest} obj Optional instance to populate.
     * @return {UploadRequest} The populated <code>UploadRequest</code> instance.
     */
    static constructFromObject(data, obj) {
        if (data) {
            obj = obj || new UploadRequest();

            if (data.hasOwnProperty('fileData')) {
                obj['fileData'] = ApiClient.convertToType(data['fileData'], File);
            }
        }
        return obj;
    }

    /**
     * Validates the JSON data with respect to <code>UploadRequest</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>UploadRequest</code>.
     */
    static validateJSON(data) {
        // check to make sure all required properties are present in the JSON string
        for (const property of UploadRequest.RequiredProperties) {
            if (!data.hasOwnProperty(property)) {
                throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
            }
        }

        return true;
    }


}

UploadRequest.RequiredProperties = ["fileData"];

/**
 * @member {File} fileData
 */
UploadRequest.prototype['fileData'] = undefined;






export default UploadRequest;