UNPKG

wallee

Version:
40 lines (39 loc) 1.69 kB
import { CreationEntityStateFromJSON, CreationEntityStateToJSON, } from './CreationEntityState'; import { UserTypeFromJSON, UserTypeToJSON, } from './UserType'; /** * Check if a given object implements the ApplicationUser interface. */ export function instanceOfApplicationUser(value) { return true; } export function ApplicationUserFromJSON(json) { return ApplicationUserFromJSONTyped(json, false); } export 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 : CreationEntityStateFromJSON(json['state']), 'userType': json['userType'] == null ? undefined : 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'], }; } export function ApplicationUserToJSON(json) { return ApplicationUserToJSONTyped(json, false); } export function ApplicationUserToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'state': CreationEntityStateToJSON(value['state']), 'userType': UserTypeToJSON(value['userType']), }; }