Class JsonApiError

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

@Marshalled public class JsonApiError extends Object
Represents a JSON:API Error Object as defined by JSON:API v1.1 § Error Objects.
See Also:
  • Constructor Details

  • Method Details

    • getId

      public String getId()
      Bean property getter: id.
      Returns:
      The value of the id property, or null if it is not set.
    • setId

      public JsonApiError setId(String value)
      Bean property setter: id.
      Parameters:
      value - The new value for this property. Can be null to unset the property.
      Returns:
      This object.
    • getLinks

      Bean property getter: links.

      Per spec, each links value can be either a JSON string URL or a JsonApiLink object.

      Returns:
      The value of the links property, or null if it is not set.
    • setLinks

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

      public JsonApiError putLink(String name, Object value)
      Convenience method to add a single link.
      Parameters:
      name - The link name. Can be null (LinkedHashMap tolerates a null key).
      value - The link value (a String URL or a JsonApiLink object). Can be null (stored as null).
      Returns:
      This object.
    • getStatus

      public String getStatus()
      Bean property getter: status.

      Per spec, the HTTP status code as a string.

      Returns:
      The value of the status property, or null if it is not set.
    • setStatus

      public JsonApiError setStatus(String value)
      Bean property setter: status.
      Parameters:
      value - The new value for this property. Can be null to unset the property.
      Returns:
      This object.
    • getCode

      public String getCode()
      Bean property getter: code.

      An application-specific error code.

      Returns:
      The value of the code property, or null if it is not set.
    • setCode

      public JsonApiError setCode(String value)
      Bean property setter: code.
      Parameters:
      value - The new value for this property. Can be null to unset the property.
      Returns:
      This object.
    • getTitle

      public String getTitle()
      Bean property getter: title.
      Returns:
      The value of the title property, or null if it is not set.
    • setTitle

      public JsonApiError setTitle(String value)
      Bean property setter: title.
      Parameters:
      value - The new value for this property. Can be null to unset the property.
      Returns:
      This object.
    • getDetail

      public String getDetail()
      Bean property getter: detail.
      Returns:
      The value of the detail property, or null if it is not set.
    • setDetail

      public JsonApiError setDetail(String value)
      Bean property setter: detail.
      Parameters:
      value - The new value for this property. Can be null to unset the property.
      Returns:
      This object.
    • getSource

      Bean property getter: source.
      Returns:
      The value of the source property, or null if it is not set.
    • setSource

      Bean property setter: source.
      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 JsonApiError 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