io.apicurio.datamodels.models.asyncapi.v23.AsyncApi23DocumentImpl 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.v23;
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.v23.visitors.AsyncApi23Visitor;
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 AsyncApi23DocumentImpl extends RootNodeImpl implements AsyncApi23Document {
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 AsyncApi23ExternalDocumentation externalDocs;
private Map extensions;
public AsyncApi23DocumentImpl() {
super(ModelType.ASYNCAPI23);
}
@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 AsyncApi23Info createInfo() {
AsyncApi23InfoImpl node = new AsyncApi23InfoImpl();
node.setParent(this);
return node;
}
@Override
public AsyncApiServers getServers() {
return servers;
}
@Override
public void setServers(AsyncApiServers value) {
this.servers = value;
}
@Override
public AsyncApi23Servers createServers() {
AsyncApi23ServersImpl node = new AsyncApi23ServersImpl();
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 AsyncApi23Channels createChannels() {
AsyncApi23ChannelsImpl node = new AsyncApi23ChannelsImpl();
node.setParent(this);
return node;
}
@Override
public AsyncApiComponents getComponents() {
return components;
}
@Override
public void setComponents(AsyncApiComponents value) {
this.components = value;
}
@Override
public AsyncApi23Components createComponents() {
AsyncApi23ComponentsImpl node = new AsyncApi23ComponentsImpl();
node.setParent(this);
return node;
}
@Override
public AsyncApi23Tag createTag() {
AsyncApi23TagImpl node = new AsyncApi23TagImpl();
node.setParent(this);
return node;
}
@Override
public List getTags() {
return tags;
}
@Override
public void addTag(AsyncApi23Tag 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(AsyncApi23Tag value) {
if (this.tags != null) {
this.tags.remove(value);
}
}
@Override
public AsyncApi23ExternalDocumentation getExternalDocs() {
return externalDocs;
}
@Override
public void setExternalDocs(AsyncApi23ExternalDocumentation value) {
this.externalDocs = value;
}
@Override
public AsyncApi23ExternalDocumentation createExternalDocumentation() {
AsyncApi23ExternalDocumentationImpl node = new AsyncApi23ExternalDocumentationImpl();
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) {
AsyncApi23Visitor viz = (AsyncApi23Visitor) visitor;
viz.visitDocument(this);
}
@Override
public Node emptyClone() {
return new AsyncApi23DocumentImpl();
}
}