Class JsonApiVersion

java.lang.Object
org.apache.juneau.bean.jsonapi.JsonApiVersion

@Marshalled public class JsonApiVersion extends Object
Represents the JSON:API top-level jsonapi member.

Per JSON:API v1.1 § JSON:API Object, this object carries the optional protocol version string (e.g. "1.1") and an optional meta bag.

See Also:
  • Constructor Details

    • JsonApiVersion

      public JsonApiVersion()
      Default constructor.
    • JsonApiVersion

      public JsonApiVersion(String version)
      Convenience constructor.
      Parameters:
      version - The JSON:API protocol version (e.g. "1.1"). Can be null to leave the property unset.
  • Method Details

    • getVersion

      public String getVersion()
      Bean property getter: version.
      Returns:
      The value of the version property, or null if it is not set.
    • setVersion

      Bean property setter: version.
      Parameters:
      value - The new value for this property. Can be null to unset the property.
      Returns:
      This object.
    • getMeta

      public Map<String,Object> getMeta()
      Bean property getter: meta.
      Returns:
      The value of the meta property, or null if it is not set.
    • setMeta

      Bean property setter: meta.
      Parameters:
      value - The new value for this property. Can be null to unset the property.
      Returns:
      This object.
    • putMeta

      public JsonApiVersion putMeta(String name, Object value)
      Convenience method to add a single meta entry.
      Parameters:
      name - The meta key. Can be null (LinkedHashMap tolerates a null key).
      value - The meta value. Can be null (stored as null).
      Returns:
      This object.
    • toString

      public String toString()
      Overrides:
      toString in class Object