public interface APIResponse extends Constructible, Extensible<APIResponse>, Reference<APIResponse>
Modifier and Type | Method and Description |
---|---|
APIResponse |
addHeader(java.lang.String name,
Header header)
Adds the given Header to this ApiResponse instance's map of Headers with the given name and return this instance
of ApiResponse.
|
APIResponse |
addLink(java.lang.String name,
Link link)
Adds a link to this instance of ApiResponse using the given name and Link, and returns this ApiResponse instance.
|
default APIResponse |
content(Content content)
Sets the map containing descriptions of potential response payload for this instance of ApiResponse and returns
this ApiResponse instance.
|
default APIResponse |
description(java.lang.String description)
Sets the description of this instance of ApiResponse and returns this ApiResponse instance.
|
Content |
getContent()
Returns the map containing descriptions of potential response payload for this instance of ApiResponse.
|
java.lang.String |
getDescription()
Returns a short description of this instance of ApiResponse.
|
java.util.Map<java.lang.String,Header> |
getHeaders()
Returns the map of Headers in this instance of ApiResponse.
|
java.util.Map<java.lang.String,Link> |
getLinks()
Returns the operations links that can be followed from this instance of ApiResponse.
|
default APIResponse |
headers(java.util.Map<java.lang.String,Header> headers)
Sets the Headers for this instance of ApiResponse with the given map of Headers and returns this instance of
ApiResponse.
|
default APIResponse |
links(java.util.Map<java.lang.String,Link> links)
Sets the operations links that can be followed from this instance of ApiResponse.
|
void |
removeHeader(java.lang.String name)
Removes the given Header to this ApiResponse instance's map of Headers with the given name and return this
instance of ApiResponse.
|
void |
removeLink(java.lang.String name)
Removes a link to this instance of ApiResponse using the given name and Link.
|
void |
setContent(Content content)
Sets the map containing descriptions of potential response payload for this instance of ApiResponse.
|
void |
setDescription(java.lang.String description)
Sets the description of this instance of ApiResponse.
|
void |
setHeaders(java.util.Map<java.lang.String,Header> headers)
Sets the Headers for this instance of ApiResponse with the given map of Headers.
|
void |
setLinks(java.util.Map<java.lang.String,Link> links)
Sets the operations links that can be followed from this instance of ApiResponse.
|
addExtension, extensions, getExtensions, removeExtension, setExtensions
java.lang.String getDescription()
void setDescription(java.lang.String description)
description
- a short description of the responsedefault APIResponse description(java.lang.String description)
description
- a short description of the responsejava.util.Map<java.lang.String,Header> getHeaders()
void setHeaders(java.util.Map<java.lang.String,Header> headers)
headers
- the headers of the responsedefault APIResponse headers(java.util.Map<java.lang.String,Header> headers)
headers
- the headers of the responseAPIResponse addHeader(java.lang.String name, Header header)
name
- the unique name of the headerheader
- a header for the response. null values will be rejected (implementation will throw an exception) or
ignored.void removeHeader(java.lang.String name)
name
- the unique name of the headerContent getContent()
void setContent(Content content)
content
- the potential content of the responsedefault APIResponse content(Content content)
content
- the potential content of the responsejava.util.Map<java.lang.String,Link> getLinks()
void setLinks(java.util.Map<java.lang.String,Link> links)
links
- the operation links followed from the responsedefault APIResponse links(java.util.Map<java.lang.String,Link> links)
links
- the operation links followed from the responseAPIResponse addLink(java.lang.String name, Link link)
name
- the short name of the linklink
- the operation link that can be followed from the response. null values will be rejected
(implementation will throw an exception) or ignored.void removeLink(java.lang.String name)
name
- the short name of the link