wallee
Version:
TypeScript/JavaScript client for wallee
61 lines (60 loc) • 3.2 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfSpace = instanceOfSpace;
exports.SpaceFromJSON = SpaceFromJSON;
exports.SpaceFromJSONTyped = SpaceFromJSONTyped;
exports.SpaceToJSON = SpaceToJSON;
exports.SpaceToJSONTyped = SpaceToJSONTyped;
const Account_1 = require("./Account");
const SpaceAddress_1 = require("./SpaceAddress");
const CreationEntityState_1 = require("./CreationEntityState");
const TenantDatabase_1 = require("./TenantDatabase");
/**
* Check if a given object implements the Space interface.
*/
function instanceOfSpace(value) {
return true;
}
function SpaceFromJSON(json) {
return SpaceFromJSONTyped(json, false);
}
function SpaceFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'activeOrRestrictedActive': json['activeOrRestrictedActive'] == null ? undefined : json['activeOrRestrictedActive'],
'deletedOn': json['deletedOn'] == null ? undefined : (new Date(json['deletedOn'])),
'plannedPurgeDate': json['plannedPurgeDate'] == null ? undefined : (new Date(json['plannedPurgeDate'])),
'active': json['active'] == null ? undefined : json['active'],
'timeZone': json['timeZone'] == null ? undefined : json['timeZone'],
'createdOn': json['createdOn'] == null ? undefined : (new Date(json['createdOn'])),
'primaryCurrency': json['primaryCurrency'] == null ? undefined : json['primaryCurrency'],
'version': json['version'] == null ? undefined : json['version'],
'deletedBy': json['deletedBy'] == null ? undefined : json['deletedBy'],
'requestLimit': json['requestLimit'] == null ? undefined : json['requestLimit'],
'database': json['database'] == null ? undefined : (0, TenantDatabase_1.TenantDatabaseFromJSON)(json['database']),
'postalAddress': json['postalAddress'] == null ? undefined : (0, SpaceAddress_1.SpaceAddressFromJSON)(json['postalAddress']),
'restrictedActive': json['restrictedActive'] == null ? undefined : json['restrictedActive'],
'createdBy': json['createdBy'] == null ? undefined : json['createdBy'],
'name': json['name'] == null ? undefined : json['name'],
'technicalContactAddresses': json['technicalContactAddresses'] == null ? undefined : new Set(json['technicalContactAddresses']),
'id': json['id'] == null ? undefined : json['id'],
'state': json['state'] == null ? undefined : (0, CreationEntityState_1.CreationEntityStateFromJSON)(json['state']),
'account': json['account'] == null ? undefined : (0, Account_1.AccountFromJSON)(json['account']),
};
}
function SpaceToJSON(json) {
return SpaceToJSONTyped(json, false);
}
function SpaceToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'database': (0, TenantDatabase_1.TenantDatabaseToJSON)(value['database']),
'postalAddress': (0, SpaceAddress_1.SpaceAddressToJSON)(value['postalAddress']),
'state': (0, CreationEntityState_1.CreationEntityStateToJSON)(value['state']),
'account': (0, Account_1.AccountToJSON)(value['account']),
};
}