wallee
Version:
TypeScript/JavaScript client for wallee
47 lines (46 loc) • 2.1 kB
JavaScript
import { SpaceAddressCreateFromJSON, SpaceAddressCreateToJSON, } from './SpaceAddressCreate';
import { CreationEntityStateFromJSON, CreationEntityStateToJSON, } from './CreationEntityState';
/**
* Check if a given object implements the SpaceUpdate interface.
*/
export function instanceOfSpaceUpdate(value) {
if (!('version' in value) || value['version'] === undefined)
return false;
return true;
}
export function SpaceUpdateFromJSON(json) {
return SpaceUpdateFromJSONTyped(json, false);
}
export function SpaceUpdateFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'requestLimit': json['requestLimit'] == null ? undefined : json['requestLimit'],
'postalAddress': json['postalAddress'] == null ? undefined : SpaceAddressCreateFromJSON(json['postalAddress']),
'name': json['name'] == null ? undefined : json['name'],
'technicalContactAddresses': json['technicalContactAddresses'] == null ? undefined : new Set(json['technicalContactAddresses']),
'timeZone': json['timeZone'] == null ? undefined : json['timeZone'],
'state': json['state'] == null ? undefined : CreationEntityStateFromJSON(json['state']),
'primaryCurrency': json['primaryCurrency'] == null ? undefined : json['primaryCurrency'],
'version': json['version'],
};
}
export function SpaceUpdateToJSON(json) {
return SpaceUpdateToJSONTyped(json, false);
}
export function SpaceUpdateToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'requestLimit': value['requestLimit'],
'postalAddress': SpaceAddressCreateToJSON(value['postalAddress']),
'name': value['name'],
'technicalContactAddresses': value['technicalContactAddresses'] == null ? undefined : Array.from(value['technicalContactAddresses']),
'timeZone': value['timeZone'],
'state': CreationEntityStateToJSON(value['state']),
'primaryCurrency': value['primaryCurrency'],
'version': value['version'],
};
}