wallee
Version:
TypeScript/JavaScript client for wallee
38 lines (37 loc) • 1.51 kB
JavaScript
import { ConditionFromJSON, } from './Condition';
import { CreationEntityStateFromJSON, CreationEntityStateToJSON, } from './CreationEntityState';
/**
* Check if a given object implements the ChargeFlow interface.
*/
export function instanceOfChargeFlow(value) {
return true;
}
export function ChargeFlowFromJSON(json) {
return ChargeFlowFromJSONTyped(json, false);
}
export 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 : CreationEntityStateFromJSON(json['state']),
'conditions': json['conditions'] == null ? undefined : (json['conditions'].map(ConditionFromJSON)),
'priority': json['priority'] == null ? undefined : json['priority'],
'version': json['version'] == null ? undefined : json['version'],
};
}
export function ChargeFlowToJSON(json) {
return ChargeFlowToJSONTyped(json, false);
}
export function ChargeFlowToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'state': CreationEntityStateToJSON(value['state']),
};
}