All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.apicurio.datamodels.models.asyncapi.v30.AsyncApi30DocumentImpl Maven / Gradle / Ivy

package io.apicurio.datamodels.models.asyncapi.v30;

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.v30.visitors.AsyncApi30Visitor;
import io.apicurio.datamodels.models.visitors.Visitor;
import java.util.LinkedHashMap;
import java.util.Map;

public class AsyncApi30DocumentImpl extends RootNodeImpl implements AsyncApi30Document {

	private String asyncapi;
	private String id;
	private Info info;
	private AsyncApiServers servers;
	private String defaultContentType;
	private AsyncApiChannels channels;
	private AsyncApi30Operations operations;
	private AsyncApiComponents components;
	private Map extensions;

	public AsyncApi30DocumentImpl() {
		super(ModelType.ASYNCAPI30);
	}

	@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 AsyncApi30Info createInfo() {
		AsyncApi30InfoImpl node = new AsyncApi30InfoImpl();
		node.setParent(this);
		return node;
	}

	@Override
	public AsyncApiServers getServers() {
		return servers;
	}

	@Override
	public void setServers(AsyncApiServers value) {
		this.servers = value;
	}

	@Override
	public AsyncApi30Servers createServers() {
		AsyncApi30ServersImpl node = new AsyncApi30ServersImpl();
		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 AsyncApi30Channels createChannels() {
		AsyncApi30ChannelsImpl node = new AsyncApi30ChannelsImpl();
		node.setParent(this);
		return node;
	}

	@Override
	public AsyncApi30Operations getOperations() {
		return operations;
	}

	@Override
	public void setOperations(AsyncApi30Operations value) {
		this.operations = value;
	}

	@Override
	public AsyncApi30Operations createOperations() {
		AsyncApi30OperationsImpl node = new AsyncApi30OperationsImpl();
		node.setParent(this);
		return node;
	}

	@Override
	public AsyncApiComponents getComponents() {
		return components;
	}

	@Override
	public void setComponents(AsyncApiComponents value) {
		this.components = value;
	}

	@Override
	public AsyncApi30Components createComponents() {
		AsyncApi30ComponentsImpl node = new AsyncApi30ComponentsImpl();
		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) {
		AsyncApi30Visitor viz = (AsyncApi30Visitor) visitor;
		viz.visitDocument(this);
	}

	@Override
	public Node emptyClone() {
		return new AsyncApi30DocumentImpl();
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy