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

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

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

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;

/**
 * BizOrderQueryResponse
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class BizOrderQueryResponse {
  private static final long serialVersionUID = 1L;

  public static final String SERIALIZED_NAME_ACTION = "action";
  @SerializedName(SERIALIZED_NAME_ACTION)
  private String action;

  public static final String SERIALIZED_NAME_ACTION_MODE = "action_mode";
  @SerializedName(SERIALIZED_NAME_ACTION_MODE)
  private String actionMode;

  public static final String SERIALIZED_NAME_APPLY_ID = "apply_id";
  @SerializedName(SERIALIZED_NAME_APPLY_ID)
  private String applyId;

  public static final String SERIALIZED_NAME_BIZ_CONTEXT_INFO = "biz_context_info";
  @SerializedName(SERIALIZED_NAME_BIZ_CONTEXT_INFO)
  private String bizContextInfo;

  public static final String SERIALIZED_NAME_BIZ_ID = "biz_id";
  @SerializedName(SERIALIZED_NAME_BIZ_ID)
  private String bizId;

  public static final String SERIALIZED_NAME_BIZ_TYPE = "biz_type";
  @SerializedName(SERIALIZED_NAME_BIZ_TYPE)
  private String bizType;

  public static final String SERIALIZED_NAME_CREATE_TIME = "create_time";
  @SerializedName(SERIALIZED_NAME_CREATE_TIME)
  private String createTime;

  public static final String SERIALIZED_NAME_OP_ID = "op_id";
  @SerializedName(SERIALIZED_NAME_OP_ID)
  private String opId;

  public static final String SERIALIZED_NAME_REQUEST_ID = "request_id";
  @SerializedName(SERIALIZED_NAME_REQUEST_ID)
  private String requestId;

  public static final String SERIALIZED_NAME_RESULT_CODE = "result_code";
  @SerializedName(SERIALIZED_NAME_RESULT_CODE)
  private String resultCode;

  public static final String SERIALIZED_NAME_RESULT_DESC = "result_desc";
  @SerializedName(SERIALIZED_NAME_RESULT_DESC)
  private String resultDesc;

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

  public static final String SERIALIZED_NAME_SUB_STATUS = "sub_status";
  @SerializedName(SERIALIZED_NAME_SUB_STATUS)
  private String subStatus;

  public static final String SERIALIZED_NAME_UPDATE_TIME = "update_time";
  @SerializedName(SERIALIZED_NAME_UPDATE_TIME)
  private String updateTime;

  public BizOrderQueryResponse() { 
  }

  public BizOrderQueryResponse action(String action) {
    
    this.action = action;
    return this;
  }

   /**
   * 操作动作。  CREATE_SHOP-创建门店,  MODIFY_SHOP-修改门店,  CREATE_ITEM-创建商品,  MODIFY_ITEM-修改商品,  EFFECTIVE_ITEM-上架商品,  INVALID_ITEM-下架商品,  RESUME_ITEM-暂停售卖商品,  PAUSE_ITEM-恢复售卖商品
   * @return action
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "CREATE_SHOP", value = "操作动作。  CREATE_SHOP-创建门店,  MODIFY_SHOP-修改门店,  CREATE_ITEM-创建商品,  MODIFY_ITEM-修改商品,  EFFECTIVE_ITEM-上架商品,  INVALID_ITEM-下架商品,  RESUME_ITEM-暂停售卖商品,  PAUSE_ITEM-恢复售卖商品")

  public String getAction() {
    return action;
  }


  public void setAction(String action) {
    this.action = action;
  }


  public BizOrderQueryResponse actionMode(String actionMode) {
    
    this.actionMode = actionMode;
    return this;
  }

   /**
   * 操作模式:NORMAL-普通开店
   * @return actionMode
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "WITH_LEADS", value = "操作模式:NORMAL-普通开店")

  public String getActionMode() {
    return actionMode;
  }


  public void setActionMode(String actionMode) {
    this.actionMode = actionMode;
  }


  public BizOrderQueryResponse applyId(String applyId) {
    
    this.applyId = applyId;
    return this;
  }

   /**
   * 支付宝流水ID
   * @return applyId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "2015111410223410000001", value = "支付宝流水ID")

  public String getApplyId() {
    return applyId;
  }


  public void setApplyId(String applyId) {
    this.applyId = applyId;
  }


  public BizOrderQueryResponse bizContextInfo(String bizContextInfo) {
    
    this.bizContextInfo = bizContextInfo;
    return this;
  }

   /**
   * 流水上下文信息,JSON格式。根据action不同对应的结构也不同,JSON字段与含义可参考各个接口的请求参数。
   * @return bizContextInfo
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "{\"category_id\":\"2015050700000018\",\"main_shop_name\":\"海底捞万塘路分公司\"}", value = "流水上下文信息,JSON格式。根据action不同对应的结构也不同,JSON字段与含义可参考各个接口的请求参数。")

  public String getBizContextInfo() {
    return bizContextInfo;
  }


  public void setBizContextInfo(String bizContextInfo) {
    this.bizContextInfo = bizContextInfo;
  }


  public BizOrderQueryResponse bizId(String bizId) {
    
    this.bizId = bizId;
    return this;
  }

   /**
   * 业务主体ID。根据biz_type不同可能对应shop_id或item_id。  特别注意对于门店创建,当流水status=SUCCESS时,此字段才为shop_id,其他状态时为0或空。
   * @return bizId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "2015052100077000000000120774", value = "业务主体ID。根据biz_type不同可能对应shop_id或item_id。  特别注意对于门店创建,当流水status=SUCCESS时,此字段才为shop_id,其他状态时为0或空。")

  public String getBizId() {
    return bizId;
  }


  public void setBizId(String bizId) {
    this.bizId = bizId;
  }


  public BizOrderQueryResponse bizType(String bizType) {
    
    this.bizType = bizType;
    return this;
  }

   /**
   * 业务类型:SHOP-店铺,ITEM-商品
   * @return bizType
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "SHOP", value = "业务类型:SHOP-店铺,ITEM-商品")

  public String getBizType() {
    return bizType;
  }


  public void setBizType(String bizType) {
    this.bizType = bizType;
  }


  public BizOrderQueryResponse createTime(String createTime) {
    
    this.createTime = createTime;
    return this;
  }

   /**
   * 创建时间
   * @return createTime
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "2015-10-29 10:51:57", value = "创建时间")

  public String getCreateTime() {
    return createTime;
  }


  public void setCreateTime(String createTime) {
    this.createTime = createTime;
  }


  public BizOrderQueryResponse opId(String opId) {
    
    this.opId = opId;
    return this;
  }

   /**
   * 操作用户的支付账号id
   * @return opId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "2088001969784501", value = "操作用户的支付账号id")

  public String getOpId() {
    return opId;
  }


  public void setOpId(String opId) {
    this.opId = opId;
  }


  public BizOrderQueryResponse requestId(String requestId) {
    
    this.requestId = requestId;
    return this;
  }

   /**
   * 注意:此字段并非外部商户请求时传入的request_id,暂时代表支付宝内部字段,请勿用。
   * @return requestId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "2015123235324534", value = "注意:此字段并非外部商户请求时传入的request_id,暂时代表支付宝内部字段,请勿用。")

  public String getRequestId() {
    return requestId;
  }


  public void setRequestId(String requestId) {
    this.requestId = requestId;
  }


  public BizOrderQueryResponse resultCode(String resultCode) {
    
    this.resultCode = resultCode;
    return this;
  }

   /**
   * 流水处理结果码  <a href=\"https://doc.open.alipay.com/doc2/detail.htm?spm=a219a.7629140.0.0.lL9hGI&treeId=78&articleId=103834&docType=1#s2\">点此查看</a>
   * @return resultCode
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "RISK_AUDIT_FAIL", value = "流水处理结果码  点此查看")

  public String getResultCode() {
    return resultCode;
  }


  public void setResultCode(String resultCode) {
    this.resultCode = resultCode;
  }


  public BizOrderQueryResponse resultDesc(String resultDesc) {
    
    this.resultDesc = resultDesc;
    return this;
  }

   /**
   * 流水处理结果描述
   * @return resultDesc
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "证照审核未通过", value = "流水处理结果描述")

  public String getResultDesc() {
    return resultDesc;
  }


  public void setResultDesc(String resultDesc) {
    this.resultDesc = resultDesc;
  }


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

   /**
   * 流水状态:INIT-初始,PROCESS-处理中,SUCCESS-成功,FAIL-失败。
   * @return status
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "FAIL", value = "流水状态:INIT-初始,PROCESS-处理中,SUCCESS-成功,FAIL-失败。")

  public String getStatus() {
    return status;
  }


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


  public BizOrderQueryResponse subStatus(String subStatus) {
    
    this.subStatus = subStatus;
    return this;
  }

   /**
   * 流水子状态:WAIT_CERTIFY-等待认证,LICENSE_AUDITING-证照审核中,RISK_AUDITING-风控审核中,WAIT_SIGN-等待签约,FINISH-终结。
   * @return subStatus
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "FINISH", value = "流水子状态:WAIT_CERTIFY-等待认证,LICENSE_AUDITING-证照审核中,RISK_AUDITING-风控审核中,WAIT_SIGN-等待签约,FINISH-终结。")

  public String getSubStatus() {
    return subStatus;
  }


  public void setSubStatus(String subStatus) {
    this.subStatus = subStatus;
  }


  public BizOrderQueryResponse updateTime(String updateTime) {
    
    this.updateTime = updateTime;
    return this;
  }

   /**
   * 更新时间
   * @return updateTime
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "2015-10-29 10:51:57", value = "更新时间")

  public String getUpdateTime() {
    return updateTime;
  }


  public void setUpdateTime(String updateTime) {
    this.updateTime = updateTime;
  }



  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    BizOrderQueryResponse bizOrderQueryResponse = (BizOrderQueryResponse) o;
    return Objects.equals(this.action, bizOrderQueryResponse.action) &&
        Objects.equals(this.actionMode, bizOrderQueryResponse.actionMode) &&
        Objects.equals(this.applyId, bizOrderQueryResponse.applyId) &&
        Objects.equals(this.bizContextInfo, bizOrderQueryResponse.bizContextInfo) &&
        Objects.equals(this.bizId, bizOrderQueryResponse.bizId) &&
        Objects.equals(this.bizType, bizOrderQueryResponse.bizType) &&
        Objects.equals(this.createTime, bizOrderQueryResponse.createTime) &&
        Objects.equals(this.opId, bizOrderQueryResponse.opId) &&
        Objects.equals(this.requestId, bizOrderQueryResponse.requestId) &&
        Objects.equals(this.resultCode, bizOrderQueryResponse.resultCode) &&
        Objects.equals(this.resultDesc, bizOrderQueryResponse.resultDesc) &&
        Objects.equals(this.status, bizOrderQueryResponse.status) &&
        Objects.equals(this.subStatus, bizOrderQueryResponse.subStatus) &&
        Objects.equals(this.updateTime, bizOrderQueryResponse.updateTime);
  }

  @Override
  public int hashCode() {
    return Objects.hash(action, actionMode, applyId, bizContextInfo, bizId, bizType, createTime, opId, requestId, resultCode, resultDesc, status, subStatus, updateTime);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class BizOrderQueryResponse {\n");
    sb.append("    action: ").append(toIndentedString(action)).append("\n");
    sb.append("    actionMode: ").append(toIndentedString(actionMode)).append("\n");
    sb.append("    applyId: ").append(toIndentedString(applyId)).append("\n");
    sb.append("    bizContextInfo: ").append(toIndentedString(bizContextInfo)).append("\n");
    sb.append("    bizId: ").append(toIndentedString(bizId)).append("\n");
    sb.append("    bizType: ").append(toIndentedString(bizType)).append("\n");
    sb.append("    createTime: ").append(toIndentedString(createTime)).append("\n");
    sb.append("    opId: ").append(toIndentedString(opId)).append("\n");
    sb.append("    requestId: ").append(toIndentedString(requestId)).append("\n");
    sb.append("    resultCode: ").append(toIndentedString(resultCode)).append("\n");
    sb.append("    resultDesc: ").append(toIndentedString(resultDesc)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
    sb.append("    subStatus: ").append(toIndentedString(subStatus)).append("\n");
    sb.append("    updateTime: ").append(toIndentedString(updateTime)).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("action");
    openapiFields.add("action_mode");
    openapiFields.add("apply_id");
    openapiFields.add("biz_context_info");
    openapiFields.add("biz_id");
    openapiFields.add("biz_type");
    openapiFields.add("create_time");
    openapiFields.add("op_id");
    openapiFields.add("request_id");
    openapiFields.add("result_code");
    openapiFields.add("result_desc");
    openapiFields.add("status");
    openapiFields.add("sub_status");
    openapiFields.add("update_time");

    // 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 BizOrderQueryResponse
  */
  public static void validateJsonObject(JsonObject jsonObj) throws IOException {
      if (jsonObj == null) {
        if (BizOrderQueryResponse.openapiRequiredFields.isEmpty()) {
          return;
        } else { // has required fields
          throw new IllegalArgumentException(String.format("The required field(s) %s in BizOrderQueryResponse is not found in the empty JSON string", BizOrderQueryResponse.openapiRequiredFields.toString()));
        }
      }

      Set> entries = jsonObj.entrySet();
      // check to see if the JSON string contains additional fields
      for (Entry entry : entries) {
        if (!BizOrderQueryResponse.openapiFields.contains(entry.getKey())) {
          throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BizOrderQueryResponse` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
        }
      }
      if (jsonObj.get("action") != null && !jsonObj.get("action").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `action` to be a primitive type in the JSON string but got `%s`", jsonObj.get("action").toString()));
      }
      if (jsonObj.get("action_mode") != null && !jsonObj.get("action_mode").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `action_mode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("action_mode").toString()));
      }
      if (jsonObj.get("apply_id") != null && !jsonObj.get("apply_id").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `apply_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apply_id").toString()));
      }
      if (jsonObj.get("biz_context_info") != null && !jsonObj.get("biz_context_info").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `biz_context_info` to be a primitive type in the JSON string but got `%s`", jsonObj.get("biz_context_info").toString()));
      }
      if (jsonObj.get("biz_id") != null && !jsonObj.get("biz_id").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `biz_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("biz_id").toString()));
      }
      if (jsonObj.get("biz_type") != null && !jsonObj.get("biz_type").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `biz_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("biz_type").toString()));
      }
      if (jsonObj.get("create_time") != null && !jsonObj.get("create_time").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `create_time` to be a primitive type in the JSON string but got `%s`", jsonObj.get("create_time").toString()));
      }
      if (jsonObj.get("op_id") != null && !jsonObj.get("op_id").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `op_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("op_id").toString()));
      }
      if (jsonObj.get("request_id") != null && !jsonObj.get("request_id").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `request_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("request_id").toString()));
      }
      if (jsonObj.get("result_code") != null && !jsonObj.get("result_code").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `result_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("result_code").toString()));
      }
      if (jsonObj.get("result_desc") != null && !jsonObj.get("result_desc").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `result_desc` to be a primitive type in the JSON string but got `%s`", jsonObj.get("result_desc").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_status") != null && !jsonObj.get("sub_status").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `sub_status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sub_status").toString()));
      }
      if (jsonObj.get("update_time") != null && !jsonObj.get("update_time").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `update_time` to be a primitive type in the JSON string but got `%s`", jsonObj.get("update_time").toString()));
      }
  }

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

       return (TypeAdapter) new TypeAdapter() {
           @Override
           public void write(JsonWriter out, BizOrderQueryResponse value) throws IOException {
             JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
             elementAdapter.write(out, obj);
           }

           @Override
           public BizOrderQueryResponse read(JsonReader in) throws IOException {
             JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
             validateJsonObject(jsonObj);
             return thisAdapter.fromJsonTree(jsonObj);
           }

       }.nullSafe();
    }
  }

 /**
  * Create an instance of BizOrderQueryResponse given an JSON string
  *
  * @param jsonString JSON string
  * @return An instance of BizOrderQueryResponse
  * @throws IOException if the JSON string is invalid with respect to BizOrderQueryResponse
  */
  public static BizOrderQueryResponse fromJson(String jsonString) throws IOException {
    return JSON.getGson().fromJson(jsonString, BizOrderQueryResponse.class);
  }

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





© 2015 - 2024 Weber Informatics LLC | Privacy Policy