/*
 * The Plaid API
 * The Plaid REST API. Please see https://plaid.com/docs/api for more details.
 *
 * The version of the OpenAPI document: 2020-09-14_1.680.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package com.plaid.client.model;

import java.util.Objects;
import java.util.Arrays;
import io.swagger.annotations.ApiModel;
import com.google.gson.annotations.SerializedName;

import java.io.IOException;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;

/**
 * The reason for removing the item  &#x60;FRAUD_FIRST_PARTY&#x60;: The end user who owns the connected bank account committed fraud &#x60;FRAUD_FALSE_IDENTITY&#x60;: The end user created the connection using false identity information or stolen credentials &#x60;FRAUD_ABUSE&#x60;: The end user is abusing the client&#39;s service or platform through their connected account &#x60;FRAUD_OTHER&#x60;: Other fraud-related reasons involving the end user not covered by the specific fraud categories &#x60;CONNECTION_IS_NON_FUNCTIONAL&#x60;: The connection to the end user&#39;s financial institution is broken and cannot be restored &#x60;OTHER&#x60;: Any other reason for removing the connection not covered by the above categories 
 */
@JsonAdapter(ItemRemoveReasonCode.Adapter.class)
public enum ItemRemoveReasonCode {
  
  FRAUD_FIRST_PARTY("FRAUD_FIRST_PARTY"),
  
  FRAUD_FALSE_IDENTITY("FRAUD_FALSE_IDENTITY"),
  
  FRAUD_ABUSE("FRAUD_ABUSE"),
  
  FRAUD_OTHER("FRAUD_OTHER"),
  
  CONNECTION_IS_NON_FUNCTIONAL("CONNECTION_IS_NON_FUNCTIONAL"),
  
  OTHER("OTHER"),

  // This is returned when an enum is returned from the API that doesn't exist in the OpenAPI file.
  // Try upgrading your client-library version.
  ENUM_UNKNOWN("ENUM_UNKNOWN");

  private String value;

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

  public String getValue() {
    return value;
  }

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

  public static ItemRemoveReasonCode fromValue(String value) {
    for (ItemRemoveReasonCode b : ItemRemoveReasonCode.values()) {
      if (b.value.equals(value)) {
        return b;
      }
    }
    return null;  }

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

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

