/*
 * Swagger of Opencellsoft Api
 * @#Introduction
 *
 * The version of the OpenAPI document: 7.3.1-SNAPSHOT
 * Contact: contact@opencellsoft.fr
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package org.openapitools.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.HashMap;
import java.util.List;
import java.util.Map;
import org.openapitools.client.model.Auditable;
import org.openapitools.client.model.AuditableFieldHistory;
import org.openapitools.client.model.BankCoordinates;
import org.openapitools.client.model.BusinessEntity;
import org.openapitools.client.model.Country;
import org.openapitools.client.model.CustomFieldValues;
import org.openapitools.client.model.ICustomFieldEntity;
import org.openapitools.client.model.PaymentGatewayRumSequence;
import org.openapitools.client.model.ScriptInstance;
import org.openapitools.client.model.Seller;
import org.openapitools.client.model.TradingCurrency;

/**
 * PaymentGateway
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-09-13T10:03:17.753Z[GMT]")
public class PaymentGateway {
  public static final String SERIALIZED_NAME_ID = "id";
  @SerializedName(SERIALIZED_NAME_ID)
  private Long id;

  public static final String SERIALIZED_NAME_VERSION = "version";
  @SerializedName(SERIALIZED_NAME_VERSION)
  private Integer version;

  public static final String SERIALIZED_NAME_AUDITABLE = "auditable";
  @SerializedName(SERIALIZED_NAME_AUDITABLE)
  private Auditable auditable;

  public static final String SERIALIZED_NAME_HISTORIZED = "historized";
  @SerializedName(SERIALIZED_NAME_HISTORIZED)
  private Boolean historized;

  public static final String SERIALIZED_NAME_NOTIFIED = "notified";
  @SerializedName(SERIALIZED_NAME_NOTIFIED)
  private Boolean notified;

  public static final String SERIALIZED_NAME_AUDITABLE_FIELDS = "auditableFields";
  @SerializedName(SERIALIZED_NAME_AUDITABLE_FIELDS)
  private List<AuditableFieldHistory> auditableFields = null;

  public static final String SERIALIZED_NAME_CODE = "code";
  @SerializedName(SERIALIZED_NAME_CODE)
  private String code;

  public static final String SERIALIZED_NAME_DESCRIPTION = "description";
  @SerializedName(SERIALIZED_NAME_DESCRIPTION)
  private String description;

  public static final String SERIALIZED_NAME_APPEND_GENERATED_CODE = "appendGeneratedCode";
  @SerializedName(SERIALIZED_NAME_APPEND_GENERATED_CODE)
  private Boolean appendGeneratedCode;

  public static final String SERIALIZED_NAME_UUID = "uuid";
  @SerializedName(SERIALIZED_NAME_UUID)
  private String uuid;

  public static final String SERIALIZED_NAME_CF_VALUES = "cfValues";
  @SerializedName(SERIALIZED_NAME_CF_VALUES)
  private CustomFieldValues cfValues;

  public static final String SERIALIZED_NAME_CF_ACCUMULATED_VALUES = "cfAccumulatedValues";
  @SerializedName(SERIALIZED_NAME_CF_ACCUMULATED_VALUES)
  private CustomFieldValues cfAccumulatedValues;

  public static final String SERIALIZED_NAME_DISABLED = "disabled";
  @SerializedName(SERIALIZED_NAME_DISABLED)
  private Boolean disabled;

  /**
   * Gets or Sets type
   */
  @JsonAdapter(TypeEnum.Adapter.class)
  public enum TypeEnum {
    CUSTOM("CUSTOM"),
    
    NATIF("NATIF");

    private String value;

    TypeEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static TypeEnum fromValue(String value) {
      for (TypeEnum b : TypeEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }

    public static class Adapter extends TypeAdapter<TypeEnum> {
      @Override
      public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public TypeEnum read(final JsonReader jsonReader) throws IOException {
        String value = jsonReader.nextString();
        return TypeEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_TYPE = "type";
  @SerializedName(SERIALIZED_NAME_TYPE)
  private TypeEnum type;

  /**
   * Gets or Sets paymentMethodType
   */
  @JsonAdapter(PaymentMethodTypeEnum.Adapter.class)
  public enum PaymentMethodTypeEnum {
    CHECK("CHECK"),
    
    DIRECTDEBIT("DIRECTDEBIT"),
    
    WIRETRANSFER("WIRETRANSFER"),
    
    CARD("CARD");

    private String value;

    PaymentMethodTypeEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static PaymentMethodTypeEnum fromValue(String value) {
      for (PaymentMethodTypeEnum b : PaymentMethodTypeEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }

    public static class Adapter extends TypeAdapter<PaymentMethodTypeEnum> {
      @Override
      public void write(final JsonWriter jsonWriter, final PaymentMethodTypeEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public PaymentMethodTypeEnum read(final JsonReader jsonReader) throws IOException {
        String value = jsonReader.nextString();
        return PaymentMethodTypeEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_PAYMENT_METHOD_TYPE = "paymentMethodType";
  @SerializedName(SERIALIZED_NAME_PAYMENT_METHOD_TYPE)
  private PaymentMethodTypeEnum paymentMethodType;

  public static final String SERIALIZED_NAME_SCRIPT_INSTANCE = "scriptInstance";
  @SerializedName(SERIALIZED_NAME_SCRIPT_INSTANCE)
  private ScriptInstance scriptInstance;

  public static final String SERIALIZED_NAME_IMPLEMENTATION_CLASS_NAME = "implementationClassName";
  @SerializedName(SERIALIZED_NAME_IMPLEMENTATION_CLASS_NAME)
  private String implementationClassName;

  public static final String SERIALIZED_NAME_APPLICATION_E_L = "applicationEL";
  @SerializedName(SERIALIZED_NAME_APPLICATION_E_L)
  private String applicationEL;

  public static final String SERIALIZED_NAME_COUNTRY = "country";
  @SerializedName(SERIALIZED_NAME_COUNTRY)
  private Country country;

  public static final String SERIALIZED_NAME_TRADING_CURRENCY = "tradingCurrency";
  @SerializedName(SERIALIZED_NAME_TRADING_CURRENCY)
  private TradingCurrency tradingCurrency;

  /**
   * Gets or Sets cardType
   */
  @JsonAdapter(CardTypeEnum.Adapter.class)
  public enum CardTypeEnum {
    VISA("VISA"),
    
    MASTERCARD("MASTERCARD"),
    
    AMERICAN_EXPRESS("AMERICAN_EXPRESS"),
    
    CB("CB");

    private String value;

    CardTypeEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static CardTypeEnum fromValue(String value) {
      for (CardTypeEnum b : CardTypeEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }

    public static class Adapter extends TypeAdapter<CardTypeEnum> {
      @Override
      public void write(final JsonWriter jsonWriter, final CardTypeEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public CardTypeEnum read(final JsonReader jsonReader) throws IOException {
        String value = jsonReader.nextString();
        return CardTypeEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_CARD_TYPE = "cardType";
  @SerializedName(SERIALIZED_NAME_CARD_TYPE)
  private CardTypeEnum cardType;

  public static final String SERIALIZED_NAME_NB_TRIES = "nbTries";
  @SerializedName(SERIALIZED_NAME_NB_TRIES)
  private Integer nbTries;

  /**
   * Gets or Sets replayCause
   */
  @JsonAdapter(ReplayCauseEnum.Adapter.class)
  public enum ReplayCauseEnum {
    ERROR("ERROR"),
    
    REJECT("REJECT");

    private String value;

    ReplayCauseEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static ReplayCauseEnum fromValue(String value) {
      for (ReplayCauseEnum b : ReplayCauseEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }

    public static class Adapter extends TypeAdapter<ReplayCauseEnum> {
      @Override
      public void write(final JsonWriter jsonWriter, final ReplayCauseEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public ReplayCauseEnum read(final JsonReader jsonReader) throws IOException {
        String value = jsonReader.nextString();
        return ReplayCauseEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_REPLAY_CAUSE = "replayCause";
  @SerializedName(SERIALIZED_NAME_REPLAY_CAUSE)
  private ReplayCauseEnum replayCause;

  public static final String SERIALIZED_NAME_ERRORS_TO_REPLAY = "errorsToReplay";
  @SerializedName(SERIALIZED_NAME_ERRORS_TO_REPLAY)
  private String errorsToReplay;

  public static final String SERIALIZED_NAME_MARCHAND_ID = "marchandId";
  @SerializedName(SERIALIZED_NAME_MARCHAND_ID)
  private String marchandId;

  public static final String SERIALIZED_NAME_SECRET_KEY = "secretKey";
  @SerializedName(SERIALIZED_NAME_SECRET_KEY)
  private String secretKey;

  public static final String SERIALIZED_NAME_API_KEY = "apiKey";
  @SerializedName(SERIALIZED_NAME_API_KEY)
  private String apiKey;

  public static final String SERIALIZED_NAME_WEBHOOKS_KEY_ID = "webhooksKeyId";
  @SerializedName(SERIALIZED_NAME_WEBHOOKS_KEY_ID)
  private String webhooksKeyId;

  public static final String SERIALIZED_NAME_WEBHOOKS_SECRET_KEY = "webhooksSecretKey";
  @SerializedName(SERIALIZED_NAME_WEBHOOKS_SECRET_KEY)
  private String webhooksSecretKey;

  public static final String SERIALIZED_NAME_PROFILE = "profile";
  @SerializedName(SERIALIZED_NAME_PROFILE)
  private String profile;

  public static final String SERIALIZED_NAME_RUM_SEQUENCE = "rumSequence";
  @SerializedName(SERIALIZED_NAME_RUM_SEQUENCE)
  private PaymentGatewayRumSequence rumSequence;

  public static final String SERIALIZED_NAME_BANK_COORDINATES = "bankCoordinates";
  @SerializedName(SERIALIZED_NAME_BANK_COORDINATES)
  private BankCoordinates bankCoordinates;

  public static final String SERIALIZED_NAME_SELLER = "seller";
  @SerializedName(SERIALIZED_NAME_SELLER)
  private Seller seller;

  public static final String SERIALIZED_NAME_ACTIVE = "active";
  @SerializedName(SERIALIZED_NAME_ACTIVE)
  private Boolean active;

  public static final String SERIALIZED_NAME_PARENT_C_F_ENTITIES = "parentCFEntities";
  @SerializedName(SERIALIZED_NAME_PARENT_C_F_ENTITIES)
  private List<ICustomFieldEntity> parentCFEntities = null;

  public static final String SERIALIZED_NAME_CF_VALUES_NULL_SAFE = "cfValuesNullSafe";
  @SerializedName(SERIALIZED_NAME_CF_VALUES_NULL_SAFE)
  private CustomFieldValues cfValuesNullSafe;

  public static final String SERIALIZED_NAME_CF_VALUES_AS_VALUES = "cfValuesAsValues";
  @SerializedName(SERIALIZED_NAME_CF_VALUES_AS_VALUES)
  private Map<String, Object> cfValuesAsValues = null;

  public static final String SERIALIZED_NAME_CF_ACCUMULATED_VALUES_NULL_SAFE = "cfAccumulatedValuesNullSafe";
  @SerializedName(SERIALIZED_NAME_CF_ACCUMULATED_VALUES_NULL_SAFE)
  private CustomFieldValues cfAccumulatedValuesNullSafe;

  public static final String SERIALIZED_NAME_DESCRIPTION_OR_CODE = "descriptionOrCode";
  @SerializedName(SERIALIZED_NAME_DESCRIPTION_OR_CODE)
  private String descriptionOrCode;

  public static final String SERIALIZED_NAME_DESCRIPTION_AND_CODE = "descriptionAndCode";
  @SerializedName(SERIALIZED_NAME_DESCRIPTION_AND_CODE)
  private String descriptionAndCode;

  public static final String SERIALIZED_NAME_REFERENCE_CODE = "referenceCode";
  @SerializedName(SERIALIZED_NAME_REFERENCE_CODE)
  private String referenceCode;

  public static final String SERIALIZED_NAME_REFERENCE_DESCRIPTION = "referenceDescription";
  @SerializedName(SERIALIZED_NAME_REFERENCE_DESCRIPTION)
  private String referenceDescription;

  public static final String SERIALIZED_NAME_CODE_CHANGED = "codeChanged";
  @SerializedName(SERIALIZED_NAME_CODE_CHANGED)
  private Boolean codeChanged;

  public static final String SERIALIZED_NAME_PARENT_ENTITY = "parentEntity";
  @SerializedName(SERIALIZED_NAME_PARENT_ENTITY)
  private BusinessEntity parentEntity;

  public static final String SERIALIZED_NAME_TRANSIENT = "transient";
  @SerializedName(SERIALIZED_NAME_TRANSIENT)
  private Boolean _transient;


  public PaymentGateway id(Long id) {
    
    this.id = id;
    return this;
  }

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

  public Long getId() {
    return id;
  }



  public void setId(Long id) {
    this.id = id;
  }


  public PaymentGateway version(Integer version) {
    
    this.version = version;
    return this;
  }

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

  public Integer getVersion() {
    return version;
  }



  public void setVersion(Integer version) {
    this.version = version;
  }


  public PaymentGateway auditable(Auditable auditable) {
    
    this.auditable = auditable;
    return this;
  }

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

  public Auditable getAuditable() {
    return auditable;
  }



  public void setAuditable(Auditable auditable) {
    this.auditable = auditable;
  }


  public PaymentGateway historized(Boolean historized) {
    
    this.historized = historized;
    return this;
  }

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

  public Boolean getHistorized() {
    return historized;
  }



  public void setHistorized(Boolean historized) {
    this.historized = historized;
  }


  public PaymentGateway notified(Boolean notified) {
    
    this.notified = notified;
    return this;
  }

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

  public Boolean getNotified() {
    return notified;
  }



  public void setNotified(Boolean notified) {
    this.notified = notified;
  }


  public PaymentGateway auditableFields(List<AuditableFieldHistory> auditableFields) {
    
    this.auditableFields = auditableFields;
    return this;
  }

  public PaymentGateway addAuditableFieldsItem(AuditableFieldHistory auditableFieldsItem) {
    if (this.auditableFields == null) {
      this.auditableFields = new ArrayList<AuditableFieldHistory>();
    }
    this.auditableFields.add(auditableFieldsItem);
    return this;
  }

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

  public List<AuditableFieldHistory> getAuditableFields() {
    return auditableFields;
  }



  public void setAuditableFields(List<AuditableFieldHistory> auditableFields) {
    this.auditableFields = auditableFields;
  }


  public PaymentGateway code(String code) {
    
    this.code = code;
    return this;
  }

   /**
   * Get code
   * @return code
  **/
  @ApiModelProperty(required = true, value = "")

  public String getCode() {
    return code;
  }



  public void setCode(String code) {
    this.code = code;
  }


  public PaymentGateway description(String description) {
    
    this.description = description;
    return this;
  }

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

  public String getDescription() {
    return description;
  }



  public void setDescription(String description) {
    this.description = description;
  }


  public PaymentGateway appendGeneratedCode(Boolean appendGeneratedCode) {
    
    this.appendGeneratedCode = appendGeneratedCode;
    return this;
  }

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

  public Boolean getAppendGeneratedCode() {
    return appendGeneratedCode;
  }



  public void setAppendGeneratedCode(Boolean appendGeneratedCode) {
    this.appendGeneratedCode = appendGeneratedCode;
  }


  public PaymentGateway uuid(String uuid) {
    
    this.uuid = uuid;
    return this;
  }

   /**
   * Get uuid
   * @return uuid
  **/
  @ApiModelProperty(required = true, value = "")

  public String getUuid() {
    return uuid;
  }



  public void setUuid(String uuid) {
    this.uuid = uuid;
  }


  public PaymentGateway cfValues(CustomFieldValues cfValues) {
    
    this.cfValues = cfValues;
    return this;
  }

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

  public CustomFieldValues getCfValues() {
    return cfValues;
  }



  public void setCfValues(CustomFieldValues cfValues) {
    this.cfValues = cfValues;
  }


  public PaymentGateway cfAccumulatedValues(CustomFieldValues cfAccumulatedValues) {
    
    this.cfAccumulatedValues = cfAccumulatedValues;
    return this;
  }

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

  public CustomFieldValues getCfAccumulatedValues() {
    return cfAccumulatedValues;
  }



  public void setCfAccumulatedValues(CustomFieldValues cfAccumulatedValues) {
    this.cfAccumulatedValues = cfAccumulatedValues;
  }


  public PaymentGateway disabled(Boolean disabled) {
    
    this.disabled = disabled;
    return this;
  }

   /**
   * Get disabled
   * @return disabled
  **/
  @ApiModelProperty(required = true, value = "")

  public Boolean getDisabled() {
    return disabled;
  }



  public void setDisabled(Boolean disabled) {
    this.disabled = disabled;
  }


  public PaymentGateway type(TypeEnum type) {
    
    this.type = type;
    return this;
  }

   /**
   * Get type
   * @return type
  **/
  @ApiModelProperty(required = true, value = "")

  public TypeEnum getType() {
    return type;
  }



  public void setType(TypeEnum type) {
    this.type = type;
  }


  public PaymentGateway paymentMethodType(PaymentMethodTypeEnum paymentMethodType) {
    
    this.paymentMethodType = paymentMethodType;
    return this;
  }

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

  public PaymentMethodTypeEnum getPaymentMethodType() {
    return paymentMethodType;
  }



  public void setPaymentMethodType(PaymentMethodTypeEnum paymentMethodType) {
    this.paymentMethodType = paymentMethodType;
  }


  public PaymentGateway scriptInstance(ScriptInstance scriptInstance) {
    
    this.scriptInstance = scriptInstance;
    return this;
  }

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

  public ScriptInstance getScriptInstance() {
    return scriptInstance;
  }



  public void setScriptInstance(ScriptInstance scriptInstance) {
    this.scriptInstance = scriptInstance;
  }


  public PaymentGateway implementationClassName(String implementationClassName) {
    
    this.implementationClassName = implementationClassName;
    return this;
  }

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

  public String getImplementationClassName() {
    return implementationClassName;
  }



  public void setImplementationClassName(String implementationClassName) {
    this.implementationClassName = implementationClassName;
  }


  public PaymentGateway applicationEL(String applicationEL) {
    
    this.applicationEL = applicationEL;
    return this;
  }

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

  public String getApplicationEL() {
    return applicationEL;
  }



  public void setApplicationEL(String applicationEL) {
    this.applicationEL = applicationEL;
  }


  public PaymentGateway country(Country country) {
    
    this.country = country;
    return this;
  }

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

  public Country getCountry() {
    return country;
  }



  public void setCountry(Country country) {
    this.country = country;
  }


  public PaymentGateway tradingCurrency(TradingCurrency tradingCurrency) {
    
    this.tradingCurrency = tradingCurrency;
    return this;
  }

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

  public TradingCurrency getTradingCurrency() {
    return tradingCurrency;
  }



  public void setTradingCurrency(TradingCurrency tradingCurrency) {
    this.tradingCurrency = tradingCurrency;
  }


  public PaymentGateway cardType(CardTypeEnum cardType) {
    
    this.cardType = cardType;
    return this;
  }

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

  public CardTypeEnum getCardType() {
    return cardType;
  }



  public void setCardType(CardTypeEnum cardType) {
    this.cardType = cardType;
  }


  public PaymentGateway nbTries(Integer nbTries) {
    
    this.nbTries = nbTries;
    return this;
  }

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

  public Integer getNbTries() {
    return nbTries;
  }



  public void setNbTries(Integer nbTries) {
    this.nbTries = nbTries;
  }


  public PaymentGateway replayCause(ReplayCauseEnum replayCause) {
    
    this.replayCause = replayCause;
    return this;
  }

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

  public ReplayCauseEnum getReplayCause() {
    return replayCause;
  }



  public void setReplayCause(ReplayCauseEnum replayCause) {
    this.replayCause = replayCause;
  }


  public PaymentGateway errorsToReplay(String errorsToReplay) {
    
    this.errorsToReplay = errorsToReplay;
    return this;
  }

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

  public String getErrorsToReplay() {
    return errorsToReplay;
  }



  public void setErrorsToReplay(String errorsToReplay) {
    this.errorsToReplay = errorsToReplay;
  }


  public PaymentGateway marchandId(String marchandId) {
    
    this.marchandId = marchandId;
    return this;
  }

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

  public String getMarchandId() {
    return marchandId;
  }



  public void setMarchandId(String marchandId) {
    this.marchandId = marchandId;
  }


  public PaymentGateway secretKey(String secretKey) {
    
    this.secretKey = secretKey;
    return this;
  }

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

  public String getSecretKey() {
    return secretKey;
  }



  public void setSecretKey(String secretKey) {
    this.secretKey = secretKey;
  }


  public PaymentGateway apiKey(String apiKey) {
    
    this.apiKey = apiKey;
    return this;
  }

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

  public String getApiKey() {
    return apiKey;
  }



  public void setApiKey(String apiKey) {
    this.apiKey = apiKey;
  }


  public PaymentGateway webhooksKeyId(String webhooksKeyId) {
    
    this.webhooksKeyId = webhooksKeyId;
    return this;
  }

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

  public String getWebhooksKeyId() {
    return webhooksKeyId;
  }



  public void setWebhooksKeyId(String webhooksKeyId) {
    this.webhooksKeyId = webhooksKeyId;
  }


  public PaymentGateway webhooksSecretKey(String webhooksSecretKey) {
    
    this.webhooksSecretKey = webhooksSecretKey;
    return this;
  }

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

  public String getWebhooksSecretKey() {
    return webhooksSecretKey;
  }



  public void setWebhooksSecretKey(String webhooksSecretKey) {
    this.webhooksSecretKey = webhooksSecretKey;
  }


  public PaymentGateway profile(String profile) {
    
    this.profile = profile;
    return this;
  }

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

  public String getProfile() {
    return profile;
  }



  public void setProfile(String profile) {
    this.profile = profile;
  }


  public PaymentGateway rumSequence(PaymentGatewayRumSequence rumSequence) {
    
    this.rumSequence = rumSequence;
    return this;
  }

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

  public PaymentGatewayRumSequence getRumSequence() {
    return rumSequence;
  }



  public void setRumSequence(PaymentGatewayRumSequence rumSequence) {
    this.rumSequence = rumSequence;
  }


  public PaymentGateway bankCoordinates(BankCoordinates bankCoordinates) {
    
    this.bankCoordinates = bankCoordinates;
    return this;
  }

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

  public BankCoordinates getBankCoordinates() {
    return bankCoordinates;
  }



  public void setBankCoordinates(BankCoordinates bankCoordinates) {
    this.bankCoordinates = bankCoordinates;
  }


  public PaymentGateway seller(Seller seller) {
    
    this.seller = seller;
    return this;
  }

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

  public Seller getSeller() {
    return seller;
  }



  public void setSeller(Seller seller) {
    this.seller = seller;
  }


  public PaymentGateway active(Boolean active) {
    
    this.active = active;
    return this;
  }

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

  public Boolean getActive() {
    return active;
  }



  public void setActive(Boolean active) {
    this.active = active;
  }


  public PaymentGateway parentCFEntities(List<ICustomFieldEntity> parentCFEntities) {
    
    this.parentCFEntities = parentCFEntities;
    return this;
  }

  public PaymentGateway addParentCFEntitiesItem(ICustomFieldEntity parentCFEntitiesItem) {
    if (this.parentCFEntities == null) {
      this.parentCFEntities = new ArrayList<ICustomFieldEntity>();
    }
    this.parentCFEntities.add(parentCFEntitiesItem);
    return this;
  }

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

  public List<ICustomFieldEntity> getParentCFEntities() {
    return parentCFEntities;
  }



  public void setParentCFEntities(List<ICustomFieldEntity> parentCFEntities) {
    this.parentCFEntities = parentCFEntities;
  }


  public PaymentGateway cfValuesNullSafe(CustomFieldValues cfValuesNullSafe) {
    
    this.cfValuesNullSafe = cfValuesNullSafe;
    return this;
  }

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

  public CustomFieldValues getCfValuesNullSafe() {
    return cfValuesNullSafe;
  }



  public void setCfValuesNullSafe(CustomFieldValues cfValuesNullSafe) {
    this.cfValuesNullSafe = cfValuesNullSafe;
  }


  public PaymentGateway cfValuesAsValues(Map<String, Object> cfValuesAsValues) {
    
    this.cfValuesAsValues = cfValuesAsValues;
    return this;
  }

  public PaymentGateway putCfValuesAsValuesItem(String key, Object cfValuesAsValuesItem) {
    if (this.cfValuesAsValues == null) {
      this.cfValuesAsValues = new HashMap<String, Object>();
    }
    this.cfValuesAsValues.put(key, cfValuesAsValuesItem);
    return this;
  }

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

  public Map<String, Object> getCfValuesAsValues() {
    return cfValuesAsValues;
  }



  public void setCfValuesAsValues(Map<String, Object> cfValuesAsValues) {
    this.cfValuesAsValues = cfValuesAsValues;
  }


  public PaymentGateway cfAccumulatedValuesNullSafe(CustomFieldValues cfAccumulatedValuesNullSafe) {
    
    this.cfAccumulatedValuesNullSafe = cfAccumulatedValuesNullSafe;
    return this;
  }

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

  public CustomFieldValues getCfAccumulatedValuesNullSafe() {
    return cfAccumulatedValuesNullSafe;
  }



  public void setCfAccumulatedValuesNullSafe(CustomFieldValues cfAccumulatedValuesNullSafe) {
    this.cfAccumulatedValuesNullSafe = cfAccumulatedValuesNullSafe;
  }


  public PaymentGateway descriptionOrCode(String descriptionOrCode) {
    
    this.descriptionOrCode = descriptionOrCode;
    return this;
  }

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

  public String getDescriptionOrCode() {
    return descriptionOrCode;
  }



  public void setDescriptionOrCode(String descriptionOrCode) {
    this.descriptionOrCode = descriptionOrCode;
  }


  public PaymentGateway descriptionAndCode(String descriptionAndCode) {
    
    this.descriptionAndCode = descriptionAndCode;
    return this;
  }

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

  public String getDescriptionAndCode() {
    return descriptionAndCode;
  }



  public void setDescriptionAndCode(String descriptionAndCode) {
    this.descriptionAndCode = descriptionAndCode;
  }


  public PaymentGateway referenceCode(String referenceCode) {
    
    this.referenceCode = referenceCode;
    return this;
  }

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

  public String getReferenceCode() {
    return referenceCode;
  }



  public void setReferenceCode(String referenceCode) {
    this.referenceCode = referenceCode;
  }


  public PaymentGateway referenceDescription(String referenceDescription) {
    
    this.referenceDescription = referenceDescription;
    return this;
  }

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

  public String getReferenceDescription() {
    return referenceDescription;
  }



  public void setReferenceDescription(String referenceDescription) {
    this.referenceDescription = referenceDescription;
  }


  public PaymentGateway codeChanged(Boolean codeChanged) {
    
    this.codeChanged = codeChanged;
    return this;
  }

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

  public Boolean getCodeChanged() {
    return codeChanged;
  }



  public void setCodeChanged(Boolean codeChanged) {
    this.codeChanged = codeChanged;
  }


  public PaymentGateway parentEntity(BusinessEntity parentEntity) {
    
    this.parentEntity = parentEntity;
    return this;
  }

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

  public BusinessEntity getParentEntity() {
    return parentEntity;
  }



  public void setParentEntity(BusinessEntity parentEntity) {
    this.parentEntity = parentEntity;
  }


  public PaymentGateway _transient(Boolean _transient) {
    
    this._transient = _transient;
    return this;
  }

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

  public Boolean getTransient() {
    return _transient;
  }



  public void setTransient(Boolean _transient) {
    this._transient = _transient;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    PaymentGateway paymentGateway = (PaymentGateway) o;
    return Objects.equals(this.id, paymentGateway.id) &&
        Objects.equals(this.version, paymentGateway.version) &&
        Objects.equals(this.auditable, paymentGateway.auditable) &&
        Objects.equals(this.historized, paymentGateway.historized) &&
        Objects.equals(this.notified, paymentGateway.notified) &&
        Objects.equals(this.auditableFields, paymentGateway.auditableFields) &&
        Objects.equals(this.code, paymentGateway.code) &&
        Objects.equals(this.description, paymentGateway.description) &&
        Objects.equals(this.appendGeneratedCode, paymentGateway.appendGeneratedCode) &&
        Objects.equals(this.uuid, paymentGateway.uuid) &&
        Objects.equals(this.cfValues, paymentGateway.cfValues) &&
        Objects.equals(this.cfAccumulatedValues, paymentGateway.cfAccumulatedValues) &&
        Objects.equals(this.disabled, paymentGateway.disabled) &&
        Objects.equals(this.type, paymentGateway.type) &&
        Objects.equals(this.paymentMethodType, paymentGateway.paymentMethodType) &&
        Objects.equals(this.scriptInstance, paymentGateway.scriptInstance) &&
        Objects.equals(this.implementationClassName, paymentGateway.implementationClassName) &&
        Objects.equals(this.applicationEL, paymentGateway.applicationEL) &&
        Objects.equals(this.country, paymentGateway.country) &&
        Objects.equals(this.tradingCurrency, paymentGateway.tradingCurrency) &&
        Objects.equals(this.cardType, paymentGateway.cardType) &&
        Objects.equals(this.nbTries, paymentGateway.nbTries) &&
        Objects.equals(this.replayCause, paymentGateway.replayCause) &&
        Objects.equals(this.errorsToReplay, paymentGateway.errorsToReplay) &&
        Objects.equals(this.marchandId, paymentGateway.marchandId) &&
        Objects.equals(this.secretKey, paymentGateway.secretKey) &&
        Objects.equals(this.apiKey, paymentGateway.apiKey) &&
        Objects.equals(this.webhooksKeyId, paymentGateway.webhooksKeyId) &&
        Objects.equals(this.webhooksSecretKey, paymentGateway.webhooksSecretKey) &&
        Objects.equals(this.profile, paymentGateway.profile) &&
        Objects.equals(this.rumSequence, paymentGateway.rumSequence) &&
        Objects.equals(this.bankCoordinates, paymentGateway.bankCoordinates) &&
        Objects.equals(this.seller, paymentGateway.seller) &&
        Objects.equals(this.active, paymentGateway.active) &&
        Objects.equals(this.parentCFEntities, paymentGateway.parentCFEntities) &&
        Objects.equals(this.cfValuesNullSafe, paymentGateway.cfValuesNullSafe) &&
        Objects.equals(this.cfValuesAsValues, paymentGateway.cfValuesAsValues) &&
        Objects.equals(this.cfAccumulatedValuesNullSafe, paymentGateway.cfAccumulatedValuesNullSafe) &&
        Objects.equals(this.descriptionOrCode, paymentGateway.descriptionOrCode) &&
        Objects.equals(this.descriptionAndCode, paymentGateway.descriptionAndCode) &&
        Objects.equals(this.referenceCode, paymentGateway.referenceCode) &&
        Objects.equals(this.referenceDescription, paymentGateway.referenceDescription) &&
        Objects.equals(this.codeChanged, paymentGateway.codeChanged) &&
        Objects.equals(this.parentEntity, paymentGateway.parentEntity) &&
        Objects.equals(this._transient, paymentGateway._transient);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, version, auditable, historized, notified, auditableFields, code, description, appendGeneratedCode, uuid, cfValues, cfAccumulatedValues, disabled, type, paymentMethodType, scriptInstance, implementationClassName, applicationEL, country, tradingCurrency, cardType, nbTries, replayCause, errorsToReplay, marchandId, secretKey, apiKey, webhooksKeyId, webhooksSecretKey, profile, rumSequence, bankCoordinates, seller, active, parentCFEntities, cfValuesNullSafe, cfValuesAsValues, cfAccumulatedValuesNullSafe, descriptionOrCode, descriptionAndCode, referenceCode, referenceDescription, codeChanged, parentEntity, _transient);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PaymentGateway {\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    version: ").append(toIndentedString(version)).append("\n");
    sb.append("    auditable: ").append(toIndentedString(auditable)).append("\n");
    sb.append("    historized: ").append(toIndentedString(historized)).append("\n");
    sb.append("    notified: ").append(toIndentedString(notified)).append("\n");
    sb.append("    auditableFields: ").append(toIndentedString(auditableFields)).append("\n");
    sb.append("    code: ").append(toIndentedString(code)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    appendGeneratedCode: ").append(toIndentedString(appendGeneratedCode)).append("\n");
    sb.append("    uuid: ").append(toIndentedString(uuid)).append("\n");
    sb.append("    cfValues: ").append(toIndentedString(cfValues)).append("\n");
    sb.append("    cfAccumulatedValues: ").append(toIndentedString(cfAccumulatedValues)).append("\n");
    sb.append("    disabled: ").append(toIndentedString(disabled)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    paymentMethodType: ").append(toIndentedString(paymentMethodType)).append("\n");
    sb.append("    scriptInstance: ").append(toIndentedString(scriptInstance)).append("\n");
    sb.append("    implementationClassName: ").append(toIndentedString(implementationClassName)).append("\n");
    sb.append("    applicationEL: ").append(toIndentedString(applicationEL)).append("\n");
    sb.append("    country: ").append(toIndentedString(country)).append("\n");
    sb.append("    tradingCurrency: ").append(toIndentedString(tradingCurrency)).append("\n");
    sb.append("    cardType: ").append(toIndentedString(cardType)).append("\n");
    sb.append("    nbTries: ").append(toIndentedString(nbTries)).append("\n");
    sb.append("    replayCause: ").append(toIndentedString(replayCause)).append("\n");
    sb.append("    errorsToReplay: ").append(toIndentedString(errorsToReplay)).append("\n");
    sb.append("    marchandId: ").append(toIndentedString(marchandId)).append("\n");
    sb.append("    secretKey: ").append(toIndentedString(secretKey)).append("\n");
    sb.append("    apiKey: ").append(toIndentedString(apiKey)).append("\n");
    sb.append("    webhooksKeyId: ").append(toIndentedString(webhooksKeyId)).append("\n");
    sb.append("    webhooksSecretKey: ").append(toIndentedString(webhooksSecretKey)).append("\n");
    sb.append("    profile: ").append(toIndentedString(profile)).append("\n");
    sb.append("    rumSequence: ").append(toIndentedString(rumSequence)).append("\n");
    sb.append("    bankCoordinates: ").append(toIndentedString(bankCoordinates)).append("\n");
    sb.append("    seller: ").append(toIndentedString(seller)).append("\n");
    sb.append("    active: ").append(toIndentedString(active)).append("\n");
    sb.append("    parentCFEntities: ").append(toIndentedString(parentCFEntities)).append("\n");
    sb.append("    cfValuesNullSafe: ").append(toIndentedString(cfValuesNullSafe)).append("\n");
    sb.append("    cfValuesAsValues: ").append(toIndentedString(cfValuesAsValues)).append("\n");
    sb.append("    cfAccumulatedValuesNullSafe: ").append(toIndentedString(cfAccumulatedValuesNullSafe)).append("\n");
    sb.append("    descriptionOrCode: ").append(toIndentedString(descriptionOrCode)).append("\n");
    sb.append("    descriptionAndCode: ").append(toIndentedString(descriptionAndCode)).append("\n");
    sb.append("    referenceCode: ").append(toIndentedString(referenceCode)).append("\n");
    sb.append("    referenceDescription: ").append(toIndentedString(referenceDescription)).append("\n");
    sb.append("    codeChanged: ").append(toIndentedString(codeChanged)).append("\n");
    sb.append("    parentEntity: ").append(toIndentedString(parentEntity)).append("\n");
    sb.append("    _transient: ").append(toIndentedString(_transient)).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(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}

