Enum Class Field

java.lang.Object
java.lang.Enum<Field>
rs.adsdev.ifconfig.client.Field
All Implemented Interfaces:
Serializable, Comparable<Field>, Constable

public enum Field extends Enum<Field>
The set of top-level wire fields available on /json responses, mirroring the server's FlatField registry. Used to build ?fields=-filtered requests.

Two encodings are available:

  • wireName() – the JSON key, joined with commas: ?fields=country,city,isp.
  • bit() – the numeric position; OR the bits of the desired fields and pass the result as ?fields=N.

Bit positions are pinned by the server and never renumbered; new fields claim the next free bit. The 32-bit signed-int ceiling means bits 0–30 are usable.

  • Enum Constant Details

    • STATUS

      public static final Field STATUS
    • MESSAGE

      public static final Field MESSAGE
    • QUERY

      public static final Field QUERY
    • CONTINENT

      public static final Field CONTINENT
    • CONTINENT_CODE

      public static final Field CONTINENT_CODE
    • COUNTRY

      public static final Field COUNTRY
    • COUNTRY_CODE

      public static final Field COUNTRY_CODE
    • REGION

      public static final Field REGION
    • REGION_NAME

      public static final Field REGION_NAME
    • CITY

      public static final Field CITY
    • DISTRICT

      public static final Field DISTRICT
    • ZIP

      public static final Field ZIP
    • LAT

      public static final Field LAT
    • LON

      public static final Field LON
    • TIMEZONE

      public static final Field TIMEZONE
    • OFFSET

      public static final Field OFFSET
    • CURRENCY

      public static final Field CURRENCY
    • ISP

      public static final Field ISP
    • ORG

      public static final Field ORG
    • AS

      public static final Field AS
    • ASNAME

      public static final Field ASNAME
    • REVERSE

      public static final Field REVERSE
    • MOBILE

      public static final Field MOBILE
    • PROXY

      public static final Field PROXY
    • HOSTING

      public static final Field HOSTING
  • Method Details

    • values

      public static Field[] 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 Field 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
    • bit

      public int bit()
    • wireName

      @Nonnull public String wireName()
    • toQuery

      @Nonnull public static String toQuery(@Nonnull Collection<Field> fields)
      Joins the wire names of a collection of fields with commas, suitable for passing as ?fields=country,city,isp.
    • toBitmask

      public static int toBitmask(@Nonnull Collection<Field> fields)
      ORs the bits of a collection of fields into a single integer, suitable for passing as ?fields=N.