public interface Operation extends Constructible, Extensible<Operation>
Describes a single API operation on a path.
Modifier and Type | Method and Description |
---|---|
Operation |
addCallback(String key,
Callback callback)
Adds the given callback item to this Operation's map of callbacks.
|
Operation |
addParameter(Parameter parameter)
Adds the given parameter item to this Operation's list of parameters.
|
Operation |
addSecurityRequirement(SecurityRequirement securityRequirement)
Adds the given security requirement item to this Operation's list of security mechanisms.
|
Operation |
addServer(Server server)
Adds the given server to this Operation's list of servers.
|
Operation |
addTag(String tag)
Adds the given tag to this Operation's list of tags.
|
default Operation |
callbacks(Map<String,Callback> callbacks)
Sets this Operation's callbacks property to the given map.
|
default Operation |
deprecated(Boolean deprecated)
Sets this Operation's deprecated property to the given value.
|
default Operation |
description(String description)
Sets this Operation's description property to the given string.
|
default Operation |
externalDocs(ExternalDocumentation externalDocs)
Sets this Operation's externalDocs property to the given object.
|
Map<String,Callback> |
getCallbacks()
Returns the callbacks property from an Operation instance.
|
Boolean |
getDeprecated()
Returns the deprecated property from an Operation instance.
|
String |
getDescription()
Returns the description property from an Operation instance.
|
ExternalDocumentation |
getExternalDocs()
Returns the externalDocs property from an Operation instance.
|
String |
getOperationId()
Returns the operationId property from an Operation instance.
|
List<Parameter> |
getParameters()
Returns the parameters property from an Operation instance.
|
RequestBody |
getRequestBody()
Returns the requestBody property from an Operation instance.
|
APIResponses |
getResponses()
Returns the responses property from an Operation instance.
|
List<SecurityRequirement> |
getSecurity()
Returns the security property from an Operation instance.
|
List<Server> |
getServers()
Returns the servers property from an Operation instance.
|
String |
getSummary()
Returns the summary property from an Operation instance.
|
List<String> |
getTags()
Returns the tags property from an Operation instance.
|
default Operation |
operationId(String operationId)
Sets this Operation's operationId property to the given string.
|
default Operation |
parameters(List<Parameter> parameters)
Sets this Operation's parameters property to the given parameter list.
|
void |
removeCallback(String key)
Removes the given callback item to this Operation's map of callbacks.
|
void |
removeParameter(Parameter parameter)
Removes the given parameter item to this Operation's list of parameters.
|
void |
removeSecurityRequirement(SecurityRequirement securityRequirement)
Removes the given security requirement item to this Operation's list of security mechanisms.
|
void |
removeServer(Server server)
Removes the given server to this Operation's list of servers.
|
void |
removeTag(String tag)
Removes the given tag to this Operation's list of tags.
|
default Operation |
requestBody(RequestBody requestBody)
Sets this Operation's requestBody property to the given object.
|
default Operation |
responses(APIResponses responses)
Sets this Operation's responses property to the given responses.
|
default Operation |
security(List<SecurityRequirement> security)
Sets this Operation's security property to the given list.
|
default Operation |
servers(List<Server> servers)
Sets this Operation's servers property to the given list.
|
void |
setCallbacks(Map<String,Callback> callbacks)
Sets this Operation's callbacks property to the given map.
|
void |
setDeprecated(Boolean deprecated)
Sets this Operation's deprecated property to the given value.
|
void |
setDescription(String description)
Sets this Operation's description property to the given string.
|
void |
setExternalDocs(ExternalDocumentation externalDocs)
Sets this Operation's externalDocs property to the given object.
|
void |
setOperationId(String operationId)
Sets this Operation's operationId property to the given string.
|
void |
setParameters(List<Parameter> parameters)
Sets this Operation's parameters property to the given parameter list.
|
void |
setRequestBody(RequestBody requestBody)
Sets this Operation's requestBody property to the given object.
|
void |
setResponses(APIResponses responses)
Sets this Operation's responses property to the given responses.
|
void |
setSecurity(List<SecurityRequirement> security)
Sets this Operation's security property to the given list.
|
void |
setServers(List<Server> servers)
Sets this Operation's servers property to the given list.
|
void |
setSummary(String summary)
Sets this Operation's summary property to the given string.
|
void |
setTags(List<String> tags)
Sets this Operation's tags property to the given tags.
|
default Operation |
summary(String summary)
Sets this Operation's summary property to the given string.
|
default Operation |
tags(List<String> tags)
Sets this Operation's tags property to the given tags.
|
addExtension, extensions, getExtensions, removeExtension, setExtensions
List<String> getTags()
void setTags(List<String> tags)
tags
- a list of tags for API documentation controldefault Operation tags(List<String> tags)
tags
- a list of tags for API documentation controlOperation addTag(String tag)
tag
- a tag for API documentation controlvoid removeTag(String tag)
tag
- a tag for API documentation controlString getSummary()
void setSummary(String summary)
summary
- a short summary of what the operation doesdefault Operation summary(String summary)
summary
- a short summary of what the operation doesString getDescription()
void setDescription(String description)
description
- a verbose explanation of the operation behaviordefault Operation description(String description)
description
- a verbose explanation of the operation behaviorExternalDocumentation getExternalDocs()
void setExternalDocs(ExternalDocumentation externalDocs)
externalDocs
- additional external documentation for this operationdefault Operation externalDocs(ExternalDocumentation externalDocs)
externalDocs
- additional external documentation for this operationString getOperationId()
void setOperationId(String operationId)
operationId
- unique string used to identify the operationdefault Operation operationId(String operationId)
operationId
- unique string used to identify the operationList<Parameter> getParameters()
void setParameters(List<Parameter> parameters)
parameters
- a list of parameters that are applicable for this operationdefault Operation parameters(List<Parameter> parameters)
parameters
- a list of parameters that are applicable for this operationOperation addParameter(Parameter parameter)
parameter
- a parameter that is applicable for this operationvoid removeParameter(Parameter parameter)
parameter
- a parameter that is applicable for this operationRequestBody getRequestBody()
void setRequestBody(RequestBody requestBody)
requestBody
- the request body applicable for this operationdefault Operation requestBody(RequestBody requestBody)
requestBody
- the request body applicable for this operationAPIResponses getResponses()
void setResponses(APIResponses responses)
responses
- collection of possible responses from executing this operationdefault Operation responses(APIResponses responses)
responses
- collection of possible responses from executing this operationMap<String,Callback> getCallbacks()
void setCallbacks(Map<String,Callback> callbacks)
callbacks
- map of possible out-of-band callbacks related to the operation. The key value must be the correct
format for this field.default Operation callbacks(Map<String,Callback> callbacks)
callbacks
- map of possible out-of-band callbacks related to the operation. The key value must be the correct
format for this field.Operation addCallback(String key, Callback callback)
key
- a key conforming to the format required for this objectcallback
- a callback that is applicable for this operation. null values will be rejected (implementation will
throw an exception) or ignored.void removeCallback(String key)
key
- a key conforming to the format required for this objectBoolean getDeprecated()
void setDeprecated(Boolean deprecated)
deprecated
- declaration whether this operation is deprecateddefault Operation deprecated(Boolean deprecated)
deprecated
- declaration whether this operation is deprecatedList<SecurityRequirement> getSecurity()
void setSecurity(List<SecurityRequirement> security)
security
- list of which security mechanisms can be used for this operationdefault Operation security(List<SecurityRequirement> security)
security
- list of which security mechanisms can be used for this operationOperation addSecurityRequirement(SecurityRequirement securityRequirement)
securityRequirement
- security mechanism which can be used for this operationvoid removeSecurityRequirement(SecurityRequirement securityRequirement)
securityRequirement
- security mechanism which can be used for this operationList<Server> getServers()
void setServers(List<Server> servers)
servers
- list of servers to service this operationdefault Operation servers(List<Server> servers)
servers
- list of servers to service this operationOperation addServer(Server server)
server
- server which can service this operationvoid removeServer(Server server)
server
- server which can service this operationCopyright © 2017 – 2022 Eclipse Foundation. All rights reserved.
Use is subject to license terms.