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

io.apicurio.datamodels.models.openapi.v30.OpenApi30ServerVariableImpl Maven / Gradle / Ivy

The newest version!
package io.apicurio.datamodels.models.openapi.v30;

import com.fasterxml.jackson.databind.JsonNode;
import io.apicurio.datamodels.models.Node;
import io.apicurio.datamodels.models.NodeImpl;
import io.apicurio.datamodels.models.openapi.v30.visitors.OpenApi30Visitor;
import io.apicurio.datamodels.models.visitors.Visitor;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

public class OpenApi30ServerVariableImpl extends NodeImpl implements OpenApi30ServerVariable {

	private List _enum;
	private String _default;
	private String description;
	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 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) {
		OpenApi30Visitor viz = (OpenApi30Visitor) visitor;
		viz.visitServerVariable(this);
	}

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy