wallee
Version:
TypeScript/JavaScript client for wallee
44 lines (43 loc) • 1.95 kB
JavaScript
import { CreationEntityStateFromJSON, CreationEntityStateToJSON, } from './CreationEntityState';
import { FeatureFromJSON, } from './Feature';
/**
* Check if a given object implements the Scope interface.
*/
export function instanceOfScope(value) {
return true;
}
export function ScopeFromJSON(json) {
return ScopeFromJSONTyped(json, false);
}
export 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(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 : CreationEntityStateFromJSON(json['state']),
'sandboxDomainName': json['sandboxDomainName'] == null ? undefined : json['sandboxDomainName'],
};
}
export function ScopeToJSON(json) {
return ScopeToJSONTyped(json, false);
}
export function ScopeToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'state': CreationEntityStateToJSON(value['state']),
};
}