java.lang.Object
java.lang.Enum<Necessity>
com.github.muehmar.gradle.openapi.generator.model.Necessity
All Implemented Interfaces:
Serializable, Comparable<Necessity>, Constable

public enum Necessity extends Enum<Necessity>
Defines the necessity of an attribute, i.e. if the attribute is required or optional.
  • Enum Constant Details

    • REQUIRED

      public static final Necessity REQUIRED
    • OPTIONAL

      public static final Necessity OPTIONAL
  • Method Details

    • values

      public static Necessity[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Necessity valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • fromBoolean

      public static Necessity fromBoolean(boolean necessity)
    • leastRestrictive

      public static Necessity leastRestrictive(Necessity n1, Necessity n2)
    • mostRestrictive

      public static Necessity mostRestrictive(Necessity n1, Necessity n2)
    • isOptional

      public boolean isOptional()
    • isRequired

      public boolean isRequired()