UNPKG

wallee

Version:
48 lines (47 loc) 2.25 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfHumanUser = instanceOfHumanUser; exports.HumanUserFromJSON = HumanUserFromJSON; exports.HumanUserFromJSONTyped = HumanUserFromJSONTyped; exports.HumanUserToJSON = HumanUserToJSON; exports.HumanUserToJSONTyped = HumanUserToJSONTyped; const TwoFactorAuthenticationType_1 = require("./TwoFactorAuthenticationType"); /** * Check if a given object implements the HumanUser interface. */ function instanceOfHumanUser(value) { return true; } function HumanUserFromJSON(json) { return HumanUserFromJSONTyped(json, false); } function HumanUserFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'mobilePhoneNumber': json['mobilePhoneNumber'] == null ? undefined : json['mobilePhoneNumber'], 'twoFactorEnabled': json['twoFactorEnabled'] == null ? undefined : json['twoFactorEnabled'], 'emailAddress': json['emailAddress'] == null ? undefined : json['emailAddress'], 'firstname': json['firstname'] == null ? undefined : json['firstname'], 'emailAddressVerified': json['emailAddressVerified'] == null ? undefined : json['emailAddressVerified'], 'scope': json['scope'] == null ? undefined : json['scope'], 'timeZone': json['timeZone'] == null ? undefined : json['timeZone'], 'language': json['language'] == null ? undefined : json['language'], 'twoFactorType': json['twoFactorType'] == null ? undefined : (0, TwoFactorAuthenticationType_1.TwoFactorAuthenticationTypeFromJSON)(json['twoFactorType']), 'mobilePhoneVerified': json['mobilePhoneVerified'] == null ? undefined : json['mobilePhoneVerified'], 'primaryAccount': json['primaryAccount'] == null ? undefined : json['primaryAccount'], 'lastname': json['lastname'] == null ? undefined : json['lastname'], }; } function HumanUserToJSON(json) { return HumanUserToJSONTyped(json, false); } function HumanUserToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'twoFactorType': (0, TwoFactorAuthenticationType_1.TwoFactorAuthenticationTypeToJSON)(value['twoFactorType']), }; }