Enum Class LinkType

java.lang.Object
java.lang.Enum<LinkType>
org.brapi.schematools.core.openapi.generator.LinkType
All Implemented Interfaces:
Serializable, Comparable<LinkType>, Constable

public enum LinkType extends Enum<LinkType>
Determines how a child property value is linked to the parent object
  • Enum Constant Details

    • EMBEDDED

      public static final LinkType EMBEDDED
      The json property value will be embedded in the parent object
    • ID

      public static final LinkType ID
      The property value will be linked to the parent object via an ID, usually the DbId
    • SUB_PATH

      public static final LinkType SUB_PATH
      The property value will be exposed as a separate endpoint
    • NONE

      public static final LinkType NONE
      The property value will be not be exposed in the parent object
  • Method Details

    • values

      public static LinkType[] 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 LinkType 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
    • findByNameOrLabel

      public static Optional<LinkType> findByNameOrLabel(String value)
      Find a LinkType by name or label
      Parameters:
      value - the name or label of the LinkType
      Returns:
      an Optional containing the LinkType that has the provided name or label or an empty Optional if the name of label does not match any LinkType
    • fromNameOrLabels

      public static Response<LinkType> fromNameOrLabels(String value)
      Find a LinkType by name or label
      Parameters:
      value - the name or label of the LinkType
      Returns:
      a successful Response containing the LinkType that has the provided name or label or a failed Response if the name of label does not match any LinkType