/*
 * appNG REST API
 * The REST API for appNG
 *
 * OpenAPI spec version: 1.0.0
 * Contact: matthias.mueller@appng.org
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */


package org.appng.api.rest.model;

import java.util.Objects;
import java.util.Arrays;
import io.swagger.annotations.ApiModel;
import java.io.Serializable;

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;
      }
    }
    return null;
  }
}

