/*
 * 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 type of incident being reported.  &#x60;USER_ACCOUNT_TAKEOVER&#x60; - Indicates that a legitimate user&#39;s account was accessed or controlled by an unauthorized party.  &#x60;FALSE_IDENTITY&#x60; - Indicates that a user created an account using stolen or fabricated identity information.  &#x60;STOLEN_IDENTITY&#x60; - Indicates that a user created an account using identity information belonging to a real individual without their consent.  &#x60;SYNTHETIC_IDENTITY&#x60; - Indicates that a user created an account using a fake or partially fabricated identity (e.g., combining real and fake information to form a new persona).  &#x60;MULTIPLE_USER_ACCOUNTS&#x60; - Indicates that the same individual is operating multiple accounts in violation of policy.  &#x60;SCAM_VICTIM&#x60; - Indicates that the user was tricked into authorizing or sending funds as part of a scam.  &#x60;BANK_ACCOUNT_TAKEOVER&#x60; - Indicates that a user&#39;s linked bank account was accessed or misused by an unauthorized party.  &#x60;BANK_CONNECTION_REVOKED&#x60; - Indicates that a linked bank account connection was revoked by the financial institution, often due to suspected misuse, fraud, or security concerns.  &#x60;CARD_TESTING&#x60; - Indicates that a card was used in small or repeated transactions to test its validity.  &#x60;UNAUTHORIZED_TRANSACTION&#x60; - Indicates that a transaction was made without the user&#39;s consent or authorization.  &#x60;CARD_CHARGEBACK&#x60; - Indicates that a card transaction was reversed via a chargeback claim.  &#x60;ACH_RETURN&#x60; - Indicates that an ACH transaction was returned or reversed by the bank.  &#x60;DISPUTE&#x60; - Indicates that a user filed a dispute regarding a transaction or account activity.  &#x60;FIRST_PARTY_FRAUD&#x60; - Indicates that a user intentionally misrepresented themselves or their actions for financial gain.  &#x60;MISSED_PAYMENT&#x60; - Indicates that a user failed to make a required payment on time.  &#x60;LOAN_STACKING&#x60; - Indicates that a user applied for or took out multiple loans simultaneously beyond their ability to repay.  &#x60;MONEY_LAUNDERING&#x60; - Indicates that funds are being moved through accounts to obscure their illicit origin.  &#x60;NO_FRAUD&#x60; - Indicates that an investigation determined no fraudulent activity occurred on user/event (positive label)  &#x60;OTHER&#x60; - Indicates that the case involves fraud or financial risk not covered by other report types. Requires notes describing the report.
 */
@JsonAdapter(ProtectReportType.Adapter.class)
public enum ProtectReportType {
  
  USER_ACCOUNT_TAKEOVER("USER_ACCOUNT_TAKEOVER"),
  
  FALSE_IDENTITY("FALSE_IDENTITY"),
  
  STOLEN_IDENTITY("STOLEN_IDENTITY"),
  
  SYNTHETIC_IDENTITY("SYNTHETIC_IDENTITY"),
  
  MULTIPLE_USER_ACCOUNTS("MULTIPLE_USER_ACCOUNTS"),
  
  SCAM_VICTIM("SCAM_VICTIM"),
  
  BANK_ACCOUNT_TAKEOVER("BANK_ACCOUNT_TAKEOVER"),
  
  BANK_CONNECTION_REVOKED("BANK_CONNECTION_REVOKED"),
  
  CARD_TESTING("CARD_TESTING"),
  
  UNAUTHORIZED_TRANSACTION("UNAUTHORIZED_TRANSACTION"),
  
  CARD_CHARGEBACK("CARD_CHARGEBACK"),
  
  ACH_RETURN("ACH_RETURN"),
  
  DISPUTE("DISPUTE"),
  
  FIRST_PARTY_FRAUD("FIRST_PARTY_FRAUD"),
  
  MISSED_PAYMENT("MISSED_PAYMENT"),
  
  LOAN_STACKING("LOAN_STACKING"),
  
  MONEY_LAUNDERING("MONEY_LAUNDERING"),
  
  NO_FRAUD("NO_FRAUD"),
  
  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;

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

  public String getValue() {
    return value;
  }

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

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

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

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

