wallee
Version:
TypeScript/JavaScript client for wallee
54 lines (53 loc) • 2.46 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfSpaceUpdate = instanceOfSpaceUpdate;
exports.SpaceUpdateFromJSON = SpaceUpdateFromJSON;
exports.SpaceUpdateFromJSONTyped = SpaceUpdateFromJSONTyped;
exports.SpaceUpdateToJSON = SpaceUpdateToJSON;
exports.SpaceUpdateToJSONTyped = SpaceUpdateToJSONTyped;
const SpaceAddressCreate_1 = require("./SpaceAddressCreate");
const CreationEntityState_1 = require("./CreationEntityState");
/**
* Check if a given object implements the SpaceUpdate interface.
*/
function instanceOfSpaceUpdate(value) {
if (!('version' in value) || value['version'] === undefined)
return false;
return true;
}
function SpaceUpdateFromJSON(json) {
return SpaceUpdateFromJSONTyped(json, false);
}
function SpaceUpdateFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'requestLimit': json['requestLimit'] == null ? undefined : json['requestLimit'],
'postalAddress': json['postalAddress'] == null ? undefined : (0, SpaceAddressCreate_1.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 : (0, CreationEntityState_1.CreationEntityStateFromJSON)(json['state']),
'primaryCurrency': json['primaryCurrency'] == null ? undefined : json['primaryCurrency'],
'version': json['version'],
};
}
function SpaceUpdateToJSON(json) {
return SpaceUpdateToJSONTyped(json, false);
}
function SpaceUpdateToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'requestLimit': value['requestLimit'],
'postalAddress': (0, SpaceAddressCreate_1.SpaceAddressCreateToJSON)(value['postalAddress']),
'name': value['name'],
'technicalContactAddresses': value['technicalContactAddresses'] == null ? undefined : Array.from(value['technicalContactAddresses']),
'timeZone': value['timeZone'],
'state': (0, CreationEntityState_1.CreationEntityStateToJSON)(value['state']),
'primaryCurrency': value['primaryCurrency'],
'version': value['version'],
};
}