Enum Class WPPathField

java.lang.Object
java.lang.Enum<WPPathField>
net.ygbstudio.powerwp4j.models.schema.WPPathField
All Implemented Interfaces:
Serializable, Comparable<WPPathField>, Constable, FriendlyEnum, URLFieldsEnum

public enum WPPathField extends Enum<WPPathField> implements URLFieldsEnum
Enum representing the fields that can be requested in a WordPress REST API path.

By default, these field values do not include a trailing slash.

  • Enum Constant Details

    • FIELDS_BASE

      public static final WPPathField FIELDS_BASE
    • FIELD_AUTHOR

      public static final WPPathField FIELD_AUTHOR
    • FIELD_ID

      public static final WPPathField FIELD_ID
    • FIELD_EXCERPT

      public static final WPPathField FIELD_EXCERPT
    • FIELD_TITLE

      public static final WPPathField FIELD_TITLE
  • Method Details

    • values

      public static WPPathField[] 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 WPPathField 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
    • value

      public String value()
      Description copied from interface: FriendlyEnum
      Returns the value of the enum constant, which is the actual string to be used in the API.

      Example: If an enum constant is named STATUS_PENDING, the value returned by this method would be "pending", which is the value provided in its constructor.

      Specified by:
      value in interface FriendlyEnum
      Returns:
      the value of the enum constant