UNPKG

wallee

Version:
41 lines (40 loc) 1.88 kB
import { CreationEntityStateFromJSON, CreationEntityStateToJSON, } from './CreationEntityState'; import { UserTypeFromJSON, UserTypeToJSON, } from './UserType'; /** * Check if a given object implements the ApplicationUserCreateWithMacKey interface. */ export function instanceOfApplicationUserCreateWithMacKey(value) { return true; } export function ApplicationUserCreateWithMacKeyFromJSON(json) { return ApplicationUserCreateWithMacKeyFromJSONTyped(json, false); } export function ApplicationUserCreateWithMacKeyFromJSONTyped(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'], 'macKey': json['macKey'] == null ? undefined : json['macKey'], }; } export function ApplicationUserCreateWithMacKeyToJSON(json) { return ApplicationUserCreateWithMacKeyToJSONTyped(json, false); } export function ApplicationUserCreateWithMacKeyToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'state': CreationEntityStateToJSON(value['state']), 'userType': UserTypeToJSON(value['userType']), }; }