java/src/main/java/com/konfigthis/dojah/client/model/GetEmailReputationResponseEntityDetails.java
<filename>java/src/main/java/com/konfigthis/dojah/client/model/GetEmailReputationResponseEntityDetails.java/*
 * DOJAH APIs
 * Use Dojah to verify, onboard and manage user identity across Africa!
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 *
 * NOTE: This class is auto generated by Konfig (https://konfigthis.com).
 * Do not edit the class manually.
 */


package com.konfigthis.dojah.client.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.util.ArrayList;
import java.util.List;

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 org.apache.commons.lang3.StringUtils;

import java.lang.reflect.Type;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

import com.konfigthis.dojah.client.JSON;

/**
 * GetEmailReputationResponseEntityDetails
 */
@javax.annotation.Generated(value = "Generated by https://konfigthis.com")
public class GetEmailReputationResponseEntityDetails {
  public static final String SERIALIZED_NAME_BLACKLISTED = "blacklisted";
  @SerializedName(SERIALIZED_NAME_BLACKLISTED)
  private Boolean blacklisted;

  public static final String SERIALIZED_NAME_MALICIOUS_ACTIVITY = "malicious_activity";
  @SerializedName(SERIALIZED_NAME_MALICIOUS_ACTIVITY)
  private Boolean maliciousActivity;

  public static final String SERIALIZED_NAME_MALICIOUS_ACTIVITY_RECENT = "malicious_activity_recent";
  @SerializedName(SERIALIZED_NAME_MALICIOUS_ACTIVITY_RECENT)
  private Boolean maliciousActivityRecent;

  public static final String SERIALIZED_NAME_CREDENTIALS_LEAKED = "credentials_leaked";
  @SerializedName(SERIALIZED_NAME_CREDENTIALS_LEAKED)
  private Boolean credentialsLeaked;

  public static final String SERIALIZED_NAME_CREDENTIALS_LEAKED_RECENT = "credentials_leaked_recent";
  @SerializedName(SERIALIZED_NAME_CREDENTIALS_LEAKED_RECENT)
  private Boolean credentialsLeakedRecent;

  public static final String SERIALIZED_NAME_DATA_BREACH = "data_breach";
  @SerializedName(SERIALIZED_NAME_DATA_BREACH)
  private Boolean dataBreach;

  public static final String SERIALIZED_NAME_FIRST_SEEN = "first_seen";
  @SerializedName(SERIALIZED_NAME_FIRST_SEEN)
  private String firstSeen;

  public static final String SERIALIZED_NAME_LAST_SEEN = "last_seen";
  @SerializedName(SERIALIZED_NAME_LAST_SEEN)
  private String lastSeen;

  public static final String SERIALIZED_NAME_DOMAIN_EXISTS = "domain_exists";
  @SerializedName(SERIALIZED_NAME_DOMAIN_EXISTS)
  private Boolean domainExists;

  public static final String SERIALIZED_NAME_DOMAIN_REPUTATION = "domain_reputation";
  @SerializedName(SERIALIZED_NAME_DOMAIN_REPUTATION)
  private String domainReputation;

  public static final String SERIALIZED_NAME_NEW_DOMAIN = "new_domain";
  @SerializedName(SERIALIZED_NAME_NEW_DOMAIN)
  private Boolean newDomain;

  public static final String SERIALIZED_NAME_DAYS_SINCE_DOMAIN_CREATION = "days_since_domain_creation";
  @SerializedName(SERIALIZED_NAME_DAYS_SINCE_DOMAIN_CREATION)
  private Double daysSinceDomainCreation;

  public static final String SERIALIZED_NAME_SUSPICIOUS_TLD = "suspicious_tld";
  @SerializedName(SERIALIZED_NAME_SUSPICIOUS_TLD)
  private Boolean suspiciousTld;

  public static final String SERIALIZED_NAME_SPAM = "spam";
  @SerializedName(SERIALIZED_NAME_SPAM)
  private Boolean spam;

  public static final String SERIALIZED_NAME_FREE_PROVIDER = "free_provider";
  @SerializedName(SERIALIZED_NAME_FREE_PROVIDER)
  private Boolean freeProvider;

  public static final String SERIALIZED_NAME_DISPOSABLE = "disposable";
  @SerializedName(SERIALIZED_NAME_DISPOSABLE)
  private Boolean disposable;

  public static final String SERIALIZED_NAME_DELIVERABLE = "deliverable";
  @SerializedName(SERIALIZED_NAME_DELIVERABLE)
  private Boolean deliverable;

  public static final String SERIALIZED_NAME_ACCEPT_ALL = "accept_all";
  @SerializedName(SERIALIZED_NAME_ACCEPT_ALL)
  private Boolean acceptAll;

  public static final String SERIALIZED_NAME_VALID_MX = "valid_mx";
  @SerializedName(SERIALIZED_NAME_VALID_MX)
  private Boolean validMx;

  public static final String SERIALIZED_NAME_PRIMARY_MX = "primary_mx";
  @SerializedName(SERIALIZED_NAME_PRIMARY_MX)
  private String primaryMx;

  public static final String SERIALIZED_NAME_SPOOFABLE = "spoofable";
  @SerializedName(SERIALIZED_NAME_SPOOFABLE)
  private Boolean spoofable;

  public static final String SERIALIZED_NAME_SPF_STRICT = "spf_strict";
  @SerializedName(SERIALIZED_NAME_SPF_STRICT)
  private Boolean spfStrict;

  public static final String SERIALIZED_NAME_DMARC_ENFORCED = "dmarc_enforced";
  @SerializedName(SERIALIZED_NAME_DMARC_ENFORCED)
  private Boolean dmarcEnforced;

  public static final String SERIALIZED_NAME_PROFILES = "profiles";
  @SerializedName(SERIALIZED_NAME_PROFILES)
  private List<String> profiles = null;

  public GetEmailReputationResponseEntityDetails() {
  }

  public GetEmailReputationResponseEntityDetails blacklisted(Boolean blacklisted) {

    
    
    
    
    this.blacklisted = blacklisted;
    return this;
  }

   /**
   * Get blacklisted
   * @return blacklisted
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "false", value = "")

  public Boolean getBlacklisted() {
    return blacklisted;
  }


  public void setBlacklisted(Boolean blacklisted) {

    
    
    
    this.blacklisted = blacklisted;
  }


  public GetEmailReputationResponseEntityDetails maliciousActivity(Boolean maliciousActivity) {

    
    
    
    
    this.maliciousActivity = maliciousActivity;
    return this;
  }

   /**
   * Get maliciousActivity
   * @return maliciousActivity
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "false", value = "")

  public Boolean getMaliciousActivity() {
    return maliciousActivity;
  }


  public void setMaliciousActivity(Boolean maliciousActivity) {

    
    
    
    this.maliciousActivity = maliciousActivity;
  }


  public GetEmailReputationResponseEntityDetails maliciousActivityRecent(Boolean maliciousActivityRecent) {

    
    
    
    
    this.maliciousActivityRecent = maliciousActivityRecent;
    return this;
  }

   /**
   * Get maliciousActivityRecent
   * @return maliciousActivityRecent
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "false", value = "")

  public Boolean getMaliciousActivityRecent() {
    return maliciousActivityRecent;
  }


  public void setMaliciousActivityRecent(Boolean maliciousActivityRecent) {

    
    
    
    this.maliciousActivityRecent = maliciousActivityRecent;
  }


  public GetEmailReputationResponseEntityDetails credentialsLeaked(Boolean credentialsLeaked) {

    
    
    
    
    this.credentialsLeaked = credentialsLeaked;
    return this;
  }

   /**
   * Get credentialsLeaked
   * @return credentialsLeaked
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "true", value = "")

  public Boolean getCredentialsLeaked() {
    return credentialsLeaked;
  }


  public void setCredentialsLeaked(Boolean credentialsLeaked) {

    
    
    
    this.credentialsLeaked = credentialsLeaked;
  }


  public GetEmailReputationResponseEntityDetails credentialsLeakedRecent(Boolean credentialsLeakedRecent) {

    
    
    
    
    this.credentialsLeakedRecent = credentialsLeakedRecent;
    return this;
  }

   /**
   * Get credentialsLeakedRecent
   * @return credentialsLeakedRecent
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "false", value = "")

  public Boolean getCredentialsLeakedRecent() {
    return credentialsLeakedRecent;
  }


  public void setCredentialsLeakedRecent(Boolean credentialsLeakedRecent) {

    
    
    
    this.credentialsLeakedRecent = credentialsLeakedRecent;
  }


  public GetEmailReputationResponseEntityDetails dataBreach(Boolean dataBreach) {

    
    
    
    
    this.dataBreach = dataBreach;
    return this;
  }

   /**
   * Get dataBreach
   * @return dataBreach
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "true", value = "")

  public Boolean getDataBreach() {
    return dataBreach;
  }


  public void setDataBreach(Boolean dataBreach) {

    
    
    
    this.dataBreach = dataBreach;
  }


  public GetEmailReputationResponseEntityDetails firstSeen(String firstSeen) {

    
    
    
    
    this.firstSeen = firstSeen;
    return this;
  }

   /**
   * Get firstSeen
   * @return firstSeen
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "07/01/2008", value = "")

  public String getFirstSeen() {
    return firstSeen;
  }


  public void setFirstSeen(String firstSeen) {

    
    
    
    this.firstSeen = firstSeen;
  }


  public GetEmailReputationResponseEntityDetails lastSeen(String lastSeen) {

    
    
    
    
    this.lastSeen = lastSeen;
    return this;
  }

   /**
   * Get lastSeen
   * @return lastSeen
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "03/22/2021", value = "")

  public String getLastSeen() {
    return lastSeen;
  }


  public void setLastSeen(String lastSeen) {

    
    
    
    this.lastSeen = lastSeen;
  }


  public GetEmailReputationResponseEntityDetails domainExists(Boolean domainExists) {

    
    
    
    
    this.domainExists = domainExists;
    return this;
  }

   /**
   * Get domainExists
   * @return domainExists
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "true", value = "")

  public Boolean getDomainExists() {
    return domainExists;
  }


  public void setDomainExists(Boolean domainExists) {

    
    
    
    this.domainExists = domainExists;
  }


  public GetEmailReputationResponseEntityDetails domainReputation(String domainReputation) {

    
    
    
    
    this.domainReputation = domainReputation;
    return this;
  }

   /**
   * Get domainReputation
   * @return domainReputation
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "n/a", value = "")

  public String getDomainReputation() {
    return domainReputation;
  }


  public void setDomainReputation(String domainReputation) {

    
    
    
    this.domainReputation = domainReputation;
  }


  public GetEmailReputationResponseEntityDetails newDomain(Boolean newDomain) {

    
    
    
    
    this.newDomain = newDomain;
    return this;
  }

   /**
   * Get newDomain
   * @return newDomain
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "false", value = "")

  public Boolean getNewDomain() {
    return newDomain;
  }


  public void setNewDomain(Boolean newDomain) {

    
    
    
    this.newDomain = newDomain;
  }


  public GetEmailReputationResponseEntityDetails daysSinceDomainCreation(Double daysSinceDomainCreation) {

    
    
    
    
    this.daysSinceDomainCreation = daysSinceDomainCreation;
    return this;
  }

  public GetEmailReputationResponseEntityDetails daysSinceDomainCreation(Integer daysSinceDomainCreation) {

    
    
    
    
    this.daysSinceDomainCreation = daysSinceDomainCreation.doubleValue();
    return this;
  }

   /**
   * Get daysSinceDomainCreation
   * @return daysSinceDomainCreation
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "9474", value = "")

  public Double getDaysSinceDomainCreation() {
    return daysSinceDomainCreation;
  }


  public void setDaysSinceDomainCreation(Double daysSinceDomainCreation) {

    
    
    
    this.daysSinceDomainCreation = daysSinceDomainCreation;
  }


  public GetEmailReputationResponseEntityDetails suspiciousTld(Boolean suspiciousTld) {

    
    
    
    
    this.suspiciousTld = suspiciousTld;
    return this;
  }

   /**
   * Get suspiciousTld
   * @return suspiciousTld
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "false", value = "")

  public Boolean getSuspiciousTld() {
    return suspiciousTld;
  }


  public void setSuspiciousTld(Boolean suspiciousTld) {

    
    
    
    this.suspiciousTld = suspiciousTld;
  }


  public GetEmailReputationResponseEntityDetails spam(Boolean spam) {

    
    
    
    
    this.spam = spam;
    return this;
  }

   /**
   * Get spam
   * @return spam
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "false", value = "")

  public Boolean getSpam() {
    return spam;
  }


  public void setSpam(Boolean spam) {

    
    
    
    this.spam = spam;
  }


  public GetEmailReputationResponseEntityDetails freeProvider(Boolean freeProvider) {

    
    
    
    
    this.freeProvider = freeProvider;
    return this;
  }

   /**
   * Get freeProvider
   * @return freeProvider
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "true", value = "")

  public Boolean getFreeProvider() {
    return freeProvider;
  }


  public void setFreeProvider(Boolean freeProvider) {

    
    
    
    this.freeProvider = freeProvider;
  }


  public GetEmailReputationResponseEntityDetails disposable(Boolean disposable) {

    
    
    
    
    this.disposable = disposable;
    return this;
  }

   /**
   * Get disposable
   * @return disposable
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "false", value = "")

  public Boolean getDisposable() {
    return disposable;
  }


  public void setDisposable(Boolean disposable) {

    
    
    
    this.disposable = disposable;
  }


  public GetEmailReputationResponseEntityDetails deliverable(Boolean deliverable) {

    
    
    
    
    this.deliverable = deliverable;
    return this;
  }

   /**
   * Get deliverable
   * @return deliverable
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "true", value = "")

  public Boolean getDeliverable() {
    return deliverable;
  }


  public void setDeliverable(Boolean deliverable) {

    
    
    
    this.deliverable = deliverable;
  }


  public GetEmailReputationResponseEntityDetails acceptAll(Boolean acceptAll) {

    
    
    
    
    this.acceptAll = acceptAll;
    return this;
  }

   /**
   * Get acceptAll
   * @return acceptAll
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "false", value = "")

  public Boolean getAcceptAll() {
    return acceptAll;
  }


  public void setAcceptAll(Boolean acceptAll) {

    
    
    
    this.acceptAll = acceptAll;
  }


  public GetEmailReputationResponseEntityDetails validMx(Boolean validMx) {

    
    
    
    
    this.validMx = validMx;
    return this;
  }

   /**
   * Get validMx
   * @return validMx
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "true", value = "")

  public Boolean getValidMx() {
    return validMx;
  }


  public void setValidMx(Boolean validMx) {

    
    
    
    this.validMx = validMx;
  }


  public GetEmailReputationResponseEntityDetails primaryMx(String primaryMx) {

    
    
    
    
    this.primaryMx = primaryMx;
    return this;
  }

   /**
   * Get primaryMx
   * @return primaryMx
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "gmail-smtp-in.l.google.com", value = "")

  public String getPrimaryMx() {
    return primaryMx;
  }


  public void setPrimaryMx(String primaryMx) {

    
    
    
    this.primaryMx = primaryMx;
  }


  public GetEmailReputationResponseEntityDetails spoofable(Boolean spoofable) {

    
    
    
    
    this.spoofable = spoofable;
    return this;
  }

   /**
   * Get spoofable
   * @return spoofable
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "true", value = "")

  public Boolean getSpoofable() {
    return spoofable;
  }


  public void setSpoofable(Boolean spoofable) {

    
    
    
    this.spoofable = spoofable;
  }


  public GetEmailReputationResponseEntityDetails spfStrict(Boolean spfStrict) {

    
    
    
    
    this.spfStrict = spfStrict;
    return this;
  }

   /**
   * Get spfStrict
   * @return spfStrict
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "true", value = "")

  public Boolean getSpfStrict() {
    return spfStrict;
  }


  public void setSpfStrict(Boolean spfStrict) {

    
    
    
    this.spfStrict = spfStrict;
  }


  public GetEmailReputationResponseEntityDetails dmarcEnforced(Boolean dmarcEnforced) {

    
    
    
    
    this.dmarcEnforced = dmarcEnforced;
    return this;
  }

   /**
   * Get dmarcEnforced
   * @return dmarcEnforced
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "false", value = "")

  public Boolean getDmarcEnforced() {
    return dmarcEnforced;
  }


  public void setDmarcEnforced(Boolean dmarcEnforced) {

    
    
    
    this.dmarcEnforced = dmarcEnforced;
  }


  public GetEmailReputationResponseEntityDetails profiles(List<String> profiles) {

    
    
    
    
    this.profiles = profiles;
    return this;
  }

  public GetEmailReputationResponseEntityDetails addProfilesItem(String profilesItem) {
    if (this.profiles == null) {
      this.profiles = new ArrayList<>();
    }
    this.profiles.add(profilesItem);
    return this;
  }

   /**
   * Get profiles
   * @return profiles
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public List<String> getProfiles() {
    return profiles;
  }


  public void setProfiles(List<String> profiles) {

    
    
    
    this.profiles = profiles;
  }

  /**
   * A container for additional, undeclared properties.
   * This is a holder for any undeclared properties as specified with
   * the 'additionalProperties' keyword in the OAS document.
   */
  private Map<String, Object> additionalProperties;

  /**
   * Set the additional (undeclared) property with the specified name and value.
   * If the property does not already exist, create it otherwise replace it.
   *
   * @param key name of the property
   * @param value value of the property
   * @return the GetEmailReputationResponseEntityDetails instance itself
   */
  public GetEmailReputationResponseEntityDetails putAdditionalProperty(String key, Object value) {
    if (this.additionalProperties == null) {
        this.additionalProperties = new HashMap<String, Object>();
    }
    this.additionalProperties.put(key, value);
    return this;
  }

  /**
   * Return the additional (undeclared) property.
   *
   * @return a map of objects
   */
  public Map<String, Object> getAdditionalProperties() {
    return additionalProperties;
  }

  /**
   * Return the additional (undeclared) property with the specified name.
   *
   * @param key name of the property
   * @return an object
   */
  public Object getAdditionalProperty(String key) {
    if (this.additionalProperties == null) {
        return null;
    }
    return this.additionalProperties.get(key);
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    GetEmailReputationResponseEntityDetails getEmailReputationResponseEntityDetails = (GetEmailReputationResponseEntityDetails) o;
    return Objects.equals(this.blacklisted, getEmailReputationResponseEntityDetails.blacklisted) &&
        Objects.equals(this.maliciousActivity, getEmailReputationResponseEntityDetails.maliciousActivity) &&
        Objects.equals(this.maliciousActivityRecent, getEmailReputationResponseEntityDetails.maliciousActivityRecent) &&
        Objects.equals(this.credentialsLeaked, getEmailReputationResponseEntityDetails.credentialsLeaked) &&
        Objects.equals(this.credentialsLeakedRecent, getEmailReputationResponseEntityDetails.credentialsLeakedRecent) &&
        Objects.equals(this.dataBreach, getEmailReputationResponseEntityDetails.dataBreach) &&
        Objects.equals(this.firstSeen, getEmailReputationResponseEntityDetails.firstSeen) &&
        Objects.equals(this.lastSeen, getEmailReputationResponseEntityDetails.lastSeen) &&
        Objects.equals(this.domainExists, getEmailReputationResponseEntityDetails.domainExists) &&
        Objects.equals(this.domainReputation, getEmailReputationResponseEntityDetails.domainReputation) &&
        Objects.equals(this.newDomain, getEmailReputationResponseEntityDetails.newDomain) &&
        Objects.equals(this.daysSinceDomainCreation, getEmailReputationResponseEntityDetails.daysSinceDomainCreation) &&
        Objects.equals(this.suspiciousTld, getEmailReputationResponseEntityDetails.suspiciousTld) &&
        Objects.equals(this.spam, getEmailReputationResponseEntityDetails.spam) &&
        Objects.equals(this.freeProvider, getEmailReputationResponseEntityDetails.freeProvider) &&
        Objects.equals(this.disposable, getEmailReputationResponseEntityDetails.disposable) &&
        Objects.equals(this.deliverable, getEmailReputationResponseEntityDetails.deliverable) &&
        Objects.equals(this.acceptAll, getEmailReputationResponseEntityDetails.acceptAll) &&
        Objects.equals(this.validMx, getEmailReputationResponseEntityDetails.validMx) &&
        Objects.equals(this.primaryMx, getEmailReputationResponseEntityDetails.primaryMx) &&
        Objects.equals(this.spoofable, getEmailReputationResponseEntityDetails.spoofable) &&
        Objects.equals(this.spfStrict, getEmailReputationResponseEntityDetails.spfStrict) &&
        Objects.equals(this.dmarcEnforced, getEmailReputationResponseEntityDetails.dmarcEnforced) &&
        Objects.equals(this.profiles, getEmailReputationResponseEntityDetails.profiles)&&
        Objects.equals(this.additionalProperties, getEmailReputationResponseEntityDetails.additionalProperties);
  }

  @Override
  public int hashCode() {
    return Objects.hash(blacklisted, maliciousActivity, maliciousActivityRecent, credentialsLeaked, credentialsLeakedRecent, dataBreach, firstSeen, lastSeen, domainExists, domainReputation, newDomain, daysSinceDomainCreation, suspiciousTld, spam, freeProvider, disposable, deliverable, acceptAll, validMx, primaryMx, spoofable, spfStrict, dmarcEnforced, profiles, additionalProperties);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class GetEmailReputationResponseEntityDetails {\n");
    sb.append("    blacklisted: ").append(toIndentedString(blacklisted)).append("\n");
    sb.append("    maliciousActivity: ").append(toIndentedString(maliciousActivity)).append("\n");
    sb.append("    maliciousActivityRecent: ").append(toIndentedString(maliciousActivityRecent)).append("\n");
    sb.append("    credentialsLeaked: ").append(toIndentedString(credentialsLeaked)).append("\n");
    sb.append("    credentialsLeakedRecent: ").append(toIndentedString(credentialsLeakedRecent)).append("\n");
    sb.append("    dataBreach: ").append(toIndentedString(dataBreach)).append("\n");
    sb.append("    firstSeen: ").append(toIndentedString(firstSeen)).append("\n");
    sb.append("    lastSeen: ").append(toIndentedString(lastSeen)).append("\n");
    sb.append("    domainExists: ").append(toIndentedString(domainExists)).append("\n");
    sb.append("    domainReputation: ").append(toIndentedString(domainReputation)).append("\n");
    sb.append("    newDomain: ").append(toIndentedString(newDomain)).append("\n");
    sb.append("    daysSinceDomainCreation: ").append(toIndentedString(daysSinceDomainCreation)).append("\n");
    sb.append("    suspiciousTld: ").append(toIndentedString(suspiciousTld)).append("\n");
    sb.append("    spam: ").append(toIndentedString(spam)).append("\n");
    sb.append("    freeProvider: ").append(toIndentedString(freeProvider)).append("\n");
    sb.append("    disposable: ").append(toIndentedString(disposable)).append("\n");
    sb.append("    deliverable: ").append(toIndentedString(deliverable)).append("\n");
    sb.append("    acceptAll: ").append(toIndentedString(acceptAll)).append("\n");
    sb.append("    validMx: ").append(toIndentedString(validMx)).append("\n");
    sb.append("    primaryMx: ").append(toIndentedString(primaryMx)).append("\n");
    sb.append("    spoofable: ").append(toIndentedString(spoofable)).append("\n");
    sb.append("    spfStrict: ").append(toIndentedString(spfStrict)).append("\n");
    sb.append("    dmarcEnforced: ").append(toIndentedString(dmarcEnforced)).append("\n");
    sb.append("    profiles: ").append(toIndentedString(profiles)).append("\n");
    sb.append("    additionalProperties: ").append(toIndentedString(additionalProperties)).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("blacklisted");
    openapiFields.add("malicious_activity");
    openapiFields.add("malicious_activity_recent");
    openapiFields.add("credentials_leaked");
    openapiFields.add("credentials_leaked_recent");
    openapiFields.add("data_breach");
    openapiFields.add("first_seen");
    openapiFields.add("last_seen");
    openapiFields.add("domain_exists");
    openapiFields.add("domain_reputation");
    openapiFields.add("new_domain");
    openapiFields.add("days_since_domain_creation");
    openapiFields.add("suspicious_tld");
    openapiFields.add("spam");
    openapiFields.add("free_provider");
    openapiFields.add("disposable");
    openapiFields.add("deliverable");
    openapiFields.add("accept_all");
    openapiFields.add("valid_mx");
    openapiFields.add("primary_mx");
    openapiFields.add("spoofable");
    openapiFields.add("spf_strict");
    openapiFields.add("dmarc_enforced");
    openapiFields.add("profiles");

    // 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 GetEmailReputationResponseEntityDetails
  */
  public static void validateJsonObject(JsonObject jsonObj) throws IOException {
      if (jsonObj == null) {
        if (!GetEmailReputationResponseEntityDetails.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
          throw new IllegalArgumentException(String.format("The required field(s) %s in GetEmailReputationResponseEntityDetails is not found in the empty JSON string", GetEmailReputationResponseEntityDetails.openapiRequiredFields.toString()));
        }
      }
      if ((jsonObj.get("first_seen") != null && !jsonObj.get("first_seen").isJsonNull()) && !jsonObj.get("first_seen").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `first_seen` to be a primitive type in the JSON string but got `%s`", jsonObj.get("first_seen").toString()));
      }
      if ((jsonObj.get("last_seen") != null && !jsonObj.get("last_seen").isJsonNull()) && !jsonObj.get("last_seen").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `last_seen` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_seen").toString()));
      }
      if ((jsonObj.get("domain_reputation") != null && !jsonObj.get("domain_reputation").isJsonNull()) && !jsonObj.get("domain_reputation").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `domain_reputation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("domain_reputation").toString()));
      }
      if ((jsonObj.get("primary_mx") != null && !jsonObj.get("primary_mx").isJsonNull()) && !jsonObj.get("primary_mx").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `primary_mx` to be a primitive type in the JSON string but got `%s`", jsonObj.get("primary_mx").toString()));
      }
      // ensure the optional json data is an array if present
      if (jsonObj.get("profiles") != null && !jsonObj.get("profiles").isJsonArray()) {
        throw new IllegalArgumentException(String.format("Expected the field `profiles` to be an array in the JSON string but got `%s`", jsonObj.get("profiles").toString()));
      }
  }

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

       return (TypeAdapter<T>) new TypeAdapter<GetEmailReputationResponseEntityDetails>() {
           @Override
           public void write(JsonWriter out, GetEmailReputationResponseEntityDetails value) throws IOException {
             JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
             obj.remove("additionalProperties");
             // serialize additonal properties
             if (value.getAdditionalProperties() != null) {
               for (Map.Entry<String, Object> entry : value.getAdditionalProperties().entrySet()) {
                 if (entry.getValue() instanceof String)
                   obj.addProperty(entry.getKey(), (String) entry.getValue());
                 else if (entry.getValue() instanceof Number)
                   obj.addProperty(entry.getKey(), (Number) entry.getValue());
                 else if (entry.getValue() instanceof Boolean)
                   obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
                 else if (entry.getValue() instanceof Character)
                   obj.addProperty(entry.getKey(), (Character) entry.getValue());
                 else {
                   obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject());
                 }
               }
             }
             elementAdapter.write(out, obj);
           }

           @Override
           public GetEmailReputationResponseEntityDetails read(JsonReader in) throws IOException {
             JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
             validateJsonObject(jsonObj);
             // store additional fields in the deserialized instance
             GetEmailReputationResponseEntityDetails instance = thisAdapter.fromJsonTree(jsonObj);
             for (Map.Entry<String, JsonElement> entry : jsonObj.entrySet()) {
               if (!openapiFields.contains(entry.getKey())) {
                 if (entry.getValue().isJsonPrimitive()) { // primitive type
                   if (entry.getValue().getAsJsonPrimitive().isString())
                     instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
                   else if (entry.getValue().getAsJsonPrimitive().isNumber())
                     instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
                   else if (entry.getValue().getAsJsonPrimitive().isBoolean())
                     instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
                   else
                     throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
                 } else if (entry.getValue().isJsonArray()) {
                     instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
                 } else { // JSON object
                     instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
                 }
               }
             }
             return instance;
           }

       }.nullSafe();
    }
  }

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

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

