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;
  
  /**
   * AlipayIserviceCcmAgentGetModel
   */
  @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
  public class AlipayIserviceCcmAgentGetModel {
    public static final String SERIALIZED_NAME_EXTERNAL_USER_ID = "external_user_id";
    @SerializedName(SERIALIZED_NAME_EXTERNAL_USER_ID)
    private String externalUserId;
  
    public static final String SERIALIZED_NAME_ID = "id";
    @SerializedName(SERIALIZED_NAME_ID)
    private String id;
  
    public static final String SERIALIZED_NAME_JOB_NUMBER = "job_number";
    @SerializedName(SERIALIZED_NAME_JOB_NUMBER)
    private String jobNumber;
  
    public static final String SERIALIZED_NAME_USER_CHANNEL = "user_channel";
    @SerializedName(SERIALIZED_NAME_USER_CHANNEL)
    private String userChannel;
  
    public AlipayIserviceCcmAgentGetModel() { 
    }
  
    public AlipayIserviceCcmAgentGetModel externalUserId(String externalUserId) {
      
      this.externalUserId = externalUserId;
      return this;
    }
  
     /**
     * 客服账号id，当user_channel&#x3D;ALIPAY时，此id为支付宝2088id external_user_id和user_channel必须配对使用
     * @return externalUserId
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "2088xxx", value = "客服账号id，当user_channel=ALIPAY时，此id为支付宝2088id external_user_id和user_channel必须配对使用")
  
    public String getExternalUserId() {
      return externalUserId;
    }
  
  
    public void setExternalUserId(String externalUserId) {
      this.externalUserId = externalUserId;
    }
  
  
    public AlipayIserviceCcmAgentGetModel id(String id) {
      
      this.id = id;
      return this;
    }
  
     /**
     * 客服id
     * @return id
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "2018101801902073", value = "客服id")
  
    public String getId() {
      return id;
    }
  
  
    public void setId(String id) {
      this.id = id;
    }
  
  
    public AlipayIserviceCcmAgentGetModel jobNumber(String jobNumber) {
      
      this.jobNumber = jobNumber;
      return this;
    }
  
     /**
     * 客服工号
     * @return jobNumber
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "0001", value = "客服工号")
  
    public String getJobNumber() {
      return jobNumber;
    }
  
  
    public void setJobNumber(String jobNumber) {
      this.jobNumber = jobNumber;
    }
  
  
    public AlipayIserviceCcmAgentGetModel userChannel(String userChannel) {
      
      this.userChannel = userChannel;
      return this;
    }
  
     /**
     * 客服账号渠道, ALIPAY:支付宝账号 user_channel和external_user_id必须配对使用
     * @return userChannel
    **/
    @javax.annotation.Nullable
    @ApiModelProperty(example = "ALIPAY", value = "客服账号渠道, ALIPAY:支付宝账号 user_channel和external_user_id必须配对使用")
  
    public String getUserChannel() {
      return userChannel;
    }
  
  
    public void setUserChannel(String userChannel) {
      this.userChannel = userChannel;
    }
  
  
  
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      AlipayIserviceCcmAgentGetModel alipayIserviceCcmAgentGetModel = (AlipayIserviceCcmAgentGetModel) o;
      return Objects.equals(this.externalUserId, alipayIserviceCcmAgentGetModel.externalUserId) &&
          Objects.equals(this.id, alipayIserviceCcmAgentGetModel.id) &&
          Objects.equals(this.jobNumber, alipayIserviceCcmAgentGetModel.jobNumber) &&
          Objects.equals(this.userChannel, alipayIserviceCcmAgentGetModel.userChannel);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(externalUserId, id, jobNumber, userChannel);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class AlipayIserviceCcmAgentGetModel {\n");
      sb.append("    externalUserId: ").append(toIndentedString(externalUserId)).append("\n");
      sb.append("    id: ").append(toIndentedString(id)).append("\n");
      sb.append("    jobNumber: ").append(toIndentedString(jobNumber)).append("\n");
      sb.append("    userChannel: ").append(toIndentedString(userChannel)).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("external_user_id");
      openapiFields.add("id");
      openapiFields.add("job_number");
      openapiFields.add("user_channel");
  
      // 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 AlipayIserviceCcmAgentGetModel
    */
    public static void validateJsonObject(JsonObject jsonObj) throws IOException {
        if (jsonObj == null) {
          if (AlipayIserviceCcmAgentGetModel.openapiRequiredFields.isEmpty()) {
            return;
          } else { // has required fields
            throw new IllegalArgumentException(String.format("The required field(s) %s in AlipayIserviceCcmAgentGetModel is not found in the empty JSON string", AlipayIserviceCcmAgentGetModel.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 (!AlipayIserviceCcmAgentGetModel.openapiFields.contains(entry.getKey())) {
            throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AlipayIserviceCcmAgentGetModel` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
          }
        }
        if (jsonObj.get("external_user_id") != null && !jsonObj.get("external_user_id").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `external_user_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("external_user_id").toString()));
        }
        if (jsonObj.get("id") != null && !jsonObj.get("id").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString()));
        }
        if (jsonObj.get("job_number") != null && !jsonObj.get("job_number").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `job_number` to be a primitive type in the JSON string but got `%s`", jsonObj.get("job_number").toString()));
        }
        if (jsonObj.get("user_channel") != null && !jsonObj.get("user_channel").isJsonPrimitive()) {
          throw new IllegalArgumentException(String.format("Expected the field `user_channel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_channel").toString()));
        }
    }
  
    public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
      @SuppressWarnings("unchecked")
      @Override
      public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
         if (!AlipayIserviceCcmAgentGetModel.class.isAssignableFrom(type.getRawType())) {
           return null; // this class only serializes 'AlipayIserviceCcmAgentGetModel' and its subtypes
         }
         final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class);
         final TypeAdapter<AlipayIserviceCcmAgentGetModel> thisAdapter
                          = gson.getDelegateAdapter(this, TypeToken.get(AlipayIserviceCcmAgentGetModel.class));
  
         return (TypeAdapter<T>) new TypeAdapter<AlipayIserviceCcmAgentGetModel>() {
             @Override
             public void write(JsonWriter out, AlipayIserviceCcmAgentGetModel value) throws IOException {
               JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
               elementAdapter.write(out, obj);
             }
  
             @Override
             public AlipayIserviceCcmAgentGetModel read(JsonReader in) throws IOException {
               JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
               validateJsonObject(jsonObj);
               return thisAdapter.fromJsonTree(jsonObj);
             }
  
         }.nullSafe();
      }
    }
  
   /**
    * Create an instance of AlipayIserviceCcmAgentGetModel given an JSON string
    *
    * @param jsonString JSON string
    * @return An instance of AlipayIserviceCcmAgentGetModel
    * @throws IOException if the JSON string is invalid with respect to AlipayIserviceCcmAgentGetModel
    */
    public static AlipayIserviceCcmAgentGetModel fromJson(String jsonString) throws IOException {
      return JSON.getGson().fromJson(jsonString, AlipayIserviceCcmAgentGetModel.class);
    }
  
   /**
    * Convert an instance of AlipayIserviceCcmAgentGetModel to an JSON string
    *
    * @return JSON string
    */
    public String toJson() {
      return JSON.getGson().toJson(this);
    }
  }
  
  