/**
* 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 ModelLicense model module.
* @module model/ModelLicense
* @version v0
*/
export class ModelLicense {
/**
* Constructs a new <code>ModelLicense</code>.
* @alias ModelLicense
*/
constructor() {
/** uid
* @type {String}
*/
this.uid = undefined;
/** label
* @type {String}
*/
this.label = undefined;
ModelLicense.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>ModelLicense</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 {ModelLicense} obj Optional instance to populate.
* @return {ModelLicense} The populated <code>ModelLicense</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new ModelLicense();
if (data.hasOwnProperty('uid')) {
obj['uid'] = ApiClient.convertToType(data['uid'], 'String');
}
if (data.hasOwnProperty('label')) {
obj['label'] = ApiClient.convertToType(data['label'], 'String');
}
}
return obj;
}
/**
* Validates the JSON data with respect to <code>ModelLicense</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>ModelLicense</code>.
*/
static validateJSON(data) {
// ensure the json data is a string
if (data['uid'] && !(typeof data['uid'] === 'string' || data['uid'] instanceof String)) {
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data['uid']);
}
// ensure the json data is a string
if (data['label'] && !(typeof data['label'] === 'string' || data['label'] instanceof String)) {
throw new Error("Expected the field `label` to be a primitive type in the JSON string but got " + data['label']);
}
return true;
}
}
export default ModelLicense;