/*
 * 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.ActionStatus;
import org.openapitools.client.model.CreditCategoriesDto;

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

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

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

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

  public static final String SERIALIZED_NAME_PAYMENT_METHODS = "paymentMethods";
  @SerializedName(SERIALIZED_NAME_PAYMENT_METHODS)
  private List<PaymentMethodsEnum> paymentMethods = null;

  public static final String SERIALIZED_NAME_CREDIT_CATEGORIES = "creditCategories";
  @SerializedName(SERIALIZED_NAME_CREDIT_CATEGORIES)
  private CreditCategoriesDto creditCategories;


  public GetCustomerAccountConfigurationResponseDto actionStatus(ActionStatus actionStatus) {
    
    this.actionStatus = actionStatus;
    return this;
  }

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

  public ActionStatus getActionStatus() {
    return actionStatus;
  }



  public void setActionStatus(ActionStatus actionStatus) {
    this.actionStatus = actionStatus;
  }


  public GetCustomerAccountConfigurationResponseDto paymentMethods(List<PaymentMethodsEnum> paymentMethods) {
    
    this.paymentMethods = paymentMethods;
    return this;
  }

  public GetCustomerAccountConfigurationResponseDto addPaymentMethodsItem(PaymentMethodsEnum paymentMethodsItem) {
    if (this.paymentMethods == null) {
      this.paymentMethods = new ArrayList<PaymentMethodsEnum>();
    }
    this.paymentMethods.add(paymentMethodsItem);
    return this;
  }

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

  public List<PaymentMethodsEnum> getPaymentMethods() {
    return paymentMethods;
  }



  public void setPaymentMethods(List<PaymentMethodsEnum> paymentMethods) {
    this.paymentMethods = paymentMethods;
  }


  public GetCustomerAccountConfigurationResponseDto creditCategories(CreditCategoriesDto creditCategories) {
    
    this.creditCategories = creditCategories;
    return this;
  }

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

  public CreditCategoriesDto getCreditCategories() {
    return creditCategories;
  }



  public void setCreditCategories(CreditCategoriesDto creditCategories) {
    this.creditCategories = creditCategories;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    GetCustomerAccountConfigurationResponseDto getCustomerAccountConfigurationResponseDto = (GetCustomerAccountConfigurationResponseDto) o;
    return Objects.equals(this.actionStatus, getCustomerAccountConfigurationResponseDto.actionStatus) &&
        Objects.equals(this.paymentMethods, getCustomerAccountConfigurationResponseDto.paymentMethods) &&
        Objects.equals(this.creditCategories, getCustomerAccountConfigurationResponseDto.creditCategories);
  }

  @Override
  public int hashCode() {
    return Objects.hash(actionStatus, paymentMethods, creditCategories);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class GetCustomerAccountConfigurationResponseDto {\n");
    sb.append("    actionStatus: ").append(toIndentedString(actionStatus)).append("\n");
    sb.append("    paymentMethods: ").append(toIndentedString(paymentMethods)).append("\n");
    sb.append("    creditCategories: ").append(toIndentedString(creditCategories)).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    ");
  }

}

