"use strict";
/* eslint-disable-next-line no-unused-vars */
function __export(m) {
/* eslint-disable-next-line no-prototype-builtins */
    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
/* eslint-disable-next-line no-unused-vars */
var jtv = require('@mojotech/json-type-validation');
/* eslint-disable-next-line no-unused-vars */
var damlTypes = require('@daml/types');
/* eslint-disable-next-line no-unused-vars */
var damlLedger = require('@daml/ledger');


exports.PaymentStreamAmount = {
  decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.object({tag: jtv.constant('AmuletAmount'), value: damlTypes.Numeric(10).decoder, }), jtv.object({tag: jtv.constant('USDAmount'), value: damlTypes.Numeric(10).decoder, })); }),
  encode: function (__typed__) {
  switch(__typed__.tag) {
    case 'AmuletAmount': return {tag: __typed__.tag, value: damlTypes.Numeric(10).encode(__typed__.value)};
    case 'USDAmount': return {tag: __typed__.tag, value: damlTypes.Numeric(10).encode(__typed__.value)};
    default: throw 'unrecognized type tag: ' + __typed__.tag + ' while serializing a value of type PaymentStreamAmount';
  }
}
,
};

