public abstract class OasResponses extends ExtensibleNode implements IIndexedNode<OasResponse>
| Modifier and Type | Field and Description |
|---|---|
OasResponse |
default_ |
_extensions_attributes, _extraProperties, _modelId, _ownerDocument, _parent, _validationProblems| Constructor and Description |
|---|
OasResponses() |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(IVisitor visitor)
Called to accept a visitor onto a visitable data model instance.
|
void |
addItem(String name,
OasResponse item)
Adds a child item.
|
OasResponse |
addResponse(String statusCode,
OasResponse response)
Adds a response.
|
OasResponse |
createDefaultResponse()
Creates a default OAS response.
|
abstract OasResponse |
createResponse(String statusCode)
Creates an OAS Response object.
|
OasResponse |
deleteItem(String name)
Deletes a child item by name and returns the deleted child or undefined if there wasn't one.
|
OasResponse |
getItem(String name)
Gets a single item (indexed child) by name.
|
List<String> |
getItemNames()
Gets a list of the names of all indexed children.
|
List<OasResponse> |
getItems()
Returns an array of all the child items.
|
OasResponse |
getResponse(String statusCode)
Returns a single response by status code.
|
List<OasResponse> |
getResponses()
Returns an array of all the responses.
|
List<String> |
getResponseStatusCodes()
Gets a list of all the response status codes.
|
OasResponse |
removeResponse(String statusCode)
Removes a single response child model.
|
addExtension, clearExtensions, createExtension, getExtension, getExtensions, isExtensible, removeExtensionaddExtraProperty, addValidationProblem, clearAttributes, clearValidationProblems, getAttribute, getAttributeNames, getExtraProperty, getExtraPropertyNames, getValidationProblemCodes, getValidationProblems, getValidationProblemsFor, hasExtraProperties, modelId, ownerDocument, parent, removeExtraProperty, setAttributepublic OasResponse default_
public void accept(IVisitor visitor)
IVisitableaccept in interface IVisitableaccept in class NodeNode.accept(io.apicurio.datamodels.core.visitors.IVisitor)public OasResponse getResponse(String statusCode)
statusCode - public List<OasResponse> getResponses()
public OasResponse addResponse(String statusCode, OasResponse response)
statusCode - response - public OasResponse removeResponse(String statusCode)
statusCode - public List<String> getResponseStatusCodes()
public abstract OasResponse createResponse(String statusCode)
statusCode - public OasResponse createDefaultResponse()
public OasResponse getItem(String name)
IIndexedNodegetItem in interface IIndexedNode<OasResponse>IIndexedNode.getItem(java.lang.String)public List<OasResponse> getItems()
IIndexedNodegetItems in interface IIndexedNode<OasResponse>IIndexedNode.getItems()public List<String> getItemNames()
IIndexedNodegetItemNames in interface IIndexedNode<OasResponse>IIndexedNode.getItemNames()public void addItem(String name, OasResponse item)
IIndexedNodeaddItem in interface IIndexedNode<OasResponse>IIndexedNode.addItem(java.lang.String, io.apicurio.datamodels.core.models.Node)public OasResponse deleteItem(String name)
IIndexedNodedeleteItem in interface IIndexedNode<OasResponse>IIndexedNode.deleteItem(java.lang.String)Copyright © 2019 Red Hat. All rights reserved.