content: /*
   * 支付宝开放平台API
   * 支付宝开放平台v3协议文档
   *
   * The version of the OpenAPI document: 2024-01-10
   * 
   *
   * 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;
  
  /**
   * ZhimaMerchantZmgoCumulateQueryModel
   */
  @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
  public class ZhimaMerchantZmgoCumulateQueryModel {
    public static final String SERIALIZED_NAME_AGREEMENT_ID = "agreement_id";
    @SerializedName(SERIALIZED_NAME_AGREEMENT_ID)
    private String agreementId;
  
    public static final String SERIALIZED_NAME_NEED_DETAIL = "need_detail";
    @SerializedName(SERIALIZED_NAME_NEED_DETAIL)
    private Boolean needDetail;
  
    public static final String SERIALIZED_NAME_OPEN_ID = "open_id";
    @SerializedName(SERIALIZED_NAME_OPEN_ID)
    private String openId;
  
    public static final String SERIALIZED_NAME_PAGE_NO = "page_no";
    @SerializedName(SERIALIZED_NAME_PAGE_NO)
    private Integer pageNo;
  
    public static final String SERIALIZED_NAME_PAGE_SIZE = "page_size";
    @SerializedName(SERIALIZED_NAME_PAGE_SIZE)
    private Integer pageSize;
  
    public static final String SERIALIZED_NAME_PROVIDER_PID = "provider_pid";
    @SerializedName(SERIALIZED_NAME_PROVIDER_PID)
    private String providerPid;
  
    public static final String SERIALIZED_NAME_USER_ID = "user_id";
    @SerializedName(SERIALIZED_NAME_USER_ID)
    private String userId;
  
    public ZhimaMerchantZmgoCumulateQueryModel() { 
    }
  
    public ZhimaMerchantZmgoCumulateQueryModel agreementId(String agreementId) {
      
      this.agreementId = agreementId;
      return this;
    }
  
     /**
     * 芝麻go协议号，唯一标识一个芝麻go协议。
     * @return agreementId
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "20195108518085620000", value = "芝麻go协议号，唯一标识一个芝麻go协议。")
  
    public String getAgreementId() {
      return agreementId;
    }
  
  
    public void setAgreementId(String agreementId) {
      this.agreementId = agreementId;
    }
  
  
    public ZhimaMerchantZmgoCumulateQueryModel needDetail(Boolean needDetail) {
      
      this.needDetail = needDetail;
      return this;
    }
  
     /**
     * 是否需要回传明细。枚举支持： * true：需要回传明细。 * false：不需要回传明细。
     * @return needDetail
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "false", value = "是否需要回传明细。枚举支持： * true：需要回传明细。 * false：不需要回传明细。")
  
    public Boolean getNeedDetail() {
      return needDetail;
    }
  
  
    public void setNeedDetail(Boolean needDetail) {
      this.needDetail = needDetail;
    }
  
  
    public ZhimaMerchantZmgoCumulateQueryModel openId(String openId) {
      
      this.openId = openId;
      return this;
    }
  
     /**
     * 用户 id，用户在支付宝的唯一标识，以 2088 开头的 16 位纯数字组成。
     * @return openId
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "074a1CcTG1LelxKe4xQC0zgNdId0nxi95b5lsNpazWYoCo5", value = "用户 id，用户在支付宝的唯一标识，以 2088 开头的 16 位纯数字组成。")
  
    public String getOpenId() {
      return openId;
    }
  
  
    public void setOpenId(String openId) {
      this.openId = openId;
    }
  
  
    public ZhimaMerchantZmgoCumulateQueryModel pageNo(Integer pageNo) {
      
      this.pageNo = pageNo;
      return this;
    }
  
     /**
     * 分页参数，当need_detail&#x3D;true时需要，代表当前页数，从1开始。
     * @return pageNo
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "1", value = "分页参数，当need_detail=true时需要，代表当前页数，从1开始。")
  
    public Integer getPageNo() {
      return pageNo;
    }
  
  
    public void setPageNo(Integer pageNo) {
      this.pageNo = pageNo;
    }
  
  
    public ZhimaMerchantZmgoCumulateQueryModel pageSize(Integer pageSize) {
      
      this.pageSize = pageSize;
      return this;
    }
  
     /**
     * 分页参数，当need_detail&#x3D;true时需要，代表每页大小，不能大于20。
     * @return pageSize
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "20", value = "分页参数，当need_detail=true时需要，代表每页大小，不能大于20。")
  
    public Integer getPageSize() {
      return pageSize;
    }
  
  
    public void setPageSize(Integer pageSize) {
      this.pageSize = pageSize;
    }
  
  
    public ZhimaMerchantZmgoCumulateQueryModel providerPid(String providerPid) {
      
      this.providerPid = providerPid;
      return this;
    }
  
     /**
     * 数据回传的商户 ID，即和用户发生业务来往的 PID 主体。商户账号在支付宝的唯一标识，以 2088 开头的 16 位纯数字组成。
     * @return providerPid
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "2088621805983504", value = "数据回传的商户 ID，即和用户发生业务来往的 PID 主体。商户账号在支付宝的唯一标识，以 2088 开头的 16 位纯数字组成。")
  
    public String getProviderPid() {
      return providerPid;
    }
  
  
    public void setProviderPid(String providerPid) {
      this.providerPid = providerPid;
    }
  
  
    public ZhimaMerchantZmgoCumulateQueryModel userId(String userId) {
      
      this.userId = userId;
      return this;
    }
  
     /**
     * 用户 id，用户在支付宝的唯一标识，以 2088 开头的 16 位纯数字组成。
     * @return userId
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "2088602002015001", value = "用户 id，用户在支付宝的唯一标识，以 2088 开头的 16 位纯数字组成。")
  
    public String getUserId() {
      return userId;
    }
  
  
    public void setUserId(String userId) {
      this.userId = userId;
    }
  
  
  
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      ZhimaMerchantZmgoCumulateQueryModel zhimaMerchantZmgoCumulateQueryModel = (ZhimaMerchantZmgoCumulateQueryModel) o;
      return Objects.equals(this.agreementId, zhimaMerchantZmgoCumulateQueryModel.agreementId) &&
          Objects.equals(this.needDetail, zhimaMerchantZmgoCumulateQueryModel.needDetail) &&
          Objects.equals(this.openId, zhimaMerchantZmgoCumulateQueryModel.openId) &&
          Objects.equals(this.pageNo, zhimaMerchantZmgoCumulateQueryModel.pageNo) &&
          Objects.equals(this.pageSize, zhimaMerchantZmgoCumulateQueryModel.pageSize) &&
          Objects.equals(this.providerPid, zhimaMerchantZmgoCumulateQueryModel.providerPid) &&
          Objects.equals(this.userId, zhimaMerchantZmgoCumulateQueryModel.userId);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(agreementId, needDetail, openId, pageNo, pageSize, providerPid, userId);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class ZhimaMerchantZmgoCumulateQueryModel {\n");
      sb.append("    agreementId: ").append(toIndentedString(agreementId)).append("\n");
      sb.append("    needDetail: ").append(toIndentedString(needDetail)).append("\n");
      sb.append("    openId: ").append(toIndentedString(openId)).append("\n");
      sb.append("    pageNo: ").append(toIndentedString(pageNo)).append("\n");
      sb.append("    pageSize: ").append(toIndentedString(pageSize)).append("\n");
      sb.append("    providerPid: ").append(toIndentedString(providerPid)).append("\n");
      sb.append("    userId: ").append(toIndentedString(userId)).append("\n");
      sb.append("}");
      return sb.toString();
    }
  
    /**
     * Convert the given object to string with each line indented by 4 spaces
     * (except the first line).
     */
    private String toIndentedString(Object o) {
      if (o == null) {
        return "null";
      }
      return o.toString().replace("\n", "\n    ");
    }
  
  
    public static HashSet<String> openapiFields;
    public static HashSet<String> openapiRequiredFields;
  
    static {
      // a set of all properties/fields (JSON key names)
      openapiFields = new HashSet<String>();
      openapiFields.add("agreement_id");
      openapiFields.add("need_detail");
      openapiFields.add("open_id");
      openapiFields.add("page_no");
      openapiFields.add("page_size");
      openapiFields.add("provider_pid");
      openapiFields.add("user_id");
  
      // a set of required properties/fields (JSON key names)
      openapiRequiredFields = new HashSet<String>();
    }
  
   /**
    * Validates the JSON Object and throws an exception if issues found
    *
    * @param jsonObj JSON Object
    * @throws IOException if the JSON Object is invalid with respect to ZhimaMerchantZmgoCumulateQueryModel
    */
    public static void validateJsonObject(JsonObject jsonObj) throws IOException {
        if (jsonObj == null) {
          if (ZhimaMerchantZmgoCumulateQueryModel.openapiRequiredFields.isEmpty()) {
            return;
          } else { // has required fields
            throw new IllegalArgumentException(String.format("The required field(s) %s in ZhimaMerchantZmgoCumulateQueryModel is not found in the empty JSON string", ZhimaMerchantZmgoCumulateQueryModel.openapiRequiredFields.toString()));
          }
        }
  
        Set<Entry<String, JsonElement>> entries = jsonObj.entrySet();
        // check to see if the JSON string contains additional fields
        for (Entry<String, JsonElement> entry : entries) {
          if (!ZhimaMerchantZmgoCumulateQueryModel.openapiFields.contains(entry.getKey())) {
            throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ZhimaMerchantZmgoCumulateQueryModel` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
          }
        }
        if (jsonObj.get("agreement_id") != null && !jsonObj.get("agreement_id").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `agreement_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("agreement_id").toString()));
        }
        if (jsonObj.get("open_id") != null && !jsonObj.get("open_id").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `open_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("open_id").toString()));
        }
        if (jsonObj.get("provider_pid") != null && !jsonObj.get("provider_pid").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `provider_pid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("provider_pid").toString()));
        }
        if (jsonObj.get("user_id") != null && !jsonObj.get("user_id").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `user_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_id").toString()));
        }
    }
  
    public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
      @SuppressWarnings("unchecked")
      @Override
      public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
         if (!ZhimaMerchantZmgoCumulateQueryModel.class.isAssignableFrom(type.getRawType())) {
           return null; // this class only serializes 'ZhimaMerchantZmgoCumulateQueryModel' and its subtypes
         }
         final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class);
         final TypeAdapter<ZhimaMerchantZmgoCumulateQueryModel> thisAdapter
                          = gson.getDelegateAdapter(this, TypeToken.get(ZhimaMerchantZmgoCumulateQueryModel.class));
  
         return (TypeAdapter<T>) new TypeAdapter<ZhimaMerchantZmgoCumulateQueryModel>() {
             @Override
             public void write(JsonWriter out, ZhimaMerchantZmgoCumulateQueryModel value) throws IOException {
               JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
               elementAdapter.write(out, obj);
             }
  
             @Override
             public ZhimaMerchantZmgoCumulateQueryModel read(JsonReader in) throws IOException {
               JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
               validateJsonObject(jsonObj);
               return thisAdapter.fromJsonTree(jsonObj);
             }
  
         }.nullSafe();
      }
    }
  
   /**
    * Create an instance of ZhimaMerchantZmgoCumulateQueryModel given an JSON string
    *
    * @param jsonString JSON string
    * @return An instance of ZhimaMerchantZmgoCumulateQueryModel
    * @throws IOException if the JSON string is invalid with respect to ZhimaMerchantZmgoCumulateQueryModel
    */
    public static ZhimaMerchantZmgoCumulateQueryModel fromJson(String jsonString) throws IOException {
      return JSON.getGson().fromJson(jsonString, ZhimaMerchantZmgoCumulateQueryModel.class);
    }
  
   /**
    * Convert an instance of ZhimaMerchantZmgoCumulateQueryModel to an JSON string
    *
    * @return JSON string
    */
    public String toJson() {
      return JSON.getGson().toJson(this);
    }
  }
  
  