UNPKG

wallee

Version:
62 lines (61 loc) 3.5 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfTransactionVoid = instanceOfTransactionVoid; exports.TransactionVoidFromJSON = TransactionVoidFromJSON; exports.TransactionVoidFromJSONTyped = TransactionVoidFromJSONTyped; exports.TransactionVoidToJSON = TransactionVoidToJSON; exports.TransactionVoidToJSONTyped = TransactionVoidToJSONTyped; const TransactionVoidMode_1 = require("./TransactionVoidMode"); const Transaction_1 = require("./Transaction"); const TransactionVoidState_1 = require("./TransactionVoidState"); const FailureReason_1 = require("./FailureReason"); const Label_1 = require("./Label"); /** * Check if a given object implements the TransactionVoid interface. */ function instanceOfTransactionVoid(value) { return true; } function TransactionVoidFromJSON(json) { return TransactionVoidFromJSONTyped(json, false); } function TransactionVoidFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'plannedPurgeDate': json['plannedPurgeDate'] == null ? undefined : (new Date(json['plannedPurgeDate'])), 'language': json['language'] == null ? undefined : json['language'], 'spaceViewId': json['spaceViewId'] == null ? undefined : json['spaceViewId'], 'createdOn': json['createdOn'] == null ? undefined : (new Date(json['createdOn'])), 'version': json['version'] == null ? undefined : json['version'], 'labels': json['labels'] == null ? undefined : (new Set(json['labels'].map(Label_1.LabelFromJSON))), 'mode': json['mode'] == null ? undefined : (0, TransactionVoidMode_1.TransactionVoidModeFromJSON)(json['mode']), 'linkedSpaceId': json['linkedSpaceId'] == null ? undefined : json['linkedSpaceId'], 'timeoutOn': json['timeoutOn'] == null ? undefined : (new Date(json['timeoutOn'])), 'createdBy': json['createdBy'] == null ? undefined : json['createdBy'], 'nextUpdateOn': json['nextUpdateOn'] == null ? undefined : (new Date(json['nextUpdateOn'])), 'failureReason': json['failureReason'] == null ? undefined : (0, FailureReason_1.FailureReasonFromJSON)(json['failureReason']), 'succeededOn': json['succeededOn'] == null ? undefined : (new Date(json['succeededOn'])), 'id': json['id'] == null ? undefined : json['id'], 'state': json['state'] == null ? undefined : (0, TransactionVoidState_1.TransactionVoidStateFromJSON)(json['state']), 'linkedTransaction': json['linkedTransaction'] == null ? undefined : json['linkedTransaction'], 'failedOn': json['failedOn'] == null ? undefined : (new Date(json['failedOn'])), 'transaction': json['transaction'] == null ? undefined : (0, Transaction_1.TransactionFromJSON)(json['transaction']), 'processorReference': json['processorReference'] == null ? undefined : json['processorReference'], }; } function TransactionVoidToJSON(json) { return TransactionVoidToJSONTyped(json, false); } function TransactionVoidToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'mode': (0, TransactionVoidMode_1.TransactionVoidModeToJSON)(value['mode']), 'failureReason': (0, FailureReason_1.FailureReasonToJSON)(value['failureReason']), 'state': (0, TransactionVoidState_1.TransactionVoidStateToJSON)(value['state']), 'transaction': (0, Transaction_1.TransactionToJSON)(value['transaction']), }; }