UNPKG

wallee

Version:
41 lines (40 loc) 1.83 kB
import { ChargeFlowFromJSON, ChargeFlowToJSON, } from './ChargeFlow'; import { CreationEntityStateFromJSON, CreationEntityStateToJSON, } from './CreationEntityState'; /** * Check if a given object implements the ChargeFlowLevelConfiguration interface. */ export function instanceOfChargeFlowLevelConfiguration(value) { return true; } export function ChargeFlowLevelConfigurationFromJSON(json) { return ChargeFlowLevelConfigurationFromJSONTyped(json, false); } export function ChargeFlowLevelConfigurationFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'linkedSpaceId': json['linkedSpaceId'] == null ? undefined : json['linkedSpaceId'], 'period': json['period'] == null ? undefined : json['period'], '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 : CreationEntityStateFromJSON(json['state']), 'priority': json['priority'] == null ? undefined : json['priority'], 'type': json['type'] == null ? undefined : json['type'], 'version': json['version'] == null ? undefined : json['version'], 'flow': json['flow'] == null ? undefined : ChargeFlowFromJSON(json['flow']), }; } export function ChargeFlowLevelConfigurationToJSON(json) { return ChargeFlowLevelConfigurationToJSONTyped(json, false); } export function ChargeFlowLevelConfigurationToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'state': CreationEntityStateToJSON(value['state']), 'flow': ChargeFlowToJSON(value['flow']), }; }