io.apicurio.datamodels.models.openapi.v30.OpenApi30SchemaImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of apicurio-data-models Show documentation
Show all versions of apicurio-data-models Show documentation
Open Source API Design Studio
The newest version!
package io.apicurio.datamodels.models.openapi.v30;
import com.fasterxml.jackson.databind.JsonNode;
import io.apicurio.datamodels.models.ExternalDocumentation;
import io.apicurio.datamodels.models.Node;
import io.apicurio.datamodels.models.NodeImpl;
import io.apicurio.datamodels.models.Schema;
import io.apicurio.datamodels.models.openapi.OpenApiXML;
import io.apicurio.datamodels.models.openapi.v30.visitors.OpenApi30Visitor;
import io.apicurio.datamodels.models.union.BooleanSchemaUnion;
import io.apicurio.datamodels.models.visitors.Visitor;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
public class OpenApi30SchemaImpl extends NodeImpl implements OpenApi30Schema {
private String $ref;
private String format;
private String title;
private String description;
private JsonNode _default;
private Number multipleOf;
private Number maximum;
private Boolean exclusiveMaximum;
private Number minimum;
private Boolean exclusiveMinimum;
private Integer maxLength;
private Integer minLength;
private String pattern;
private Integer maxItems;
private Integer minItems;
private Boolean uniqueItems;
private Integer maxProperties;
private Integer minProperties;
private List required;
private List _enum;
private String type;
private OpenApi30Schema items;
private List allOf;
private Map properties;
private BooleanSchemaUnion additionalProperties;
private Boolean readOnly;
private OpenApiXML xml;
private ExternalDocumentation externalDocs;
private JsonNode example;
private List oneOf;
private List anyOf;
private OpenApi30Schema not;
private OpenApi30Discriminator discriminator;
private Boolean nullable;
private Boolean writeOnly;
private Boolean deprecated;
private Map extensions;
@Override
public String get$ref() {
return $ref;
}
@Override
public void set$ref(String value) {
this.$ref = value;
}
@Override
public String getFormat() {
return format;
}
@Override
public void setFormat(String value) {
this.format = value;
}
@Override
public String getTitle() {
return title;
}
@Override
public void setTitle(String value) {
this.title = value;
}
@Override
public String getDescription() {
return description;
}
@Override
public void setDescription(String value) {
this.description = value;
}
@Override
public JsonNode getDefault() {
return _default;
}
@Override
public void setDefault(JsonNode value) {
this._default = value;
}
@Override
public Number getMultipleOf() {
return multipleOf;
}
@Override
public void setMultipleOf(Number value) {
this.multipleOf = value;
}
@Override
public Number getMaximum() {
return maximum;
}
@Override
public void setMaximum(Number value) {
this.maximum = value;
}
@Override
public Boolean isExclusiveMaximum() {
return exclusiveMaximum;
}
@Override
public void setExclusiveMaximum(Boolean value) {
this.exclusiveMaximum = value;
}
@Override
public Number getMinimum() {
return minimum;
}
@Override
public void setMinimum(Number value) {
this.minimum = value;
}
@Override
public Boolean isExclusiveMinimum() {
return exclusiveMinimum;
}
@Override
public void setExclusiveMinimum(Boolean value) {
this.exclusiveMinimum = value;
}
@Override
public Integer getMaxLength() {
return maxLength;
}
@Override
public void setMaxLength(Integer value) {
this.maxLength = value;
}
@Override
public Integer getMinLength() {
return minLength;
}
@Override
public void setMinLength(Integer value) {
this.minLength = value;
}
@Override
public String getPattern() {
return pattern;
}
@Override
public void setPattern(String value) {
this.pattern = value;
}
@Override
public Integer getMaxItems() {
return maxItems;
}
@Override
public void setMaxItems(Integer value) {
this.maxItems = value;
}
@Override
public Integer getMinItems() {
return minItems;
}
@Override
public void setMinItems(Integer value) {
this.minItems = value;
}
@Override
public Boolean isUniqueItems() {
return uniqueItems;
}
@Override
public void setUniqueItems(Boolean value) {
this.uniqueItems = value;
}
@Override
public Integer getMaxProperties() {
return maxProperties;
}
@Override
public void setMaxProperties(Integer value) {
this.maxProperties = value;
}
@Override
public Integer getMinProperties() {
return minProperties;
}
@Override
public void setMinProperties(Integer value) {
this.minProperties = value;
}
@Override
public List getRequired() {
return required;
}
@Override
public void setRequired(List value) {
this.required = value;
}
@Override
public List getEnum() {
return _enum;
}
@Override
public void setEnum(List value) {
this._enum = value;
}
@Override
public String getType() {
return type;
}
@Override
public void setType(String value) {
this.type = value;
}
@Override
public OpenApi30Schema getItems() {
return items;
}
@Override
public void setItems(OpenApi30Schema value) {
this.items = value;
}
@Override
public OpenApi30Schema createSchema() {
OpenApi30SchemaImpl node = new OpenApi30SchemaImpl();
node.setParent(this);
return node;
}
@Override
public List getAllOf() {
return allOf;
}
@Override
public void addAllOf(Schema value) {
if (this.allOf == null) {
this.allOf = new ArrayList<>();
}
this.allOf.add(value);
}
@Override
public void clearAllOf() {
if (this.allOf != null) {
this.allOf.clear();
}
}
@Override
public void removeAllOf(Schema value) {
if (this.allOf != null) {
this.allOf.remove(value);
}
}
@Override
public Map getProperties() {
return properties;
}
@Override
public void addProperty(String name, Schema value) {
if (this.properties == null) {
this.properties = new LinkedHashMap<>();
}
this.properties.put(name, value);
}
@Override
public void clearProperties() {
if (this.properties != null) {
this.properties.clear();
}
}
@Override
public void removeProperty(String name) {
if (this.properties != null) {
this.properties.remove(name);
}
}
@Override
public BooleanSchemaUnion getAdditionalProperties() {
return additionalProperties;
}
@Override
public void setAdditionalProperties(BooleanSchemaUnion value) {
this.additionalProperties = value;
}
@Override
public Boolean isReadOnly() {
return readOnly;
}
@Override
public void setReadOnly(Boolean value) {
this.readOnly = value;
}
@Override
public OpenApiXML getXml() {
return xml;
}
@Override
public void setXml(OpenApiXML value) {
this.xml = value;
}
@Override
public OpenApi30XML createXML() {
OpenApi30XMLImpl node = new OpenApi30XMLImpl();
node.setParent(this);
return node;
}
@Override
public ExternalDocumentation getExternalDocs() {
return externalDocs;
}
@Override
public void setExternalDocs(ExternalDocumentation value) {
this.externalDocs = value;
}
@Override
public OpenApi30ExternalDocumentation createExternalDocumentation() {
OpenApi30ExternalDocumentationImpl node = new OpenApi30ExternalDocumentationImpl();
node.setParent(this);
return node;
}
@Override
public JsonNode getExample() {
return example;
}
@Override
public void setExample(JsonNode value) {
this.example = value;
}
@Override
public List getOneOf() {
return oneOf;
}
@Override
public void addOneOf(OpenApi30Schema value) {
if (this.oneOf == null) {
this.oneOf = new ArrayList<>();
}
this.oneOf.add(value);
}
@Override
public void clearOneOf() {
if (this.oneOf != null) {
this.oneOf.clear();
}
}
@Override
public void removeOneOf(OpenApi30Schema value) {
if (this.oneOf != null) {
this.oneOf.remove(value);
}
}
@Override
public List getAnyOf() {
return anyOf;
}
@Override
public void addAnyOf(OpenApi30Schema value) {
if (this.anyOf == null) {
this.anyOf = new ArrayList<>();
}
this.anyOf.add(value);
}
@Override
public void clearAnyOf() {
if (this.anyOf != null) {
this.anyOf.clear();
}
}
@Override
public void removeAnyOf(OpenApi30Schema value) {
if (this.anyOf != null) {
this.anyOf.remove(value);
}
}
@Override
public OpenApi30Schema getNot() {
return not;
}
@Override
public void setNot(OpenApi30Schema value) {
this.not = value;
}
@Override
public OpenApi30Discriminator getDiscriminator() {
return discriminator;
}
@Override
public void setDiscriminator(OpenApi30Discriminator value) {
this.discriminator = value;
}
@Override
public OpenApi30Discriminator createDiscriminator() {
OpenApi30DiscriminatorImpl node = new OpenApi30DiscriminatorImpl();
node.setParent(this);
return node;
}
@Override
public Boolean isNullable() {
return nullable;
}
@Override
public void setNullable(Boolean value) {
this.nullable = value;
}
@Override
public Boolean isWriteOnly() {
return writeOnly;
}
@Override
public void setWriteOnly(Boolean value) {
this.writeOnly = value;
}
@Override
public Boolean isDeprecated() {
return deprecated;
}
@Override
public void setDeprecated(Boolean value) {
this.deprecated = value;
}
@Override
public Map getExtensions() {
return extensions;
}
@Override
public void addExtension(String name, JsonNode value) {
if (this.extensions == null) {
this.extensions = new LinkedHashMap<>();
}
this.extensions.put(name, value);
}
@Override
public void clearExtensions() {
if (this.extensions != null) {
this.extensions.clear();
}
}
@Override
public void removeExtension(String name) {
if (this.extensions != null) {
this.extensions.remove(name);
}
}
@Override
public boolean isBoolean() {
return false;
}
@Override
public Boolean asBoolean() {
throw new ClassCastException();
}
@Override
public boolean isSchema() {
return true;
}
@Override
public Schema asSchema() {
return this;
}
@Override
public Object unionValue() {
return this;
}
@Override
public void accept(Visitor visitor) {
OpenApi30Visitor viz = (OpenApi30Visitor) visitor;
viz.visitSchema(this);
}
@Override
public Node emptyClone() {
return new OpenApi30SchemaImpl();
}
}