Package org.apache.juneau.bean.jsonapi
Class JsonApiVersion
java.lang.Object
org.apache.juneau.bean.jsonapi.JsonApiVersion
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 Summary
ConstructorsConstructorDescriptionDefault constructor.JsonApiVersion(String version) Convenience constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetMeta()Bean property getter:meta .Bean property getter:version .Convenience method to add a single meta entry.Bean property setter:meta .setVersion(String value) Bean property setter:version .toString()
-
Constructor Details
-
JsonApiVersion
public JsonApiVersion()Default constructor. -
JsonApiVersion
Convenience constructor.- Parameters:
version- The JSON:API protocol version (e.g."1.1"). Can benull to leave the property unset.
-
-
Method Details
-
getVersion
Bean property getter:version .- Returns:
- The value of the
version property, ornull if it is not set.
-
setVersion
Bean property setter:version .- Parameters:
value- The new value for this property. Can benull to unset the property.- Returns:
- This object.
-
getMeta
Bean property getter:meta .- Returns:
- The value of the
meta property, ornull if it is not set.
-
setMeta
Bean property setter:meta .- Parameters:
value- The new value for this property. Can benull to unset the property.- Returns:
- This object.
-
putMeta
Convenience method to add a single meta entry.- Parameters:
name- The meta key. Can benull (LinkedHashMaptolerates anull key).value- The meta value. Can benull (stored asnull ).- Returns:
- This object.
-
toString
-