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

io.apicurio.datamodels.models.asyncapi.v23.AsyncApi23ExternalDocumentationImpl Maven / Gradle / Ivy

The newest version!
package io.apicurio.datamodels.models.asyncapi.v23;

import com.fasterxml.jackson.databind.JsonNode;
import io.apicurio.datamodels.models.Node;
import io.apicurio.datamodels.models.NodeImpl;
import io.apicurio.datamodels.models.asyncapi.v23.visitors.AsyncApi23Visitor;
import io.apicurio.datamodels.models.visitors.Visitor;
import java.util.LinkedHashMap;
import java.util.Map;

public class AsyncApi23ExternalDocumentationImpl extends NodeImpl implements AsyncApi23ExternalDocumentation {

	private String description;
	private String url;
	private Map extensions;

	@Override
	public String getDescription() {
		return description;
	}

	@Override
	public void setDescription(String value) {
		this.description = value;
	}

	@Override
	public String getUrl() {
		return url;
	}

	@Override
	public void setUrl(String value) {
		this.url = 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) {
		AsyncApi23Visitor viz = (AsyncApi23Visitor) visitor;
		viz.visitExternalDocumentation(this);
	}

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy