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;
  
  /**
   * DatadigitalFincloudGeneralsaasFaceCheckQueryModel
   */
  @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
  public class DatadigitalFincloudGeneralsaasFaceCheckQueryModel {
    public static final String SERIALIZED_NAME_CERTIFY_ID = "certify_id";
    @SerializedName(SERIALIZED_NAME_CERTIFY_ID)
    private String certifyId;
  
    public static final String SERIALIZED_NAME_NEED_ALIVE_PHOTO = "need_alive_photo";
    @SerializedName(SERIALIZED_NAME_NEED_ALIVE_PHOTO)
    private String needAlivePhoto;
  
    public static final String SERIALIZED_NAME_NEED_ATTACK_RESULT = "need_attack_result";
    @SerializedName(SERIALIZED_NAME_NEED_ATTACK_RESULT)
    private String needAttackResult;
  
    public static final String SERIALIZED_NAME_NEED_QUALITY_SCORE = "need_quality_score";
    @SerializedName(SERIALIZED_NAME_NEED_QUALITY_SCORE)
    private String needQualityScore;
  
    public static final String SERIALIZED_NAME_NEED_SCORE = "need_score";
    @SerializedName(SERIALIZED_NAME_NEED_SCORE)
    private String needScore;
  
    public DatadigitalFincloudGeneralsaasFaceCheckQueryModel() { 
    }
  
    public DatadigitalFincloudGeneralsaasFaceCheckQueryModel certifyId(String certifyId) {
      
      this.certifyId = certifyId;
      return this;
    }
  
     /**
     * 传入初始化接口datadigital.fincloud.generalsaas.face.check.initialize 得到的certify_id
     * @return certifyId
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "dddddfsss88833ssf", value = "传入初始化接口datadigital.fincloud.generalsaas.face.check.initialize 得到的certify_id")
  
    public String getCertifyId() {
      return certifyId;
    }
  
  
    public void setCertifyId(String certifyId) {
      this.certifyId = certifyId;
    }
  
  
    public DatadigitalFincloudGeneralsaasFaceCheckQueryModel needAlivePhoto(String needAlivePhoto) {
      
      this.needAlivePhoto = needAlivePhoto;
      return this;
    }
  
     /**
     * 是否需要返回活体结果图片，needAlivePhoto：Y_O （原始图片）、Y_M（虚化，背景马赛克）、N（不返图）。非必填，默认为N
     * @return needAlivePhoto
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "Y_M", value = "是否需要返回活体结果图片，needAlivePhoto：Y_O （原始图片）、Y_M（虚化，背景马赛克）、N（不返图）。非必填，默认为N")
  
    public String getNeedAlivePhoto() {
      return needAlivePhoto;
    }
  
  
    public void setNeedAlivePhoto(String needAlivePhoto) {
      this.needAlivePhoto = needAlivePhoto;
    }
  
  
    public DatadigitalFincloudGeneralsaasFaceCheckQueryModel needAttackResult(String needAttackResult) {
      
      this.needAttackResult = needAttackResult;
      return this;
    }
  
     /**
     * 该参数已废弃
     * @return needAttackResult
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "N", value = "该参数已废弃")
  
    public String getNeedAttackResult() {
      return needAttackResult;
    }
  
  
    public void setNeedAttackResult(String needAttackResult) {
      this.needAttackResult = needAttackResult;
    }
  
  
    public DatadigitalFincloudGeneralsaasFaceCheckQueryModel needQualityScore(String needQualityScore) {
      
      this.needQualityScore = needQualityScore;
      return this;
    }
  
     /**
     * 是否需要返回图片质量分，非必填，默认值为N。 N表示不需要，Y表示需要
     * @return needQualityScore
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "N", value = "是否需要返回图片质量分，非必填，默认值为N。 N表示不需要，Y表示需要")
  
    public String getNeedQualityScore() {
      return needQualityScore;
    }
  
  
    public void setNeedQualityScore(String needQualityScore) {
      this.needQualityScore = needQualityScore;
    }
  
  
    public DatadigitalFincloudGeneralsaasFaceCheckQueryModel needScore(String needScore) {
      
      this.needScore = needScore;
      return this;
    }
  
     /**
     * 该入参已经废弃。
     * @return needScore
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "Y", value = "该入参已经废弃。")
  
    public String getNeedScore() {
      return needScore;
    }
  
  
    public void setNeedScore(String needScore) {
      this.needScore = needScore;
    }
  
  
  
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      DatadigitalFincloudGeneralsaasFaceCheckQueryModel datadigitalFincloudGeneralsaasFaceCheckQueryModel = (DatadigitalFincloudGeneralsaasFaceCheckQueryModel) o;
      return Objects.equals(this.certifyId, datadigitalFincloudGeneralsaasFaceCheckQueryModel.certifyId) &&
          Objects.equals(this.needAlivePhoto, datadigitalFincloudGeneralsaasFaceCheckQueryModel.needAlivePhoto) &&
          Objects.equals(this.needAttackResult, datadigitalFincloudGeneralsaasFaceCheckQueryModel.needAttackResult) &&
          Objects.equals(this.needQualityScore, datadigitalFincloudGeneralsaasFaceCheckQueryModel.needQualityScore) &&
          Objects.equals(this.needScore, datadigitalFincloudGeneralsaasFaceCheckQueryModel.needScore);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(certifyId, needAlivePhoto, needAttackResult, needQualityScore, needScore);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class DatadigitalFincloudGeneralsaasFaceCheckQueryModel {\n");
      sb.append("    certifyId: ").append(toIndentedString(certifyId)).append("\n");
      sb.append("    needAlivePhoto: ").append(toIndentedString(needAlivePhoto)).append("\n");
      sb.append("    needAttackResult: ").append(toIndentedString(needAttackResult)).append("\n");
      sb.append("    needQualityScore: ").append(toIndentedString(needQualityScore)).append("\n");
      sb.append("    needScore: ").append(toIndentedString(needScore)).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("certify_id");
      openapiFields.add("need_alive_photo");
      openapiFields.add("need_attack_result");
      openapiFields.add("need_quality_score");
      openapiFields.add("need_score");
  
      // 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 DatadigitalFincloudGeneralsaasFaceCheckQueryModel
    */
    public static void validateJsonObject(JsonObject jsonObj) throws IOException {
        if (jsonObj == null) {
          if (DatadigitalFincloudGeneralsaasFaceCheckQueryModel.openapiRequiredFields.isEmpty()) {
            return;
          } else { // has required fields
            throw new IllegalArgumentException(String.format("The required field(s) %s in DatadigitalFincloudGeneralsaasFaceCheckQueryModel is not found in the empty JSON string", DatadigitalFincloudGeneralsaasFaceCheckQueryModel.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 (!DatadigitalFincloudGeneralsaasFaceCheckQueryModel.openapiFields.contains(entry.getKey())) {
            throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DatadigitalFincloudGeneralsaasFaceCheckQueryModel` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
          }
        }
        if (jsonObj.get("certify_id") != null && !jsonObj.get("certify_id").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `certify_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("certify_id").toString()));
        }
        if (jsonObj.get("need_alive_photo") != null && !jsonObj.get("need_alive_photo").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `need_alive_photo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("need_alive_photo").toString()));
        }
        if (jsonObj.get("need_attack_result") != null && !jsonObj.get("need_attack_result").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `need_attack_result` to be a primitive type in the JSON string but got `%s`", jsonObj.get("need_attack_result").toString()));
        }
        if (jsonObj.get("need_quality_score") != null && !jsonObj.get("need_quality_score").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `need_quality_score` to be a primitive type in the JSON string but got `%s`", jsonObj.get("need_quality_score").toString()));
        }
        if (jsonObj.get("need_score") != null && !jsonObj.get("need_score").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `need_score` to be a primitive type in the JSON string but got `%s`", jsonObj.get("need_score").toString()));
        }
    }
  
    public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
      @SuppressWarnings("unchecked")
      @Override
      public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
         if (!DatadigitalFincloudGeneralsaasFaceCheckQueryModel.class.isAssignableFrom(type.getRawType())) {
           return null; // this class only serializes 'DatadigitalFincloudGeneralsaasFaceCheckQueryModel' and its subtypes
         }
         final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class);
         final TypeAdapter<DatadigitalFincloudGeneralsaasFaceCheckQueryModel> thisAdapter
                          = gson.getDelegateAdapter(this, TypeToken.get(DatadigitalFincloudGeneralsaasFaceCheckQueryModel.class));
  
         return (TypeAdapter<T>) new TypeAdapter<DatadigitalFincloudGeneralsaasFaceCheckQueryModel>() {
             @Override
             public void write(JsonWriter out, DatadigitalFincloudGeneralsaasFaceCheckQueryModel value) throws IOException {
               JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
               elementAdapter.write(out, obj);
             }
  
             @Override
             public DatadigitalFincloudGeneralsaasFaceCheckQueryModel read(JsonReader in) throws IOException {
               JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
               validateJsonObject(jsonObj);
               return thisAdapter.fromJsonTree(jsonObj);
             }
  
         }.nullSafe();
      }
    }
  
   /**
    * Create an instance of DatadigitalFincloudGeneralsaasFaceCheckQueryModel given an JSON string
    *
    * @param jsonString JSON string
    * @return An instance of DatadigitalFincloudGeneralsaasFaceCheckQueryModel
    * @throws IOException if the JSON string is invalid with respect to DatadigitalFincloudGeneralsaasFaceCheckQueryModel
    */
    public static DatadigitalFincloudGeneralsaasFaceCheckQueryModel fromJson(String jsonString) throws IOException {
      return JSON.getGson().fromJson(jsonString, DatadigitalFincloudGeneralsaasFaceCheckQueryModel.class);
    }
  
   /**
    * Convert an instance of DatadigitalFincloudGeneralsaasFaceCheckQueryModel to an JSON string
    *
    * @return JSON string
    */
    public String toJson() {
      return JSON.getGson().toJson(this);
    }
  }
  
  