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, removeExtension
addExtraProperty, addValidationProblem, clearAttributes, clearValidationProblems, getAttribute, getAttributeNames, getExtraProperty, getExtraPropertyNames, getValidationProblemCodes, getValidationProblems, getValidationProblemsFor, hasExtraProperties, modelId, ownerDocument, parent, removeExtraProperty, setAttribute
public OasResponse default_
public void accept(IVisitor visitor)
IVisitable
accept
in interface IVisitable
accept
in class Node
Node.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)
IIndexedNode
getItem
in interface IIndexedNode<OasResponse>
IIndexedNode.getItem(java.lang.String)
public List<OasResponse> getItems()
IIndexedNode
getItems
in interface IIndexedNode<OasResponse>
IIndexedNode.getItems()
public List<String> getItemNames()
IIndexedNode
getItemNames
in interface IIndexedNode<OasResponse>
IIndexedNode.getItemNames()
public void addItem(String name, OasResponse item)
IIndexedNode
addItem
in interface IIndexedNode<OasResponse>
IIndexedNode.addItem(java.lang.String, io.apicurio.datamodels.core.models.Node)
public OasResponse deleteItem(String name)
IIndexedNode
deleteItem
in interface IIndexedNode<OasResponse>
IIndexedNode.deleteItem(java.lang.String)
Copyright © 2021 Red Hat. All rights reserved.