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

io.apicurio.datamodels.models.asyncapi.v24.AsyncApi24MessageExampleImpl Maven / Gradle / Ivy

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

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

public class AsyncApi24MessageExampleImpl extends NodeImpl implements AsyncApi24MessageExample {

	private Map headers;
	private JsonNode payload;
	private String name;
	private String summary;
	private Map extensions;

	@Override
	public Map getHeaders() {
		return headers;
	}

	@Override
	public void setHeaders(Map value) {
		this.headers = value;
	}

	@Override
	public JsonNode getPayload() {
		return payload;
	}

	@Override
	public void setPayload(JsonNode value) {
		this.payload = value;
	}

	@Override
	public String getName() {
		return name;
	}

	@Override
	public void setName(String value) {
		this.name = value;
	}

	@Override
	public String getSummary() {
		return summary;
	}

	@Override
	public void setSummary(String value) {
		this.summary = 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) {
		AsyncApi24Visitor viz = (AsyncApi24Visitor) visitor;
		viz.visitMessageExample(this);
	}

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy