/*
 * 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.List;
import org.openapitools.client.model.Auditable;
import org.openapitools.client.model.AuditableFieldHistory;
import org.openapitools.client.model.CustomerAccount;

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

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

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

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

  public static final String SERIALIZED_NAME_PAYMENT_TYPE = "paymentType";
  @SerializedName(SERIALIZED_NAME_PAYMENT_TYPE)
  private PaymentTypeEnum paymentType;

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

  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_TOKEN_ID = "tokenId";
  @SerializedName(SERIALIZED_NAME_TOKEN_ID)
  private String tokenId;

  public static final String SERIALIZED_NAME_ACTION = "action";
  @SerializedName(SERIALIZED_NAME_ACTION)
  private String action;

  public static final String SERIALIZED_NAME_EXPIRED = "expired";
  @SerializedName(SERIALIZED_NAME_EXPIRED)
  private Boolean expired;

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

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


  public WirePaymentMethod 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 WirePaymentMethod 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 WirePaymentMethod 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 WirePaymentMethod 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 WirePaymentMethod 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 WirePaymentMethod auditableFields(List<AuditableFieldHistory> auditableFields) {
    
    this.auditableFields = auditableFields;
    return this;
  }

  public WirePaymentMethod 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 WirePaymentMethod 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 WirePaymentMethod 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 WirePaymentMethod 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 WirePaymentMethod customerAccount(CustomerAccount customerAccount) {
    
    this.customerAccount = customerAccount;
    return this;
  }

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

  public CustomerAccount getCustomerAccount() {
    return customerAccount;
  }



  public void setCustomerAccount(CustomerAccount customerAccount) {
    this.customerAccount = customerAccount;
  }


  public WirePaymentMethod paymentType(PaymentTypeEnum paymentType) {
    
    this.paymentType = paymentType;
    return this;
  }

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

  public PaymentTypeEnum getPaymentType() {
    return paymentType;
  }



  public void setPaymentType(PaymentTypeEnum paymentType) {
    this.paymentType = paymentType;
  }


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

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

  public String getAction() {
    return action;
  }



  public void setAction(String action) {
    this.action = action;
  }


  public WirePaymentMethod expired(Boolean expired) {
    
    this.expired = expired;
    return this;
  }

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

  public Boolean getExpired() {
    return expired;
  }



  public void setExpired(Boolean expired) {
    this.expired = expired;
  }


  public WirePaymentMethod 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 WirePaymentMethod _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;
    }
    WirePaymentMethod wirePaymentMethod = (WirePaymentMethod) o;
    return Objects.equals(this.id, wirePaymentMethod.id) &&
        Objects.equals(this.version, wirePaymentMethod.version) &&
        Objects.equals(this.auditable, wirePaymentMethod.auditable) &&
        Objects.equals(this.historized, wirePaymentMethod.historized) &&
        Objects.equals(this.notified, wirePaymentMethod.notified) &&
        Objects.equals(this.auditableFields, wirePaymentMethod.auditableFields) &&
        Objects.equals(this.disabled, wirePaymentMethod.disabled) &&
        Objects.equals(this.alias, wirePaymentMethod.alias) &&
        Objects.equals(this.preferred, wirePaymentMethod.preferred) &&
        Objects.equals(this.customerAccount, wirePaymentMethod.customerAccount) &&
        Objects.equals(this.paymentType, wirePaymentMethod.paymentType) &&
        Objects.equals(this.userId, wirePaymentMethod.userId) &&
        Objects.equals(this.info1, wirePaymentMethod.info1) &&
        Objects.equals(this.info2, wirePaymentMethod.info2) &&
        Objects.equals(this.info3, wirePaymentMethod.info3) &&
        Objects.equals(this.info4, wirePaymentMethod.info4) &&
        Objects.equals(this.info5, wirePaymentMethod.info5) &&
        Objects.equals(this.tokenId, wirePaymentMethod.tokenId) &&
        Objects.equals(this.action, wirePaymentMethod.action) &&
        Objects.equals(this.expired, wirePaymentMethod.expired) &&
        Objects.equals(this.active, wirePaymentMethod.active) &&
        Objects.equals(this._transient, wirePaymentMethod._transient);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, version, auditable, historized, notified, auditableFields, disabled, alias, preferred, customerAccount, paymentType, userId, info1, info2, info3, info4, info5, tokenId, action, expired, active, _transient);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class WirePaymentMethod {\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("    disabled: ").append(toIndentedString(disabled)).append("\n");
    sb.append("    alias: ").append(toIndentedString(alias)).append("\n");
    sb.append("    preferred: ").append(toIndentedString(preferred)).append("\n");
    sb.append("    customerAccount: ").append(toIndentedString(customerAccount)).append("\n");
    sb.append("    paymentType: ").append(toIndentedString(paymentType)).append("\n");
    sb.append("    userId: ").append(toIndentedString(userId)).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("    tokenId: ").append(toIndentedString(tokenId)).append("\n");
    sb.append("    action: ").append(toIndentedString(action)).append("\n");
    sb.append("    expired: ").append(toIndentedString(expired)).append("\n");
    sb.append("    active: ").append(toIndentedString(active)).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    ");
  }

}

