"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');

var pkg7804375fe5e4c6d5afe067bd314c42fe0b7d005a1300019c73154dd939da4dda = require('../../../../Splice/Api/FeaturedAppRightV1');
var pkgb70db8369e1c461d5c70f1c86f526a29e9776c655e6ffc2560f95b05ccb8b946 = require('../../../../DA/Time/Types');

var CantonPayments_PaymentStream_Types_PaymentStreamAmount = require('../../../../CantonPayments/PaymentStream/Types/PaymentStreamAmount/module');
var CantonPayments_PaymentStream_Types_PaymentStreamTime = require('../../../../CantonPayments/PaymentStream/Types/PaymentStreamTime/module');


exports.PaymentStreamProposalChanges = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({payer: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Party).decoder), recipient: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Party).decoder), provider: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Party).decoder), appRewardBeneficiaries: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.List(pkg7804375fe5e4c6d5afe067bd314c42fe0b7d005a1300019c73154dd939da4dda.AppRewardBeneficiary)).decoder), recipientPaymentPerDay: jtv.Decoder.withDefault(null, damlTypes.Optional(CantonPayments_PaymentStream_Types_PaymentStreamAmount.PaymentStreamAmount).decoder), processorPaymentPerDay: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Optional(CantonPayments_PaymentStream_Types_PaymentStreamAmount.PaymentStreamAmount)).decoder), paymentsEndAt: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Optional(CantonPayments_PaymentStream_Types_PaymentStreamTime.PaymentStreamExpiration)).decoder), prepayWindow: jtv.Decoder.withDefault(null, damlTypes.Optional(pkgb70db8369e1c461d5c70f1c86f526a29e9776c655e6ffc2560f95b05ccb8b946.DA.Time.Types.RelTime).decoder), freeTrialExpiration: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Optional(CantonPayments_PaymentStream_Types_PaymentStreamTime.PaymentStreamExpiration)).decoder), description: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Optional(damlTypes.Text)).decoder), metadata: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Optional(damlTypes.TextMap(damlTypes.Text))).decoder), observers: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.List(damlTypes.Party)).decoder), }); }),
  encode: function (__typed__) {
  return {
    payer: damlTypes.Optional(damlTypes.Party).encode(__typed__.payer),
    recipient: damlTypes.Optional(damlTypes.Party).encode(__typed__.recipient),
    provider: damlTypes.Optional(damlTypes.Party).encode(__typed__.provider),
    appRewardBeneficiaries: damlTypes.Optional(damlTypes.List(pkg7804375fe5e4c6d5afe067bd314c42fe0b7d005a1300019c73154dd939da4dda.AppRewardBeneficiary)).encode(__typed__.appRewardBeneficiaries),
    recipientPaymentPerDay: damlTypes.Optional(CantonPayments_PaymentStream_Types_PaymentStreamAmount.PaymentStreamAmount).encode(__typed__.recipientPaymentPerDay),
    processorPaymentPerDay: damlTypes.Optional(damlTypes.Optional(CantonPayments_PaymentStream_Types_PaymentStreamAmount.PaymentStreamAmount)).encode(__typed__.processorPaymentPerDay),
    paymentsEndAt: damlTypes.Optional(damlTypes.Optional(CantonPayments_PaymentStream_Types_PaymentStreamTime.PaymentStreamExpiration)).encode(__typed__.paymentsEndAt),
    prepayWindow: damlTypes.Optional(pkgb70db8369e1c461d5c70f1c86f526a29e9776c655e6ffc2560f95b05ccb8b946.DA.Time.Types.RelTime).encode(__typed__.prepayWindow),
    freeTrialExpiration: damlTypes.Optional(damlTypes.Optional(CantonPayments_PaymentStream_Types_PaymentStreamTime.PaymentStreamExpiration)).encode(__typed__.freeTrialExpiration),
    description: damlTypes.Optional(damlTypes.Optional(damlTypes.Text)).encode(__typed__.description),
    metadata: damlTypes.Optional(damlTypes.Optional(damlTypes.TextMap(damlTypes.Text))).encode(__typed__.metadata),
    observers: damlTypes.Optional(damlTypes.List(damlTypes.Party)).encode(__typed__.observers),
  };
}
,
};

