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;
  
  /**
   * AlipayCommerceEducateCampusInstitutionsQueryModel
   */
  @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
  public class AlipayCommerceEducateCampusInstitutionsQueryModel {
    public static final String SERIALIZED_NAME_CITY_CODE = "city_code";
    @SerializedName(SERIALIZED_NAME_CITY_CODE)
    private String cityCode;
  
    public static final String SERIALIZED_NAME_INST_ID = "inst_id";
    @SerializedName(SERIALIZED_NAME_INST_ID)
    private String instId;
  
    public static final String SERIALIZED_NAME_INST_NAME = "inst_name";
    @SerializedName(SERIALIZED_NAME_INST_NAME)
    private String instName;
  
    public static final String SERIALIZED_NAME_INST_STD_CODE = "inst_std_code";
    @SerializedName(SERIALIZED_NAME_INST_STD_CODE)
    private String instStdCode;
  
    public static final String SERIALIZED_NAME_LIKE_PROPERTY = "like_property";
    @SerializedName(SERIALIZED_NAME_LIKE_PROPERTY)
    private String likeProperty;
  
    public static final String SERIALIZED_NAME_PROVINCE_CODE = "province_code";
    @SerializedName(SERIALIZED_NAME_PROVINCE_CODE)
    private String provinceCode;
  
    public AlipayCommerceEducateCampusInstitutionsQueryModel() { 
    }
  
    public AlipayCommerceEducateCampusInstitutionsQueryModel cityCode(String cityCode) {
      
      this.cityCode = cityCode;
      return this;
    }
  
     /**
     * 城市编码，编码标准为中华人民共和国行政区划代码，参见 2020年12月中华人民共和国县以上行政区划代码。
     * @return cityCode
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "370900", value = "城市编码，编码标准为中华人民共和国行政区划代码，参见 2020年12月中华人民共和国县以上行政区划代码。")
  
    public String getCityCode() {
      return cityCode;
    }
  
  
    public void setCityCode(String cityCode) {
      this.cityCode = cityCode;
    }
  
  
    public AlipayCommerceEducateCampusInstitutionsQueryModel instId(String instId) {
      
      this.instId = instId;
      return this;
    }
  
     /**
     * 学校内标：支付宝内部学校唯一编号。使用内标查询时，默认使用内标进行精确匹配。
     * @return instId
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "2088000139662311", value = "学校内标：支付宝内部学校唯一编号。使用内标查询时，默认使用内标进行精确匹配。")
  
    public String getInstId() {
      return instId;
    }
  
  
    public void setInstId(String instId) {
      this.instId = instId;
    }
  
  
    public AlipayCommerceEducateCampusInstitutionsQueryModel instName(String instName) {
      
      this.instName = instName;
      return this;
    }
  
     /**
     * 学校名称
     * @return instName
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "复旦大学", value = "学校名称")
  
    public String getInstName() {
      return instName;
    }
  
  
    public void setInstName(String instName) {
      this.instName = instName;
    }
  
  
    public AlipayCommerceEducateCampusInstitutionsQueryModel instStdCode(String instStdCode) {
      
      this.instStdCode = instStdCode;
      return this;
    }
  
     /**
     * 学校外标：统一社会信用编码或教育部提供的学校标识码。使用学校外标查询时，默认使用外标进行精确匹配。
     * @return instStdCode
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "202008016104", value = "学校外标：统一社会信用编码或教育部提供的学校标识码。使用学校外标查询时，默认使用外标进行精确匹配。")
  
    public String getInstStdCode() {
      return instStdCode;
    }
  
  
    public void setInstStdCode(String instStdCode) {
      this.instStdCode = instStdCode;
    }
  
  
    public AlipayCommerceEducateCampusInstitutionsQueryModel likeProperty(String likeProperty) {
      
      this.likeProperty = likeProperty;
      return this;
    }
  
     /**
     * 是否使用学校名称模糊匹配进行查询，默认精确匹配。 枚举值如下： 1：精确匹配； 0：模糊匹配
     * @return likeProperty
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "1", value = "是否使用学校名称模糊匹配进行查询，默认精确匹配。 枚举值如下： 1：精确匹配； 0：模糊匹配")
  
    public String getLikeProperty() {
      return likeProperty;
    }
  
  
    public void setLikeProperty(String likeProperty) {
      this.likeProperty = likeProperty;
    }
  
  
    public AlipayCommerceEducateCampusInstitutionsQueryModel provinceCode(String provinceCode) {
      
      this.provinceCode = provinceCode;
      return this;
    }
  
     /**
     * 省份编码，编码标准为中华人民共和国行政区划代码，参见 2020年12月中华人民共和国县以上行政区划代码。
     * @return provinceCode
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "370000", value = "省份编码，编码标准为中华人民共和国行政区划代码，参见 2020年12月中华人民共和国县以上行政区划代码。")
  
    public String getProvinceCode() {
      return provinceCode;
    }
  
  
    public void setProvinceCode(String provinceCode) {
      this.provinceCode = provinceCode;
    }
  
  
  
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      AlipayCommerceEducateCampusInstitutionsQueryModel alipayCommerceEducateCampusInstitutionsQueryModel = (AlipayCommerceEducateCampusInstitutionsQueryModel) o;
      return Objects.equals(this.cityCode, alipayCommerceEducateCampusInstitutionsQueryModel.cityCode) &&
          Objects.equals(this.instId, alipayCommerceEducateCampusInstitutionsQueryModel.instId) &&
          Objects.equals(this.instName, alipayCommerceEducateCampusInstitutionsQueryModel.instName) &&
          Objects.equals(this.instStdCode, alipayCommerceEducateCampusInstitutionsQueryModel.instStdCode) &&
          Objects.equals(this.likeProperty, alipayCommerceEducateCampusInstitutionsQueryModel.likeProperty) &&
          Objects.equals(this.provinceCode, alipayCommerceEducateCampusInstitutionsQueryModel.provinceCode);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(cityCode, instId, instName, instStdCode, likeProperty, provinceCode);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class AlipayCommerceEducateCampusInstitutionsQueryModel {\n");
      sb.append("    cityCode: ").append(toIndentedString(cityCode)).append("\n");
      sb.append("    instId: ").append(toIndentedString(instId)).append("\n");
      sb.append("    instName: ").append(toIndentedString(instName)).append("\n");
      sb.append("    instStdCode: ").append(toIndentedString(instStdCode)).append("\n");
      sb.append("    likeProperty: ").append(toIndentedString(likeProperty)).append("\n");
      sb.append("    provinceCode: ").append(toIndentedString(provinceCode)).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("city_code");
      openapiFields.add("inst_id");
      openapiFields.add("inst_name");
      openapiFields.add("inst_std_code");
      openapiFields.add("like_property");
      openapiFields.add("province_code");
  
      // 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 AlipayCommerceEducateCampusInstitutionsQueryModel
    */
    public static void validateJsonObject(JsonObject jsonObj) throws IOException {
        if (jsonObj == null) {
          if (AlipayCommerceEducateCampusInstitutionsQueryModel.openapiRequiredFields.isEmpty()) {
            return;
          } else { // has required fields
            throw new IllegalArgumentException(String.format("The required field(s) %s in AlipayCommerceEducateCampusInstitutionsQueryModel is not found in the empty JSON string", AlipayCommerceEducateCampusInstitutionsQueryModel.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 (!AlipayCommerceEducateCampusInstitutionsQueryModel.openapiFields.contains(entry.getKey())) {
            throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AlipayCommerceEducateCampusInstitutionsQueryModel` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
          }
        }
        if (jsonObj.get("city_code") != null && !jsonObj.get("city_code").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `city_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city_code").toString()));
        }
        if (jsonObj.get("inst_id") != null && !jsonObj.get("inst_id").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `inst_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("inst_id").toString()));
        }
        if (jsonObj.get("inst_name") != null && !jsonObj.get("inst_name").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `inst_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("inst_name").toString()));
        }
        if (jsonObj.get("inst_std_code") != null && !jsonObj.get("inst_std_code").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `inst_std_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("inst_std_code").toString()));
        }
        if (jsonObj.get("like_property") != null && !jsonObj.get("like_property").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `like_property` to be a primitive type in the JSON string but got `%s`", jsonObj.get("like_property").toString()));
        }
        if (jsonObj.get("province_code") != null && !jsonObj.get("province_code").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `province_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("province_code").toString()));
        }
    }
  
    public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
      @SuppressWarnings("unchecked")
      @Override
      public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
         if (!AlipayCommerceEducateCampusInstitutionsQueryModel.class.isAssignableFrom(type.getRawType())) {
           return null; // this class only serializes 'AlipayCommerceEducateCampusInstitutionsQueryModel' and its subtypes
         }
         final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class);
         final TypeAdapter<AlipayCommerceEducateCampusInstitutionsQueryModel> thisAdapter
                          = gson.getDelegateAdapter(this, TypeToken.get(AlipayCommerceEducateCampusInstitutionsQueryModel.class));
  
         return (TypeAdapter<T>) new TypeAdapter<AlipayCommerceEducateCampusInstitutionsQueryModel>() {
             @Override
             public void write(JsonWriter out, AlipayCommerceEducateCampusInstitutionsQueryModel value) throws IOException {
               JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
               elementAdapter.write(out, obj);
             }
  
             @Override
             public AlipayCommerceEducateCampusInstitutionsQueryModel read(JsonReader in) throws IOException {
               JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
               validateJsonObject(jsonObj);
               return thisAdapter.fromJsonTree(jsonObj);
             }
  
         }.nullSafe();
      }
    }
  
   /**
    * Create an instance of AlipayCommerceEducateCampusInstitutionsQueryModel given an JSON string
    *
    * @param jsonString JSON string
    * @return An instance of AlipayCommerceEducateCampusInstitutionsQueryModel
    * @throws IOException if the JSON string is invalid with respect to AlipayCommerceEducateCampusInstitutionsQueryModel
    */
    public static AlipayCommerceEducateCampusInstitutionsQueryModel fromJson(String jsonString) throws IOException {
      return JSON.getGson().fromJson(jsonString, AlipayCommerceEducateCampusInstitutionsQueryModel.class);
    }
  
   /**
    * Convert an instance of AlipayCommerceEducateCampusInstitutionsQueryModel to an JSON string
    *
    * @return JSON string
    */
    public String toJson() {
      return JSON.getGson().toJson(this);
    }
  }
  
  