forge-apis
Version:
⚠️ Deprecated: This package is no longer maintained. Use 'https://github.com/autodesk-platform-services/aps-sdk-node' instead.
152 lines (141 loc) • 5.71 kB
JavaScript
/**
* Forge SDK
* The Forge Platform contains an expanding collection of web service components that can be used with Autodesk cloud-based products or your own technologies. Take advantage of Autodesk’s expertise in design and engineering.
*
* Contact: forge.help@autodesk.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
module.exports = (function () {
'use strict';
var ApiClient = require('../ApiClient');
/**
* The User model module.
* @module model/User
*/
/**
* Constructs a <code>User</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/User} obj Optional instance to populate.
* @return {module:model/User} The populated <code>User</code> instance.
*/
var constructFromObject = function (data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('sub')) // Oxygen id of the user.
obj.sub = ApiClient.convertToType(data.sub, 'String');
if (data.hasOwnProperty('name')) // Full name of the user.
obj.name = ApiClient.convertToType(data.name, 'String');
if (data.hasOwnProperty('given_name')) // First name of the user.
obj.given_name = ApiClient.convertToType(data.given_name, 'String');
if (data.hasOwnProperty('family_name')) // Last name of the user.
obj.family_name = ApiClient.convertToType(data.family_name, 'String');
if (data.hasOwnProperty('preferred_username')) // Username of the user.
obj.preferred_username = ApiClient.convertToType(data.preferred_username, 'String');
if (data.hasOwnProperty('email')) // Primary email of the user.
obj.email = ApiClient.convertToType(data.email, 'String');
if (data.hasOwnProperty('email_verified')) // Flag that shows if the user’s email is verified or not.
obj.email_verified = ApiClient.convertToType(data.email_verified, 'Boolean');
if (data.hasOwnProperty('profile')) // URL for the profile of the user.
obj.profile = ApiClient.convertToType(data.profile, 'String');
if (data.hasOwnProperty('picture')) // Profile image of the user (x120 thumbnail).
obj.picture = ApiClient.convertToType(data.picture, 'String');
if (data.hasOwnProperty('locale')) // End-User’s locale, represented as a BCP47 standard (eg, en-US).
obj.locale = ApiClient.convertToType(data.locale, 'String');
if (data.hasOwnProperty('updated_at')) // The second-precision Unix timestamp of last modification on the user profile.
obj.updated_at = ApiClient.convertToType(data.updated_at, 'Integer');
}
return (obj);
};
/**
* Constructs a new <code>User</code>.
* user Profile
* @alias module:model/User
* @class
* @param {Object} theData The plain JavaScript object bearing properties of interest.
* @param {module:model/User} obj Optional instance to populate.
*/
var exports = function (theData, obj) {
var _this = this;
return (constructFromObject(theData, obj || _this));
};
/**
* Constructs a <code>User</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/User} obj Optional instance to populate.
* @return {module:model/User} The populated <code>User</code> instance.
*/
exports.constructFromObject = constructFromObject;
/**
* Oxygen id of the user.
* @member {String} sub
*/
exports.prototype.sub = undefined;
/**
* Full name of the user.
* @member {String} name
*/
exports.prototype.name = undefined;
/**
* First name of the user.
* @member {String} given_name
*/
exports.prototype.given_name = undefined;
/**
* Last name of the user.
* @member {String} family_name
*/
exports.prototype.family_name = undefined;
/**
* // Username of the user.
* @member {String} preferred_username
*/
exports.prototype.preferred_username = undefined;
/**
* Primary email of the user.
* @member {String} email
*/
exports.prototype.email = undefined;
/**
* Flag that shows if the user’s email is verified or not.
* @member {Boolean} email_verified
*/
exports.prototype.email_verified = undefined;
/**
* URL for the profile of the user.
* @member {String} profile
*/
exports.prototype.profile = undefined;
/**
* Profile image of the user (x120 thumbnail).
* @member {String} picture
*/
exports.prototype.picture = undefined;
/**
* End-User’s locale, represented as a BCP47 standard (eg, en-US).
* @member {String} locale
*/
exports.prototype.locale = undefined;
/**
* The second-precision Unix timestamp of last modification on the user profile.
* @member {Integer} updated_at
*/
exports.prototype.updated_at = undefined;
return (exports);
}());