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

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

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

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

public class AsyncApi30OperationReplyImpl extends NodeImpl implements AsyncApi30OperationReply {

	private String $ref;
	private AsyncApi30OperationReplyAddress address;
	private AsyncApi30Reference channel;
	private List messages;
	private Map extensions;

	@Override
	public String get$ref() {
		return $ref;
	}

	@Override
	public void set$ref(String value) {
		this.$ref = value;
	}

	@Override
	public AsyncApi30OperationReplyAddress getAddress() {
		return address;
	}

	@Override
	public void setAddress(AsyncApi30OperationReplyAddress value) {
		this.address = value;
	}

	@Override
	public AsyncApi30OperationReplyAddress createOperationReplyAddress() {
		AsyncApi30OperationReplyAddressImpl node = new AsyncApi30OperationReplyAddressImpl();
		node.setParent(this);
		return node;
	}

	@Override
	public AsyncApi30Reference getChannel() {
		return channel;
	}

	@Override
	public void setChannel(AsyncApi30Reference value) {
		this.channel = value;
	}

	@Override
	public AsyncApi30Reference createReference() {
		AsyncApi30ReferenceImpl node = new AsyncApi30ReferenceImpl();
		node.setParent(this);
		return node;
	}

	@Override
	public List getMessages() {
		return messages;
	}

	@Override
	public void addMessage(AsyncApi30Reference value) {
		if (this.messages == null) {
			this.messages = new ArrayList<>();
		}
		this.messages.add(value);
	}

	@Override
	public void clearMessages() {
		if (this.messages != null) {
			this.messages.clear();
		}
	}

	@Override
	public void removeMessage(AsyncApi30Reference value) {
		if (this.messages != null) {
			this.messages.remove(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) {
		AsyncApi30Visitor viz = (AsyncApi30Visitor) visitor;
		viz.visitOperationReply(this);
	}

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy