io.apicurio.datamodels.models.asyncapi.v25.AsyncApi25ServerVariableImpl 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.asyncapi.v25;
import com.fasterxml.jackson.databind.JsonNode;
import io.apicurio.datamodels.models.Node;
import io.apicurio.datamodels.models.NodeImpl;
import io.apicurio.datamodels.models.asyncapi.v25.visitors.AsyncApi25Visitor;
import io.apicurio.datamodels.models.visitors.Visitor;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
public class AsyncApi25ServerVariableImpl extends NodeImpl implements AsyncApi25ServerVariable {
private String $ref;
private List _enum;
private String _default;
private String description;
private List examples;
private Map extensions;
@Override
public String get$ref() {
return $ref;
}
@Override
public void set$ref(String value) {
this.$ref = value;
}
@Override
public List getEnum() {
return _enum;
}
@Override
public void setEnum(List value) {
this._enum = value;
}
@Override
public String getDefault() {
return _default;
}
@Override
public void setDefault(String value) {
this._default = value;
}
@Override
public String getDescription() {
return description;
}
@Override
public void setDescription(String value) {
this.description = value;
}
@Override
public List getExamples() {
return examples;
}
@Override
public void setExamples(List value) {
this.examples = 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) {
AsyncApi25Visitor viz = (AsyncApi25Visitor) visitor;
viz.visitServerVariable(this);
}
@Override
public Node emptyClone() {
return new AsyncApi25ServerVariableImpl();
}
}