/*
 * 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.threeten.bp.OffsetDateTime;

/**
 * CardPaymentMethodDto
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-09-13T10:03:17.753Z[GMT]")
public class CardPaymentMethodDto {
  /**
   * 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_ID = "id";
  @SerializedName(SERIALIZED_NAME_ID)
  private Long id;

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

  public static final String SERIALIZED_NAME_ALIAS = "alias";
  @SerializedName(SERIALIZED_NAME_ALIAS)
  private String alias;

  public static final String SERIALIZED_NAME_PREFERRED = "preferred";
  @SerializedName(SERIALIZED_NAME_PREFERRED)
  private Boolean preferred;

  public static final String SERIALIZED_NAME_CUSTOMER_ACCOUNT_CODE = "customerAccountCode";
  @SerializedName(SERIALIZED_NAME_CUSTOMER_ACCOUNT_CODE)
  private String customerAccountCode;

  public static final String SERIALIZED_NAME_INFO1 = "info1";
  @SerializedName(SERIALIZED_NAME_INFO1)
  private String info1;

  public static final String SERIALIZED_NAME_INFO2 = "info2";
  @SerializedName(SERIALIZED_NAME_INFO2)
  private String info2;

  public static final String SERIALIZED_NAME_INFO3 = "info3";
  @SerializedName(SERIALIZED_NAME_INFO3)
  private String info3;

  public static final String SERIALIZED_NAME_INFO4 = "info4";
  @SerializedName(SERIALIZED_NAME_INFO4)
  private String info4;

  public static final String SERIALIZED_NAME_INFO5 = "info5";
  @SerializedName(SERIALIZED_NAME_INFO5)
  private String info5;

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

  public static final String SERIALIZED_NAME_MANDATE_IDENTIFICATION = "mandateIdentification";
  @SerializedName(SERIALIZED_NAME_MANDATE_IDENTIFICATION)
  private String mandateIdentification;

  public static final String SERIALIZED_NAME_MANDATE_DATE = "mandateDate";
  @SerializedName(SERIALIZED_NAME_MANDATE_DATE)
  private OffsetDateTime mandateDate;

  /**
   * 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_OWNER = "owner";
  @SerializedName(SERIALIZED_NAME_OWNER)
  private String owner;

  public static final String SERIALIZED_NAME_MONTH_EXPIRATION = "monthExpiration";
  @SerializedName(SERIALIZED_NAME_MONTH_EXPIRATION)
  private Integer monthExpiration;

  public static final String SERIALIZED_NAME_YEAR_EXPIRATION = "yearExpiration";
  @SerializedName(SERIALIZED_NAME_YEAR_EXPIRATION)
  private Integer yearExpiration;

  public static final String SERIALIZED_NAME_TOKEN_ID = "tokenId";
  @SerializedName(SERIALIZED_NAME_TOKEN_ID)
  private String tokenId;

  public static final String SERIALIZED_NAME_CARD_NUMBER = "cardNumber";
  @SerializedName(SERIALIZED_NAME_CARD_NUMBER)
  private String cardNumber;

  public static final String SERIALIZED_NAME_ISSUE_NUMBER = "issueNumber";
  @SerializedName(SERIALIZED_NAME_ISSUE_NUMBER)
  private String issueNumber;

  public static final String SERIALIZED_NAME_USER_ID = "userId";
  @SerializedName(SERIALIZED_NAME_USER_ID)
  private String userId;

  public static final String SERIALIZED_NAME_CUSTOMER_CODE = "customerCode";
  @SerializedName(SERIALIZED_NAME_CUSTOMER_CODE)
  private String customerCode;


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

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

  public PaymentMethodTypeEnum getPaymentMethodType() {
    return paymentMethodType;
  }



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


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

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

  public String getAlias() {
    return alias;
  }



  public void setAlias(String alias) {
    this.alias = alias;
  }


  public CardPaymentMethodDto preferred(Boolean preferred) {
    
    this.preferred = preferred;
    return this;
  }

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

  public Boolean getPreferred() {
    return preferred;
  }



  public void setPreferred(Boolean preferred) {
    this.preferred = preferred;
  }


  public CardPaymentMethodDto customerAccountCode(String customerAccountCode) {
    
    this.customerAccountCode = customerAccountCode;
    return this;
  }

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

  public String getCustomerAccountCode() {
    return customerAccountCode;
  }



  public void setCustomerAccountCode(String customerAccountCode) {
    this.customerAccountCode = customerAccountCode;
  }


  public CardPaymentMethodDto info1(String info1) {
    
    this.info1 = info1;
    return this;
  }

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

  public String getInfo1() {
    return info1;
  }



  public void setInfo1(String info1) {
    this.info1 = info1;
  }


  public CardPaymentMethodDto info2(String info2) {
    
    this.info2 = info2;
    return this;
  }

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

  public String getInfo2() {
    return info2;
  }



  public void setInfo2(String info2) {
    this.info2 = info2;
  }


  public CardPaymentMethodDto info3(String info3) {
    
    this.info3 = info3;
    return this;
  }

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

  public String getInfo3() {
    return info3;
  }



  public void setInfo3(String info3) {
    this.info3 = info3;
  }


  public CardPaymentMethodDto info4(String info4) {
    
    this.info4 = info4;
    return this;
  }

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

  public String getInfo4() {
    return info4;
  }



  public void setInfo4(String info4) {
    this.info4 = info4;
  }


  public CardPaymentMethodDto info5(String info5) {
    
    this.info5 = info5;
    return this;
  }

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

  public String getInfo5() {
    return info5;
  }



  public void setInfo5(String info5) {
    this.info5 = info5;
  }


  public CardPaymentMethodDto 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;
  }


  public CardPaymentMethodDto mandateIdentification(String mandateIdentification) {
    
    this.mandateIdentification = mandateIdentification;
    return this;
  }

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

  public String getMandateIdentification() {
    return mandateIdentification;
  }



  public void setMandateIdentification(String mandateIdentification) {
    this.mandateIdentification = mandateIdentification;
  }


  public CardPaymentMethodDto mandateDate(OffsetDateTime mandateDate) {
    
    this.mandateDate = mandateDate;
    return this;
  }

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

  public OffsetDateTime getMandateDate() {
    return mandateDate;
  }



  public void setMandateDate(OffsetDateTime mandateDate) {
    this.mandateDate = mandateDate;
  }


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

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

  public String getOwner() {
    return owner;
  }



  public void setOwner(String owner) {
    this.owner = owner;
  }


  public CardPaymentMethodDto monthExpiration(Integer monthExpiration) {
    
    this.monthExpiration = monthExpiration;
    return this;
  }

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

  public Integer getMonthExpiration() {
    return monthExpiration;
  }



  public void setMonthExpiration(Integer monthExpiration) {
    this.monthExpiration = monthExpiration;
  }


  public CardPaymentMethodDto yearExpiration(Integer yearExpiration) {
    
    this.yearExpiration = yearExpiration;
    return this;
  }

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

  public Integer getYearExpiration() {
    return yearExpiration;
  }



  public void setYearExpiration(Integer yearExpiration) {
    this.yearExpiration = yearExpiration;
  }


  public CardPaymentMethodDto tokenId(String tokenId) {
    
    this.tokenId = tokenId;
    return this;
  }

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

  public String getTokenId() {
    return tokenId;
  }



  public void setTokenId(String tokenId) {
    this.tokenId = tokenId;
  }


  public CardPaymentMethodDto cardNumber(String cardNumber) {
    
    this.cardNumber = cardNumber;
    return this;
  }

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

  public String getCardNumber() {
    return cardNumber;
  }



  public void setCardNumber(String cardNumber) {
    this.cardNumber = cardNumber;
  }


  public CardPaymentMethodDto issueNumber(String issueNumber) {
    
    this.issueNumber = issueNumber;
    return this;
  }

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

  public String getIssueNumber() {
    return issueNumber;
  }



  public void setIssueNumber(String issueNumber) {
    this.issueNumber = issueNumber;
  }


  public CardPaymentMethodDto userId(String userId) {
    
    this.userId = userId;
    return this;
  }

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

  public String getUserId() {
    return userId;
  }



  public void setUserId(String userId) {
    this.userId = userId;
  }


  public CardPaymentMethodDto customerCode(String customerCode) {
    
    this.customerCode = customerCode;
    return this;
  }

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

  public String getCustomerCode() {
    return customerCode;
  }



  public void setCustomerCode(String customerCode) {
    this.customerCode = customerCode;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CardPaymentMethodDto cardPaymentMethodDto = (CardPaymentMethodDto) o;
    return Objects.equals(this.paymentMethodType, cardPaymentMethodDto.paymentMethodType) &&
        Objects.equals(this.id, cardPaymentMethodDto.id) &&
        Objects.equals(this.disabled, cardPaymentMethodDto.disabled) &&
        Objects.equals(this.alias, cardPaymentMethodDto.alias) &&
        Objects.equals(this.preferred, cardPaymentMethodDto.preferred) &&
        Objects.equals(this.customerAccountCode, cardPaymentMethodDto.customerAccountCode) &&
        Objects.equals(this.info1, cardPaymentMethodDto.info1) &&
        Objects.equals(this.info2, cardPaymentMethodDto.info2) &&
        Objects.equals(this.info3, cardPaymentMethodDto.info3) &&
        Objects.equals(this.info4, cardPaymentMethodDto.info4) &&
        Objects.equals(this.info5, cardPaymentMethodDto.info5) &&
        Objects.equals(this.bankCoordinates, cardPaymentMethodDto.bankCoordinates) &&
        Objects.equals(this.mandateIdentification, cardPaymentMethodDto.mandateIdentification) &&
        Objects.equals(this.mandateDate, cardPaymentMethodDto.mandateDate) &&
        Objects.equals(this.cardType, cardPaymentMethodDto.cardType) &&
        Objects.equals(this.owner, cardPaymentMethodDto.owner) &&
        Objects.equals(this.monthExpiration, cardPaymentMethodDto.monthExpiration) &&
        Objects.equals(this.yearExpiration, cardPaymentMethodDto.yearExpiration) &&
        Objects.equals(this.tokenId, cardPaymentMethodDto.tokenId) &&
        Objects.equals(this.cardNumber, cardPaymentMethodDto.cardNumber) &&
        Objects.equals(this.issueNumber, cardPaymentMethodDto.issueNumber) &&
        Objects.equals(this.userId, cardPaymentMethodDto.userId) &&
        Objects.equals(this.customerCode, cardPaymentMethodDto.customerCode);
  }

  @Override
  public int hashCode() {
    return Objects.hash(paymentMethodType, id, disabled, alias, preferred, customerAccountCode, info1, info2, info3, info4, info5, bankCoordinates, mandateIdentification, mandateDate, cardType, owner, monthExpiration, yearExpiration, tokenId, cardNumber, issueNumber, userId, customerCode);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CardPaymentMethodDto {\n");
    sb.append("    paymentMethodType: ").append(toIndentedString(paymentMethodType)).append("\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    disabled: ").append(toIndentedString(disabled)).append("\n");
    sb.append("    alias: ").append(toIndentedString(alias)).append("\n");
    sb.append("    preferred: ").append(toIndentedString(preferred)).append("\n");
    sb.append("    customerAccountCode: ").append(toIndentedString(customerAccountCode)).append("\n");
    sb.append("    info1: ").append(toIndentedString(info1)).append("\n");
    sb.append("    info2: ").append(toIndentedString(info2)).append("\n");
    sb.append("    info3: ").append(toIndentedString(info3)).append("\n");
    sb.append("    info4: ").append(toIndentedString(info4)).append("\n");
    sb.append("    info5: ").append(toIndentedString(info5)).append("\n");
    sb.append("    bankCoordinates: ").append(toIndentedString(bankCoordinates)).append("\n");
    sb.append("    mandateIdentification: ").append(toIndentedString(mandateIdentification)).append("\n");
    sb.append("    mandateDate: ").append(toIndentedString(mandateDate)).append("\n");
    sb.append("    cardType: ").append(toIndentedString(cardType)).append("\n");
    sb.append("    owner: ").append(toIndentedString(owner)).append("\n");
    sb.append("    monthExpiration: ").append(toIndentedString(monthExpiration)).append("\n");
    sb.append("    yearExpiration: ").append(toIndentedString(yearExpiration)).append("\n");
    sb.append("    tokenId: ").append(toIndentedString(tokenId)).append("\n");
    sb.append("    cardNumber: ").append(toIndentedString(cardNumber)).append("\n");
    sb.append("    issueNumber: ").append(toIndentedString(issueNumber)).append("\n");
    sb.append("    userId: ").append(toIndentedString(userId)).append("\n");
    sb.append("    customerCode: ").append(toIndentedString(customerCode)).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    ");
  }

}

