wallee
Version:
TypeScript/JavaScript client for wallee
47 lines (46 loc) • 2.07 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfApplicationUser = instanceOfApplicationUser;
exports.ApplicationUserFromJSON = ApplicationUserFromJSON;
exports.ApplicationUserFromJSONTyped = ApplicationUserFromJSONTyped;
exports.ApplicationUserToJSON = ApplicationUserToJSON;
exports.ApplicationUserToJSONTyped = ApplicationUserToJSONTyped;
const CreationEntityState_1 = require("./CreationEntityState");
const UserType_1 = require("./UserType");
/**
* Check if a given object implements the ApplicationUser interface.
*/
function instanceOfApplicationUser(value) {
return true;
}
function ApplicationUserFromJSON(json) {
return ApplicationUserFromJSONTyped(json, false);
}
function ApplicationUserFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'scope': json['scope'] == null ? undefined : json['scope'],
'plannedPurgeDate': json['plannedPurgeDate'] == null ? undefined : (new Date(json['plannedPurgeDate'])),
'id': json['id'] == null ? undefined : json['id'],
'state': json['state'] == null ? undefined : (0, CreationEntityState_1.CreationEntityStateFromJSON)(json['state']),
'userType': json['userType'] == null ? undefined : (0, UserType_1.UserTypeFromJSON)(json['userType']),
'version': json['version'] == null ? undefined : json['version'],
'requestLimit': json['requestLimit'] == null ? undefined : json['requestLimit'],
'name': json['name'] == null ? undefined : json['name'],
'primaryAccount': json['primaryAccount'] == null ? undefined : json['primaryAccount'],
};
}
function ApplicationUserToJSON(json) {
return ApplicationUserToJSONTyped(json, false);
}
function ApplicationUserToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'state': (0, CreationEntityState_1.CreationEntityStateToJSON)(value['state']),
'userType': (0, UserType_1.UserTypeToJSON)(value['userType']),
};
}