/*
 * 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;

/**
 * PaymentActionStatus
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-09-13T10:03:17.753Z[GMT]")
public class PaymentActionStatus {
  /**
   * Gets or Sets status
   */
  @JsonAdapter(StatusEnum.Adapter.class)
  public enum StatusEnum {
    SUCCESS("SUCCESS"),
    
    FAIL("FAIL");

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

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

  public static final String SERIALIZED_NAME_STATUS = "status";
  @SerializedName(SERIALIZED_NAME_STATUS)
  private StatusEnum status;

  /**
   * Gets or Sets errorCode
   */
  @JsonAdapter(ErrorCodeEnum.Adapter.class)
  public enum ErrorCodeEnum {
    ENTITY_DOES_NOT_EXISTS_EXCEPTION("ENTITY_DOES_NOT_EXISTS_EXCEPTION"),
    
    ENTITY_NOT_ALLOWED_EXCEPTION("ENTITY_NOT_ALLOWED_EXCEPTION"),
    
    ENTITY_ALREADY_EXISTS_EXCEPTION("ENTITY_ALREADY_EXISTS_EXCEPTION"),
    
    DELETE_REFERENCED_ENTITY_EXCEPTION("DELETE_REFERENCED_ENTITY_EXCEPTION"),
    
    MISSING_PARAMETER("MISSING_PARAMETER"),
    
    INVALID_PARAMETER("INVALID_PARAMETER"),
    
    INVALID_ENUM_VALUE("INVALID_ENUM_VALUE"),
    
    DUPLICATE_ACCESS("DUPLICATE_ACCESS"),
    
    INSUFFICIENT_BALANCE("INSUFFICIENT_BALANCE"),
    
    GENERIC_API_EXCEPTION("GENERIC_API_EXCEPTION"),
    
    BUSINESS_API_EXCEPTION("BUSINESS_API_EXCEPTION"),
    
    AUTHENTICATION_AUTHORIZATION_EXCEPTION("AUTHENTICATION_AUTHORIZATION_EXCEPTION"),
    
    ACTION_FORBIDDEN("ACTION_FORBIDDEN"),
    
    INVALID_IMAGE_DATA("INVALID_IMAGE_DATA");

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

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

  public static final String SERIALIZED_NAME_ERROR_CODE = "errorCode";
  @SerializedName(SERIALIZED_NAME_ERROR_CODE)
  private ErrorCodeEnum errorCode;

  public static final String SERIALIZED_NAME_MESSAGE = "message";
  @SerializedName(SERIALIZED_NAME_MESSAGE)
  private String message;

  public static final String SERIALIZED_NAME_ENTITY_ID = "entityId";
  @SerializedName(SERIALIZED_NAME_ENTITY_ID)
  private Long entityId;

  public static final String SERIALIZED_NAME_ENTITY_CODE = "entityCode";
  @SerializedName(SERIALIZED_NAME_ENTITY_CODE)
  private String entityCode;

  public static final String SERIALIZED_NAME_PAYMENT_ID = "paymentId";
  @SerializedName(SERIALIZED_NAME_PAYMENT_ID)
  private Long paymentId;

  public static final String SERIALIZED_NAME_GETJSON = "getjson";
  @SerializedName(SERIALIZED_NAME_GETJSON)
  private String getjson;


  public PaymentActionStatus status(StatusEnum status) {
    
    this.status = status;
    return this;
  }

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

  public StatusEnum getStatus() {
    return status;
  }



  public void setStatus(StatusEnum status) {
    this.status = status;
  }


  public PaymentActionStatus errorCode(ErrorCodeEnum errorCode) {
    
    this.errorCode = errorCode;
    return this;
  }

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

  public ErrorCodeEnum getErrorCode() {
    return errorCode;
  }



  public void setErrorCode(ErrorCodeEnum errorCode) {
    this.errorCode = errorCode;
  }


  public PaymentActionStatus message(String message) {
    
    this.message = message;
    return this;
  }

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

  public String getMessage() {
    return message;
  }



  public void setMessage(String message) {
    this.message = message;
  }


  public PaymentActionStatus entityId(Long entityId) {
    
    this.entityId = entityId;
    return this;
  }

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

  public Long getEntityId() {
    return entityId;
  }



  public void setEntityId(Long entityId) {
    this.entityId = entityId;
  }


  public PaymentActionStatus entityCode(String entityCode) {
    
    this.entityCode = entityCode;
    return this;
  }

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

  public String getEntityCode() {
    return entityCode;
  }



  public void setEntityCode(String entityCode) {
    this.entityCode = entityCode;
  }


  public PaymentActionStatus paymentId(Long paymentId) {
    
    this.paymentId = paymentId;
    return this;
  }

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

  public Long getPaymentId() {
    return paymentId;
  }



  public void setPaymentId(Long paymentId) {
    this.paymentId = paymentId;
  }


  public PaymentActionStatus getjson(String getjson) {
    
    this.getjson = getjson;
    return this;
  }

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

  public String getGetjson() {
    return getjson;
  }



  public void setGetjson(String getjson) {
    this.getjson = getjson;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    PaymentActionStatus paymentActionStatus = (PaymentActionStatus) o;
    return Objects.equals(this.status, paymentActionStatus.status) &&
        Objects.equals(this.errorCode, paymentActionStatus.errorCode) &&
        Objects.equals(this.message, paymentActionStatus.message) &&
        Objects.equals(this.entityId, paymentActionStatus.entityId) &&
        Objects.equals(this.entityCode, paymentActionStatus.entityCode) &&
        Objects.equals(this.paymentId, paymentActionStatus.paymentId) &&
        Objects.equals(this.getjson, paymentActionStatus.getjson);
  }

  @Override
  public int hashCode() {
    return Objects.hash(status, errorCode, message, entityId, entityCode, paymentId, getjson);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PaymentActionStatus {\n");
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
    sb.append("    errorCode: ").append(toIndentedString(errorCode)).append("\n");
    sb.append("    message: ").append(toIndentedString(message)).append("\n");
    sb.append("    entityId: ").append(toIndentedString(entityId)).append("\n");
    sb.append("    entityCode: ").append(toIndentedString(entityCode)).append("\n");
    sb.append("    paymentId: ").append(toIndentedString(paymentId)).append("\n");
    sb.append("    getjson: ").append(toIndentedString(getjson)).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    ");
  }

}

