![JAR search and dependency download from the Maven repository](/logo.png)
io.apicurio.datamodels.models.asyncapi.v25.AsyncApi25DocumentImpl Maven / Gradle / Ivy
package io.apicurio.datamodels.models.asyncapi.v25;
import com.fasterxml.jackson.databind.JsonNode;
import io.apicurio.datamodels.models.Info;
import io.apicurio.datamodels.models.ModelType;
import io.apicurio.datamodels.models.Node;
import io.apicurio.datamodels.models.RootNodeImpl;
import io.apicurio.datamodels.models.asyncapi.AsyncApiChannels;
import io.apicurio.datamodels.models.asyncapi.AsyncApiComponents;
import io.apicurio.datamodels.models.asyncapi.AsyncApiServers;
import io.apicurio.datamodels.models.asyncapi.v25.visitors.AsyncApi25Visitor;
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 AsyncApi25DocumentImpl extends RootNodeImpl implements AsyncApi25Document {
private String asyncapi;
private String id;
private Info info;
private AsyncApiServers servers;
private String defaultContentType;
private AsyncApiChannels channels;
private AsyncApiComponents components;
private List tags;
private AsyncApi25ExternalDocumentation externalDocs;
private Map extensions;
public AsyncApi25DocumentImpl() {
super(ModelType.ASYNCAPI25);
}
@Override
public String getAsyncapi() {
return asyncapi;
}
@Override
public void setAsyncapi(String value) {
this.asyncapi = value;
}
@Override
public String getId() {
return id;
}
@Override
public void setId(String value) {
this.id = value;
}
@Override
public Info getInfo() {
return info;
}
@Override
public void setInfo(Info value) {
this.info = value;
}
@Override
public AsyncApi25Info createInfo() {
AsyncApi25InfoImpl node = new AsyncApi25InfoImpl();
node.setParent(this);
return node;
}
@Override
public AsyncApiServers getServers() {
return servers;
}
@Override
public void setServers(AsyncApiServers value) {
this.servers = value;
}
@Override
public AsyncApi25Servers createServers() {
AsyncApi25ServersImpl node = new AsyncApi25ServersImpl();
node.setParent(this);
return node;
}
@Override
public String getDefaultContentType() {
return defaultContentType;
}
@Override
public void setDefaultContentType(String value) {
this.defaultContentType = value;
}
@Override
public AsyncApiChannels getChannels() {
return channels;
}
@Override
public void setChannels(AsyncApiChannels value) {
this.channels = value;
}
@Override
public AsyncApi25Channels createChannels() {
AsyncApi25ChannelsImpl node = new AsyncApi25ChannelsImpl();
node.setParent(this);
return node;
}
@Override
public AsyncApiComponents getComponents() {
return components;
}
@Override
public void setComponents(AsyncApiComponents value) {
this.components = value;
}
@Override
public AsyncApi25Components createComponents() {
AsyncApi25ComponentsImpl node = new AsyncApi25ComponentsImpl();
node.setParent(this);
return node;
}
@Override
public AsyncApi25Tag createTag() {
AsyncApi25TagImpl node = new AsyncApi25TagImpl();
node.setParent(this);
return node;
}
@Override
public List getTags() {
return tags;
}
@Override
public void addTag(AsyncApi25Tag value) {
if (this.tags == null) {
this.tags = new ArrayList<>();
}
this.tags.add(value);
}
@Override
public void clearTags() {
if (this.tags != null) {
this.tags.clear();
}
}
@Override
public void removeTag(AsyncApi25Tag value) {
if (this.tags != null) {
this.tags.remove(value);
}
}
@Override
public AsyncApi25ExternalDocumentation getExternalDocs() {
return externalDocs;
}
@Override
public void setExternalDocs(AsyncApi25ExternalDocumentation value) {
this.externalDocs = value;
}
@Override
public AsyncApi25ExternalDocumentation createExternalDocumentation() {
AsyncApi25ExternalDocumentationImpl node = new AsyncApi25ExternalDocumentationImpl();
node.setParent(this);
return node;
}
@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.visitDocument(this);
}
@Override
public Node emptyClone() {
return new AsyncApi25DocumentImpl();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy