/*
 * 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 org.openapitools.client.model.BankCoordinatesDto;
import org.openapitools.client.model.CustomFieldsDto;
import org.openapitools.client.model.PaymentGatewayRumSequenceDto;

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

  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_UPDATED_CODE = "updatedCode";
  @SerializedName(SERIALIZED_NAME_UPDATED_CODE)
  private String updatedCode;

  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_CODE = "scriptInstanceCode";
  @SerializedName(SERIALIZED_NAME_SCRIPT_INSTANCE_CODE)
  private String scriptInstanceCode;

  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_CODE = "countryCode";
  @SerializedName(SERIALIZED_NAME_COUNTRY_CODE)
  private String countryCode;

  public static final String SERIALIZED_NAME_TRADING_CURRENCY_CODE = "tradingCurrencyCode";
  @SerializedName(SERIALIZED_NAME_TRADING_CURRENCY_CODE)
  private String tradingCurrencyCode;

  /**
   * 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_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_SECRET_KEY = "webhooksSecretKey";
  @SerializedName(SERIALIZED_NAME_WEBHOOKS_SECRET_KEY)
  private String webhooksSecretKey;

  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_PROFILE = "profile";
  @SerializedName(SERIALIZED_NAME_PROFILE)
  private String profile;

  public static final String SERIALIZED_NAME_CUSTOM_FIELDS = "customFields";
  @SerializedName(SERIALIZED_NAME_CUSTOM_FIELDS)
  private CustomFieldsDto customFields;

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

  public static final String SERIALIZED_NAME_SELLER_CODE = "sellerCode";
  @SerializedName(SERIALIZED_NAME_SELLER_CODE)
  private String sellerCode;

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


  public PaymentGatewayDto 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 PaymentGatewayDto code(String code) {
    
    this.code = code;
    return this;
  }

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

  public String getCode() {
    return code;
  }



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


  public PaymentGatewayDto 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 PaymentGatewayDto updatedCode(String updatedCode) {
    
    this.updatedCode = updatedCode;
    return this;
  }

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

  public String getUpdatedCode() {
    return updatedCode;
  }



  public void setUpdatedCode(String updatedCode) {
    this.updatedCode = updatedCode;
  }


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

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

  public Boolean getDisabled() {
    return disabled;
  }



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


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

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

  public TypeEnum getType() {
    return type;
  }



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


  public PaymentGatewayDto 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 PaymentGatewayDto scriptInstanceCode(String scriptInstanceCode) {
    
    this.scriptInstanceCode = scriptInstanceCode;
    return this;
  }

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

  public String getScriptInstanceCode() {
    return scriptInstanceCode;
  }



  public void setScriptInstanceCode(String scriptInstanceCode) {
    this.scriptInstanceCode = scriptInstanceCode;
  }


  public PaymentGatewayDto 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 PaymentGatewayDto 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 PaymentGatewayDto countryCode(String countryCode) {
    
    this.countryCode = countryCode;
    return this;
  }

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

  public String getCountryCode() {
    return countryCode;
  }



  public void setCountryCode(String countryCode) {
    this.countryCode = countryCode;
  }


  public PaymentGatewayDto tradingCurrencyCode(String tradingCurrencyCode) {
    
    this.tradingCurrencyCode = tradingCurrencyCode;
    return this;
  }

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

  public String getTradingCurrencyCode() {
    return tradingCurrencyCode;
  }



  public void setTradingCurrencyCode(String tradingCurrencyCode) {
    this.tradingCurrencyCode = tradingCurrencyCode;
  }


  public PaymentGatewayDto 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 PaymentGatewayDto 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 PaymentGatewayDto 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 PaymentGatewayDto 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 PaymentGatewayDto 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 PaymentGatewayDto 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 PaymentGatewayDto 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 PaymentGatewayDto customFields(CustomFieldsDto customFields) {
    
    this.customFields = customFields;
    return this;
  }

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

  public CustomFieldsDto getCustomFields() {
    return customFields;
  }



  public void setCustomFields(CustomFieldsDto customFields) {
    this.customFields = customFields;
  }


  public PaymentGatewayDto rumSequence(PaymentGatewayRumSequenceDto rumSequence) {
    
    this.rumSequence = rumSequence;
    return this;
  }

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

  public PaymentGatewayRumSequenceDto getRumSequence() {
    return rumSequence;
  }



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


  public PaymentGatewayDto sellerCode(String sellerCode) {
    
    this.sellerCode = sellerCode;
    return this;
  }

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

  public String getSellerCode() {
    return sellerCode;
  }



  public void setSellerCode(String sellerCode) {
    this.sellerCode = sellerCode;
  }


  public PaymentGatewayDto bankCoordinates(BankCoordinatesDto bankCoordinates) {
    
    this.bankCoordinates = bankCoordinates;
    return this;
  }

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

  public BankCoordinatesDto getBankCoordinates() {
    return bankCoordinates;
  }



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


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    PaymentGatewayDto paymentGatewayDto = (PaymentGatewayDto) o;
    return Objects.equals(this.id, paymentGatewayDto.id) &&
        Objects.equals(this.code, paymentGatewayDto.code) &&
        Objects.equals(this.description, paymentGatewayDto.description) &&
        Objects.equals(this.updatedCode, paymentGatewayDto.updatedCode) &&
        Objects.equals(this.disabled, paymentGatewayDto.disabled) &&
        Objects.equals(this.type, paymentGatewayDto.type) &&
        Objects.equals(this.paymentMethodType, paymentGatewayDto.paymentMethodType) &&
        Objects.equals(this.scriptInstanceCode, paymentGatewayDto.scriptInstanceCode) &&
        Objects.equals(this.implementationClassName, paymentGatewayDto.implementationClassName) &&
        Objects.equals(this.applicationEL, paymentGatewayDto.applicationEL) &&
        Objects.equals(this.countryCode, paymentGatewayDto.countryCode) &&
        Objects.equals(this.tradingCurrencyCode, paymentGatewayDto.tradingCurrencyCode) &&
        Objects.equals(this.cardType, paymentGatewayDto.cardType) &&
        Objects.equals(this.marchandId, paymentGatewayDto.marchandId) &&
        Objects.equals(this.secretKey, paymentGatewayDto.secretKey) &&
        Objects.equals(this.apiKey, paymentGatewayDto.apiKey) &&
        Objects.equals(this.webhooksSecretKey, paymentGatewayDto.webhooksSecretKey) &&
        Objects.equals(this.webhooksKeyId, paymentGatewayDto.webhooksKeyId) &&
        Objects.equals(this.profile, paymentGatewayDto.profile) &&
        Objects.equals(this.customFields, paymentGatewayDto.customFields) &&
        Objects.equals(this.rumSequence, paymentGatewayDto.rumSequence) &&
        Objects.equals(this.sellerCode, paymentGatewayDto.sellerCode) &&
        Objects.equals(this.bankCoordinates, paymentGatewayDto.bankCoordinates);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, code, description, updatedCode, disabled, type, paymentMethodType, scriptInstanceCode, implementationClassName, applicationEL, countryCode, tradingCurrencyCode, cardType, marchandId, secretKey, apiKey, webhooksSecretKey, webhooksKeyId, profile, customFields, rumSequence, sellerCode, bankCoordinates);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PaymentGatewayDto {\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    code: ").append(toIndentedString(code)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    updatedCode: ").append(toIndentedString(updatedCode)).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("    scriptInstanceCode: ").append(toIndentedString(scriptInstanceCode)).append("\n");
    sb.append("    implementationClassName: ").append(toIndentedString(implementationClassName)).append("\n");
    sb.append("    applicationEL: ").append(toIndentedString(applicationEL)).append("\n");
    sb.append("    countryCode: ").append(toIndentedString(countryCode)).append("\n");
    sb.append("    tradingCurrencyCode: ").append(toIndentedString(tradingCurrencyCode)).append("\n");
    sb.append("    cardType: ").append(toIndentedString(cardType)).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("    webhooksSecretKey: ").append(toIndentedString(webhooksSecretKey)).append("\n");
    sb.append("    webhooksKeyId: ").append(toIndentedString(webhooksKeyId)).append("\n");
    sb.append("    profile: ").append(toIndentedString(profile)).append("\n");
    sb.append("    customFields: ").append(toIndentedString(customFields)).append("\n");
    sb.append("    rumSequence: ").append(toIndentedString(rumSequence)).append("\n");
    sb.append("    sellerCode: ").append(toIndentedString(sellerCode)).append("\n");
    sb.append("    bankCoordinates: ").append(toIndentedString(bankCoordinates)).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    ");
  }

}

