Interface Operation
-
- All Superinterfaces:
Constructible,Extensible<Operation>
public interface Operation extends Constructible, Extensible<Operation>
OperationDescribes a single API operation on a path.
- See Also:
- OpenAPI Specification Operation Object
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description OperationaddCallback(String key, Callback callback)Adds the given callback item to this Operation's map of callbacks.OperationaddParameter(Parameter parameter)Adds the given parameter item to this Operation's list of parameters.OperationaddSecurityRequirement(SecurityRequirement securityRequirement)Adds the given security requirement item to this Operation's list of security mechanisms.OperationaddServer(Server server)Adds the given server to this Operation's list of servers.OperationaddTag(String tag)Adds the given tag to this Operation's list of tags.default Operationcallbacks(Map<String,Callback> callbacks)Sets this Operation's callbacks property to the given map.default Operationdeprecated(Boolean deprecated)Sets this Operation's deprecated property to the given value.default Operationdescription(String description)Sets this Operation's description property to the given string.default OperationexternalDocs(ExternalDocumentation externalDocs)Sets this Operation's externalDocs property to the given object.Map<String,Callback>getCallbacks()Returns the callbacks property from an Operation instance.BooleangetDeprecated()Returns the deprecated property from an Operation instance.StringgetDescription()Returns the description property from an Operation instance.ExternalDocumentationgetExternalDocs()Returns the externalDocs property from an Operation instance.StringgetOperationId()Returns the operationId property from an Operation instance.List<Parameter>getParameters()Returns the parameters property from an Operation instance.RequestBodygetRequestBody()Returns the requestBody property from an Operation instance.APIResponsesgetResponses()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.StringgetSummary()Returns the summary property from an Operation instance.List<String>getTags()Returns the tags property from an Operation instance.default OperationoperationId(String operationId)Sets this Operation's operationId property to the given string.default Operationparameters(List<Parameter> parameters)Sets this Operation's parameters property to the given parameter list.voidremoveCallback(String key)Removes the given callback item to this Operation's map of callbacks.voidremoveParameter(Parameter parameter)Removes the given parameter item to this Operation's list of parameters.voidremoveSecurityRequirement(SecurityRequirement securityRequirement)Removes the given security requirement item to this Operation's list of security mechanisms.voidremoveServer(Server server)Removes the given server to this Operation's list of servers.voidremoveTag(String tag)Removes the given tag to this Operation's list of tags.default OperationrequestBody(RequestBody requestBody)Sets this Operation's requestBody property to the given object.default Operationresponses(APIResponses responses)Sets this Operation's responses property to the given responses.default Operationsecurity(List<SecurityRequirement> security)Sets this Operation's security property to the given list.default Operationservers(List<Server> servers)Sets this Operation's servers property to the given list.voidsetCallbacks(Map<String,Callback> callbacks)Sets this Operation's callbacks property to the given map.voidsetDeprecated(Boolean deprecated)Sets this Operation's deprecated property to the given value.voidsetDescription(String description)Sets this Operation's description property to the given string.voidsetExternalDocs(ExternalDocumentation externalDocs)Sets this Operation's externalDocs property to the given object.voidsetOperationId(String operationId)Sets this Operation's operationId property to the given string.voidsetParameters(List<Parameter> parameters)Sets this Operation's parameters property to the given parameter list.voidsetRequestBody(RequestBody requestBody)Sets this Operation's requestBody property to the given object.voidsetResponses(APIResponses responses)Sets this Operation's responses property to the given responses.voidsetSecurity(List<SecurityRequirement> security)Sets this Operation's security property to the given list.voidsetServers(List<Server> servers)Sets this Operation's servers property to the given list.voidsetSummary(String summary)Sets this Operation's summary property to the given string.voidsetTags(List<String> tags)Sets this Operation's tags property to the given tags.default Operationsummary(String summary)Sets this Operation's summary property to the given string.default Operationtags(List<String> tags)Sets this Operation's tags property to the given tags.-
Methods inherited from interface org.eclipse.microprofile.openapi.models.Extensible
addExtension, extensions, getExtensions, removeExtension, setExtensions
-
-
-
-
Method Detail
-
getTags
List<String> getTags()
Returns the tags property from an Operation instance.- Returns:
- a copy List (potentially immutable) of the operation's tags
-
setTags
void setTags(List<String> tags)
Sets this Operation's tags property to the given tags.- Parameters:
tags- a list of tags for API documentation control
-
tags
default Operation tags(List<String> tags)
Sets this Operation's tags property to the given tags.- Parameters:
tags- a list of tags for API documentation control- Returns:
- the current Operation object
-
addTag
Operation addTag(String tag)
Adds the given tag to this Operation's list of tags.- Parameters:
tag- a tag for API documentation control- Returns:
- the current Operation object
-
removeTag
void removeTag(String tag)
Removes the given tag to this Operation's list of tags.- Parameters:
tag- a tag for API documentation control
-
getSummary
String getSummary()
Returns the summary property from an Operation instance.- Returns:
- a short summary of what the operation does
-
setSummary
void setSummary(String summary)
Sets this Operation's summary property to the given string.- Parameters:
summary- a short summary of what the operation does
-
summary
default Operation summary(String summary)
Sets this Operation's summary property to the given string.- Parameters:
summary- a short summary of what the operation does- Returns:
- the current Operation object
-
getDescription
String getDescription()
Returns the description property from an Operation instance.- Returns:
- a verbose explanation of the operation behavior
-
setDescription
void setDescription(String description)
Sets this Operation's description property to the given string.- Parameters:
description- a verbose explanation of the operation behavior
-
description
default Operation description(String description)
Sets this Operation's description property to the given string.- Parameters:
description- a verbose explanation of the operation behavior- Returns:
- the current Operation object
-
getExternalDocs
ExternalDocumentation getExternalDocs()
Returns the externalDocs property from an Operation instance.- Returns:
- additional external documentation for this operation
-
setExternalDocs
void setExternalDocs(ExternalDocumentation externalDocs)
Sets this Operation's externalDocs property to the given object.- Parameters:
externalDocs- additional external documentation for this operation
-
externalDocs
default Operation externalDocs(ExternalDocumentation externalDocs)
Sets this Operation's externalDocs property to the given object.- Parameters:
externalDocs- additional external documentation for this operation- Returns:
- the current Operation object
-
getOperationId
String getOperationId()
Returns the operationId property from an Operation instance.- Returns:
- unique string used to identify the operation
-
setOperationId
void setOperationId(String operationId)
Sets this Operation's operationId property to the given string.- Parameters:
operationId- unique string used to identify the operation
-
operationId
default Operation operationId(String operationId)
Sets this Operation's operationId property to the given string.- Parameters:
operationId- unique string used to identify the operation- Returns:
- the current Operation object
-
getParameters
List<Parameter> getParameters()
Returns the parameters property from an Operation instance.- Returns:
- a copy List (potentially immutable) of parameters that are applicable for this operation
-
setParameters
void setParameters(List<Parameter> parameters)
Sets this Operation's parameters property to the given parameter list.- Parameters:
parameters- a list of parameters that are applicable for this operation
-
parameters
default Operation parameters(List<Parameter> parameters)
Sets this Operation's parameters property to the given parameter list.- Parameters:
parameters- a list of parameters that are applicable for this operation- Returns:
- the current Operation object
-
addParameter
Operation addParameter(Parameter parameter)
Adds the given parameter item to this Operation's list of parameters.- Parameters:
parameter- a parameter that is applicable for this operation- Returns:
- the current Operation object
-
removeParameter
void removeParameter(Parameter parameter)
Removes the given parameter item to this Operation's list of parameters.- Parameters:
parameter- a parameter that is applicable for this operation
-
getRequestBody
RequestBody getRequestBody()
Returns the requestBody property from an Operation instance.- Returns:
- the request body applicable for this operation
-
setRequestBody
void setRequestBody(RequestBody requestBody)
Sets this Operation's requestBody property to the given object.- Parameters:
requestBody- the request body applicable for this operation
-
requestBody
default Operation requestBody(RequestBody requestBody)
Sets this Operation's requestBody property to the given object.- Parameters:
requestBody- the request body applicable for this operation- Returns:
- the current Operation object
-
getResponses
APIResponses getResponses()
Returns the responses property from an Operation instance.- Returns:
- collection of possible responses from executing this operation
-
setResponses
void setResponses(APIResponses responses)
Sets this Operation's responses property to the given responses.- Parameters:
responses- collection of possible responses from executing this operation
-
responses
default Operation responses(APIResponses responses)
Sets this Operation's responses property to the given responses.- Parameters:
responses- collection of possible responses from executing this operation- Returns:
- the current Operation object
-
getCallbacks
Map<String,Callback> getCallbacks()
Returns the callbacks property from an Operation instance.- Returns:
- a copy Map (potentially immutable) of possible out-of-band callbacks related to the operation
-
setCallbacks
void setCallbacks(Map<String,Callback> callbacks)
Sets this Operation's callbacks property to the given map.- Parameters:
callbacks- map of possible out-of-band callbacks related to the operation. The key value must be the correct format for this field.
-
callbacks
default Operation callbacks(Map<String,Callback> callbacks)
Sets this Operation's callbacks property to the given map.- Parameters:
callbacks- map of possible out-of-band callbacks related to the operation. The key value must be the correct format for this field.- Returns:
- the current Operation object
-
addCallback
Operation addCallback(String key, Callback callback)
Adds the given callback item to this Operation's map of callbacks.- Parameters:
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.- Returns:
- the current Operation object
-
removeCallback
void removeCallback(String key)
Removes the given callback item to this Operation's map of callbacks.- Parameters:
key- a key conforming to the format required for this object
-
getDeprecated
Boolean getDeprecated()
Returns the deprecated property from an Operation instance.- Returns:
- declaration whether this operation is deprecated
-
setDeprecated
void setDeprecated(Boolean deprecated)
Sets this Operation's deprecated property to the given value.- Parameters:
deprecated- declaration whether this operation is deprecated
-
deprecated
default Operation deprecated(Boolean deprecated)
Sets this Operation's deprecated property to the given value.- Parameters:
deprecated- declaration whether this operation is deprecated- Returns:
- the current Operation object
-
getSecurity
List<SecurityRequirement> getSecurity()
Returns the security property from an Operation instance.- Returns:
- a copy List (potentially immutable) of which security mechanisms can be used for this operation
-
setSecurity
void setSecurity(List<SecurityRequirement> security)
Sets this Operation's security property to the given list.- Parameters:
security- list of which security mechanisms can be used for this operation
-
security
default Operation security(List<SecurityRequirement> security)
Sets this Operation's security property to the given list.- Parameters:
security- list of which security mechanisms can be used for this operation- Returns:
- the current Operation object
-
addSecurityRequirement
Operation addSecurityRequirement(SecurityRequirement securityRequirement)
Adds the given security requirement item to this Operation's list of security mechanisms.- Parameters:
securityRequirement- security mechanism which can be used for this operation- Returns:
- the current Operation object
-
removeSecurityRequirement
void removeSecurityRequirement(SecurityRequirement securityRequirement)
Removes the given security requirement item to this Operation's list of security mechanisms.- Parameters:
securityRequirement- security mechanism which can be used for this operation
-
getServers
List<Server> getServers()
Returns the servers property from an Operation instance.- Returns:
- a copy List (potentially immutable) of servers to service this operation
-
setServers
void setServers(List<Server> servers)
Sets this Operation's servers property to the given list.- Parameters:
servers- list of servers to service this operation
-
servers
default Operation servers(List<Server> servers)
Sets this Operation's servers property to the given list.- Parameters:
servers- list of servers to service this operation- Returns:
- the current Operation object
-
addServer
Operation addServer(Server server)
Adds the given server to this Operation's list of servers.- Parameters:
server- server which can service this operation- Returns:
- the current Operation object
-
removeServer
void removeServer(Server server)
Removes the given server to this Operation's list of servers.- Parameters:
server- server which can service this operation
-
-