content: /*
   * 支付宝开放平台API
   * 支付宝开放平台v3协议文档
   *
   * The version of the OpenAPI document: 2025-08-26
   * 
   *
   * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
   * https://openapi-generator.tech
   * Do not edit the class manually.
   */
  
  
  package com.alipay.v3.model;
  
  import java.util.Objects;
  import java.util.Arrays;
  import com.alipay.v3.model.BkAgentRespInfo;
  import com.alipay.v3.model.ChargeInfo;
  import com.alipay.v3.model.EnterprisePayInfo;
  import com.alipay.v3.model.TapPayInfo;
  import com.alipay.v3.model.TradeFundBill;
  import com.alipay.v3.model.VoucherDetail;
  import com.google.gson.TypeAdapter;
  import com.google.gson.annotations.JsonAdapter;
  import com.google.gson.annotations.SerializedName;
  import com.google.gson.stream.JsonReader;
  import com.google.gson.stream.JsonWriter;
  import io.swagger.annotations.ApiModel;
  import io.swagger.annotations.ApiModelProperty;
  import java.io.IOException;
  import java.util.ArrayList;
  import java.util.List;
  
  import com.google.gson.Gson;
  import com.google.gson.GsonBuilder;
  import com.google.gson.JsonArray;
  import com.google.gson.JsonDeserializationContext;
  import com.google.gson.JsonDeserializer;
  import com.google.gson.JsonElement;
  import com.google.gson.JsonObject;
  import com.google.gson.JsonParseException;
  import com.google.gson.TypeAdapterFactory;
  import com.google.gson.reflect.TypeToken;
  
  import java.lang.reflect.Type;
  import java.util.HashMap;
  import java.util.HashSet;
  import java.util.Map;
  import java.util.Map.Entry;
  import java.util.Set;
  
  import com.alipay.v3.JSON;
  
  /**
   * AlipayTradePayResponseModel
   */
  @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
  public class AlipayTradePayResponseModel {
    public static final String SERIALIZED_NAME_ADVANCE_AMOUNT = "advance_amount";
    @SerializedName(SERIALIZED_NAME_ADVANCE_AMOUNT)
    private String advanceAmount;
  
    public static final String SERIALIZED_NAME_ASYNC_PAY_APPLY_STATUS = "async_pay_apply_status";
    @SerializedName(SERIALIZED_NAME_ASYNC_PAY_APPLY_STATUS)
    private String asyncPayApplyStatus;
  
    public static final String SERIALIZED_NAME_ASYNC_PAYMENT_MODE = "async_payment_mode";
    @SerializedName(SERIALIZED_NAME_ASYNC_PAYMENT_MODE)
    private String asyncPaymentMode;
  
    public static final String SERIALIZED_NAME_AUTH_TRADE_PAY_MODE = "auth_trade_pay_mode";
    @SerializedName(SERIALIZED_NAME_AUTH_TRADE_PAY_MODE)
    private String authTradePayMode;
  
    public static final String SERIALIZED_NAME_BKAGENT_RESP_INFO = "bkagent_resp_info";
    @SerializedName(SERIALIZED_NAME_BKAGENT_RESP_INFO)
    private BkAgentRespInfo bkagentRespInfo;
  
    public static final String SERIALIZED_NAME_BUSINESS_PARAMS = "business_params";
    @SerializedName(SERIALIZED_NAME_BUSINESS_PARAMS)
    private String businessParams;
  
    public static final String SERIALIZED_NAME_BUYER_LOGON_ID = "buyer_logon_id";
    @SerializedName(SERIALIZED_NAME_BUYER_LOGON_ID)
    private String buyerLogonId;
  
    public static final String SERIALIZED_NAME_BUYER_OPEN_ID = "buyer_open_id";
    @SerializedName(SERIALIZED_NAME_BUYER_OPEN_ID)
    private String buyerOpenId;
  
    public static final String SERIALIZED_NAME_BUYER_PAY_AMOUNT = "buyer_pay_amount";
    @SerializedName(SERIALIZED_NAME_BUYER_PAY_AMOUNT)
    private String buyerPayAmount;
  
    public static final String SERIALIZED_NAME_BUYER_USER_ID = "buyer_user_id";
    @SerializedName(SERIALIZED_NAME_BUYER_USER_ID)
    private String buyerUserId;
  
    public static final String SERIALIZED_NAME_BUYER_USER_NAME = "buyer_user_name";
    @SerializedName(SERIALIZED_NAME_BUYER_USER_NAME)
    private String buyerUserName;
  
    public static final String SERIALIZED_NAME_BUYER_USER_TYPE = "buyer_user_type";
    @SerializedName(SERIALIZED_NAME_BUYER_USER_TYPE)
    private String buyerUserType;
  
    public static final String SERIALIZED_NAME_CAN_TURN_TO_APP_PAY = "can_turn_to_app_pay";
    @SerializedName(SERIALIZED_NAME_CAN_TURN_TO_APP_PAY)
    private String canTurnToAppPay;
  
    public static final String SERIALIZED_NAME_CARD_BALANCE = "card_balance";
    @SerializedName(SERIALIZED_NAME_CARD_BALANCE)
    private String cardBalance;
  
    public static final String SERIALIZED_NAME_CHARGE_AMOUNT = "charge_amount";
    @SerializedName(SERIALIZED_NAME_CHARGE_AMOUNT)
    private String chargeAmount;
  
    public static final String SERIALIZED_NAME_CHARGE_FLAGS = "charge_flags";
    @SerializedName(SERIALIZED_NAME_CHARGE_FLAGS)
    private String chargeFlags;
  
    public static final String SERIALIZED_NAME_CHARGE_INFO_LIST = "charge_info_list";
    @SerializedName(SERIALIZED_NAME_CHARGE_INFO_LIST)
    private ChargeInfo chargeInfoList;
  
    public static final String SERIALIZED_NAME_CREDIT_BIZ_ORDER_ID = "credit_biz_order_id";
    @SerializedName(SERIALIZED_NAME_CREDIT_BIZ_ORDER_ID)
    private String creditBizOrderId;
  
    public static final String SERIALIZED_NAME_CREDIT_PAY_MODE = "credit_pay_mode";
    @SerializedName(SERIALIZED_NAME_CREDIT_PAY_MODE)
    private String creditPayMode;
  
    public static final String SERIALIZED_NAME_DISCOUNT_AMOUNT = "discount_amount";
    @SerializedName(SERIALIZED_NAME_DISCOUNT_AMOUNT)
    private String discountAmount;
  
    public static final String SERIALIZED_NAME_DISCOUNT_GOODS_DETAIL = "discount_goods_detail";
    @SerializedName(SERIALIZED_NAME_DISCOUNT_GOODS_DETAIL)
    private String discountGoodsDetail;
  
    public static final String SERIALIZED_NAME_ENTERPRISE_PAY_INFO = "enterprise_pay_info";
    @SerializedName(SERIALIZED_NAME_ENTERPRISE_PAY_INFO)
    private EnterprisePayInfo enterprisePayInfo;
  
    public static final String SERIALIZED_NAME_FUND_BILL_LIST = "fund_bill_list";
    @SerializedName(SERIALIZED_NAME_FUND_BILL_LIST)
    private List<TradeFundBill> fundBillList = null;
  
    public static final String SERIALIZED_NAME_GMT_PAYMENT = "gmt_payment";
    @SerializedName(SERIALIZED_NAME_GMT_PAYMENT)
    private String gmtPayment;
  
    public static final String SERIALIZED_NAME_HYB_AMOUNT = "hyb_amount";
    @SerializedName(SERIALIZED_NAME_HYB_AMOUNT)
    private String hybAmount;
  
    public static final String SERIALIZED_NAME_INVOICE_AMOUNT = "invoice_amount";
    @SerializedName(SERIALIZED_NAME_INVOICE_AMOUNT)
    private String invoiceAmount;
  
    public static final String SERIALIZED_NAME_MDISCOUNT_AMOUNT = "mdiscount_amount";
    @SerializedName(SERIALIZED_NAME_MDISCOUNT_AMOUNT)
    private String mdiscountAmount;
  
    public static final String SERIALIZED_NAME_OPEN_ID = "open_id";
    @SerializedName(SERIALIZED_NAME_OPEN_ID)
    private String openId;
  
    public static final String SERIALIZED_NAME_OUT_TRADE_NO = "out_trade_no";
    @SerializedName(SERIALIZED_NAME_OUT_TRADE_NO)
    private String outTradeNo;
  
    public static final String SERIALIZED_NAME_PAY_AMOUNT = "pay_amount";
    @SerializedName(SERIALIZED_NAME_PAY_AMOUNT)
    private String payAmount;
  
    public static final String SERIALIZED_NAME_PAY_CURRENCY = "pay_currency";
    @SerializedName(SERIALIZED_NAME_PAY_CURRENCY)
    private String payCurrency;
  
    public static final String SERIALIZED_NAME_POINT_AMOUNT = "point_amount";
    @SerializedName(SERIALIZED_NAME_POINT_AMOUNT)
    private String pointAmount;
  
    public static final String SERIALIZED_NAME_PRE_AUTH_PAY_AMOUNT = "pre_auth_pay_amount";
    @SerializedName(SERIALIZED_NAME_PRE_AUTH_PAY_AMOUNT)
    private String preAuthPayAmount;
  
    public static final String SERIALIZED_NAME_RECEIPT_AMOUNT = "receipt_amount";
    @SerializedName(SERIALIZED_NAME_RECEIPT_AMOUNT)
    private String receiptAmount;
  
    public static final String SERIALIZED_NAME_RECEIPT_CURRENCY_TYPE = "receipt_currency_type";
    @SerializedName(SERIALIZED_NAME_RECEIPT_CURRENCY_TYPE)
    private String receiptCurrencyType;
  
    public static final String SERIALIZED_NAME_SETTLE_AMOUNT = "settle_amount";
    @SerializedName(SERIALIZED_NAME_SETTLE_AMOUNT)
    private String settleAmount;
  
    public static final String SERIALIZED_NAME_SETTLE_CURRENCY = "settle_currency";
    @SerializedName(SERIALIZED_NAME_SETTLE_CURRENCY)
    private String settleCurrency;
  
    public static final String SERIALIZED_NAME_SETTLE_TRANS_RATE = "settle_trans_rate";
    @SerializedName(SERIALIZED_NAME_SETTLE_TRANS_RATE)
    private String settleTransRate;
  
    public static final String SERIALIZED_NAME_SETTLEMENT_ID = "settlement_id";
    @SerializedName(SERIALIZED_NAME_SETTLEMENT_ID)
    private String settlementId;
  
    public static final String SERIALIZED_NAME_STORE_NAME = "store_name";
    @SerializedName(SERIALIZED_NAME_STORE_NAME)
    private String storeName;
  
    public static final String SERIALIZED_NAME_TAP_PAY_INFO = "tap_pay_info";
    @SerializedName(SERIALIZED_NAME_TAP_PAY_INFO)
    private TapPayInfo tapPayInfo;
  
    public static final String SERIALIZED_NAME_TOTAL_AMOUNT = "total_amount";
    @SerializedName(SERIALIZED_NAME_TOTAL_AMOUNT)
    private String totalAmount;
  
    public static final String SERIALIZED_NAME_TRADE_NO = "trade_no";
    @SerializedName(SERIALIZED_NAME_TRADE_NO)
    private String tradeNo;
  
    public static final String SERIALIZED_NAME_TRANS_CURRENCY = "trans_currency";
    @SerializedName(SERIALIZED_NAME_TRANS_CURRENCY)
    private String transCurrency;
  
    public static final String SERIALIZED_NAME_TRANS_PAY_RATE = "trans_pay_rate";
    @SerializedName(SERIALIZED_NAME_TRANS_PAY_RATE)
    private String transPayRate;
  
    public static final String SERIALIZED_NAME_VOUCHER_DETAIL_LIST = "voucher_detail_list";
    @SerializedName(SERIALIZED_NAME_VOUCHER_DETAIL_LIST)
    private List<VoucherDetail> voucherDetailList = null;
  
    public AlipayTradePayResponseModel() { 
    }
  
    public AlipayTradePayResponseModel advanceAmount(String advanceAmount) {
      
      this.advanceAmount = advanceAmount;
      return this;
    }
  
     /**
     * 先享后付2.0垫资金额,不返回表示没有走垫资，非空表示垫资支付的金额
     * @return advanceAmount
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "88.8", value = "先享后付2.0垫资金额,不返回表示没有走垫资，非空表示垫资支付的金额")
  
    public String getAdvanceAmount() {
      return advanceAmount;
    }
  
  
    public void setAdvanceAmount(String advanceAmount) {
      this.advanceAmount = advanceAmount;
    }
  
  
    public AlipayTradePayResponseModel asyncPayApplyStatus(String asyncPayApplyStatus) {
      
      this.asyncPayApplyStatus = asyncPayApplyStatus;
      return this;
    }
  
     /**
     * 异步支付受理状态，仅异步支付模式且query_options指定async_pay_info时返回。S：受理成功，支付宝内部会在一定期限内捞起任务推进支付，直到支付成功或超出可重试期限；其它：受理结果未知，可通过查询接口获取交易状态。
     * @return asyncPayApplyStatus
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "S", value = "异步支付受理状态，仅异步支付模式且query_options指定async_pay_info时返回。S：受理成功，支付宝内部会在一定期限内捞起任务推进支付，直到支付成功或超出可重试期限；其它：受理结果未知，可通过查询接口获取交易状态。")
  
    public String getAsyncPayApplyStatus() {
      return asyncPayApplyStatus;
    }
  
  
    public void setAsyncPayApplyStatus(String asyncPayApplyStatus) {
      this.asyncPayApplyStatus = asyncPayApplyStatus;
    }
  
  
    public AlipayTradePayResponseModel asyncPaymentMode(String asyncPaymentMode) {
      
      this.asyncPaymentMode = asyncPaymentMode;
      return this;
    }
  
     /**
     * 异步支付模式，目前有五种值： ASYNC_DELAY_PAY(异步延时付款); ASYNC_REALTIME_PAY(异步准实时付款); SYNC_DIRECT_PAY(同步直接扣款); NORMAL_ASYNC_PAY(纯异步付款); QUOTA_OCCUPYIED_ASYNC_PAY(异步支付并且预占了先享后付额度);
     * @return asyncPaymentMode
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "SYNC_DIRECT_PAY", value = "异步支付模式，目前有五种值： ASYNC_DELAY_PAY(异步延时付款); ASYNC_REALTIME_PAY(异步准实时付款); SYNC_DIRECT_PAY(同步直接扣款); NORMAL_ASYNC_PAY(纯异步付款); QUOTA_OCCUPYIED_ASYNC_PAY(异步支付并且预占了先享后付额度);")
  
    public String getAsyncPaymentMode() {
      return asyncPaymentMode;
    }
  
  
    public void setAsyncPaymentMode(String asyncPaymentMode) {
      this.asyncPaymentMode = asyncPaymentMode;
    }
  
  
    public AlipayTradePayResponseModel authTradePayMode(String authTradePayMode) {
      
      this.authTradePayMode = authTradePayMode;
      return this;
    }
  
     /**
     * 预授权支付模式，该参数仅在信用预授权支付场景下返回。信用预授权支付：CREDIT_PREAUTH_PAY
     * @return authTradePayMode
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "CREDIT_PREAUTH_PAY", value = "预授权支付模式，该参数仅在信用预授权支付场景下返回。信用预授权支付：CREDIT_PREAUTH_PAY")
  
    public String getAuthTradePayMode() {
      return authTradePayMode;
    }
  
  
    public void setAuthTradePayMode(String authTradePayMode) {
      this.authTradePayMode = authTradePayMode;
    }
  
  
    public AlipayTradePayResponseModel bkagentRespInfo(BkAgentRespInfo bkagentRespInfo) {
      
      this.bkagentRespInfo = bkagentRespInfo;
      return this;
    }
  
     /**
     * Get bkagentRespInfo
     * @return bkagentRespInfo
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(value = "")
  
    public BkAgentRespInfo getBkagentRespInfo() {
      return bkagentRespInfo;
    }
  
  
    public void setBkagentRespInfo(BkAgentRespInfo bkagentRespInfo) {
      this.bkagentRespInfo = bkagentRespInfo;
    }
  
  
    public AlipayTradePayResponseModel businessParams(String businessParams) {
      
      this.businessParams = businessParams;
      return this;
    }
  
     /**
     * 商户传入业务信息，具体值要和支付宝约定  将商户传入信息分发给相应系统，应用于安全，营销等参数直传场景  格式为json格式
     * @return businessParams
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "{\"data\":\"123\"}", value = "商户传入业务信息，具体值要和支付宝约定  将商户传入信息分发给相应系统，应用于安全，营销等参数直传场景  格式为json格式")
  
    public String getBusinessParams() {
      return businessParams;
    }
  
  
    public void setBusinessParams(String businessParams) {
      this.businessParams = businessParams;
    }
  
  
    public AlipayTradePayResponseModel buyerLogonId(String buyerLogonId) {
      
      this.buyerLogonId = buyerLogonId;
      return this;
    }
  
     /**
     * 买家支付宝账号
     * @return buyerLogonId
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "159****5620", value = "买家支付宝账号")
  
    public String getBuyerLogonId() {
      return buyerLogonId;
    }
  
  
    public void setBuyerLogonId(String buyerLogonId) {
      this.buyerLogonId = buyerLogonId;
    }
  
  
    public AlipayTradePayResponseModel buyerOpenId(String buyerOpenId) {
      
      this.buyerOpenId = buyerOpenId;
      return this;
    }
  
     /**
     * 买家支付宝用户唯一标识
     * @return buyerOpenId
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "074a1CcTG1LelxKe4xQC0zgNdId0nxi95b5lsNpazWYoCo5", value = "买家支付宝用户唯一标识")
  
    public String getBuyerOpenId() {
      return buyerOpenId;
    }
  
  
    public void setBuyerOpenId(String buyerOpenId) {
      this.buyerOpenId = buyerOpenId;
    }
  
  
    public AlipayTradePayResponseModel buyerPayAmount(String buyerPayAmount) {
      
      this.buyerPayAmount = buyerPayAmount;
      return this;
    }
  
     /**
     * 买家付款的金额
     * @return buyerPayAmount
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "8.88", value = "买家付款的金额")
  
    public String getBuyerPayAmount() {
      return buyerPayAmount;
    }
  
  
    public void setBuyerPayAmount(String buyerPayAmount) {
      this.buyerPayAmount = buyerPayAmount;
    }
  
  
    public AlipayTradePayResponseModel buyerUserId(String buyerUserId) {
      
      this.buyerUserId = buyerUserId;
      return this;
    }
  
     /**
     * 买家在支付宝的用户id
     * @return buyerUserId
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "2088101117955611", value = "买家在支付宝的用户id")
  
    public String getBuyerUserId() {
      return buyerUserId;
    }
  
  
    public void setBuyerUserId(String buyerUserId) {
      this.buyerUserId = buyerUserId;
    }
  
  
    public AlipayTradePayResponseModel buyerUserName(String buyerUserName) {
      
      this.buyerUserName = buyerUserName;
      return this;
    }
  
     /**
     * 买家名称；  买家为个人用户时为买家姓名，买家为企业用户时为企业名称；  默认不返回该信息，需与支付宝约定后配置返回；
     * @return buyerUserName
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "菜鸟网络有限公司", value = "买家名称；  买家为个人用户时为买家姓名，买家为企业用户时为企业名称；  默认不返回该信息，需与支付宝约定后配置返回；")
  
    public String getBuyerUserName() {
      return buyerUserName;
    }
  
  
    public void setBuyerUserName(String buyerUserName) {
      this.buyerUserName = buyerUserName;
    }
  
  
    public AlipayTradePayResponseModel buyerUserType(String buyerUserType) {
      
      this.buyerUserType = buyerUserType;
      return this;
    }
  
     /**
     * 买家用户类型。
     * @return buyerUserType
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "PRIVATE", value = "买家用户类型。")
  
    public String getBuyerUserType() {
      return buyerUserType;
    }
  
  
    public void setBuyerUserType(String buyerUserType) {
      this.buyerUserType = buyerUserType;
    }
  
  
    public AlipayTradePayResponseModel canTurnToAppPay(String canTurnToAppPay) {
      
      this.canTurnToAppPay = canTurnToAppPay;
      return this;
    }
  
     /**
     * 是否可以转为app支付，仅当商户代扣失败场景才会返回该字段信息
     * @return canTurnToAppPay
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "true", value = "是否可以转为app支付，仅当商户代扣失败场景才会返回该字段信息")
  
    public String getCanTurnToAppPay() {
      return canTurnToAppPay;
    }
  
  
    public void setCanTurnToAppPay(String canTurnToAppPay) {
      this.canTurnToAppPay = canTurnToAppPay;
    }
  
  
    public AlipayTradePayResponseModel cardBalance(String cardBalance) {
      
      this.cardBalance = cardBalance;
      return this;
    }
  
     /**
     * 支付宝卡余额
     * @return cardBalance
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "98.23", value = "支付宝卡余额")
  
    public String getCardBalance() {
      return cardBalance;
    }
  
  
    public void setCardBalance(String cardBalance) {
      this.cardBalance = cardBalance;
    }
  
  
    public AlipayTradePayResponseModel chargeAmount(String chargeAmount) {
      
      this.chargeAmount = chargeAmount;
      return this;
    }
  
     /**
     * 该笔交易针对收款方的收费金额； 只在机构间联模式下返回，其它场景下不返回该字段；
     * @return chargeAmount
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "8.88", value = "该笔交易针对收款方的收费金额； 只在机构间联模式下返回，其它场景下不返回该字段；")
  
    public String getChargeAmount() {
      return chargeAmount;
    }
  
  
    public void setChargeAmount(String chargeAmount) {
      this.chargeAmount = chargeAmount;
    }
  
  
    public AlipayTradePayResponseModel chargeFlags(String chargeFlags) {
      
      this.chargeFlags = chargeFlags;
      return this;
    }
  
     /**
     * 费率活动标识。 当交易享受特殊行业或活动费率时，返回该场景的标识。具体场景如下： trade_special_00：订单优惠费率； industry_special_on_00：线上行业特殊费率0； industry_special_on_01：线上行业特殊费率1； industry_special_00：线下行业特殊费率0； industry_special_01：线下行业特殊费率1； bluesea_1：蓝海活动优惠费率标签； 注：只在机构间联模式下返回，其它场景下不返回该字段；
     * @return chargeFlags
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "industry_special_00", value = "费率活动标识。 当交易享受特殊行业或活动费率时，返回该场景的标识。具体场景如下： trade_special_00：订单优惠费率； industry_special_on_00：线上行业特殊费率0； industry_special_on_01：线上行业特殊费率1； industry_special_00：线下行业特殊费率0； industry_special_01：线下行业特殊费率1； bluesea_1：蓝海活动优惠费率标签； 注：只在机构间联模式下返回，其它场景下不返回该字段；")
  
    public String getChargeFlags() {
      return chargeFlags;
    }
  
  
    public void setChargeFlags(String chargeFlags) {
      this.chargeFlags = chargeFlags;
    }
  
  
    public AlipayTradePayResponseModel chargeInfoList(ChargeInfo chargeInfoList) {
      
      this.chargeInfoList = chargeInfoList;
      return this;
    }
  
     /**
     * Get chargeInfoList
     * @return chargeInfoList
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(value = "")
  
    public ChargeInfo getChargeInfoList() {
      return chargeInfoList;
    }
  
  
    public void setChargeInfoList(ChargeInfo chargeInfoList) {
      this.chargeInfoList = chargeInfoList;
    }
  
  
    public AlipayTradePayResponseModel creditBizOrderId(String creditBizOrderId) {
      
      this.creditBizOrderId = creditBizOrderId;
      return this;
    }
  
     /**
     * 信用业务单号。信用支付场景才有值。先用后付产品里是芝麻订单号。
     * @return creditBizOrderId
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "ZMCB99202103310000450000041833", value = "信用业务单号。信用支付场景才有值。先用后付产品里是芝麻订单号。")
  
    public String getCreditBizOrderId() {
      return creditBizOrderId;
    }
  
  
    public void setCreditBizOrderId(String creditBizOrderId) {
      this.creditBizOrderId = creditBizOrderId;
    }
  
  
    public AlipayTradePayResponseModel creditPayMode(String creditPayMode) {
      
      this.creditPayMode = creditPayMode;
      return this;
    }
  
     /**
     * 信用支付模式。表示订单是采用信用支付方式（支付时买家没有出资，需要后续履约）。\&quot;creditAdvanceV2\&quot;表示芝麻先用后付模式，用户后续需要履约扣款。 此字段只有信用支付场景才有值，商户需要根据字段值单独处理。此字段以后可能扩展其他值，建议商户使用白名单方式识别，对于未识别的值做失败处理，并联系支付宝技术支持人员。
     * @return creditPayMode
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "creditAdvanceV2", value = "信用支付模式。表示订单是采用信用支付方式（支付时买家没有出资，需要后续履约）。\"creditAdvanceV2\"表示芝麻先用后付模式，用户后续需要履约扣款。 此字段只有信用支付场景才有值，商户需要根据字段值单独处理。此字段以后可能扩展其他值，建议商户使用白名单方式识别，对于未识别的值做失败处理，并联系支付宝技术支持人员。")
  
    public String getCreditPayMode() {
      return creditPayMode;
    }
  
  
    public void setCreditPayMode(String creditPayMode) {
      this.creditPayMode = creditPayMode;
    }
  
  
    public AlipayTradePayResponseModel discountAmount(String discountAmount) {
      
      this.discountAmount = discountAmount;
      return this;
    }
  
     /**
     * 平台优惠金额
     * @return discountAmount
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "88.88", value = "平台优惠金额")
  
    public String getDiscountAmount() {
      return discountAmount;
    }
  
  
    public void setDiscountAmount(String discountAmount) {
      this.discountAmount = discountAmount;
    }
  
  
    public AlipayTradePayResponseModel discountGoodsDetail(String discountGoodsDetail) {
      
      this.discountGoodsDetail = discountGoodsDetail;
      return this;
    }
  
     /**
     * 本次交易支付所使用的单品券优惠的商品优惠信息。 只有在query_options中指定时才返回该字段信息。
     * @return discountGoodsDetail
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "[{\"goods_id\":\"STANDARD1026181538\",\"goods_name\":\"雪碧\",\"discount_amount\":\"100.00\",\"voucher_id\":\"2015102600073002039000002D5O\"}]", value = "本次交易支付所使用的单品券优惠的商品优惠信息。 只有在query_options中指定时才返回该字段信息。")
  
    public String getDiscountGoodsDetail() {
      return discountGoodsDetail;
    }
  
  
    public void setDiscountGoodsDetail(String discountGoodsDetail) {
      this.discountGoodsDetail = discountGoodsDetail;
    }
  
  
    public AlipayTradePayResponseModel enterprisePayInfo(EnterprisePayInfo enterprisePayInfo) {
      
      this.enterprisePayInfo = enterprisePayInfo;
      return this;
    }
  
     /**
     * Get enterprisePayInfo
     * @return enterprisePayInfo
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(value = "")
  
    public EnterprisePayInfo getEnterprisePayInfo() {
      return enterprisePayInfo;
    }
  
  
    public void setEnterprisePayInfo(EnterprisePayInfo enterprisePayInfo) {
      this.enterprisePayInfo = enterprisePayInfo;
    }
  
  
    public AlipayTradePayResponseModel fundBillList(List<TradeFundBill> fundBillList) {
      
      this.fundBillList = fundBillList;
      return this;
    }
  
    public AlipayTradePayResponseModel addFundBillListItem(TradeFundBill fundBillListItem) {
      if (this.fundBillList == null) {
        this.fundBillList = new ArrayList<>();
      }
      this.fundBillList.add(fundBillListItem);
      return this;
    }
  
     /**
     * 交易支付使用的资金渠道。 只有在签约中指定需要返回资金明细，或者入参的query_options中指定时才返回该字段信息。
     * @return fundBillList
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(value = "交易支付使用的资金渠道。 只有在签约中指定需要返回资金明细，或者入参的query_options中指定时才返回该字段信息。")
  
    public List<TradeFundBill> getFundBillList() {
      return fundBillList;
    }
  
  
    public void setFundBillList(List<TradeFundBill> fundBillList) {
      this.fundBillList = fundBillList;
    }
  
  
    public AlipayTradePayResponseModel gmtPayment(String gmtPayment) {
      
      this.gmtPayment = gmtPayment;
      return this;
    }
  
     /**
     * 交易支付时间
     * @return gmtPayment
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "2014-11-27 15:45:57", value = "交易支付时间")
  
    public String getGmtPayment() {
      return gmtPayment;
    }
  
  
    public void setGmtPayment(String gmtPayment) {
      this.gmtPayment = gmtPayment;
    }
  
  
    public AlipayTradePayResponseModel hybAmount(String hybAmount) {
      
      this.hybAmount = hybAmount;
      return this;
    }
  
     /**
     * 惠营宝回票金额
     * @return hybAmount
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "10.24", value = "惠营宝回票金额")
  
    public String getHybAmount() {
      return hybAmount;
    }
  
  
    public void setHybAmount(String hybAmount) {
      this.hybAmount = hybAmount;
    }
  
  
    public AlipayTradePayResponseModel invoiceAmount(String invoiceAmount) {
      
      this.invoiceAmount = invoiceAmount;
      return this;
    }
  
     /**
     * 交易中可给用户开具发票的金额
     * @return invoiceAmount
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "12.50", value = "交易中可给用户开具发票的金额")
  
    public String getInvoiceAmount() {
      return invoiceAmount;
    }
  
  
    public void setInvoiceAmount(String invoiceAmount) {
      this.invoiceAmount = invoiceAmount;
    }
  
  
    public AlipayTradePayResponseModel mdiscountAmount(String mdiscountAmount) {
      
      this.mdiscountAmount = mdiscountAmount;
      return this;
    }
  
     /**
     * 商家优惠金额
     * @return mdiscountAmount
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "88.88", value = "商家优惠金额")
  
    public String getMdiscountAmount() {
      return mdiscountAmount;
    }
  
  
    public void setMdiscountAmount(String mdiscountAmount) {
      this.mdiscountAmount = mdiscountAmount;
    }
  
  
    public AlipayTradePayResponseModel openId(String openId) {
      
      this.openId = openId;
      return this;
    }
  
     /**
     * 买家支付宝用户号,该参数已废弃，请不要使用
     * @return openId
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "2088102122524333", value = "买家支付宝用户号,该参数已废弃，请不要使用")
  
    public String getOpenId() {
      return openId;
    }
  
  
    public void setOpenId(String openId) {
      this.openId = openId;
    }
  
  
    public AlipayTradePayResponseModel outTradeNo(String outTradeNo) {
      
      this.outTradeNo = outTradeNo;
      return this;
    }
  
     /**
     * 商户订单号
     * @return outTradeNo
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "6823789339978248", value = "商户订单号")
  
    public String getOutTradeNo() {
      return outTradeNo;
    }
  
  
    public void setOutTradeNo(String outTradeNo) {
      this.outTradeNo = outTradeNo;
    }
  
  
    public AlipayTradePayResponseModel payAmount(String payAmount) {
      
      this.payAmount = payAmount;
      return this;
    }
  
     /**
     * 支付币种订单金额
     * @return payAmount
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "580.04", value = "支付币种订单金额")
  
    public String getPayAmount() {
      return payAmount;
    }
  
  
    public void setPayAmount(String payAmount) {
      this.payAmount = payAmount;
    }
  
  
    public AlipayTradePayResponseModel payCurrency(String payCurrency) {
      
      this.payCurrency = payCurrency;
      return this;
    }
  
     /**
     * 支付币种
     * @return payCurrency
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "CNY", value = "支付币种")
  
    public String getPayCurrency() {
      return payCurrency;
    }
  
  
    public void setPayCurrency(String payCurrency) {
      this.payCurrency = payCurrency;
    }
  
  
    public AlipayTradePayResponseModel pointAmount(String pointAmount) {
      
      this.pointAmount = pointAmount;
      return this;
    }
  
     /**
     * 使用集分宝付款的金额
     * @return pointAmount
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "8.12", value = "使用集分宝付款的金额")
  
    public String getPointAmount() {
      return pointAmount;
    }
  
  
    public void setPointAmount(String pointAmount) {
      this.pointAmount = pointAmount;
    }
  
  
    public AlipayTradePayResponseModel preAuthPayAmount(String preAuthPayAmount) {
      
      this.preAuthPayAmount = preAuthPayAmount;
      return this;
    }
  
     /**
     * 当用户使用芝麻信用先享后付时，会返回该字段，代表整笔交易的原始待履约金额，单位元。
     * @return preAuthPayAmount
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "12.45", value = "当用户使用芝麻信用先享后付时，会返回该字段，代表整笔交易的原始待履约金额，单位元。")
  
    public String getPreAuthPayAmount() {
      return preAuthPayAmount;
    }
  
  
    public void setPreAuthPayAmount(String preAuthPayAmount) {
      this.preAuthPayAmount = preAuthPayAmount;
    }
  
  
    public AlipayTradePayResponseModel receiptAmount(String receiptAmount) {
      
      this.receiptAmount = receiptAmount;
      return this;
    }
  
     /**
     * 实收金额
     * @return receiptAmount
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "88.88", value = "实收金额")
  
    public String getReceiptAmount() {
      return receiptAmount;
    }
  
  
    public void setReceiptAmount(String receiptAmount) {
      this.receiptAmount = receiptAmount;
    }
  
  
    public AlipayTradePayResponseModel receiptCurrencyType(String receiptCurrencyType) {
      
      this.receiptCurrencyType = receiptCurrencyType;
      return this;
    }
  
     /**
     * 收款资金类型，当交易收款资金为数字人民币时返回值为“DC”，否则不返回该字段。
     * @return receiptCurrencyType
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "DC", value = "收款资金类型，当交易收款资金为数字人民币时返回值为“DC”，否则不返回该字段。")
  
    public String getReceiptCurrencyType() {
      return receiptCurrencyType;
    }
  
  
    public void setReceiptCurrencyType(String receiptCurrencyType) {
      this.receiptCurrencyType = receiptCurrencyType;
    }
  
  
    public AlipayTradePayResponseModel settleAmount(String settleAmount) {
      
      this.settleAmount = settleAmount;
      return this;
    }
  
     /**
     * 结算币种订单金额
     * @return settleAmount
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "88.88", value = "结算币种订单金额")
  
    public String getSettleAmount() {
      return settleAmount;
    }
  
  
    public void setSettleAmount(String settleAmount) {
      this.settleAmount = settleAmount;
    }
  
  
    public AlipayTradePayResponseModel settleCurrency(String settleCurrency) {
      
      this.settleCurrency = settleCurrency;
      return this;
    }
  
     /**
     * 商户指定的结算币种，目前支持英镑：GBP、港币：HKD、美元：USD、新加坡元：SGD、日元：JPY、加拿大元：CAD、澳元：AUD、欧元：EUR、新西兰元：NZD、韩元：KRW、泰铢：THB、瑞士法郎：CHF、瑞典克朗：SEK、丹麦克朗：DKK、挪威克朗：NOK、马来西亚林吉特：MYR、印尼卢比：IDR、菲律宾比索：PHP、毛里求斯卢比：MUR、以色列新谢克尔：ILS、斯里兰卡卢比：LKR、俄罗斯卢布：RUB、阿联酋迪拉姆：AED、捷克克朗：CZK、南非兰特：ZAR、人民币：CNY
     * @return settleCurrency
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "USD", value = "商户指定的结算币种，目前支持英镑：GBP、港币：HKD、美元：USD、新加坡元：SGD、日元：JPY、加拿大元：CAD、澳元：AUD、欧元：EUR、新西兰元：NZD、韩元：KRW、泰铢：THB、瑞士法郎：CHF、瑞典克朗：SEK、丹麦克朗：DKK、挪威克朗：NOK、马来西亚林吉特：MYR、印尼卢比：IDR、菲律宾比索：PHP、毛里求斯卢比：MUR、以色列新谢克尔：ILS、斯里兰卡卢比：LKR、俄罗斯卢布：RUB、阿联酋迪拉姆：AED、捷克克朗：CZK、南非兰特：ZAR、人民币：CNY")
  
    public String getSettleCurrency() {
      return settleCurrency;
    }
  
  
    public void setSettleCurrency(String settleCurrency) {
      this.settleCurrency = settleCurrency;
    }
  
  
    public AlipayTradePayResponseModel settleTransRate(String settleTransRate) {
      
      this.settleTransRate = settleTransRate;
      return this;
    }
  
     /**
     * 结算币种兑换标价币种汇率
     * @return settleTransRate
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "1", value = "结算币种兑换标价币种汇率")
  
    public String getSettleTransRate() {
      return settleTransRate;
    }
  
  
    public void setSettleTransRate(String settleTransRate) {
      this.settleTransRate = settleTransRate;
    }
  
  
    public AlipayTradePayResponseModel settlementId(String settlementId) {
      
      this.settlementId = settlementId;
      return this;
    }
  
     /**
     * 支付清算编号，用于清算对账使用； 只在机构间联模式下返回，其它场景下不返回该字段；
     * @return settlementId
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "2018101610032004620239146945", value = "支付清算编号，用于清算对账使用； 只在机构间联模式下返回，其它场景下不返回该字段；")
  
    public String getSettlementId() {
      return settlementId;
    }
  
  
    public void setSettlementId(String settlementId) {
      this.settlementId = settlementId;
    }
  
  
    public AlipayTradePayResponseModel storeName(String storeName) {
      
      this.storeName = storeName;
      return this;
    }
  
     /**
     * 发生支付交易的商户门店名称
     * @return storeName
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "证大五道口店", value = "发生支付交易的商户门店名称")
  
    public String getStoreName() {
      return storeName;
    }
  
  
    public void setStoreName(String storeName) {
      this.storeName = storeName;
    }
  
  
    public AlipayTradePayResponseModel tapPayInfo(TapPayInfo tapPayInfo) {
      
      this.tapPayInfo = tapPayInfo;
      return this;
    }
  
     /**
     * Get tapPayInfo
     * @return tapPayInfo
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(value = "")
  
    public TapPayInfo getTapPayInfo() {
      return tapPayInfo;
    }
  
  
    public void setTapPayInfo(TapPayInfo tapPayInfo) {
      this.tapPayInfo = tapPayInfo;
    }
  
  
    public AlipayTradePayResponseModel totalAmount(String totalAmount) {
      
      this.totalAmount = totalAmount;
      return this;
    }
  
     /**
     * 交易金额
     * @return totalAmount
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "120.88", value = "交易金额")
  
    public String getTotalAmount() {
      return totalAmount;
    }
  
  
    public void setTotalAmount(String totalAmount) {
      this.totalAmount = totalAmount;
    }
  
  
    public AlipayTradePayResponseModel tradeNo(String tradeNo) {
      
      this.tradeNo = tradeNo;
      return this;
    }
  
     /**
     * 支付宝交易号
     * @return tradeNo
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "2013112011001004330000121536", value = "支付宝交易号")
  
    public String getTradeNo() {
      return tradeNo;
    }
  
  
    public void setTradeNo(String tradeNo) {
      this.tradeNo = tradeNo;
    }
  
  
    public AlipayTradePayResponseModel transCurrency(String transCurrency) {
      
      this.transCurrency = transCurrency;
      return this;
    }
  
     /**
     * 标价币种, total_amount对应的币种单位。目前支持英镑：GBP、港币：HKD、美元：USD、新加坡元：SGD、日元：JPY、加拿大元：CAD、澳元：AUD、欧元：EUR、新西兰元：NZD、韩元：KRW、泰铢：THB、瑞士法郎：CHF、瑞典克朗：SEK、丹麦克朗：DKK、挪威克朗：NOK、马来西亚林吉特：MYR、印尼卢比：IDR、菲律宾比索：PHP、毛里求斯卢比：MUR、以色列新谢克尔：ILS、斯里兰卡卢比：LKR、俄罗斯卢布：RUB、阿联酋迪拉姆：AED、捷克克朗：CZK、南非兰特：ZAR、人民币：CNY
     * @return transCurrency
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "USD", value = "标价币种, total_amount对应的币种单位。目前支持英镑：GBP、港币：HKD、美元：USD、新加坡元：SGD、日元：JPY、加拿大元：CAD、澳元：AUD、欧元：EUR、新西兰元：NZD、韩元：KRW、泰铢：THB、瑞士法郎：CHF、瑞典克朗：SEK、丹麦克朗：DKK、挪威克朗：NOK、马来西亚林吉特：MYR、印尼卢比：IDR、菲律宾比索：PHP、毛里求斯卢比：MUR、以色列新谢克尔：ILS、斯里兰卡卢比：LKR、俄罗斯卢布：RUB、阿联酋迪拉姆：AED、捷克克朗：CZK、南非兰特：ZAR、人民币：CNY")
  
    public String getTransCurrency() {
      return transCurrency;
    }
  
  
    public void setTransCurrency(String transCurrency) {
      this.transCurrency = transCurrency;
    }
  
  
    public AlipayTradePayResponseModel transPayRate(String transPayRate) {
      
      this.transPayRate = transPayRate;
      return this;
    }
  
     /**
     * 标价币种兑换支付币种汇率
     * @return transPayRate
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "6.5261", value = "标价币种兑换支付币种汇率")
  
    public String getTransPayRate() {
      return transPayRate;
    }
  
  
    public void setTransPayRate(String transPayRate) {
      this.transPayRate = transPayRate;
    }
  
  
    public AlipayTradePayResponseModel voucherDetailList(List<VoucherDetail> voucherDetailList) {
      
      this.voucherDetailList = voucherDetailList;
      return this;
    }
  
    public AlipayTradePayResponseModel addVoucherDetailListItem(VoucherDetail voucherDetailListItem) {
      if (this.voucherDetailList == null) {
        this.voucherDetailList = new ArrayList<>();
      }
      this.voucherDetailList.add(voucherDetailListItem);
      return this;
    }
  
     /**
     * 本交易支付时使用的所有优惠券信息。 只有在query_options中指定时才返回该字段信息。
     * @return voucherDetailList
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(value = "本交易支付时使用的所有优惠券信息。 只有在query_options中指定时才返回该字段信息。")
  
    public List<VoucherDetail> getVoucherDetailList() {
      return voucherDetailList;
    }
  
  
    public void setVoucherDetailList(List<VoucherDetail> voucherDetailList) {
      this.voucherDetailList = voucherDetailList;
    }
  
    /**
     * A container for additional, undeclared properties.
     * This is a holder for any undeclared properties as specified with
     * the 'additionalProperties' keyword in the OAS document.
     */
    private Map<String, Object> additionalProperties;
  
    /**
     * Set the additional (undeclared) property with the specified name and value.
     * If the property does not already exist, create it otherwise replace it.
     *
     * @param key name of the property
     * @param value value of the property
     * @return the AlipayTradePayResponseModel instance itself
     */
    public AlipayTradePayResponseModel putAdditionalProperty(String key, Object value) {
      if (this.additionalProperties == null) {
          this.additionalProperties = new HashMap<String, Object>();
      }
      this.additionalProperties.put(key, value);
      return this;
    }
  
    /**
     * Return the additional (undeclared) property.
     *
     * @return a map of objects
     */
    public Map<String, Object> getAdditionalProperties() {
      return additionalProperties;
    }
  
    /**
     * Return the additional (undeclared) property with the specified name.
     *
     * @param key name of the property
     * @return an object
     */
    public Object getAdditionalProperty(String key) {
      if (this.additionalProperties == null) {
          return null;
      }
      return this.additionalProperties.get(key);
    }
  
  
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      AlipayTradePayResponseModel alipayTradePayResponseModel = (AlipayTradePayResponseModel) o;
      return Objects.equals(this.advanceAmount, alipayTradePayResponseModel.advanceAmount) &&
          Objects.equals(this.asyncPayApplyStatus, alipayTradePayResponseModel.asyncPayApplyStatus) &&
          Objects.equals(this.asyncPaymentMode, alipayTradePayResponseModel.asyncPaymentMode) &&
          Objects.equals(this.authTradePayMode, alipayTradePayResponseModel.authTradePayMode) &&
          Objects.equals(this.bkagentRespInfo, alipayTradePayResponseModel.bkagentRespInfo) &&
          Objects.equals(this.businessParams, alipayTradePayResponseModel.businessParams) &&
          Objects.equals(this.buyerLogonId, alipayTradePayResponseModel.buyerLogonId) &&
          Objects.equals(this.buyerOpenId, alipayTradePayResponseModel.buyerOpenId) &&
          Objects.equals(this.buyerPayAmount, alipayTradePayResponseModel.buyerPayAmount) &&
          Objects.equals(this.buyerUserId, alipayTradePayResponseModel.buyerUserId) &&
          Objects.equals(this.buyerUserName, alipayTradePayResponseModel.buyerUserName) &&
          Objects.equals(this.buyerUserType, alipayTradePayResponseModel.buyerUserType) &&
          Objects.equals(this.canTurnToAppPay, alipayTradePayResponseModel.canTurnToAppPay) &&
          Objects.equals(this.cardBalance, alipayTradePayResponseModel.cardBalance) &&
          Objects.equals(this.chargeAmount, alipayTradePayResponseModel.chargeAmount) &&
          Objects.equals(this.chargeFlags, alipayTradePayResponseModel.chargeFlags) &&
          Objects.equals(this.chargeInfoList, alipayTradePayResponseModel.chargeInfoList) &&
          Objects.equals(this.creditBizOrderId, alipayTradePayResponseModel.creditBizOrderId) &&
          Objects.equals(this.creditPayMode, alipayTradePayResponseModel.creditPayMode) &&
          Objects.equals(this.discountAmount, alipayTradePayResponseModel.discountAmount) &&
          Objects.equals(this.discountGoodsDetail, alipayTradePayResponseModel.discountGoodsDetail) &&
          Objects.equals(this.enterprisePayInfo, alipayTradePayResponseModel.enterprisePayInfo) &&
          Objects.equals(this.fundBillList, alipayTradePayResponseModel.fundBillList) &&
          Objects.equals(this.gmtPayment, alipayTradePayResponseModel.gmtPayment) &&
          Objects.equals(this.hybAmount, alipayTradePayResponseModel.hybAmount) &&
          Objects.equals(this.invoiceAmount, alipayTradePayResponseModel.invoiceAmount) &&
          Objects.equals(this.mdiscountAmount, alipayTradePayResponseModel.mdiscountAmount) &&
          Objects.equals(this.openId, alipayTradePayResponseModel.openId) &&
          Objects.equals(this.outTradeNo, alipayTradePayResponseModel.outTradeNo) &&
          Objects.equals(this.payAmount, alipayTradePayResponseModel.payAmount) &&
          Objects.equals(this.payCurrency, alipayTradePayResponseModel.payCurrency) &&
          Objects.equals(this.pointAmount, alipayTradePayResponseModel.pointAmount) &&
          Objects.equals(this.preAuthPayAmount, alipayTradePayResponseModel.preAuthPayAmount) &&
          Objects.equals(this.receiptAmount, alipayTradePayResponseModel.receiptAmount) &&
          Objects.equals(this.receiptCurrencyType, alipayTradePayResponseModel.receiptCurrencyType) &&
          Objects.equals(this.settleAmount, alipayTradePayResponseModel.settleAmount) &&
          Objects.equals(this.settleCurrency, alipayTradePayResponseModel.settleCurrency) &&
          Objects.equals(this.settleTransRate, alipayTradePayResponseModel.settleTransRate) &&
          Objects.equals(this.settlementId, alipayTradePayResponseModel.settlementId) &&
          Objects.equals(this.storeName, alipayTradePayResponseModel.storeName) &&
          Objects.equals(this.tapPayInfo, alipayTradePayResponseModel.tapPayInfo) &&
          Objects.equals(this.totalAmount, alipayTradePayResponseModel.totalAmount) &&
          Objects.equals(this.tradeNo, alipayTradePayResponseModel.tradeNo) &&
          Objects.equals(this.transCurrency, alipayTradePayResponseModel.transCurrency) &&
          Objects.equals(this.transPayRate, alipayTradePayResponseModel.transPayRate) &&
          Objects.equals(this.voucherDetailList, alipayTradePayResponseModel.voucherDetailList)&&
          Objects.equals(this.additionalProperties, alipayTradePayResponseModel.additionalProperties);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(advanceAmount, asyncPayApplyStatus, asyncPaymentMode, authTradePayMode, bkagentRespInfo, businessParams, buyerLogonId, buyerOpenId, buyerPayAmount, buyerUserId, buyerUserName, buyerUserType, canTurnToAppPay, cardBalance, chargeAmount, chargeFlags, chargeInfoList, creditBizOrderId, creditPayMode, discountAmount, discountGoodsDetail, enterprisePayInfo, fundBillList, gmtPayment, hybAmount, invoiceAmount, mdiscountAmount, openId, outTradeNo, payAmount, payCurrency, pointAmount, preAuthPayAmount, receiptAmount, receiptCurrencyType, settleAmount, settleCurrency, settleTransRate, settlementId, storeName, tapPayInfo, totalAmount, tradeNo, transCurrency, transPayRate, voucherDetailList, additionalProperties);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class AlipayTradePayResponseModel {\n");
      sb.append("    advanceAmount: ").append(toIndentedString(advanceAmount)).append("\n");
      sb.append("    asyncPayApplyStatus: ").append(toIndentedString(asyncPayApplyStatus)).append("\n");
      sb.append("    asyncPaymentMode: ").append(toIndentedString(asyncPaymentMode)).append("\n");
      sb.append("    authTradePayMode: ").append(toIndentedString(authTradePayMode)).append("\n");
      sb.append("    bkagentRespInfo: ").append(toIndentedString(bkagentRespInfo)).append("\n");
      sb.append("    businessParams: ").append(toIndentedString(businessParams)).append("\n");
      sb.append("    buyerLogonId: ").append(toIndentedString(buyerLogonId)).append("\n");
      sb.append("    buyerOpenId: ").append(toIndentedString(buyerOpenId)).append("\n");
      sb.append("    buyerPayAmount: ").append(toIndentedString(buyerPayAmount)).append("\n");
      sb.append("    buyerUserId: ").append(toIndentedString(buyerUserId)).append("\n");
      sb.append("    buyerUserName: ").append(toIndentedString(buyerUserName)).append("\n");
      sb.append("    buyerUserType: ").append(toIndentedString(buyerUserType)).append("\n");
      sb.append("    canTurnToAppPay: ").append(toIndentedString(canTurnToAppPay)).append("\n");
      sb.append("    cardBalance: ").append(toIndentedString(cardBalance)).append("\n");
      sb.append("    chargeAmount: ").append(toIndentedString(chargeAmount)).append("\n");
      sb.append("    chargeFlags: ").append(toIndentedString(chargeFlags)).append("\n");
      sb.append("    chargeInfoList: ").append(toIndentedString(chargeInfoList)).append("\n");
      sb.append("    creditBizOrderId: ").append(toIndentedString(creditBizOrderId)).append("\n");
      sb.append("    creditPayMode: ").append(toIndentedString(creditPayMode)).append("\n");
      sb.append("    discountAmount: ").append(toIndentedString(discountAmount)).append("\n");
      sb.append("    discountGoodsDetail: ").append(toIndentedString(discountGoodsDetail)).append("\n");
      sb.append("    enterprisePayInfo: ").append(toIndentedString(enterprisePayInfo)).append("\n");
      sb.append("    fundBillList: ").append(toIndentedString(fundBillList)).append("\n");
      sb.append("    gmtPayment: ").append(toIndentedString(gmtPayment)).append("\n");
      sb.append("    hybAmount: ").append(toIndentedString(hybAmount)).append("\n");
      sb.append("    invoiceAmount: ").append(toIndentedString(invoiceAmount)).append("\n");
      sb.append("    mdiscountAmount: ").append(toIndentedString(mdiscountAmount)).append("\n");
      sb.append("    openId: ").append(toIndentedString(openId)).append("\n");
      sb.append("    outTradeNo: ").append(toIndentedString(outTradeNo)).append("\n");
      sb.append("    payAmount: ").append(toIndentedString(payAmount)).append("\n");
      sb.append("    payCurrency: ").append(toIndentedString(payCurrency)).append("\n");
      sb.append("    pointAmount: ").append(toIndentedString(pointAmount)).append("\n");
      sb.append("    preAuthPayAmount: ").append(toIndentedString(preAuthPayAmount)).append("\n");
      sb.append("    receiptAmount: ").append(toIndentedString(receiptAmount)).append("\n");
      sb.append("    receiptCurrencyType: ").append(toIndentedString(receiptCurrencyType)).append("\n");
      sb.append("    settleAmount: ").append(toIndentedString(settleAmount)).append("\n");
      sb.append("    settleCurrency: ").append(toIndentedString(settleCurrency)).append("\n");
      sb.append("    settleTransRate: ").append(toIndentedString(settleTransRate)).append("\n");
      sb.append("    settlementId: ").append(toIndentedString(settlementId)).append("\n");
      sb.append("    storeName: ").append(toIndentedString(storeName)).append("\n");
      sb.append("    tapPayInfo: ").append(toIndentedString(tapPayInfo)).append("\n");
      sb.append("    totalAmount: ").append(toIndentedString(totalAmount)).append("\n");
      sb.append("    tradeNo: ").append(toIndentedString(tradeNo)).append("\n");
      sb.append("    transCurrency: ").append(toIndentedString(transCurrency)).append("\n");
      sb.append("    transPayRate: ").append(toIndentedString(transPayRate)).append("\n");
      sb.append("    voucherDetailList: ").append(toIndentedString(voucherDetailList)).append("\n");
      sb.append("    additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
      sb.append("}");
      return sb.toString();
    }
  
    /**
     * Convert the given object to string with each line indented by 4 spaces
     * (except the first line).
     */
    private String toIndentedString(Object o) {
      if (o == null) {
        return "null";
      }
      return o.toString().replace("\n", "\n    ");
    }
  
  
    public static HashSet<String> openapiFields;
    public static HashSet<String> openapiRequiredFields;
  
    static {
      // a set of all properties/fields (JSON key names)
      openapiFields = new HashSet<String>();
      openapiFields.add("advance_amount");
      openapiFields.add("async_pay_apply_status");
      openapiFields.add("async_payment_mode");
      openapiFields.add("auth_trade_pay_mode");
      openapiFields.add("bkagent_resp_info");
      openapiFields.add("business_params");
      openapiFields.add("buyer_logon_id");
      openapiFields.add("buyer_open_id");
      openapiFields.add("buyer_pay_amount");
      openapiFields.add("buyer_user_id");
      openapiFields.add("buyer_user_name");
      openapiFields.add("buyer_user_type");
      openapiFields.add("can_turn_to_app_pay");
      openapiFields.add("card_balance");
      openapiFields.add("charge_amount");
      openapiFields.add("charge_flags");
      openapiFields.add("charge_info_list");
      openapiFields.add("credit_biz_order_id");
      openapiFields.add("credit_pay_mode");
      openapiFields.add("discount_amount");
      openapiFields.add("discount_goods_detail");
      openapiFields.add("enterprise_pay_info");
      openapiFields.add("fund_bill_list");
      openapiFields.add("gmt_payment");
      openapiFields.add("hyb_amount");
      openapiFields.add("invoice_amount");
      openapiFields.add("mdiscount_amount");
      openapiFields.add("open_id");
      openapiFields.add("out_trade_no");
      openapiFields.add("pay_amount");
      openapiFields.add("pay_currency");
      openapiFields.add("point_amount");
      openapiFields.add("pre_auth_pay_amount");
      openapiFields.add("receipt_amount");
      openapiFields.add("receipt_currency_type");
      openapiFields.add("settle_amount");
      openapiFields.add("settle_currency");
      openapiFields.add("settle_trans_rate");
      openapiFields.add("settlement_id");
      openapiFields.add("store_name");
      openapiFields.add("tap_pay_info");
      openapiFields.add("total_amount");
      openapiFields.add("trade_no");
      openapiFields.add("trans_currency");
      openapiFields.add("trans_pay_rate");
      openapiFields.add("voucher_detail_list");
  
      // a set of required properties/fields (JSON key names)
      openapiRequiredFields = new HashSet<String>();
    }
  
   /**
    * Validates the JSON Object and throws an exception if issues found
    *
    * @param jsonObj JSON Object
    * @throws IOException if the JSON Object is invalid with respect to AlipayTradePayResponseModel
    */
    public static void validateJsonObject(JsonObject jsonObj) throws IOException {
        if (jsonObj == null) {
          if (AlipayTradePayResponseModel.openapiRequiredFields.isEmpty()) {
            return;
          } else { // has required fields
            throw new IllegalArgumentException(String.format("The required field(s) %s in AlipayTradePayResponseModel is not found in the empty JSON string", AlipayTradePayResponseModel.openapiRequiredFields.toString()));
          }
        }
        if (jsonObj.get("advance_amount") != null && !jsonObj.get("advance_amount").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `advance_amount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("advance_amount").toString()));
        }
        if (jsonObj.get("async_pay_apply_status") != null && !jsonObj.get("async_pay_apply_status").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `async_pay_apply_status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("async_pay_apply_status").toString()));
        }
        if (jsonObj.get("async_payment_mode") != null && !jsonObj.get("async_payment_mode").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `async_payment_mode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("async_payment_mode").toString()));
        }
        if (jsonObj.get("auth_trade_pay_mode") != null && !jsonObj.get("auth_trade_pay_mode").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `auth_trade_pay_mode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("auth_trade_pay_mode").toString()));
        }
        // validate the optional field `bkagent_resp_info`
        if (jsonObj.getAsJsonObject("bkagent_resp_info") != null) {
          BkAgentRespInfo.validateJsonObject(jsonObj.getAsJsonObject("bkagent_resp_info"));
        }
        if (jsonObj.get("business_params") != null && !jsonObj.get("business_params").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `business_params` to be a primitive type in the JSON string but got `%s`", jsonObj.get("business_params").toString()));
        }
        if (jsonObj.get("buyer_logon_id") != null && !jsonObj.get("buyer_logon_id").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `buyer_logon_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("buyer_logon_id").toString()));
        }
        if (jsonObj.get("buyer_open_id") != null && !jsonObj.get("buyer_open_id").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `buyer_open_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("buyer_open_id").toString()));
        }
        if (jsonObj.get("buyer_pay_amount") != null && !jsonObj.get("buyer_pay_amount").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `buyer_pay_amount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("buyer_pay_amount").toString()));
        }
        if (jsonObj.get("buyer_user_id") != null && !jsonObj.get("buyer_user_id").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `buyer_user_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("buyer_user_id").toString()));
        }
        if (jsonObj.get("buyer_user_name") != null && !jsonObj.get("buyer_user_name").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `buyer_user_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("buyer_user_name").toString()));
        }
        if (jsonObj.get("buyer_user_type") != null && !jsonObj.get("buyer_user_type").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `buyer_user_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("buyer_user_type").toString()));
        }
        if (jsonObj.get("can_turn_to_app_pay") != null && !jsonObj.get("can_turn_to_app_pay").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `can_turn_to_app_pay` to be a primitive type in the JSON string but got `%s`", jsonObj.get("can_turn_to_app_pay").toString()));
        }
        if (jsonObj.get("card_balance") != null && !jsonObj.get("card_balance").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `card_balance` to be a primitive type in the JSON string but got `%s`", jsonObj.get("card_balance").toString()));
        }
        if (jsonObj.get("charge_amount") != null && !jsonObj.get("charge_amount").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `charge_amount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("charge_amount").toString()));
        }
        if (jsonObj.get("charge_flags") != null && !jsonObj.get("charge_flags").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `charge_flags` to be a primitive type in the JSON string but got `%s`", jsonObj.get("charge_flags").toString()));
        }
        // validate the optional field `charge_info_list`
        if (jsonObj.getAsJsonObject("charge_info_list") != null) {
          ChargeInfo.validateJsonObject(jsonObj.getAsJsonObject("charge_info_list"));
        }
        if (jsonObj.get("credit_biz_order_id") != null && !jsonObj.get("credit_biz_order_id").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `credit_biz_order_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("credit_biz_order_id").toString()));
        }
        if (jsonObj.get("credit_pay_mode") != null && !jsonObj.get("credit_pay_mode").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `credit_pay_mode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("credit_pay_mode").toString()));
        }
        if (jsonObj.get("discount_amount") != null && !jsonObj.get("discount_amount").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `discount_amount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("discount_amount").toString()));
        }
        if (jsonObj.get("discount_goods_detail") != null && !jsonObj.get("discount_goods_detail").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `discount_goods_detail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("discount_goods_detail").toString()));
        }
        // validate the optional field `enterprise_pay_info`
        if (jsonObj.getAsJsonObject("enterprise_pay_info") != null) {
          EnterprisePayInfo.validateJsonObject(jsonObj.getAsJsonObject("enterprise_pay_info"));
        }
        JsonArray jsonArrayfundBillList = jsonObj.getAsJsonArray("fund_bill_list");
        if (jsonArrayfundBillList != null) {
          // ensure the json data is an array
          if (!jsonObj.get("fund_bill_list").isJsonArray()) {
            throw new IllegalArgumentException(String.format("Expected the field `fund_bill_list` to be an array in the JSON string but got `%s`", jsonObj.get("fund_bill_list").toString()));
          }
  
          // validate the optional field `fund_bill_list` (array)
          for (int i = 0; i < jsonArrayfundBillList.size(); i++) {
            TradeFundBill.validateJsonObject(jsonArrayfundBillList.get(i).getAsJsonObject());
          };
        }
        if (jsonObj.get("gmt_payment") != null && !jsonObj.get("gmt_payment").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `gmt_payment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("gmt_payment").toString()));
        }
        if (jsonObj.get("hyb_amount") != null && !jsonObj.get("hyb_amount").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `hyb_amount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hyb_amount").toString()));
        }
        if (jsonObj.get("invoice_amount") != null && !jsonObj.get("invoice_amount").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `invoice_amount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoice_amount").toString()));
        }
        if (jsonObj.get("mdiscount_amount") != null && !jsonObj.get("mdiscount_amount").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `mdiscount_amount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mdiscount_amount").toString()));
        }
        if (jsonObj.get("open_id") != null && !jsonObj.get("open_id").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `open_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("open_id").toString()));
        }
        if (jsonObj.get("out_trade_no") != null && !jsonObj.get("out_trade_no").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `out_trade_no` to be a primitive type in the JSON string but got `%s`", jsonObj.get("out_trade_no").toString()));
        }
        if (jsonObj.get("pay_amount") != null && !jsonObj.get("pay_amount").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `pay_amount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pay_amount").toString()));
        }
        if (jsonObj.get("pay_currency") != null && !jsonObj.get("pay_currency").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `pay_currency` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pay_currency").toString()));
        }
        if (jsonObj.get("point_amount") != null && !jsonObj.get("point_amount").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `point_amount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("point_amount").toString()));
        }
        if (jsonObj.get("pre_auth_pay_amount") != null && !jsonObj.get("pre_auth_pay_amount").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `pre_auth_pay_amount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pre_auth_pay_amount").toString()));
        }
        if (jsonObj.get("receipt_amount") != null && !jsonObj.get("receipt_amount").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `receipt_amount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("receipt_amount").toString()));
        }
        if (jsonObj.get("receipt_currency_type") != null && !jsonObj.get("receipt_currency_type").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `receipt_currency_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("receipt_currency_type").toString()));
        }
        if (jsonObj.get("settle_amount") != null && !jsonObj.get("settle_amount").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `settle_amount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("settle_amount").toString()));
        }
        if (jsonObj.get("settle_currency") != null && !jsonObj.get("settle_currency").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `settle_currency` to be a primitive type in the JSON string but got `%s`", jsonObj.get("settle_currency").toString()));
        }
        if (jsonObj.get("settle_trans_rate") != null && !jsonObj.get("settle_trans_rate").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `settle_trans_rate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("settle_trans_rate").toString()));
        }
        if (jsonObj.get("settlement_id") != null && !jsonObj.get("settlement_id").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `settlement_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("settlement_id").toString()));
        }
        if (jsonObj.get("store_name") != null && !jsonObj.get("store_name").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `store_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("store_name").toString()));
        }
        // validate the optional field `tap_pay_info`
        if (jsonObj.getAsJsonObject("tap_pay_info") != null) {
          TapPayInfo.validateJsonObject(jsonObj.getAsJsonObject("tap_pay_info"));
        }
        if (jsonObj.get("total_amount") != null && !jsonObj.get("total_amount").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `total_amount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("total_amount").toString()));
        }
        if (jsonObj.get("trade_no") != null && !jsonObj.get("trade_no").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `trade_no` to be a primitive type in the JSON string but got `%s`", jsonObj.get("trade_no").toString()));
        }
        if (jsonObj.get("trans_currency") != null && !jsonObj.get("trans_currency").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `trans_currency` to be a primitive type in the JSON string but got `%s`", jsonObj.get("trans_currency").toString()));
        }
        if (jsonObj.get("trans_pay_rate") != null && !jsonObj.get("trans_pay_rate").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `trans_pay_rate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("trans_pay_rate").toString()));
        }
        JsonArray jsonArrayvoucherDetailList = jsonObj.getAsJsonArray("voucher_detail_list");
        if (jsonArrayvoucherDetailList != null) {
          // ensure the json data is an array
          if (!jsonObj.get("voucher_detail_list").isJsonArray()) {
            throw new IllegalArgumentException(String.format("Expected the field `voucher_detail_list` to be an array in the JSON string but got `%s`", jsonObj.get("voucher_detail_list").toString()));
          }
  
          // validate the optional field `voucher_detail_list` (array)
          for (int i = 0; i < jsonArrayvoucherDetailList.size(); i++) {
            VoucherDetail.validateJsonObject(jsonArrayvoucherDetailList.get(i).getAsJsonObject());
          };
        }
    }
  
    public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
      @SuppressWarnings("unchecked")
      @Override
      public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
         if (!AlipayTradePayResponseModel.class.isAssignableFrom(type.getRawType())) {
           return null; // this class only serializes 'AlipayTradePayResponseModel' and its subtypes
         }
         final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class);
         final TypeAdapter<AlipayTradePayResponseModel> thisAdapter
                          = gson.getDelegateAdapter(this, TypeToken.get(AlipayTradePayResponseModel.class));
  
         return (TypeAdapter<T>) new TypeAdapter<AlipayTradePayResponseModel>() {
             @Override
             public void write(JsonWriter out, AlipayTradePayResponseModel value) throws IOException {
               JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
               obj.remove("additionalProperties");
               // serialize additonal properties
               if (value.getAdditionalProperties() != null) {
                 for (Map.Entry<String, Object> entry : value.getAdditionalProperties().entrySet()) {
                   if (entry.getValue() instanceof String)
                     obj.addProperty(entry.getKey(), (String) entry.getValue());
                   else if (entry.getValue() instanceof Number)
                     obj.addProperty(entry.getKey(), (Number) entry.getValue());
                   else if (entry.getValue() instanceof Boolean)
                     obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
                   else if (entry.getValue() instanceof Character)
                     obj.addProperty(entry.getKey(), (Character) entry.getValue());
                   else {
                     obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject());
                   }
                 }
               }
               elementAdapter.write(out, obj);
             }
  
             @Override
             public AlipayTradePayResponseModel read(JsonReader in) throws IOException {
               JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
               validateJsonObject(jsonObj);
               // store additional fields in the deserialized instance
               AlipayTradePayResponseModel instance = thisAdapter.fromJsonTree(jsonObj);
               for (Map.Entry<String, JsonElement> entry : jsonObj.entrySet()) {
                 if (!openapiFields.contains(entry.getKey())) {
                   if (entry.getValue().isJsonPrimitive()) { // primitive type
                     if (entry.getValue().getAsJsonPrimitive().isString())
                       instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
                     else if (entry.getValue().getAsJsonPrimitive().isNumber())
                       instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
                     else if (entry.getValue().getAsJsonPrimitive().isBoolean())
                       instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
                     else
                       throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
                   } else { // non-primitive type
                     instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
                   }
                 }
               }
               return instance;
             }
  
         }.nullSafe();
      }
    }
  
   /**
    * Create an instance of AlipayTradePayResponseModel given an JSON string
    *
    * @param jsonString JSON string
    * @return An instance of AlipayTradePayResponseModel
    * @throws IOException if the JSON string is invalid with respect to AlipayTradePayResponseModel
    */
    public static AlipayTradePayResponseModel fromJson(String jsonString) throws IOException {
      return JSON.getGson().fromJson(jsonString, AlipayTradePayResponseModel.class);
    }
  
   /**
    * Convert an instance of AlipayTradePayResponseModel to an JSON string
    *
    * @return JSON string
    */
    public String toJson() {
      return JSON.getGson().toJson(this);
    }
  }
  
  