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.AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel 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.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;
/**
* AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel {
public static final String SERIALIZED_NAME_COUPON_FEE = "coupon_fee";
@SerializedName(SERIALIZED_NAME_COUPON_FEE)
private String couponFee;
public static final String SERIALIZED_NAME_DELIVER_FEE = "deliver_fee";
@SerializedName(SERIALIZED_NAME_DELIVER_FEE)
private String deliverFee;
public static final String SERIALIZED_NAME_DISPATCH_DURATION = "dispatch_duration";
@SerializedName(SERIALIZED_NAME_DISPATCH_DURATION)
private Integer dispatchDuration;
public static final String SERIALIZED_NAME_DISTANCE = "distance";
@SerializedName(SERIALIZED_NAME_DISTANCE)
private Integer distance;
public static final String SERIALIZED_NAME_FEE = "fee";
@SerializedName(SERIALIZED_NAME_FEE)
private String fee;
public static final String SERIALIZED_NAME_FINISH_CODE = "finish_code";
@SerializedName(SERIALIZED_NAME_FINISH_CODE)
private String finishCode;
public static final String SERIALIZED_NAME_INSURANCE_FEE = "insurance_fee";
@SerializedName(SERIALIZED_NAME_INSURANCE_FEE)
private String insuranceFee;
public static final String SERIALIZED_NAME_ORDER_NO = "order_no";
@SerializedName(SERIALIZED_NAME_ORDER_NO)
private String orderNo;
public static final String SERIALIZED_NAME_PAY_AMOUNT = "pay_amount";
@SerializedName(SERIALIZED_NAME_PAY_AMOUNT)
private String payAmount;
public static final String SERIALIZED_NAME_PICKUP_CODE = "pickup_code";
@SerializedName(SERIALIZED_NAME_PICKUP_CODE)
private String pickupCode;
public static final String SERIALIZED_NAME_STATUS = "status";
@SerializedName(SERIALIZED_NAME_STATUS)
private String status;
public static final String SERIALIZED_NAME_WAYBILL_NO = "waybill_no";
@SerializedName(SERIALIZED_NAME_WAYBILL_NO)
private String waybillNo;
public AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel() {
}
public AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel couponFee(String couponFee) {
this.couponFee = couponFee;
return this;
}
/**
* 优惠券费用,单位元
* @return couponFee
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "1.00", value = "优惠券费用,单位元")
public String getCouponFee() {
return couponFee;
}
public void setCouponFee(String couponFee) {
this.couponFee = couponFee;
}
public AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel deliverFee(String deliverFee) {
this.deliverFee = deliverFee;
return this;
}
/**
* 运费,单位元
* @return deliverFee
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "10.00", value = "运费,单位元")
public String getDeliverFee() {
return deliverFee;
}
public void setDeliverFee(String deliverFee) {
this.deliverFee = deliverFee;
}
public AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel dispatchDuration(Integer dispatchDuration) {
this.dispatchDuration = dispatchDuration;
return this;
}
/**
* 预计骑手还剩多久接单,单位:秒
* @return dispatchDuration
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "60", value = "预计骑手还剩多久接单,单位:秒")
public Integer getDispatchDuration() {
return dispatchDuration;
}
public void setDispatchDuration(Integer dispatchDuration) {
this.dispatchDuration = dispatchDuration;
}
public AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel distance(Integer distance) {
this.distance = distance;
return this;
}
/**
* 配送距离
* @return distance
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "300", value = "配送距离")
public Integer getDistance() {
return distance;
}
public void setDistance(Integer distance) {
this.distance = distance;
}
public AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel fee(String fee) {
this.fee = fee;
return this;
}
/**
* 实际运费,单位元
* @return fee
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "9.00", value = "实际运费,单位元")
public String getFee() {
return fee;
}
public void setFee(String fee) {
this.fee = fee;
}
public AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel finishCode(String finishCode) {
this.finishCode = finishCode;
return this;
}
/**
* 收货码,骑手必须输入收货码才能完成订单妥投
* @return finishCode
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "xxx", value = "收货码,骑手必须输入收货码才能完成订单妥投")
public String getFinishCode() {
return finishCode;
}
public void setFinishCode(String finishCode) {
this.finishCode = finishCode;
}
public AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel insuranceFee(String insuranceFee) {
this.insuranceFee = insuranceFee;
return this;
}
/**
* 保价费用,单位元
* @return insuranceFee
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "0.00", value = "保价费用,单位元")
public String getInsuranceFee() {
return insuranceFee;
}
public void setInsuranceFee(String insuranceFee) {
this.insuranceFee = insuranceFee;
}
public AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel orderNo(String orderNo) {
this.orderNo = orderNo;
return this;
}
/**
* 支付宝订单流水号
* @return orderNo
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "2020090411130000000000772400280352", value = "支付宝订单流水号")
public String getOrderNo() {
return orderNo;
}
public void setOrderNo(String orderNo) {
this.orderNo = orderNo;
}
public AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel payAmount(String payAmount) {
this.payAmount = payAmount;
return this;
}
/**
* 支付金额, 实际扣减的费用以此字段为准,单位元
* @return payAmount
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "9.00", value = "支付金额, 实际扣减的费用以此字段为准,单位元")
public String getPayAmount() {
return payAmount;
}
public void setPayAmount(String payAmount) {
this.payAmount = payAmount;
}
public AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel pickupCode(String pickupCode) {
this.pickupCode = pickupCode;
return this;
}
/**
* 取货码, 骑手必须输入取货码才能从商家取货
* @return pickupCode
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "xxx", value = "取货码, 骑手必须输入取货码才能从商家取货")
public String getPickupCode() {
return pickupCode;
}
public void setPickupCode(String pickupCode) {
this.pickupCode = pickupCode;
}
public AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel status(String status) {
this.status = status;
return this;
}
/**
* 即时配送运单状态
* @return status
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "i_101", value = "即时配送运单状态")
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel waybillNo(String waybillNo) {
this.waybillNo = waybillNo;
return this;
}
/**
* 即时配送运单编号
* @return waybillNo
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "waybillno001", value = "即时配送运单编号")
public String getWaybillNo() {
return waybillNo;
}
public void setWaybillNo(String waybillNo) {
this.waybillNo = waybillNo;
}
/**
* 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 AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel instance itself
*/
public AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel 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;
}
AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel alipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel = (AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel) o;
return Objects.equals(this.couponFee, alipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel.couponFee) &&
Objects.equals(this.deliverFee, alipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel.deliverFee) &&
Objects.equals(this.dispatchDuration, alipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel.dispatchDuration) &&
Objects.equals(this.distance, alipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel.distance) &&
Objects.equals(this.fee, alipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel.fee) &&
Objects.equals(this.finishCode, alipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel.finishCode) &&
Objects.equals(this.insuranceFee, alipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel.insuranceFee) &&
Objects.equals(this.orderNo, alipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel.orderNo) &&
Objects.equals(this.payAmount, alipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel.payAmount) &&
Objects.equals(this.pickupCode, alipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel.pickupCode) &&
Objects.equals(this.status, alipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel.status) &&
Objects.equals(this.waybillNo, alipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel.waybillNo)&&
Objects.equals(this.additionalProperties, alipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel.additionalProperties);
}
@Override
public int hashCode() {
return Objects.hash(couponFee, deliverFee, dispatchDuration, distance, fee, finishCode, insuranceFee, orderNo, payAmount, pickupCode, status, waybillNo, additionalProperties);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel {\n");
sb.append(" couponFee: ").append(toIndentedString(couponFee)).append("\n");
sb.append(" deliverFee: ").append(toIndentedString(deliverFee)).append("\n");
sb.append(" dispatchDuration: ").append(toIndentedString(dispatchDuration)).append("\n");
sb.append(" distance: ").append(toIndentedString(distance)).append("\n");
sb.append(" fee: ").append(toIndentedString(fee)).append("\n");
sb.append(" finishCode: ").append(toIndentedString(finishCode)).append("\n");
sb.append(" insuranceFee: ").append(toIndentedString(insuranceFee)).append("\n");
sb.append(" orderNo: ").append(toIndentedString(orderNo)).append("\n");
sb.append(" payAmount: ").append(toIndentedString(payAmount)).append("\n");
sb.append(" pickupCode: ").append(toIndentedString(pickupCode)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" waybillNo: ").append(toIndentedString(waybillNo)).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("coupon_fee");
openapiFields.add("deliver_fee");
openapiFields.add("dispatch_duration");
openapiFields.add("distance");
openapiFields.add("fee");
openapiFields.add("finish_code");
openapiFields.add("insurance_fee");
openapiFields.add("order_no");
openapiFields.add("pay_amount");
openapiFields.add("pickup_code");
openapiFields.add("status");
openapiFields.add("waybill_no");
// 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 AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel
*/
public static void validateJsonObject(JsonObject jsonObj) throws IOException {
if (jsonObj == null) {
if (AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel.openapiRequiredFields.isEmpty()) {
return;
} else { // has required fields
throw new IllegalArgumentException(String.format("The required field(s) %s in AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel is not found in the empty JSON string", AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel.openapiRequiredFields.toString()));
}
}
if (jsonObj.get("coupon_fee") != null && !jsonObj.get("coupon_fee").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `coupon_fee` to be a primitive type in the JSON string but got `%s`", jsonObj.get("coupon_fee").toString()));
}
if (jsonObj.get("deliver_fee") != null && !jsonObj.get("deliver_fee").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `deliver_fee` to be a primitive type in the JSON string but got `%s`", jsonObj.get("deliver_fee").toString()));
}
if (jsonObj.get("fee") != null && !jsonObj.get("fee").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `fee` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fee").toString()));
}
if (jsonObj.get("finish_code") != null && !jsonObj.get("finish_code").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `finish_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("finish_code").toString()));
}
if (jsonObj.get("insurance_fee") != null && !jsonObj.get("insurance_fee").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `insurance_fee` to be a primitive type in the JSON string but got `%s`", jsonObj.get("insurance_fee").toString()));
}
if (jsonObj.get("order_no") != null && !jsonObj.get("order_no").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `order_no` to be a primitive type in the JSON string but got `%s`", jsonObj.get("order_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("pickup_code") != null && !jsonObj.get("pickup_code").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `pickup_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pickup_code").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("waybill_no") != null && !jsonObj.get("waybill_no").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `waybill_no` to be a primitive type in the JSON string but got `%s`", jsonObj.get("waybill_no").toString()));
}
}
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
@SuppressWarnings("unchecked")
@Override
public TypeAdapter create(Gson gson, TypeToken type) {
if (!AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel.class.isAssignableFrom(type.getRawType())) {
return null; // this class only serializes 'AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel' and its subtypes
}
final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
final TypeAdapter thisAdapter
= gson.getDelegateAdapter(this, TypeToken.get(AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel.class));
return (TypeAdapter) new TypeAdapter() {
@Override
public void write(JsonWriter out, AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel 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 AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel read(JsonReader in) throws IOException {
JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
validateJsonObject(jsonObj);
// store additional fields in the deserialized instance
AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel 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 AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel given an JSON string
*
* @param jsonString JSON string
* @return An instance of AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel
* @throws IOException if the JSON string is invalid with respect to AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel
*/
public static AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel fromJson(String jsonString) throws IOException {
return JSON.getGson().fromJson(jsonString, AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel.class);
}
/**
* Convert an instance of AlipayCommerceLogisticsOrderInstantdeliveryCreateResponseModel to an JSON string
*
* @return JSON string
*/
public String toJson() {
return JSON.getGson().toJson(this);
}
}