Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.alipay.v3.model.CompleteVoucherInfo Maven / Gradle / Ivy
/*
* 支付宝开放平台API
* 支付宝开放平台v3协议文档
*
* The version of the OpenAPI document: 2024-11-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.alipay.v3.model.InvoiceContentInfo;
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;
/**
* CompleteVoucherInfo
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class CompleteVoucherInfo {
public static final String SERIALIZED_NAME_ANTI_FAKE_CODE = "anti_fake_code";
@SerializedName(SERIALIZED_NAME_ANTI_FAKE_CODE)
private String antiFakeCode;
public static final String SERIALIZED_NAME_CHECK_SUM = "check_sum";
@SerializedName(SERIALIZED_NAME_CHECK_SUM)
private String checkSum;
public static final String SERIALIZED_NAME_DEVICE_NO = "device_no";
@SerializedName(SERIALIZED_NAME_DEVICE_NO)
private String deviceNo;
public static final String SERIALIZED_NAME_FILE_DOWNLOAD_URL = "file_download_url";
@SerializedName(SERIALIZED_NAME_FILE_DOWNLOAD_URL)
private String fileDownloadUrl;
public static final String SERIALIZED_NAME_FILE_TYPE = "file_type";
@SerializedName(SERIALIZED_NAME_FILE_TYPE)
private String fileType;
public static final String SERIALIZED_NAME_INVOICE_AMOUNT = "invoice_amount";
@SerializedName(SERIALIZED_NAME_INVOICE_AMOUNT)
private Integer invoiceAmount;
public static final String SERIALIZED_NAME_INVOICE_CODE = "invoice_code";
@SerializedName(SERIALIZED_NAME_INVOICE_CODE)
private String invoiceCode;
public static final String SERIALIZED_NAME_INVOICE_CONTENT_LIST = "invoice_content_list";
@SerializedName(SERIALIZED_NAME_INVOICE_CONTENT_LIST)
private List invoiceContentList = null;
public static final String SERIALIZED_NAME_INVOICE_DATE = "invoice_date";
@SerializedName(SERIALIZED_NAME_INVOICE_DATE)
private String invoiceDate;
public static final String SERIALIZED_NAME_INVOICE_KIND = "invoice_kind";
@SerializedName(SERIALIZED_NAME_INVOICE_KIND)
private Integer invoiceKind;
public static final String SERIALIZED_NAME_INVOICE_MEMO = "invoice_memo";
@SerializedName(SERIALIZED_NAME_INVOICE_MEMO)
private String invoiceMemo;
public static final String SERIALIZED_NAME_INVOICE_NO = "invoice_no";
@SerializedName(SERIALIZED_NAME_INVOICE_NO)
private String invoiceNo;
public static final String SERIALIZED_NAME_INVOICE_SOURCE = "invoice_source";
@SerializedName(SERIALIZED_NAME_INVOICE_SOURCE)
private String invoiceSource;
public static final String SERIALIZED_NAME_INVOICE_TITLE = "invoice_title";
@SerializedName(SERIALIZED_NAME_INVOICE_TITLE)
private String invoiceTitle;
public static final String SERIALIZED_NAME_INVOICE_TYPE = "invoice_type";
@SerializedName(SERIALIZED_NAME_INVOICE_TYPE)
private String invoiceType;
public static final String SERIALIZED_NAME_PAYEE_ADDRESS = "payee_address";
@SerializedName(SERIALIZED_NAME_PAYEE_ADDRESS)
private String payeeAddress;
public static final String SERIALIZED_NAME_PAYEE_BANK_ACCOUNT = "payee_bank_account";
@SerializedName(SERIALIZED_NAME_PAYEE_BANK_ACCOUNT)
private String payeeBankAccount;
public static final String SERIALIZED_NAME_PAYEE_BANK_NAME = "payee_bank_name";
@SerializedName(SERIALIZED_NAME_PAYEE_BANK_NAME)
private String payeeBankName;
public static final String SERIALIZED_NAME_PAYEE_CHECKER = "payee_checker";
@SerializedName(SERIALIZED_NAME_PAYEE_CHECKER)
private String payeeChecker;
public static final String SERIALIZED_NAME_PAYEE_MOBILE = "payee_mobile";
@SerializedName(SERIALIZED_NAME_PAYEE_MOBILE)
private String payeeMobile;
public static final String SERIALIZED_NAME_PAYEE_NAME = "payee_name";
@SerializedName(SERIALIZED_NAME_PAYEE_NAME)
private String payeeName;
public static final String SERIALIZED_NAME_PAYEE_OPERATOR = "payee_operator";
@SerializedName(SERIALIZED_NAME_PAYEE_OPERATOR)
private String payeeOperator;
public static final String SERIALIZED_NAME_PAYEE_RECEIVER = "payee_receiver";
@SerializedName(SERIALIZED_NAME_PAYEE_RECEIVER)
private String payeeReceiver;
public static final String SERIALIZED_NAME_PAYEE_REGISTER_NO = "payee_register_no";
@SerializedName(SERIALIZED_NAME_PAYEE_REGISTER_NO)
private String payeeRegisterNo;
public static final String SERIALIZED_NAME_PAYER_ADDRESS = "payer_address";
@SerializedName(SERIALIZED_NAME_PAYER_ADDRESS)
private String payerAddress;
public static final String SERIALIZED_NAME_PAYER_BANK_ACCOUNT = "payer_bank_account";
@SerializedName(SERIALIZED_NAME_PAYER_BANK_ACCOUNT)
private String payerBankAccount;
public static final String SERIALIZED_NAME_PAYER_BANK_NAME = "payer_bank_name";
@SerializedName(SERIALIZED_NAME_PAYER_BANK_NAME)
private String payerBankName;
public static final String SERIALIZED_NAME_PAYER_MOBILE = "payer_mobile";
@SerializedName(SERIALIZED_NAME_PAYER_MOBILE)
private String payerMobile;
public static final String SERIALIZED_NAME_PAYER_NAME = "payer_name";
@SerializedName(SERIALIZED_NAME_PAYER_NAME)
private String payerName;
public static final String SERIALIZED_NAME_PAYER_REGISTER_NO = "payer_register_no";
@SerializedName(SERIALIZED_NAME_PAYER_REGISTER_NO)
private String payerRegisterNo;
public static final String SERIALIZED_NAME_SUM_PRICE = "sum_price";
@SerializedName(SERIALIZED_NAME_SUM_PRICE)
private Integer sumPrice;
public static final String SERIALIZED_NAME_SUM_TAX = "sum_tax";
@SerializedName(SERIALIZED_NAME_SUM_TAX)
private Integer sumTax;
public CompleteVoucherInfo() {
}
public CompleteVoucherInfo antiFakeCode(String antiFakeCode) {
this.antiFakeCode = antiFakeCode;
return this;
}
/**
* 防伪码
* @return antiFakeCode
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "无", value = "防伪码")
public String getAntiFakeCode() {
return antiFakeCode;
}
public void setAntiFakeCode(String antiFakeCode) {
this.antiFakeCode = antiFakeCode;
}
public CompleteVoucherInfo checkSum(String checkSum) {
this.checkSum = checkSum;
return this;
}
/**
* 校验码
* @return checkSum
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "无", value = "校验码")
public String getCheckSum() {
return checkSum;
}
public void setCheckSum(String checkSum) {
this.checkSum = checkSum;
}
public CompleteVoucherInfo deviceNo(String deviceNo) {
this.deviceNo = deviceNo;
return this;
}
/**
* 开票机器码
* @return deviceNo
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "654334567890987654", value = "开票机器码")
public String getDeviceNo() {
return deviceNo;
}
public void setDeviceNo(String deviceNo) {
this.deviceNo = deviceNo;
}
public CompleteVoucherInfo fileDownloadUrl(String fileDownloadUrl) {
this.fileDownloadUrl = fileDownloadUrl;
return this;
}
/**
* 板式文件下载地址
* @return fileDownloadUrl
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "http://einvoice-file-daily.oss-cn-beijing.aliyuncs.com/QYMKR9GA5SPVR_042001900111_56322525.pdf?Expires=1943931648&OSSAccessKeyId=LTAI4Fndk4SpFM1E4TVUPT1K&Signature=azYKSp%2Bnn4v6GLy3YZ3nZOCO%2FVo%3D", value = "板式文件下载地址")
public String getFileDownloadUrl() {
return fileDownloadUrl;
}
public void setFileDownloadUrl(String fileDownloadUrl) {
this.fileDownloadUrl = fileDownloadUrl;
}
public CompleteVoucherInfo fileType(String fileType) {
this.fileType = fileType;
return this;
}
/**
* 板式文件的类型
* @return fileType
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "pdf", value = "板式文件的类型")
public String getFileType() {
return fileType;
}
public void setFileType(String fileType) {
this.fileType = fileType;
}
public CompleteVoucherInfo invoiceAmount(Integer invoiceAmount) {
this.invoiceAmount = invoiceAmount;
return this;
}
/**
* 发票金额(元)
* @return invoiceAmount
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "4950", value = "发票金额(元)")
public Integer getInvoiceAmount() {
return invoiceAmount;
}
public void setInvoiceAmount(Integer invoiceAmount) {
this.invoiceAmount = invoiceAmount;
}
public CompleteVoucherInfo invoiceCode(String invoiceCode) {
this.invoiceCode = invoiceCode;
return this;
}
/**
* 发票代码
* @return invoiceCode
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "042001900111", value = "发票代码")
public String getInvoiceCode() {
return invoiceCode;
}
public void setInvoiceCode(String invoiceCode) {
this.invoiceCode = invoiceCode;
}
public CompleteVoucherInfo invoiceContentList(List invoiceContentList) {
this.invoiceContentList = invoiceContentList;
return this;
}
public CompleteVoucherInfo addInvoiceContentListItem(InvoiceContentInfo invoiceContentListItem) {
if (this.invoiceContentList == null) {
this.invoiceContentList = new ArrayList<>();
}
this.invoiceContentList.add(invoiceContentListItem);
return this;
}
/**
* 汇总发票详细信息(目前该字段为空)
* @return invoiceContentList
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "汇总发票详细信息(目前该字段为空)")
public List getInvoiceContentList() {
return invoiceContentList;
}
public void setInvoiceContentList(List invoiceContentList) {
this.invoiceContentList = invoiceContentList;
}
public CompleteVoucherInfo invoiceDate(String invoiceDate) {
this.invoiceDate = invoiceDate;
return this;
}
/**
* 发票日期
* @return invoiceDate
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "2021-08-10 00:00:00", value = "发票日期")
public String getInvoiceDate() {
return invoiceDate;
}
public void setInvoiceDate(String invoiceDate) {
this.invoiceDate = invoiceDate;
}
public CompleteVoucherInfo invoiceKind(Integer invoiceKind) {
this.invoiceKind = invoiceKind;
return this;
}
/**
* 发票类型 0:增值税普通电子发票 1:增值税普通发票 2:增值税专用发票 3:增值税专用电子发票 4:财政电子发票
* @return invoiceKind
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "0", value = "发票类型 0:增值税普通电子发票 1:增值税普通发票 2:增值税专用发票 3:增值税专用电子发票 4:财政电子发票")
public Integer getInvoiceKind() {
return invoiceKind;
}
public void setInvoiceKind(Integer invoiceKind) {
this.invoiceKind = invoiceKind;
}
public CompleteVoucherInfo invoiceMemo(String invoiceMemo) {
this.invoiceMemo = invoiceMemo;
return this;
}
/**
* 备注
* @return invoiceMemo
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "无", value = "备注")
public String getInvoiceMemo() {
return invoiceMemo;
}
public void setInvoiceMemo(String invoiceMemo) {
this.invoiceMemo = invoiceMemo;
}
public CompleteVoucherInfo invoiceNo(String invoiceNo) {
this.invoiceNo = invoiceNo;
return this;
}
/**
* 发票号码
* @return invoiceNo
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "56322524", value = "发票号码")
public String getInvoiceNo() {
return invoiceNo;
}
public void setInvoiceNo(String invoiceNo) {
this.invoiceNo = invoiceNo;
}
public CompleteVoucherInfo invoiceSource(String invoiceSource) {
this.invoiceSource = invoiceSource;
return this;
}
/**
* 发票来源,取值范围 SUMMARY_INVOICE_AUTO_OPEN 汇总开票系统自动开票,SUMMARY_INVOICE_MERCHANT_UPLOAD 汇总开票商户手动上传
* @return invoiceSource
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "SUMMARY_INVOICE_AUTO_OPEN", value = "发票来源,取值范围 SUMMARY_INVOICE_AUTO_OPEN 汇总开票系统自动开票,SUMMARY_INVOICE_MERCHANT_UPLOAD 汇总开票商户手动上传")
public String getInvoiceSource() {
return invoiceSource;
}
public void setInvoiceSource(String invoiceSource) {
this.invoiceSource = invoiceSource;
}
public CompleteVoucherInfo invoiceTitle(String invoiceTitle) {
this.invoiceTitle = invoiceTitle;
return this;
}
/**
* 发票抬头
* @return invoiceTitle
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "支付宝(中国)网络技术有限公司", value = "发票抬头")
public String getInvoiceTitle() {
return invoiceTitle;
}
public void setInvoiceTitle(String invoiceTitle) {
this.invoiceTitle = invoiceTitle;
}
public CompleteVoucherInfo invoiceType(String invoiceType) {
this.invoiceType = invoiceType;
return this;
}
/**
* 发票类型(红、蓝)
* @return invoiceType
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "无", value = "发票类型(红、蓝)")
public String getInvoiceType() {
return invoiceType;
}
public void setInvoiceType(String invoiceType) {
this.invoiceType = invoiceType;
}
public CompleteVoucherInfo payeeAddress(String payeeAddress) {
this.payeeAddress = payeeAddress;
return this;
}
/**
* 销售方地址
* @return payeeAddress
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "杭州市西湖区", value = "销售方地址")
public String getPayeeAddress() {
return payeeAddress;
}
public void setPayeeAddress(String payeeAddress) {
this.payeeAddress = payeeAddress;
}
public CompleteVoucherInfo payeeBankAccount(String payeeBankAccount) {
this.payeeBankAccount = payeeBankAccount;
return this;
}
/**
* 销售方银行账号
* @return payeeBankAccount
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "283635722", value = "销售方银行账号")
public String getPayeeBankAccount() {
return payeeBankAccount;
}
public void setPayeeBankAccount(String payeeBankAccount) {
this.payeeBankAccount = payeeBankAccount;
}
public CompleteVoucherInfo payeeBankName(String payeeBankName) {
this.payeeBankName = payeeBankName;
return this;
}
/**
* 销售方银行名称
* @return payeeBankName
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "工行", value = "销售方银行名称")
public String getPayeeBankName() {
return payeeBankName;
}
public void setPayeeBankName(String payeeBankName) {
this.payeeBankName = payeeBankName;
}
public CompleteVoucherInfo payeeChecker(String payeeChecker) {
this.payeeChecker = payeeChecker;
return this;
}
/**
* 复核人
* @return payeeChecker
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "无", value = "复核人")
public String getPayeeChecker() {
return payeeChecker;
}
public void setPayeeChecker(String payeeChecker) {
this.payeeChecker = payeeChecker;
}
public CompleteVoucherInfo payeeMobile(String payeeMobile) {
this.payeeMobile = payeeMobile;
return this;
}
/**
* 销售方电话
* @return payeeMobile
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "0571-2735522", value = "销售方电话")
public String getPayeeMobile() {
return payeeMobile;
}
public void setPayeeMobile(String payeeMobile) {
this.payeeMobile = payeeMobile;
}
public CompleteVoucherInfo payeeName(String payeeName) {
this.payeeName = payeeName;
return this;
}
/**
* 销售方名称
* @return payeeName
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "航信培训企业501081", value = "销售方名称")
public String getPayeeName() {
return payeeName;
}
public void setPayeeName(String payeeName) {
this.payeeName = payeeName;
}
public CompleteVoucherInfo payeeOperator(String payeeOperator) {
this.payeeOperator = payeeOperator;
return this;
}
/**
* 开票人
* @return payeeOperator
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "无", value = "开票人")
public String getPayeeOperator() {
return payeeOperator;
}
public void setPayeeOperator(String payeeOperator) {
this.payeeOperator = payeeOperator;
}
public CompleteVoucherInfo payeeReceiver(String payeeReceiver) {
this.payeeReceiver = payeeReceiver;
return this;
}
/**
* 收款人
* @return payeeReceiver
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "无", value = "收款人")
public String getPayeeReceiver() {
return payeeReceiver;
}
public void setPayeeReceiver(String payeeReceiver) {
this.payeeReceiver = payeeReceiver;
}
public CompleteVoucherInfo payeeRegisterNo(String payeeRegisterNo) {
this.payeeRegisterNo = payeeRegisterNo;
return this;
}
/**
* 销售方税号
* @return payeeRegisterNo
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "339902999999789001", value = "销售方税号")
public String getPayeeRegisterNo() {
return payeeRegisterNo;
}
public void setPayeeRegisterNo(String payeeRegisterNo) {
this.payeeRegisterNo = payeeRegisterNo;
}
public CompleteVoucherInfo payerAddress(String payerAddress) {
this.payerAddress = payerAddress;
return this;
}
/**
* 购买方地址
* @return payerAddress
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "无", value = "购买方地址")
public String getPayerAddress() {
return payerAddress;
}
public void setPayerAddress(String payerAddress) {
this.payerAddress = payerAddress;
}
public CompleteVoucherInfo payerBankAccount(String payerBankAccount) {
this.payerBankAccount = payerBankAccount;
return this;
}
/**
* 购买方银行账号
* @return payerBankAccount
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "无", value = "购买方银行账号")
public String getPayerBankAccount() {
return payerBankAccount;
}
public void setPayerBankAccount(String payerBankAccount) {
this.payerBankAccount = payerBankAccount;
}
public CompleteVoucherInfo payerBankName(String payerBankName) {
this.payerBankName = payerBankName;
return this;
}
/**
* 购买方银行名称
* @return payerBankName
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "无", value = "购买方银行名称")
public String getPayerBankName() {
return payerBankName;
}
public void setPayerBankName(String payerBankName) {
this.payerBankName = payerBankName;
}
public CompleteVoucherInfo payerMobile(String payerMobile) {
this.payerMobile = payerMobile;
return this;
}
/**
* 购买方电话
* @return payerMobile
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "无", value = "购买方电话")
public String getPayerMobile() {
return payerMobile;
}
public void setPayerMobile(String payerMobile) {
this.payerMobile = payerMobile;
}
public CompleteVoucherInfo payerName(String payerName) {
this.payerName = payerName;
return this;
}
/**
* 购买方名称
* @return payerName
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "支付宝(中国)网络技术有限公司", value = "购买方名称")
public String getPayerName() {
return payerName;
}
public void setPayerName(String payerName) {
this.payerName = payerName;
}
public CompleteVoucherInfo payerRegisterNo(String payerRegisterNo) {
this.payerRegisterNo = payerRegisterNo;
return this;
}
/**
* 购买方税号
* @return payerRegisterNo
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "91310115768225450T", value = "购买方税号")
public String getPayerRegisterNo() {
return payerRegisterNo;
}
public void setPayerRegisterNo(String payerRegisterNo) {
this.payerRegisterNo = payerRegisterNo;
}
public CompleteVoucherInfo sumPrice(Integer sumPrice) {
this.sumPrice = sumPrice;
return this;
}
/**
* 不含税金额(元)
* @return sumPrice
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "4901", value = "不含税金额(元)")
public Integer getSumPrice() {
return sumPrice;
}
public void setSumPrice(Integer sumPrice) {
this.sumPrice = sumPrice;
}
public CompleteVoucherInfo sumTax(Integer sumTax) {
this.sumTax = sumTax;
return this;
}
/**
* 合计税额(元)
* @return sumTax
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "49", value = "合计税额(元)")
public Integer getSumTax() {
return sumTax;
}
public void setSumTax(Integer sumTax) {
this.sumTax = sumTax;
}
/**
* 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 CompleteVoucherInfo instance itself
*/
public CompleteVoucherInfo 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;
}
CompleteVoucherInfo completeVoucherInfo = (CompleteVoucherInfo) o;
return Objects.equals(this.antiFakeCode, completeVoucherInfo.antiFakeCode) &&
Objects.equals(this.checkSum, completeVoucherInfo.checkSum) &&
Objects.equals(this.deviceNo, completeVoucherInfo.deviceNo) &&
Objects.equals(this.fileDownloadUrl, completeVoucherInfo.fileDownloadUrl) &&
Objects.equals(this.fileType, completeVoucherInfo.fileType) &&
Objects.equals(this.invoiceAmount, completeVoucherInfo.invoiceAmount) &&
Objects.equals(this.invoiceCode, completeVoucherInfo.invoiceCode) &&
Objects.equals(this.invoiceContentList, completeVoucherInfo.invoiceContentList) &&
Objects.equals(this.invoiceDate, completeVoucherInfo.invoiceDate) &&
Objects.equals(this.invoiceKind, completeVoucherInfo.invoiceKind) &&
Objects.equals(this.invoiceMemo, completeVoucherInfo.invoiceMemo) &&
Objects.equals(this.invoiceNo, completeVoucherInfo.invoiceNo) &&
Objects.equals(this.invoiceSource, completeVoucherInfo.invoiceSource) &&
Objects.equals(this.invoiceTitle, completeVoucherInfo.invoiceTitle) &&
Objects.equals(this.invoiceType, completeVoucherInfo.invoiceType) &&
Objects.equals(this.payeeAddress, completeVoucherInfo.payeeAddress) &&
Objects.equals(this.payeeBankAccount, completeVoucherInfo.payeeBankAccount) &&
Objects.equals(this.payeeBankName, completeVoucherInfo.payeeBankName) &&
Objects.equals(this.payeeChecker, completeVoucherInfo.payeeChecker) &&
Objects.equals(this.payeeMobile, completeVoucherInfo.payeeMobile) &&
Objects.equals(this.payeeName, completeVoucherInfo.payeeName) &&
Objects.equals(this.payeeOperator, completeVoucherInfo.payeeOperator) &&
Objects.equals(this.payeeReceiver, completeVoucherInfo.payeeReceiver) &&
Objects.equals(this.payeeRegisterNo, completeVoucherInfo.payeeRegisterNo) &&
Objects.equals(this.payerAddress, completeVoucherInfo.payerAddress) &&
Objects.equals(this.payerBankAccount, completeVoucherInfo.payerBankAccount) &&
Objects.equals(this.payerBankName, completeVoucherInfo.payerBankName) &&
Objects.equals(this.payerMobile, completeVoucherInfo.payerMobile) &&
Objects.equals(this.payerName, completeVoucherInfo.payerName) &&
Objects.equals(this.payerRegisterNo, completeVoucherInfo.payerRegisterNo) &&
Objects.equals(this.sumPrice, completeVoucherInfo.sumPrice) &&
Objects.equals(this.sumTax, completeVoucherInfo.sumTax)&&
Objects.equals(this.additionalProperties, completeVoucherInfo.additionalProperties);
}
@Override
public int hashCode() {
return Objects.hash(antiFakeCode, checkSum, deviceNo, fileDownloadUrl, fileType, invoiceAmount, invoiceCode, invoiceContentList, invoiceDate, invoiceKind, invoiceMemo, invoiceNo, invoiceSource, invoiceTitle, invoiceType, payeeAddress, payeeBankAccount, payeeBankName, payeeChecker, payeeMobile, payeeName, payeeOperator, payeeReceiver, payeeRegisterNo, payerAddress, payerBankAccount, payerBankName, payerMobile, payerName, payerRegisterNo, sumPrice, sumTax, additionalProperties);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CompleteVoucherInfo {\n");
sb.append(" antiFakeCode: ").append(toIndentedString(antiFakeCode)).append("\n");
sb.append(" checkSum: ").append(toIndentedString(checkSum)).append("\n");
sb.append(" deviceNo: ").append(toIndentedString(deviceNo)).append("\n");
sb.append(" fileDownloadUrl: ").append(toIndentedString(fileDownloadUrl)).append("\n");
sb.append(" fileType: ").append(toIndentedString(fileType)).append("\n");
sb.append(" invoiceAmount: ").append(toIndentedString(invoiceAmount)).append("\n");
sb.append(" invoiceCode: ").append(toIndentedString(invoiceCode)).append("\n");
sb.append(" invoiceContentList: ").append(toIndentedString(invoiceContentList)).append("\n");
sb.append(" invoiceDate: ").append(toIndentedString(invoiceDate)).append("\n");
sb.append(" invoiceKind: ").append(toIndentedString(invoiceKind)).append("\n");
sb.append(" invoiceMemo: ").append(toIndentedString(invoiceMemo)).append("\n");
sb.append(" invoiceNo: ").append(toIndentedString(invoiceNo)).append("\n");
sb.append(" invoiceSource: ").append(toIndentedString(invoiceSource)).append("\n");
sb.append(" invoiceTitle: ").append(toIndentedString(invoiceTitle)).append("\n");
sb.append(" invoiceType: ").append(toIndentedString(invoiceType)).append("\n");
sb.append(" payeeAddress: ").append(toIndentedString(payeeAddress)).append("\n");
sb.append(" payeeBankAccount: ").append(toIndentedString(payeeBankAccount)).append("\n");
sb.append(" payeeBankName: ").append(toIndentedString(payeeBankName)).append("\n");
sb.append(" payeeChecker: ").append(toIndentedString(payeeChecker)).append("\n");
sb.append(" payeeMobile: ").append(toIndentedString(payeeMobile)).append("\n");
sb.append(" payeeName: ").append(toIndentedString(payeeName)).append("\n");
sb.append(" payeeOperator: ").append(toIndentedString(payeeOperator)).append("\n");
sb.append(" payeeReceiver: ").append(toIndentedString(payeeReceiver)).append("\n");
sb.append(" payeeRegisterNo: ").append(toIndentedString(payeeRegisterNo)).append("\n");
sb.append(" payerAddress: ").append(toIndentedString(payerAddress)).append("\n");
sb.append(" payerBankAccount: ").append(toIndentedString(payerBankAccount)).append("\n");
sb.append(" payerBankName: ").append(toIndentedString(payerBankName)).append("\n");
sb.append(" payerMobile: ").append(toIndentedString(payerMobile)).append("\n");
sb.append(" payerName: ").append(toIndentedString(payerName)).append("\n");
sb.append(" payerRegisterNo: ").append(toIndentedString(payerRegisterNo)).append("\n");
sb.append(" sumPrice: ").append(toIndentedString(sumPrice)).append("\n");
sb.append(" sumTax: ").append(toIndentedString(sumTax)).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("anti_fake_code");
openapiFields.add("check_sum");
openapiFields.add("device_no");
openapiFields.add("file_download_url");
openapiFields.add("file_type");
openapiFields.add("invoice_amount");
openapiFields.add("invoice_code");
openapiFields.add("invoice_content_list");
openapiFields.add("invoice_date");
openapiFields.add("invoice_kind");
openapiFields.add("invoice_memo");
openapiFields.add("invoice_no");
openapiFields.add("invoice_source");
openapiFields.add("invoice_title");
openapiFields.add("invoice_type");
openapiFields.add("payee_address");
openapiFields.add("payee_bank_account");
openapiFields.add("payee_bank_name");
openapiFields.add("payee_checker");
openapiFields.add("payee_mobile");
openapiFields.add("payee_name");
openapiFields.add("payee_operator");
openapiFields.add("payee_receiver");
openapiFields.add("payee_register_no");
openapiFields.add("payer_address");
openapiFields.add("payer_bank_account");
openapiFields.add("payer_bank_name");
openapiFields.add("payer_mobile");
openapiFields.add("payer_name");
openapiFields.add("payer_register_no");
openapiFields.add("sum_price");
openapiFields.add("sum_tax");
// 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 CompleteVoucherInfo
*/
public static void validateJsonObject(JsonObject jsonObj) throws IOException {
if (jsonObj == null) {
if (CompleteVoucherInfo.openapiRequiredFields.isEmpty()) {
return;
} else { // has required fields
throw new IllegalArgumentException(String.format("The required field(s) %s in CompleteVoucherInfo is not found in the empty JSON string", CompleteVoucherInfo.openapiRequiredFields.toString()));
}
}
if (jsonObj.get("anti_fake_code") != null && !jsonObj.get("anti_fake_code").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `anti_fake_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("anti_fake_code").toString()));
}
if (jsonObj.get("check_sum") != null && !jsonObj.get("check_sum").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `check_sum` to be a primitive type in the JSON string but got `%s`", jsonObj.get("check_sum").toString()));
}
if (jsonObj.get("device_no") != null && !jsonObj.get("device_no").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `device_no` to be a primitive type in the JSON string but got `%s`", jsonObj.get("device_no").toString()));
}
if (jsonObj.get("file_download_url") != null && !jsonObj.get("file_download_url").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `file_download_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("file_download_url").toString()));
}
if (jsonObj.get("file_type") != null && !jsonObj.get("file_type").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `file_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("file_type").toString()));
}
if (jsonObj.get("invoice_code") != null && !jsonObj.get("invoice_code").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `invoice_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoice_code").toString()));
}
JsonArray jsonArrayinvoiceContentList = jsonObj.getAsJsonArray("invoice_content_list");
if (jsonArrayinvoiceContentList != null) {
// ensure the json data is an array
if (!jsonObj.get("invoice_content_list").isJsonArray()) {
throw new IllegalArgumentException(String.format("Expected the field `invoice_content_list` to be an array in the JSON string but got `%s`", jsonObj.get("invoice_content_list").toString()));
}
// validate the optional field `invoice_content_list` (array)
for (int i = 0; i < jsonArrayinvoiceContentList.size(); i++) {
InvoiceContentInfo.validateJsonObject(jsonArrayinvoiceContentList.get(i).getAsJsonObject());
};
}
if (jsonObj.get("invoice_date") != null && !jsonObj.get("invoice_date").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `invoice_date` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoice_date").toString()));
}
if (jsonObj.get("invoice_memo") != null && !jsonObj.get("invoice_memo").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `invoice_memo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoice_memo").toString()));
}
if (jsonObj.get("invoice_no") != null && !jsonObj.get("invoice_no").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `invoice_no` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoice_no").toString()));
}
if (jsonObj.get("invoice_source") != null && !jsonObj.get("invoice_source").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `invoice_source` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoice_source").toString()));
}
if (jsonObj.get("invoice_title") != null && !jsonObj.get("invoice_title").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `invoice_title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoice_title").toString()));
}
if (jsonObj.get("invoice_type") != null && !jsonObj.get("invoice_type").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `invoice_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoice_type").toString()));
}
if (jsonObj.get("payee_address") != null && !jsonObj.get("payee_address").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `payee_address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("payee_address").toString()));
}
if (jsonObj.get("payee_bank_account") != null && !jsonObj.get("payee_bank_account").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `payee_bank_account` to be a primitive type in the JSON string but got `%s`", jsonObj.get("payee_bank_account").toString()));
}
if (jsonObj.get("payee_bank_name") != null && !jsonObj.get("payee_bank_name").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `payee_bank_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("payee_bank_name").toString()));
}
if (jsonObj.get("payee_checker") != null && !jsonObj.get("payee_checker").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `payee_checker` to be a primitive type in the JSON string but got `%s`", jsonObj.get("payee_checker").toString()));
}
if (jsonObj.get("payee_mobile") != null && !jsonObj.get("payee_mobile").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `payee_mobile` to be a primitive type in the JSON string but got `%s`", jsonObj.get("payee_mobile").toString()));
}
if (jsonObj.get("payee_name") != null && !jsonObj.get("payee_name").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `payee_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("payee_name").toString()));
}
if (jsonObj.get("payee_operator") != null && !jsonObj.get("payee_operator").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `payee_operator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("payee_operator").toString()));
}
if (jsonObj.get("payee_receiver") != null && !jsonObj.get("payee_receiver").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `payee_receiver` to be a primitive type in the JSON string but got `%s`", jsonObj.get("payee_receiver").toString()));
}
if (jsonObj.get("payee_register_no") != null && !jsonObj.get("payee_register_no").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `payee_register_no` to be a primitive type in the JSON string but got `%s`", jsonObj.get("payee_register_no").toString()));
}
if (jsonObj.get("payer_address") != null && !jsonObj.get("payer_address").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `payer_address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("payer_address").toString()));
}
if (jsonObj.get("payer_bank_account") != null && !jsonObj.get("payer_bank_account").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `payer_bank_account` to be a primitive type in the JSON string but got `%s`", jsonObj.get("payer_bank_account").toString()));
}
if (jsonObj.get("payer_bank_name") != null && !jsonObj.get("payer_bank_name").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `payer_bank_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("payer_bank_name").toString()));
}
if (jsonObj.get("payer_mobile") != null && !jsonObj.get("payer_mobile").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `payer_mobile` to be a primitive type in the JSON string but got `%s`", jsonObj.get("payer_mobile").toString()));
}
if (jsonObj.get("payer_name") != null && !jsonObj.get("payer_name").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `payer_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("payer_name").toString()));
}
if (jsonObj.get("payer_register_no") != null && !jsonObj.get("payer_register_no").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `payer_register_no` to be a primitive type in the JSON string but got `%s`", jsonObj.get("payer_register_no").toString()));
}
}
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
@SuppressWarnings("unchecked")
@Override
public TypeAdapter create(Gson gson, TypeToken type) {
if (!CompleteVoucherInfo.class.isAssignableFrom(type.getRawType())) {
return null; // this class only serializes 'CompleteVoucherInfo' and its subtypes
}
final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
final TypeAdapter thisAdapter
= gson.getDelegateAdapter(this, TypeToken.get(CompleteVoucherInfo.class));
return (TypeAdapter) new TypeAdapter() {
@Override
public void write(JsonWriter out, CompleteVoucherInfo 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 CompleteVoucherInfo read(JsonReader in) throws IOException {
JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
validateJsonObject(jsonObj);
// store additional fields in the deserialized instance
CompleteVoucherInfo 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 CompleteVoucherInfo given an JSON string
*
* @param jsonString JSON string
* @return An instance of CompleteVoucherInfo
* @throws IOException if the JSON string is invalid with respect to CompleteVoucherInfo
*/
public static CompleteVoucherInfo fromJson(String jsonString) throws IOException {
return JSON.getGson().fromJson(jsonString, CompleteVoucherInfo.class);
}
/**
* Convert an instance of CompleteVoucherInfo to an JSON string
*
* @return JSON string
*/
public String toJson() {
return JSON.getGson().toJson(this);
}
}