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

io.apicurio.datamodels.models.asyncapi.v22.AsyncApi22ServerVariableImpl Maven / Gradle / Ivy

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

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

public class AsyncApi22ServerVariableImpl extends NodeImpl implements AsyncApi22ServerVariable {

	private List _enum;
	private String _default;
	private String description;
	private List examples;
	private Map extensions;

	@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) {
		AsyncApi22Visitor viz = (AsyncApi22Visitor) visitor;
		viz.visitServerVariable(this);
	}

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy