All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.alipay.v3.model.AlipayFundTransCommonQueryResponseModel Maven / Gradle / Ivy

There is a newer version: 3.1.6.ALL
Show newest version
/*
 * 支付宝开放平台API
 * 支付宝开放平台v3协议文档
 *
 * The version of the OpenAPI document: 2024-01-12
 * 
 *
 * 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.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 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;

/**
 * AlipayFundTransCommonQueryResponseModel
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class AlipayFundTransCommonQueryResponseModel {
  public static final String SERIALIZED_NAME_ARRIVAL_TIME_END = "arrival_time_end";
  @SerializedName(SERIALIZED_NAME_ARRIVAL_TIME_END)
  private String arrivalTimeEnd;

  public static final String SERIALIZED_NAME_DEDUCT_BILL_INFO = "deduct_bill_info";
  @SerializedName(SERIALIZED_NAME_DEDUCT_BILL_INFO)
  private String deductBillInfo;

  public static final String SERIALIZED_NAME_ERROR_CODE = "error_code";
  @SerializedName(SERIALIZED_NAME_ERROR_CODE)
  private String errorCode;

  public static final String SERIALIZED_NAME_FAIL_REASON = "fail_reason";
  @SerializedName(SERIALIZED_NAME_FAIL_REASON)
  private String failReason;

  public static final String SERIALIZED_NAME_ORDER_FEE = "order_fee";
  @SerializedName(SERIALIZED_NAME_ORDER_FEE)
  private String orderFee;

  public static final String SERIALIZED_NAME_ORDER_ID = "order_id";
  @SerializedName(SERIALIZED_NAME_ORDER_ID)
  private String orderId;

  public static final String SERIALIZED_NAME_OUT_BIZ_NO = "out_biz_no";
  @SerializedName(SERIALIZED_NAME_OUT_BIZ_NO)
  private String outBizNo;

  public static final String SERIALIZED_NAME_PASSBACK_PARAMS = "passback_params";
  @SerializedName(SERIALIZED_NAME_PASSBACK_PARAMS)
  private String passbackParams;

  public static final String SERIALIZED_NAME_PAY_DATE = "pay_date";
  @SerializedName(SERIALIZED_NAME_PAY_DATE)
  private String payDate;

  public static final String SERIALIZED_NAME_PAY_FUND_ORDER_ID = "pay_fund_order_id";
  @SerializedName(SERIALIZED_NAME_PAY_FUND_ORDER_ID)
  private String payFundOrderId;

  public static final String SERIALIZED_NAME_SETTLE_SERIAL_NO = "settle_serial_no";
  @SerializedName(SERIALIZED_NAME_SETTLE_SERIAL_NO)
  private String settleSerialNo;

  public static final String SERIALIZED_NAME_STATUS = "status";
  @SerializedName(SERIALIZED_NAME_STATUS)
  private String status;

  public static final String SERIALIZED_NAME_SUB_ORDER_ERROR_CODE = "sub_order_error_code";
  @SerializedName(SERIALIZED_NAME_SUB_ORDER_ERROR_CODE)
  private String subOrderErrorCode;

  public static final String SERIALIZED_NAME_SUB_ORDER_FAIL_REASON = "sub_order_fail_reason";
  @SerializedName(SERIALIZED_NAME_SUB_ORDER_FAIL_REASON)
  private String subOrderFailReason;

  public static final String SERIALIZED_NAME_SUB_ORDER_STATUS = "sub_order_status";
  @SerializedName(SERIALIZED_NAME_SUB_ORDER_STATUS)
  private String subOrderStatus;

  public static final String SERIALIZED_NAME_TRANS_AMOUNT = "trans_amount";
  @SerializedName(SERIALIZED_NAME_TRANS_AMOUNT)
  private String transAmount;

  public static final String SERIALIZED_NAME_TRANSFER_BILL_INFO = "transfer_bill_info";
  @SerializedName(SERIALIZED_NAME_TRANSFER_BILL_INFO)
  private String transferBillInfo;

  public AlipayFundTransCommonQueryResponseModel() { 
  }

  public AlipayFundTransCommonQueryResponseModel arrivalTimeEnd(String arrivalTimeEnd) {
    
    this.arrivalTimeEnd = arrivalTimeEnd;
    return this;
  }

   /**
   * 预计到账时间,转账到银行卡专用,格式为yyyy-MM-dd HH:mm:ss,转账受理失败不返回。  注意:  此参数为预计时间,可能与实际到账时间有较大误差,不能作为实际到账时间使用,仅供参考用途。
   * @return arrivalTimeEnd
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "2013-01-01 08:08:08", value = "预计到账时间,转账到银行卡专用,格式为yyyy-MM-dd HH:mm:ss,转账受理失败不返回。  注意:  此参数为预计时间,可能与实际到账时间有较大误差,不能作为实际到账时间使用,仅供参考用途。")

  public String getArrivalTimeEnd() {
    return arrivalTimeEnd;
  }


  public void setArrivalTimeEnd(String arrivalTimeEnd) {
    this.arrivalTimeEnd = arrivalTimeEnd;
  }


  public AlipayFundTransCommonQueryResponseModel deductBillInfo(String deductBillInfo) {
    
    this.deductBillInfo = deductBillInfo;
    return this;
  }

   /**
   * 商户查询代扣订单信息时返回其在代扣请求中传入的账单属性
   * @return deductBillInfo
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "{\"bizDesc\":\"代扣账单属性\",\"bizNos\":\"M{529316162343612472}\",\"billSource\":\"账房\",\"bizOrigNo\":\"529316162343612472\",\"reqSystem\":\"PointCenter\"}", value = "商户查询代扣订单信息时返回其在代扣请求中传入的账单属性")

  public String getDeductBillInfo() {
    return deductBillInfo;
  }


  public void setDeductBillInfo(String deductBillInfo) {
    this.deductBillInfo = deductBillInfo;
  }


  public AlipayFundTransCommonQueryResponseModel errorCode(String errorCode) {
    
    this.errorCode = errorCode;
    return this;
  }

   /**
   * 查询到的订单状态为FAIL失败或REFUND退票时,返回错误代码
   * @return errorCode
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "PAYEE_CARD_INFO_ERROR", value = "查询到的订单状态为FAIL失败或REFUND退票时,返回错误代码")

  public String getErrorCode() {
    return errorCode;
  }


  public void setErrorCode(String errorCode) {
    this.errorCode = errorCode;
  }


  public AlipayFundTransCommonQueryResponseModel failReason(String failReason) {
    
    this.failReason = failReason;
    return this;
  }

   /**
   * 查询到的订单状态为FAIL失败或REFUND退票时,返回具体的原因。
   * @return failReason
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "收款方银行卡信息有误", value = "查询到的订单状态为FAIL失败或REFUND退票时,返回具体的原因。")

  public String getFailReason() {
    return failReason;
  }


  public void setFailReason(String failReason) {
    this.failReason = failReason;
  }


  public AlipayFundTransCommonQueryResponseModel orderFee(String orderFee) {
    
    this.orderFee = orderFee;
    return this;
  }

   /**
   * 预计收费金额(元),转账到银行卡专用,数字格式,精确到小数点后2位,转账失败或转账受理失败不返回。
   * @return orderFee
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "0.02", value = "预计收费金额(元),转账到银行卡专用,数字格式,精确到小数点后2位,转账失败或转账受理失败不返回。")

  public String getOrderFee() {
    return orderFee;
  }


  public void setOrderFee(String orderFee) {
    this.orderFee = orderFee;
  }


  public AlipayFundTransCommonQueryResponseModel orderId(String orderId) {
    
    this.orderId = orderId;
    return this;
  }

   /**
   * 支付宝转账单据号,查询失败不返回。
   * @return orderId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "20190801110070000006380000250621", value = "支付宝转账单据号,查询失败不返回。")

  public String getOrderId() {
    return orderId;
  }


  public void setOrderId(String orderId) {
    this.orderId = orderId;
  }


  public AlipayFundTransCommonQueryResponseModel outBizNo(String outBizNo) {
    
    this.outBizNo = outBizNo;
    return this;
  }

   /**
   * 商户订单号
   * @return outBizNo
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "201808080001", value = "商户订单号")

  public String getOutBizNo() {
    return outBizNo;
  }


  public void setOutBizNo(String outBizNo) {
    this.outBizNo = outBizNo;
  }


  public AlipayFundTransCommonQueryResponseModel passbackParams(String passbackParams) {
    
    this.passbackParams = passbackParams;
    return this;
  }

   /**
   * 商户回传参数
   * @return passbackParams
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "{\"merchantBizType\":\"peerPay\"}", value = "商户回传参数")

  public String getPassbackParams() {
    return passbackParams;
  }


  public void setPassbackParams(String passbackParams) {
    this.passbackParams = passbackParams;
  }


  public AlipayFundTransCommonQueryResponseModel payDate(String payDate) {
    
    this.payDate = payDate;
    return this;
  }

   /**
   * 支付时间,格式为yyyy-MM-dd HH:mm:ss,转账失败不返回。
   * @return payDate
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "2013-01-01 08:08:08", value = "支付时间,格式为yyyy-MM-dd HH:mm:ss,转账失败不返回。")

  public String getPayDate() {
    return payDate;
  }


  public void setPayDate(String payDate) {
    this.payDate = payDate;
  }


  public AlipayFundTransCommonQueryResponseModel payFundOrderId(String payFundOrderId) {
    
    this.payFundOrderId = payFundOrderId;
    return this;
  }

   /**
   * 支付宝支付资金流水号,转账失败不返回。
   * @return payFundOrderId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "20190801110070001506380000251556", value = "支付宝支付资金流水号,转账失败不返回。")

  public String getPayFundOrderId() {
    return payFundOrderId;
  }


  public void setPayFundOrderId(String payFundOrderId) {
    this.payFundOrderId = payFundOrderId;
  }


  public AlipayFundTransCommonQueryResponseModel settleSerialNo(String settleSerialNo) {
    
    this.settleSerialNo = settleSerialNo;
    return this;
  }

   /**
   * 金融机构发起签约类、支付类、差错类业务时,应为每笔业务分配唯一的交易流水号。31位交易流水号组成规则为:“8位日期”+“16位序列号”+“1位预留位”+“6位控制位”,其中: a)“8位日期”为系统当前日期,ISODate格式:“YYYYMMDD” b)“16位序列号”由金融机构生成,金融机构应确保该值在网联当日唯一 c)“1位预留位”由平台分配 d)“6位控制位”由金融机构通过平台获取 例如:2023052993044491260542090100400
   * @return settleSerialNo
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "2023052993044491260542090100400", value = "金融机构发起签约类、支付类、差错类业务时,应为每笔业务分配唯一的交易流水号。31位交易流水号组成规则为:“8位日期”+“16位序列号”+“1位预留位”+“6位控制位”,其中: a)“8位日期”为系统当前日期,ISODate格式:“YYYYMMDD” b)“16位序列号”由金融机构生成,金融机构应确保该值在网联当日唯一 c)“1位预留位”由平台分配 d)“6位控制位”由金融机构通过平台获取 例如:2023052993044491260542090100400")

  public String getSettleSerialNo() {
    return settleSerialNo;
  }


  public void setSettleSerialNo(String settleSerialNo) {
    this.settleSerialNo = settleSerialNo;
  }


  public AlipayFundTransCommonQueryResponseModel status(String status) {
    
    this.status = status;
    return this;
  }

   /**
   * 转账单据状态。可能出现的状态如下: SUCCESS:转账成功; WAIT_PAY:等待支付; CLOSED:订单超时关闭; FAIL:失败(适用于\"单笔转账到银行卡\"); DEALING:处理中(适用于\"单笔转账到银行卡\"); REFUND:退票(适用于\"单笔转账到银行卡\"); alipay.fund.trans.app.pay涉及的状态: WAIT_PAY、SUCCESS、CLOSED alipay.fund.trans.refund涉及的状态:SUCCESS alipay.fund.trans.uni.transfer涉及的状态:SUCCESS、FAIL、DEALING、REFUND
   * @return status
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "SUCCESS", value = "转账单据状态。可能出现的状态如下: SUCCESS:转账成功; WAIT_PAY:等待支付; CLOSED:订单超时关闭; FAIL:失败(适用于\"单笔转账到银行卡\"); DEALING:处理中(适用于\"单笔转账到银行卡\"); REFUND:退票(适用于\"单笔转账到银行卡\"); alipay.fund.trans.app.pay涉及的状态: WAIT_PAY、SUCCESS、CLOSED alipay.fund.trans.refund涉及的状态:SUCCESS alipay.fund.trans.uni.transfer涉及的状态:SUCCESS、FAIL、DEALING、REFUND")

  public String getStatus() {
    return status;
  }


  public void setStatus(String status) {
    this.status = status;
  }


  public AlipayFundTransCommonQueryResponseModel subOrderErrorCode(String subOrderErrorCode) {
    
    this.subOrderErrorCode = subOrderErrorCode;
    return this;
  }

   /**
   * 特殊场景提供,当子单出现异常导致主单失败或者退款时,会提供此字段,用于透出子单具体的错误场景
   * @return subOrderErrorCode
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "MID_ACCOUNT_CARD_INFO_ERROR", value = "特殊场景提供,当子单出现异常导致主单失败或者退款时,会提供此字段,用于透出子单具体的错误场景")

  public String getSubOrderErrorCode() {
    return subOrderErrorCode;
  }


  public void setSubOrderErrorCode(String subOrderErrorCode) {
    this.subOrderErrorCode = subOrderErrorCode;
  }


  public AlipayFundTransCommonQueryResponseModel subOrderFailReason(String subOrderFailReason) {
    
    this.subOrderFailReason = subOrderFailReason;
    return this;
  }

   /**
   * 特殊场景提供,当子单出现异常导致主单失败或者退款时,会提供此字段,用于透出子单具体的错误场景
   * @return subOrderFailReason
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "收款方银行卡信息有误", value = "特殊场景提供,当子单出现异常导致主单失败或者退款时,会提供此字段,用于透出子单具体的错误场景")

  public String getSubOrderFailReason() {
    return subOrderFailReason;
  }


  public void setSubOrderFailReason(String subOrderFailReason) {
    this.subOrderFailReason = subOrderFailReason;
  }


  public AlipayFundTransCommonQueryResponseModel subOrderStatus(String subOrderStatus) {
    
    this.subOrderStatus = subOrderStatus;
    return this;
  }

   /**
   * 退款子单失败状态
   * @return subOrderStatus
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "FAIL", value = "退款子单失败状态")

  public String getSubOrderStatus() {
    return subOrderStatus;
  }


  public void setSubOrderStatus(String subOrderStatus) {
    this.subOrderStatus = subOrderStatus;
  }


  public AlipayFundTransCommonQueryResponseModel transAmount(String transAmount) {
    
    this.transAmount = transAmount;
    return this;
  }

   /**
   * 付款金额,收银台场景下付款成功后的支付金额,订单状态为SUCCESS才返回,其他状态不返回。付款金额,单位为元,精确到小数点后两位。
   * @return transAmount
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "32.00", value = "付款金额,收银台场景下付款成功后的支付金额,订单状态为SUCCESS才返回,其他状态不返回。付款金额,单位为元,精确到小数点后两位。")

  public String getTransAmount() {
    return transAmount;
  }


  public void setTransAmount(String transAmount) {
    this.transAmount = transAmount;
  }


  public AlipayFundTransCommonQueryResponseModel transferBillInfo(String transferBillInfo) {
    
    this.transferBillInfo = transferBillInfo;
    return this;
  }

   /**
   * 商户在查询代发订单信息时返回其在代发请求中传入的账单属性。
   * @return transferBillInfo
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "{\"bizDesc\":\"代扣账单属性\",\"bizNos\":\"M{529316162343612472}\",\"billSource\":\"账房\",\"bizOrigNo\":\"529316162343612472\",\"reqSystem\":\"PointCenter\"}", value = "商户在查询代发订单信息时返回其在代发请求中传入的账单属性。")

  public String getTransferBillInfo() {
    return transferBillInfo;
  }


  public void setTransferBillInfo(String transferBillInfo) {
    this.transferBillInfo = transferBillInfo;
  }

  /**
   * 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 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 AlipayFundTransCommonQueryResponseModel instance itself
   */
  public AlipayFundTransCommonQueryResponseModel putAdditionalProperty(String key, Object value) {
    if (this.additionalProperties == null) {
        this.additionalProperties = new HashMap();
    }
    this.additionalProperties.put(key, value);
    return this;
  }

  /**
   * Return the additional (undeclared) property.
   *
   * @return a map of objects
   */
  public Map 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;
    }
    AlipayFundTransCommonQueryResponseModel alipayFundTransCommonQueryResponseModel = (AlipayFundTransCommonQueryResponseModel) o;
    return Objects.equals(this.arrivalTimeEnd, alipayFundTransCommonQueryResponseModel.arrivalTimeEnd) &&
        Objects.equals(this.deductBillInfo, alipayFundTransCommonQueryResponseModel.deductBillInfo) &&
        Objects.equals(this.errorCode, alipayFundTransCommonQueryResponseModel.errorCode) &&
        Objects.equals(this.failReason, alipayFundTransCommonQueryResponseModel.failReason) &&
        Objects.equals(this.orderFee, alipayFundTransCommonQueryResponseModel.orderFee) &&
        Objects.equals(this.orderId, alipayFundTransCommonQueryResponseModel.orderId) &&
        Objects.equals(this.outBizNo, alipayFundTransCommonQueryResponseModel.outBizNo) &&
        Objects.equals(this.passbackParams, alipayFundTransCommonQueryResponseModel.passbackParams) &&
        Objects.equals(this.payDate, alipayFundTransCommonQueryResponseModel.payDate) &&
        Objects.equals(this.payFundOrderId, alipayFundTransCommonQueryResponseModel.payFundOrderId) &&
        Objects.equals(this.settleSerialNo, alipayFundTransCommonQueryResponseModel.settleSerialNo) &&
        Objects.equals(this.status, alipayFundTransCommonQueryResponseModel.status) &&
        Objects.equals(this.subOrderErrorCode, alipayFundTransCommonQueryResponseModel.subOrderErrorCode) &&
        Objects.equals(this.subOrderFailReason, alipayFundTransCommonQueryResponseModel.subOrderFailReason) &&
        Objects.equals(this.subOrderStatus, alipayFundTransCommonQueryResponseModel.subOrderStatus) &&
        Objects.equals(this.transAmount, alipayFundTransCommonQueryResponseModel.transAmount) &&
        Objects.equals(this.transferBillInfo, alipayFundTransCommonQueryResponseModel.transferBillInfo)&&
        Objects.equals(this.additionalProperties, alipayFundTransCommonQueryResponseModel.additionalProperties);
  }

  @Override
  public int hashCode() {
    return Objects.hash(arrivalTimeEnd, deductBillInfo, errorCode, failReason, orderFee, orderId, outBizNo, passbackParams, payDate, payFundOrderId, settleSerialNo, status, subOrderErrorCode, subOrderFailReason, subOrderStatus, transAmount, transferBillInfo, additionalProperties);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class AlipayFundTransCommonQueryResponseModel {\n");
    sb.append("    arrivalTimeEnd: ").append(toIndentedString(arrivalTimeEnd)).append("\n");
    sb.append("    deductBillInfo: ").append(toIndentedString(deductBillInfo)).append("\n");
    sb.append("    errorCode: ").append(toIndentedString(errorCode)).append("\n");
    sb.append("    failReason: ").append(toIndentedString(failReason)).append("\n");
    sb.append("    orderFee: ").append(toIndentedString(orderFee)).append("\n");
    sb.append("    orderId: ").append(toIndentedString(orderId)).append("\n");
    sb.append("    outBizNo: ").append(toIndentedString(outBizNo)).append("\n");
    sb.append("    passbackParams: ").append(toIndentedString(passbackParams)).append("\n");
    sb.append("    payDate: ").append(toIndentedString(payDate)).append("\n");
    sb.append("    payFundOrderId: ").append(toIndentedString(payFundOrderId)).append("\n");
    sb.append("    settleSerialNo: ").append(toIndentedString(settleSerialNo)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
    sb.append("    subOrderErrorCode: ").append(toIndentedString(subOrderErrorCode)).append("\n");
    sb.append("    subOrderFailReason: ").append(toIndentedString(subOrderFailReason)).append("\n");
    sb.append("    subOrderStatus: ").append(toIndentedString(subOrderStatus)).append("\n");
    sb.append("    transAmount: ").append(toIndentedString(transAmount)).append("\n");
    sb.append("    transferBillInfo: ").append(toIndentedString(transferBillInfo)).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 openapiFields;
  public static HashSet openapiRequiredFields;

  static {
    // a set of all properties/fields (JSON key names)
    openapiFields = new HashSet();
    openapiFields.add("arrival_time_end");
    openapiFields.add("deduct_bill_info");
    openapiFields.add("error_code");
    openapiFields.add("fail_reason");
    openapiFields.add("order_fee");
    openapiFields.add("order_id");
    openapiFields.add("out_biz_no");
    openapiFields.add("passback_params");
    openapiFields.add("pay_date");
    openapiFields.add("pay_fund_order_id");
    openapiFields.add("settle_serial_no");
    openapiFields.add("status");
    openapiFields.add("sub_order_error_code");
    openapiFields.add("sub_order_fail_reason");
    openapiFields.add("sub_order_status");
    openapiFields.add("trans_amount");
    openapiFields.add("transfer_bill_info");

    // a set of required properties/fields (JSON key names)
    openapiRequiredFields = new HashSet();
  }

 /**
  * 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 AlipayFundTransCommonQueryResponseModel
  */
  public static void validateJsonObject(JsonObject jsonObj) throws IOException {
      if (jsonObj == null) {
        if (AlipayFundTransCommonQueryResponseModel.openapiRequiredFields.isEmpty()) {
          return;
        } else { // has required fields
          throw new IllegalArgumentException(String.format("The required field(s) %s in AlipayFundTransCommonQueryResponseModel is not found in the empty JSON string", AlipayFundTransCommonQueryResponseModel.openapiRequiredFields.toString()));
        }
      }
      if (jsonObj.get("arrival_time_end") != null && !jsonObj.get("arrival_time_end").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `arrival_time_end` to be a primitive type in the JSON string but got `%s`", jsonObj.get("arrival_time_end").toString()));
      }
      if (jsonObj.get("deduct_bill_info") != null && !jsonObj.get("deduct_bill_info").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `deduct_bill_info` to be a primitive type in the JSON string but got `%s`", jsonObj.get("deduct_bill_info").toString()));
      }
      if (jsonObj.get("error_code") != null && !jsonObj.get("error_code").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `error_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error_code").toString()));
      }
      if (jsonObj.get("fail_reason") != null && !jsonObj.get("fail_reason").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `fail_reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fail_reason").toString()));
      }
      if (jsonObj.get("order_fee") != null && !jsonObj.get("order_fee").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `order_fee` to be a primitive type in the JSON string but got `%s`", jsonObj.get("order_fee").toString()));
      }
      if (jsonObj.get("order_id") != null && !jsonObj.get("order_id").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `order_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("order_id").toString()));
      }
      if (jsonObj.get("out_biz_no") != null && !jsonObj.get("out_biz_no").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `out_biz_no` to be a primitive type in the JSON string but got `%s`", jsonObj.get("out_biz_no").toString()));
      }
      if (jsonObj.get("passback_params") != null && !jsonObj.get("passback_params").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `passback_params` to be a primitive type in the JSON string but got `%s`", jsonObj.get("passback_params").toString()));
      }
      if (jsonObj.get("pay_date") != null && !jsonObj.get("pay_date").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `pay_date` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pay_date").toString()));
      }
      if (jsonObj.get("pay_fund_order_id") != null && !jsonObj.get("pay_fund_order_id").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `pay_fund_order_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pay_fund_order_id").toString()));
      }
      if (jsonObj.get("settle_serial_no") != null && !jsonObj.get("settle_serial_no").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `settle_serial_no` to be a primitive type in the JSON string but got `%s`", jsonObj.get("settle_serial_no").toString()));
      }
      if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString()));
      }
      if (jsonObj.get("sub_order_error_code") != null && !jsonObj.get("sub_order_error_code").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `sub_order_error_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sub_order_error_code").toString()));
      }
      if (jsonObj.get("sub_order_fail_reason") != null && !jsonObj.get("sub_order_fail_reason").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `sub_order_fail_reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sub_order_fail_reason").toString()));
      }
      if (jsonObj.get("sub_order_status") != null && !jsonObj.get("sub_order_status").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `sub_order_status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sub_order_status").toString()));
      }
      if (jsonObj.get("trans_amount") != null && !jsonObj.get("trans_amount").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `trans_amount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("trans_amount").toString()));
      }
      if (jsonObj.get("transfer_bill_info") != null && !jsonObj.get("transfer_bill_info").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `transfer_bill_info` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transfer_bill_info").toString()));
      }
  }

  public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
    @SuppressWarnings("unchecked")
    @Override
    public  TypeAdapter create(Gson gson, TypeToken type) {
       if (!AlipayFundTransCommonQueryResponseModel.class.isAssignableFrom(type.getRawType())) {
         return null; // this class only serializes 'AlipayFundTransCommonQueryResponseModel' and its subtypes
       }
       final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
       final TypeAdapter thisAdapter
                        = gson.getDelegateAdapter(this, TypeToken.get(AlipayFundTransCommonQueryResponseModel.class));

       return (TypeAdapter) new TypeAdapter() {
           @Override
           public void write(JsonWriter out, AlipayFundTransCommonQueryResponseModel value) throws IOException {
             JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
             obj.remove("additionalProperties");
             // serialize additonal properties
             if (value.getAdditionalProperties() != null) {
               for (Map.Entry 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 AlipayFundTransCommonQueryResponseModel read(JsonReader in) throws IOException {
             JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
             validateJsonObject(jsonObj);
             // store additional fields in the deserialized instance
             AlipayFundTransCommonQueryResponseModel instance = thisAdapter.fromJsonTree(jsonObj);
             for (Map.Entry 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 AlipayFundTransCommonQueryResponseModel given an JSON string
  *
  * @param jsonString JSON string
  * @return An instance of AlipayFundTransCommonQueryResponseModel
  * @throws IOException if the JSON string is invalid with respect to AlipayFundTransCommonQueryResponseModel
  */
  public static AlipayFundTransCommonQueryResponseModel fromJson(String jsonString) throws IOException {
    return JSON.getGson().fromJson(jsonString, AlipayFundTransCommonQueryResponseModel.class);
  }

 /**
  * Convert an instance of AlipayFundTransCommonQueryResponseModel to an JSON string
  *
  * @return JSON string
  */
  public String toJson() {
    return JSON.getGson().toJson(this);
  }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy