/*
 * 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 an option.
 */
public enum OptionType {
  
  SELECT("select"),
  
  SELECT_MULTIPLE("select_multiple"),
  
  RADIO("radio"),
  
  CHECKBOX("checkbox"),
  
  TEXT("text"),
  
  DATE("date");

  private String value;

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

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

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

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

