/*
 * appNG REST API
 * The REST API for appNG
 *
 * The version of the OpenAPI document: 1.0.0
 * Contact: matthias.mueller@appng.org
 *
 * 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.appng.openapi.model;

import java.util.Objects;
import java.util.Arrays;
import io.swagger.annotations.ApiModel;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * The possible types for a field/action-field.
 */
public enum FieldType {
  
  TEXT("text"),
  
  LONGTEXT("longtext"),
  
  RICHTEXT("richtext"),
  
  PASSWORD("password"),
  
  URL("url"),
  
  INT("int"),
  
  LONG("long"),
  
  DECIMAL("decimal"),
  
  CHECKBOX("checkbox"),
  
  COORDINATE("coordinate"),
  
  DATE("date"),
  
  FILE("file"),
  
  FILE_MULTIPLE("file_multiple"),
  
  IMAGE("image"),
  
  LINKPANEL("linkpanel"),
  
  LIST_CHECKBOX("list_checkbox"),
  
  LIST_RADIO("list_radio"),
  
  LIST_SELECT("list_select"),
  
  LIST_TEXT("list_text"),
  
  OBJECT("object"),
  
  LIST_OBJECT("list_object");

  private String value;

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

  @JsonValue
  public String getValue() {
    return value;
  }

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

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

