UNPKG

wallee

Version:
51 lines (50 loc) 2.23 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfScope = instanceOfScope; exports.ScopeFromJSON = ScopeFromJSON; exports.ScopeFromJSONTyped = ScopeFromJSONTyped; exports.ScopeToJSON = ScopeToJSON; exports.ScopeToJSONTyped = ScopeToJSONTyped; const CreationEntityState_1 = require("./CreationEntityState"); const Feature_1 = require("./Feature"); /** * Check if a given object implements the Scope interface. */ function instanceOfScope(value) { return true; } function ScopeFromJSON(json) { return ScopeFromJSONTyped(json, false); } function ScopeFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'plannedPurgeDate': json['plannedPurgeDate'] == null ? undefined : (new Date(json['plannedPurgeDate'])), 'sslActive': json['sslActive'] == null ? undefined : json['sslActive'], 'version': json['version'] == null ? undefined : json['version'], 'machineName': json['machineName'] == null ? undefined : json['machineName'], 'url': json['url'] == null ? undefined : json['url'], 'features': json['features'] == null ? undefined : (new Set(json['features'].map(Feature_1.FeatureFromJSON))), 'themes': json['themes'] == null ? undefined : json['themes'], 'port': json['port'] == null ? undefined : json['port'], 'preprodDomainName': json['preprodDomainName'] == null ? undefined : json['preprodDomainName'], 'domainName': json['domainName'] == null ? undefined : json['domainName'], 'name': json['name'] == null ? undefined : json['name'], 'id': json['id'] == null ? undefined : json['id'], 'state': json['state'] == null ? undefined : (0, CreationEntityState_1.CreationEntityStateFromJSON)(json['state']), 'sandboxDomainName': json['sandboxDomainName'] == null ? undefined : json['sandboxDomainName'], }; } function ScopeToJSON(json) { return ScopeToJSONTyped(json, false); } function ScopeToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'state': (0, CreationEntityState_1.CreationEntityStateToJSON)(value['state']), }; }