UNPKG

wallee

Version:
45 lines (44 loc) 1.84 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfChargeFlow = instanceOfChargeFlow; exports.ChargeFlowFromJSON = ChargeFlowFromJSON; exports.ChargeFlowFromJSONTyped = ChargeFlowFromJSONTyped; exports.ChargeFlowToJSON = ChargeFlowToJSON; exports.ChargeFlowToJSONTyped = ChargeFlowToJSONTyped; const Condition_1 = require("./Condition"); const CreationEntityState_1 = require("./CreationEntityState"); /** * Check if a given object implements the ChargeFlow interface. */ function instanceOfChargeFlow(value) { return true; } function ChargeFlowFromJSON(json) { return ChargeFlowFromJSONTyped(json, false); } function ChargeFlowFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'linkedSpaceId': json['linkedSpaceId'] == null ? undefined : json['linkedSpaceId'], 'name': json['name'] == null ? undefined : json['name'], 'plannedPurgeDate': json['plannedPurgeDate'] == null ? undefined : (new Date(json['plannedPurgeDate'])), 'id': json['id'] == null ? undefined : json['id'], 'state': json['state'] == null ? undefined : (0, CreationEntityState_1.CreationEntityStateFromJSON)(json['state']), 'conditions': json['conditions'] == null ? undefined : (json['conditions'].map(Condition_1.ConditionFromJSON)), 'priority': json['priority'] == null ? undefined : json['priority'], 'version': json['version'] == null ? undefined : json['version'], }; } function ChargeFlowToJSON(json) { return ChargeFlowToJSONTyped(json, false); } function ChargeFlowToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'state': (0, CreationEntityState_1.CreationEntityStateToJSON)(value['state']), }; }