java/src/main/java/com/konfigthis/dojah/client/model/GetAccountAnalysisResponseEntityFundsManagement.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 org.openapitools.jackson.nullable.JsonNullable;

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;

/**
 * GetAccountAnalysisResponseEntityFundsManagement
 */
@javax.annotation.Generated(value = "Generated by https://konfigthis.com")
public class GetAccountAnalysisResponseEntityFundsManagement {
  public static final String SERIALIZED_NAME_ACCOUNT_ACTIVITY = "accountActivity";
  @SerializedName(SERIALIZED_NAME_ACCOUNT_ACTIVITY)
  private Double accountActivity;

  public static final String SERIALIZED_NAME_ACCOUNT_SWEEP = "accountSweep";
  @SerializedName(SERIALIZED_NAME_ACCOUNT_SWEEP)
  private String accountSweep;

  public static final String SERIALIZED_NAME_AVERAGE_MONTHLY_LOAN_AMOUNT = "averageMonthlyLoanAmount";
  @SerializedName(SERIALIZED_NAME_AVERAGE_MONTHLY_LOAN_AMOUNT)
  private Double averageMonthlyLoanAmount;

  public static final String SERIALIZED_NAME_AVERAGE_MONTHLY_LOAN_REPAYMENT_AMOUNT = "averageMonthlyLoanRepaymentAmount";
  @SerializedName(SERIALIZED_NAME_AVERAGE_MONTHLY_LOAN_REPAYMENT_AMOUNT)
  private Double averageMonthlyLoanRepaymentAmount;

  public static final String SERIALIZED_NAME_GAMBLING_RATE = "gamblingRate";
  @SerializedName(SERIALIZED_NAME_GAMBLING_RATE)
  private Double gamblingRate;

  public static final String SERIALIZED_NAME_GAMBLING_STATUS = "gamblingStatus";
  @SerializedName(SERIALIZED_NAME_GAMBLING_STATUS)
  private String gamblingStatus;

  public static final String SERIALIZED_NAME_LOAN_INFLOW_AMOUNT = "loanInflowAmount";
  @SerializedName(SERIALIZED_NAME_LOAN_INFLOW_AMOUNT)
  private String loanInflowAmount;

  public static final String SERIALIZED_NAME_LOAN_REPAYMENT_TO_INFLOW_AMOUNT = "loanRepaymentToInflowAmount";
  @SerializedName(SERIALIZED_NAME_LOAN_REPAYMENT_TO_INFLOW_AMOUNT)
  private Double loanRepaymentToInflowAmount;

  public static final String SERIALIZED_NAME_MONTH_TO_MONTH_INFLOW_TO_OUTFLOW_AMOUNT = "monthToMonthInflowToOutflowAmount";
  @SerializedName(SERIALIZED_NAME_MONTH_TO_MONTH_INFLOW_TO_OUTFLOW_AMOUNT)
  private String monthToMonthInflowToOutflowAmount;

  public static final String SERIALIZED_NAME_NUMBER_OF_CREDIT_LOAN_TRANSACTIONS = "numberOfCreditLoanTransactions";
  @SerializedName(SERIALIZED_NAME_NUMBER_OF_CREDIT_LOAN_TRANSACTIONS)
  private String numberOfCreditLoanTransactions;

  public static final String SERIALIZED_NAME_NUMBER_OF_DEBIT_REPAYMENT_TRANSACTIONS = "numberOfDebitRepaymentTransactions";
  @SerializedName(SERIALIZED_NAME_NUMBER_OF_DEBIT_REPAYMENT_TRANSACTIONS)
  private String numberOfDebitRepaymentTransactions;

  public static final String SERIALIZED_NAME_OVERALL_INFLOW_TO_OUTFLOW_AMOUNT = "overallInflowToOutflowAmount";
  @SerializedName(SERIALIZED_NAME_OVERALL_INFLOW_TO_OUTFLOW_AMOUNT)
  private String overallInflowToOutflowAmount;

  public static final String SERIALIZED_NAME_PERCENT_OF_INFLOW_IRREGULARITY = "percentOfInflowIrregularity";
  @SerializedName(SERIALIZED_NAME_PERCENT_OF_INFLOW_IRREGULARITY)
  private Double percentOfInflowIrregularity;

  public static final String SERIALIZED_NAME_TOTAL_LOAN_AMOUNT = "totalLoanAmount";
  @SerializedName(SERIALIZED_NAME_TOTAL_LOAN_AMOUNT)
  private Double totalLoanAmount;

  public static final String SERIALIZED_NAME_TOTAL_LOAN_REPAYMENT_AMOUNT = "totalLoanRepaymentAmount";
  @SerializedName(SERIALIZED_NAME_TOTAL_LOAN_REPAYMENT_AMOUNT)
  private Double totalLoanRepaymentAmount;

  public GetAccountAnalysisResponseEntityFundsManagement() {
  }

  public GetAccountAnalysisResponseEntityFundsManagement accountActivity(Double accountActivity) {

    
    
    
    
    this.accountActivity = accountActivity;
    return this;
  }

  public GetAccountAnalysisResponseEntityFundsManagement accountActivity(Integer accountActivity) {

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

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

  public Double getAccountActivity() {
    return accountActivity;
  }


  public void setAccountActivity(Double accountActivity) {

    
    
    
    this.accountActivity = accountActivity;
  }


  public GetAccountAnalysisResponseEntityFundsManagement accountSweep(String accountSweep) {

    
    
    
    
    this.accountSweep = accountSweep;
    return this;
  }

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

  public String getAccountSweep() {
    return accountSweep;
  }


  public void setAccountSweep(String accountSweep) {

    
    
    
    this.accountSweep = accountSweep;
  }


  public GetAccountAnalysisResponseEntityFundsManagement averageMonthlyLoanAmount(Double averageMonthlyLoanAmount) {

    
    
    
    
    this.averageMonthlyLoanAmount = averageMonthlyLoanAmount;
    return this;
  }

  public GetAccountAnalysisResponseEntityFundsManagement averageMonthlyLoanAmount(Integer averageMonthlyLoanAmount) {

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

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

  public Double getAverageMonthlyLoanAmount() {
    return averageMonthlyLoanAmount;
  }


  public void setAverageMonthlyLoanAmount(Double averageMonthlyLoanAmount) {

    
    
    
    this.averageMonthlyLoanAmount = averageMonthlyLoanAmount;
  }


  public GetAccountAnalysisResponseEntityFundsManagement averageMonthlyLoanRepaymentAmount(Double averageMonthlyLoanRepaymentAmount) {

    
    
    
    
    this.averageMonthlyLoanRepaymentAmount = averageMonthlyLoanRepaymentAmount;
    return this;
  }

  public GetAccountAnalysisResponseEntityFundsManagement averageMonthlyLoanRepaymentAmount(Integer averageMonthlyLoanRepaymentAmount) {

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

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

  public Double getAverageMonthlyLoanRepaymentAmount() {
    return averageMonthlyLoanRepaymentAmount;
  }


  public void setAverageMonthlyLoanRepaymentAmount(Double averageMonthlyLoanRepaymentAmount) {

    
    
    
    this.averageMonthlyLoanRepaymentAmount = averageMonthlyLoanRepaymentAmount;
  }


  public GetAccountAnalysisResponseEntityFundsManagement gamblingRate(Double gamblingRate) {

    
    
    
    
    this.gamblingRate = gamblingRate;
    return this;
  }

  public GetAccountAnalysisResponseEntityFundsManagement gamblingRate(Integer gamblingRate) {

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

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

  public Double getGamblingRate() {
    return gamblingRate;
  }


  public void setGamblingRate(Double gamblingRate) {

    
    
    
    this.gamblingRate = gamblingRate;
  }


  public GetAccountAnalysisResponseEntityFundsManagement gamblingStatus(String gamblingStatus) {

    
    
    
    
    this.gamblingStatus = gamblingStatus;
    return this;
  }

   /**
   * Get gamblingStatus
   * @return gamblingStatus
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "No Gambling Transactions Found", value = "")

  public String getGamblingStatus() {
    return gamblingStatus;
  }


  public void setGamblingStatus(String gamblingStatus) {

    
    
    
    this.gamblingStatus = gamblingStatus;
  }


  public GetAccountAnalysisResponseEntityFundsManagement loanInflowAmount(String loanInflowAmount) {

    
    
    
    
    this.loanInflowAmount = loanInflowAmount;
    return this;
  }

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

  public String getLoanInflowAmount() {
    return loanInflowAmount;
  }


  public void setLoanInflowAmount(String loanInflowAmount) {

    
    
    
    this.loanInflowAmount = loanInflowAmount;
  }


  public GetAccountAnalysisResponseEntityFundsManagement loanRepaymentToInflowAmount(Double loanRepaymentToInflowAmount) {

    
    
    
    
    this.loanRepaymentToInflowAmount = loanRepaymentToInflowAmount;
    return this;
  }

  public GetAccountAnalysisResponseEntityFundsManagement loanRepaymentToInflowAmount(Integer loanRepaymentToInflowAmount) {

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

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

  public Double getLoanRepaymentToInflowAmount() {
    return loanRepaymentToInflowAmount;
  }


  public void setLoanRepaymentToInflowAmount(Double loanRepaymentToInflowAmount) {

    
    
    
    this.loanRepaymentToInflowAmount = loanRepaymentToInflowAmount;
  }


  public GetAccountAnalysisResponseEntityFundsManagement monthToMonthInflowToOutflowAmount(String monthToMonthInflowToOutflowAmount) {

    
    
    
    
    this.monthToMonthInflowToOutflowAmount = monthToMonthInflowToOutflowAmount;
    return this;
  }

   /**
   * Get monthToMonthInflowToOutflowAmount
   * @return monthToMonthInflowToOutflowAmount
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "Positive Cash Flow", value = "")

  public String getMonthToMonthInflowToOutflowAmount() {
    return monthToMonthInflowToOutflowAmount;
  }


  public void setMonthToMonthInflowToOutflowAmount(String monthToMonthInflowToOutflowAmount) {

    
    
    
    this.monthToMonthInflowToOutflowAmount = monthToMonthInflowToOutflowAmount;
  }


  public GetAccountAnalysisResponseEntityFundsManagement numberOfCreditLoanTransactions(String numberOfCreditLoanTransactions) {

    
    
    
    
    this.numberOfCreditLoanTransactions = numberOfCreditLoanTransactions;
    return this;
  }

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

  public String getNumberOfCreditLoanTransactions() {
    return numberOfCreditLoanTransactions;
  }


  public void setNumberOfCreditLoanTransactions(String numberOfCreditLoanTransactions) {

    
    
    
    this.numberOfCreditLoanTransactions = numberOfCreditLoanTransactions;
  }


  public GetAccountAnalysisResponseEntityFundsManagement numberOfDebitRepaymentTransactions(String numberOfDebitRepaymentTransactions) {

    
    
    
    
    this.numberOfDebitRepaymentTransactions = numberOfDebitRepaymentTransactions;
    return this;
  }

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

  public String getNumberOfDebitRepaymentTransactions() {
    return numberOfDebitRepaymentTransactions;
  }


  public void setNumberOfDebitRepaymentTransactions(String numberOfDebitRepaymentTransactions) {

    
    
    
    this.numberOfDebitRepaymentTransactions = numberOfDebitRepaymentTransactions;
  }


  public GetAccountAnalysisResponseEntityFundsManagement overallInflowToOutflowAmount(String overallInflowToOutflowAmount) {

    
    
    
    
    this.overallInflowToOutflowAmount = overallInflowToOutflowAmount;
    return this;
  }

   /**
   * Get overallInflowToOutflowAmount
   * @return overallInflowToOutflowAmount
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "Negative Cash Flow", value = "")

  public String getOverallInflowToOutflowAmount() {
    return overallInflowToOutflowAmount;
  }


  public void setOverallInflowToOutflowAmount(String overallInflowToOutflowAmount) {

    
    
    
    this.overallInflowToOutflowAmount = overallInflowToOutflowAmount;
  }


  public GetAccountAnalysisResponseEntityFundsManagement percentOfInflowIrregularity(Double percentOfInflowIrregularity) {

    
    
    
    
    this.percentOfInflowIrregularity = percentOfInflowIrregularity;
    return this;
  }

  public GetAccountAnalysisResponseEntityFundsManagement percentOfInflowIrregularity(Integer percentOfInflowIrregularity) {

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

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

  public Double getPercentOfInflowIrregularity() {
    return percentOfInflowIrregularity;
  }


  public void setPercentOfInflowIrregularity(Double percentOfInflowIrregularity) {

    
    
    
    this.percentOfInflowIrregularity = percentOfInflowIrregularity;
  }


  public GetAccountAnalysisResponseEntityFundsManagement totalLoanAmount(Double totalLoanAmount) {

    
    
    
    
    this.totalLoanAmount = totalLoanAmount;
    return this;
  }

  public GetAccountAnalysisResponseEntityFundsManagement totalLoanAmount(Integer totalLoanAmount) {

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

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

  public Double getTotalLoanAmount() {
    return totalLoanAmount;
  }


  public void setTotalLoanAmount(Double totalLoanAmount) {

    
    
    
    this.totalLoanAmount = totalLoanAmount;
  }


  public GetAccountAnalysisResponseEntityFundsManagement totalLoanRepaymentAmount(Double totalLoanRepaymentAmount) {

    
    
    
    
    this.totalLoanRepaymentAmount = totalLoanRepaymentAmount;
    return this;
  }

  public GetAccountAnalysisResponseEntityFundsManagement totalLoanRepaymentAmount(Integer totalLoanRepaymentAmount) {

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

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

  public Double getTotalLoanRepaymentAmount() {
    return totalLoanRepaymentAmount;
  }


  public void setTotalLoanRepaymentAmount(Double totalLoanRepaymentAmount) {

    
    
    
    this.totalLoanRepaymentAmount = totalLoanRepaymentAmount;
  }

  /**
   * 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 GetAccountAnalysisResponseEntityFundsManagement instance itself
   */
  public GetAccountAnalysisResponseEntityFundsManagement 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;
    }
    GetAccountAnalysisResponseEntityFundsManagement getAccountAnalysisResponseEntityFundsManagement = (GetAccountAnalysisResponseEntityFundsManagement) o;
    return Objects.equals(this.accountActivity, getAccountAnalysisResponseEntityFundsManagement.accountActivity) &&
        Objects.equals(this.accountSweep, getAccountAnalysisResponseEntityFundsManagement.accountSweep) &&
        Objects.equals(this.averageMonthlyLoanAmount, getAccountAnalysisResponseEntityFundsManagement.averageMonthlyLoanAmount) &&
        Objects.equals(this.averageMonthlyLoanRepaymentAmount, getAccountAnalysisResponseEntityFundsManagement.averageMonthlyLoanRepaymentAmount) &&
        Objects.equals(this.gamblingRate, getAccountAnalysisResponseEntityFundsManagement.gamblingRate) &&
        Objects.equals(this.gamblingStatus, getAccountAnalysisResponseEntityFundsManagement.gamblingStatus) &&
        Objects.equals(this.loanInflowAmount, getAccountAnalysisResponseEntityFundsManagement.loanInflowAmount) &&
        Objects.equals(this.loanRepaymentToInflowAmount, getAccountAnalysisResponseEntityFundsManagement.loanRepaymentToInflowAmount) &&
        Objects.equals(this.monthToMonthInflowToOutflowAmount, getAccountAnalysisResponseEntityFundsManagement.monthToMonthInflowToOutflowAmount) &&
        Objects.equals(this.numberOfCreditLoanTransactions, getAccountAnalysisResponseEntityFundsManagement.numberOfCreditLoanTransactions) &&
        Objects.equals(this.numberOfDebitRepaymentTransactions, getAccountAnalysisResponseEntityFundsManagement.numberOfDebitRepaymentTransactions) &&
        Objects.equals(this.overallInflowToOutflowAmount, getAccountAnalysisResponseEntityFundsManagement.overallInflowToOutflowAmount) &&
        Objects.equals(this.percentOfInflowIrregularity, getAccountAnalysisResponseEntityFundsManagement.percentOfInflowIrregularity) &&
        Objects.equals(this.totalLoanAmount, getAccountAnalysisResponseEntityFundsManagement.totalLoanAmount) &&
        Objects.equals(this.totalLoanRepaymentAmount, getAccountAnalysisResponseEntityFundsManagement.totalLoanRepaymentAmount)&&
        Objects.equals(this.additionalProperties, getAccountAnalysisResponseEntityFundsManagement.additionalProperties);
  }

  private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
    return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
  }

  @Override
  public int hashCode() {
    return Objects.hash(accountActivity, accountSweep, averageMonthlyLoanAmount, averageMonthlyLoanRepaymentAmount, gamblingRate, gamblingStatus, loanInflowAmount, loanRepaymentToInflowAmount, monthToMonthInflowToOutflowAmount, numberOfCreditLoanTransactions, numberOfDebitRepaymentTransactions, overallInflowToOutflowAmount, percentOfInflowIrregularity, totalLoanAmount, totalLoanRepaymentAmount, additionalProperties);
  }

  private static <T> int hashCodeNullable(JsonNullable<T> a) {
    if (a == null) {
      return 1;
    }
    return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class GetAccountAnalysisResponseEntityFundsManagement {\n");
    sb.append("    accountActivity: ").append(toIndentedString(accountActivity)).append("\n");
    sb.append("    accountSweep: ").append(toIndentedString(accountSweep)).append("\n");
    sb.append("    averageMonthlyLoanAmount: ").append(toIndentedString(averageMonthlyLoanAmount)).append("\n");
    sb.append("    averageMonthlyLoanRepaymentAmount: ").append(toIndentedString(averageMonthlyLoanRepaymentAmount)).append("\n");
    sb.append("    gamblingRate: ").append(toIndentedString(gamblingRate)).append("\n");
    sb.append("    gamblingStatus: ").append(toIndentedString(gamblingStatus)).append("\n");
    sb.append("    loanInflowAmount: ").append(toIndentedString(loanInflowAmount)).append("\n");
    sb.append("    loanRepaymentToInflowAmount: ").append(toIndentedString(loanRepaymentToInflowAmount)).append("\n");
    sb.append("    monthToMonthInflowToOutflowAmount: ").append(toIndentedString(monthToMonthInflowToOutflowAmount)).append("\n");
    sb.append("    numberOfCreditLoanTransactions: ").append(toIndentedString(numberOfCreditLoanTransactions)).append("\n");
    sb.append("    numberOfDebitRepaymentTransactions: ").append(toIndentedString(numberOfDebitRepaymentTransactions)).append("\n");
    sb.append("    overallInflowToOutflowAmount: ").append(toIndentedString(overallInflowToOutflowAmount)).append("\n");
    sb.append("    percentOfInflowIrregularity: ").append(toIndentedString(percentOfInflowIrregularity)).append("\n");
    sb.append("    totalLoanAmount: ").append(toIndentedString(totalLoanAmount)).append("\n");
    sb.append("    totalLoanRepaymentAmount: ").append(toIndentedString(totalLoanRepaymentAmount)).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("accountActivity");
    openapiFields.add("accountSweep");
    openapiFields.add("averageMonthlyLoanAmount");
    openapiFields.add("averageMonthlyLoanRepaymentAmount");
    openapiFields.add("gamblingRate");
    openapiFields.add("gamblingStatus");
    openapiFields.add("loanInflowAmount");
    openapiFields.add("loanRepaymentToInflowAmount");
    openapiFields.add("monthToMonthInflowToOutflowAmount");
    openapiFields.add("numberOfCreditLoanTransactions");
    openapiFields.add("numberOfDebitRepaymentTransactions");
    openapiFields.add("overallInflowToOutflowAmount");
    openapiFields.add("percentOfInflowIrregularity");
    openapiFields.add("totalLoanAmount");
    openapiFields.add("totalLoanRepaymentAmount");

    // 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 GetAccountAnalysisResponseEntityFundsManagement
  */
  public static void validateJsonObject(JsonObject jsonObj) throws IOException {
      if (jsonObj == null) {
        if (!GetAccountAnalysisResponseEntityFundsManagement.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
          throw new IllegalArgumentException(String.format("The required field(s) %s in GetAccountAnalysisResponseEntityFundsManagement is not found in the empty JSON string", GetAccountAnalysisResponseEntityFundsManagement.openapiRequiredFields.toString()));
        }
      }
      if ((jsonObj.get("accountSweep") != null && !jsonObj.get("accountSweep").isJsonNull()) && !jsonObj.get("accountSweep").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `accountSweep` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountSweep").toString()));
      }
      if ((jsonObj.get("gamblingStatus") != null && !jsonObj.get("gamblingStatus").isJsonNull()) && !jsonObj.get("gamblingStatus").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `gamblingStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("gamblingStatus").toString()));
      }
      if (!jsonObj.get("loanInflowAmount").isJsonNull() && (jsonObj.get("loanInflowAmount") != null && !jsonObj.get("loanInflowAmount").isJsonNull()) && !jsonObj.get("loanInflowAmount").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `loanInflowAmount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("loanInflowAmount").toString()));
      }
      if ((jsonObj.get("monthToMonthInflowToOutflowAmount") != null && !jsonObj.get("monthToMonthInflowToOutflowAmount").isJsonNull()) && !jsonObj.get("monthToMonthInflowToOutflowAmount").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `monthToMonthInflowToOutflowAmount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("monthToMonthInflowToOutflowAmount").toString()));
      }
      if (!jsonObj.get("numberOfCreditLoanTransactions").isJsonNull() && (jsonObj.get("numberOfCreditLoanTransactions") != null && !jsonObj.get("numberOfCreditLoanTransactions").isJsonNull()) && !jsonObj.get("numberOfCreditLoanTransactions").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `numberOfCreditLoanTransactions` to be a primitive type in the JSON string but got `%s`", jsonObj.get("numberOfCreditLoanTransactions").toString()));
      }
      if (!jsonObj.get("numberOfDebitRepaymentTransactions").isJsonNull() && (jsonObj.get("numberOfDebitRepaymentTransactions") != null && !jsonObj.get("numberOfDebitRepaymentTransactions").isJsonNull()) && !jsonObj.get("numberOfDebitRepaymentTransactions").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `numberOfDebitRepaymentTransactions` to be a primitive type in the JSON string but got `%s`", jsonObj.get("numberOfDebitRepaymentTransactions").toString()));
      }
      if ((jsonObj.get("overallInflowToOutflowAmount") != null && !jsonObj.get("overallInflowToOutflowAmount").isJsonNull()) && !jsonObj.get("overallInflowToOutflowAmount").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `overallInflowToOutflowAmount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("overallInflowToOutflowAmount").toString()));
      }
  }

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

       return (TypeAdapter<T>) new TypeAdapter<GetAccountAnalysisResponseEntityFundsManagement>() {
           @Override
           public void write(JsonWriter out, GetAccountAnalysisResponseEntityFundsManagement 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 GetAccountAnalysisResponseEntityFundsManagement read(JsonReader in) throws IOException {
             JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
             validateJsonObject(jsonObj);
             // store additional fields in the deserialized instance
             GetAccountAnalysisResponseEntityFundsManagement 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 GetAccountAnalysisResponseEntityFundsManagement given an JSON string
  *
  * @param jsonString JSON string
  * @return An instance of GetAccountAnalysisResponseEntityFundsManagement
  * @throws IOException if the JSON string is invalid with respect to GetAccountAnalysisResponseEntityFundsManagement
  */
  public static GetAccountAnalysisResponseEntityFundsManagement fromJson(String jsonString) throws IOException {
    return JSON.getGson().fromJson(jsonString, GetAccountAnalysisResponseEntityFundsManagement.class);
  }

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

