io.apicurio.datamodels.models.openapi.v30.OpenApi30ExampleImpl 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.Node;
import io.apicurio.datamodels.models.NodeImpl;
import io.apicurio.datamodels.models.openapi.v30.visitors.OpenApi30Visitor;
import io.apicurio.datamodels.models.visitors.Visitor;
import java.util.LinkedHashMap;
import java.util.Map;
public class OpenApi30ExampleImpl extends NodeImpl implements OpenApi30Example {
private String $ref;
private String summary;
private String description;
private JsonNode value;
private String externalValue;
private Map extensions;
@Override
public String get$ref() {
return $ref;
}
@Override
public void set$ref(String value) {
this.$ref = value;
}
@Override
public String getSummary() {
return summary;
}
@Override
public void setSummary(String value) {
this.summary = value;
}
@Override
public String getDescription() {
return description;
}
@Override
public void setDescription(String value) {
this.description = value;
}
@Override
public JsonNode getValue() {
return value;
}
@Override
public void setValue(JsonNode value) {
this.value = value;
}
@Override
public String getExternalValue() {
return externalValue;
}
@Override
public void setExternalValue(String value) {
this.externalValue = 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 void accept(Visitor visitor) {
OpenApi30Visitor viz = (OpenApi30Visitor) visitor;
viz.visitExample(this);
}
@Override
public Node emptyClone() {
return new OpenApi30ExampleImpl();
}
}