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

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

The newest version!
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.Parameter;
import io.apicurio.datamodels.models.Schema;
import io.apicurio.datamodels.models.SecurityScheme;
import io.apicurio.datamodels.models.asyncapi.AsyncApiChannelBindings;
import io.apicurio.datamodels.models.asyncapi.AsyncApiCorrelationID;
import io.apicurio.datamodels.models.asyncapi.AsyncApiMessage;
import io.apicurio.datamodels.models.asyncapi.AsyncApiMessageBindings;
import io.apicurio.datamodels.models.asyncapi.AsyncApiMessageTrait;
import io.apicurio.datamodels.models.asyncapi.AsyncApiOperationBindings;
import io.apicurio.datamodels.models.asyncapi.AsyncApiOperationTrait;
import io.apicurio.datamodels.models.asyncapi.AsyncApiServerBindings;
import io.apicurio.datamodels.models.asyncapi.v30.visitors.AsyncApi30Visitor;
import io.apicurio.datamodels.models.visitors.Visitor;
import java.util.LinkedHashMap;
import java.util.Map;

public class AsyncApi30ComponentsImpl extends NodeImpl implements AsyncApi30Components {

	private Map schemas;
	private Map servers;
	private Map channels;
	private Map operations;
	private Map messages;
	private Map securitySchemes;
	private Map serverVariables;
	private Map parameters;
	private Map correlationIds;
	private Map replies;
	private Map replyAddresses;
	private Map externalDocs;
	private Map tags;
	private Map operationTraits;
	private Map messageTraits;
	private Map serverBindings;
	private Map channelBindings;
	private Map operationBindings;
	private Map messageBindings;
	private Map extensions;

	@Override
	public AsyncApi30Schema createSchema() {
		AsyncApi30SchemaImpl node = new AsyncApi30SchemaImpl();
		node.setParent(this);
		return node;
	}

	@Override
	public Map getSchemas() {
		return schemas;
	}

	@Override
	public void addSchema(String name, Schema value) {
		if (this.schemas == null) {
			this.schemas = new LinkedHashMap<>();
		}
		this.schemas.put(name, value);
	}

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

	@Override
	public void removeSchema(String name) {
		if (this.schemas != null) {
			this.schemas.remove(name);
		}
	}

	@Override
	public AsyncApi30Server createServer() {
		AsyncApi30ServerImpl node = new AsyncApi30ServerImpl();
		node.setParent(this);
		return node;
	}

	@Override
	public Map getServers() {
		return servers;
	}

	@Override
	public void addServer(String name, AsyncApi30Server value) {
		if (this.servers == null) {
			this.servers = new LinkedHashMap<>();
		}
		this.servers.put(name, value);
	}

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

	@Override
	public void removeServer(String name) {
		if (this.servers != null) {
			this.servers.remove(name);
		}
	}

	@Override
	public AsyncApi30Channel createChannel() {
		AsyncApi30ChannelImpl node = new AsyncApi30ChannelImpl();
		node.setParent(this);
		return node;
	}

	@Override
	public Map getChannels() {
		return channels;
	}

	@Override
	public void addChannel(String name, AsyncApi30Channel value) {
		if (this.channels == null) {
			this.channels = new LinkedHashMap<>();
		}
		this.channels.put(name, value);
	}

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

	@Override
	public void removeChannel(String name) {
		if (this.channels != null) {
			this.channels.remove(name);
		}
	}

	@Override
	public AsyncApi30Operation createOperation() {
		AsyncApi30OperationImpl node = new AsyncApi30OperationImpl();
		node.setParent(this);
		return node;
	}

	@Override
	public Map getOperations() {
		return operations;
	}

	@Override
	public void addOperation(String name, AsyncApi30Operation value) {
		if (this.operations == null) {
			this.operations = new LinkedHashMap<>();
		}
		this.operations.put(name, value);
	}

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

	@Override
	public void removeOperation(String name) {
		if (this.operations != null) {
			this.operations.remove(name);
		}
	}

	@Override
	public AsyncApi30Message createMessage() {
		AsyncApi30MessageImpl node = new AsyncApi30MessageImpl();
		node.setParent(this);
		return node;
	}

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

	@Override
	public void addMessage(String name, AsyncApiMessage value) {
		if (this.messages == null) {
			this.messages = new LinkedHashMap<>();
		}
		this.messages.put(name, value);
	}

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

	@Override
	public void removeMessage(String name) {
		if (this.messages != null) {
			this.messages.remove(name);
		}
	}

	@Override
	public AsyncApi30SecurityScheme createSecurityScheme() {
		AsyncApi30SecuritySchemeImpl node = new AsyncApi30SecuritySchemeImpl();
		node.setParent(this);
		return node;
	}

	@Override
	public Map getSecuritySchemes() {
		return securitySchemes;
	}

	@Override
	public void addSecurityScheme(String name, SecurityScheme value) {
		if (this.securitySchemes == null) {
			this.securitySchemes = new LinkedHashMap<>();
		}
		this.securitySchemes.put(name, value);
	}

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

	@Override
	public void removeSecurityScheme(String name) {
		if (this.securitySchemes != null) {
			this.securitySchemes.remove(name);
		}
	}

	@Override
	public AsyncApi30ServerVariable createServerVariable() {
		AsyncApi30ServerVariableImpl node = new AsyncApi30ServerVariableImpl();
		node.setParent(this);
		return node;
	}

	@Override
	public Map getServerVariables() {
		return serverVariables;
	}

	@Override
	public void addServerVariable(String name, AsyncApi30ServerVariable value) {
		if (this.serverVariables == null) {
			this.serverVariables = new LinkedHashMap<>();
		}
		this.serverVariables.put(name, value);
	}

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

	@Override
	public void removeServerVariable(String name) {
		if (this.serverVariables != null) {
			this.serverVariables.remove(name);
		}
	}

	@Override
	public AsyncApi30Parameter createParameter() {
		AsyncApi30ParameterImpl node = new AsyncApi30ParameterImpl();
		node.setParent(this);
		return node;
	}

	@Override
	public Map getParameters() {
		return parameters;
	}

	@Override
	public void addParameter(String name, Parameter value) {
		if (this.parameters == null) {
			this.parameters = new LinkedHashMap<>();
		}
		this.parameters.put(name, value);
	}

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

	@Override
	public void removeParameter(String name) {
		if (this.parameters != null) {
			this.parameters.remove(name);
		}
	}

	@Override
	public AsyncApi30CorrelationID createCorrelationID() {
		AsyncApi30CorrelationIDImpl node = new AsyncApi30CorrelationIDImpl();
		node.setParent(this);
		return node;
	}

	@Override
	public Map getCorrelationIds() {
		return correlationIds;
	}

	@Override
	public void addCorrelationId(String name, AsyncApiCorrelationID value) {
		if (this.correlationIds == null) {
			this.correlationIds = new LinkedHashMap<>();
		}
		this.correlationIds.put(name, value);
	}

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

	@Override
	public void removeCorrelationId(String name) {
		if (this.correlationIds != null) {
			this.correlationIds.remove(name);
		}
	}

	@Override
	public AsyncApi30OperationReply createOperationReply() {
		AsyncApi30OperationReplyImpl node = new AsyncApi30OperationReplyImpl();
		node.setParent(this);
		return node;
	}

	@Override
	public Map getReplies() {
		return replies;
	}

	@Override
	public void addReply(String name, AsyncApi30OperationReply value) {
		if (this.replies == null) {
			this.replies = new LinkedHashMap<>();
		}
		this.replies.put(name, value);
	}

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

	@Override
	public void removeReply(String name) {
		if (this.replies != null) {
			this.replies.remove(name);
		}
	}

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

	@Override
	public Map getReplyAddresses() {
		return replyAddresses;
	}

	@Override
	public void addReplyAddress(String name, AsyncApi30OperationReplyAddress value) {
		if (this.replyAddresses == null) {
			this.replyAddresses = new LinkedHashMap<>();
		}
		this.replyAddresses.put(name, value);
	}

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

	@Override
	public void removeReplyAddress(String name) {
		if (this.replyAddresses != null) {
			this.replyAddresses.remove(name);
		}
	}

	@Override
	public AsyncApi30ExternalDocumentation createExternalDocumentation() {
		AsyncApi30ExternalDocumentationImpl node = new AsyncApi30ExternalDocumentationImpl();
		node.setParent(this);
		return node;
	}

	@Override
	public Map getExternalDocs() {
		return externalDocs;
	}

	@Override
	public void addExternalDoc(String name, AsyncApi30ExternalDocumentation value) {
		if (this.externalDocs == null) {
			this.externalDocs = new LinkedHashMap<>();
		}
		this.externalDocs.put(name, value);
	}

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

	@Override
	public void removeExternalDoc(String name) {
		if (this.externalDocs != null) {
			this.externalDocs.remove(name);
		}
	}

	@Override
	public AsyncApi30Tag createTag() {
		AsyncApi30TagImpl node = new AsyncApi30TagImpl();
		node.setParent(this);
		return node;
	}

	@Override
	public Map getTags() {
		return tags;
	}

	@Override
	public void addTag(String name, AsyncApi30Tag value) {
		if (this.tags == null) {
			this.tags = new LinkedHashMap<>();
		}
		this.tags.put(name, value);
	}

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

	@Override
	public void removeTag(String name) {
		if (this.tags != null) {
			this.tags.remove(name);
		}
	}

	@Override
	public AsyncApi30OperationTrait createOperationTrait() {
		AsyncApi30OperationTraitImpl node = new AsyncApi30OperationTraitImpl();
		node.setParent(this);
		return node;
	}

	@Override
	public Map getOperationTraits() {
		return operationTraits;
	}

	@Override
	public void addOperationTrait(String name, AsyncApiOperationTrait value) {
		if (this.operationTraits == null) {
			this.operationTraits = new LinkedHashMap<>();
		}
		this.operationTraits.put(name, value);
	}

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

	@Override
	public void removeOperationTrait(String name) {
		if (this.operationTraits != null) {
			this.operationTraits.remove(name);
		}
	}

	@Override
	public AsyncApi30MessageTrait createMessageTrait() {
		AsyncApi30MessageTraitImpl node = new AsyncApi30MessageTraitImpl();
		node.setParent(this);
		return node;
	}

	@Override
	public Map getMessageTraits() {
		return messageTraits;
	}

	@Override
	public void addMessageTrait(String name, AsyncApiMessageTrait value) {
		if (this.messageTraits == null) {
			this.messageTraits = new LinkedHashMap<>();
		}
		this.messageTraits.put(name, value);
	}

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

	@Override
	public void removeMessageTrait(String name) {
		if (this.messageTraits != null) {
			this.messageTraits.remove(name);
		}
	}

	@Override
	public AsyncApi30ServerBindings createServerBindings() {
		AsyncApi30ServerBindingsImpl node = new AsyncApi30ServerBindingsImpl();
		node.setParent(this);
		return node;
	}

	@Override
	public Map getServerBindings() {
		return serverBindings;
	}

	@Override
	public void addServerBinding(String name, AsyncApiServerBindings value) {
		if (this.serverBindings == null) {
			this.serverBindings = new LinkedHashMap<>();
		}
		this.serverBindings.put(name, value);
	}

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

	@Override
	public void removeServerBinding(String name) {
		if (this.serverBindings != null) {
			this.serverBindings.remove(name);
		}
	}

	@Override
	public AsyncApi30ChannelBindings createChannelBindings() {
		AsyncApi30ChannelBindingsImpl node = new AsyncApi30ChannelBindingsImpl();
		node.setParent(this);
		return node;
	}

	@Override
	public Map getChannelBindings() {
		return channelBindings;
	}

	@Override
	public void addChannelBinding(String name, AsyncApiChannelBindings value) {
		if (this.channelBindings == null) {
			this.channelBindings = new LinkedHashMap<>();
		}
		this.channelBindings.put(name, value);
	}

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

	@Override
	public void removeChannelBinding(String name) {
		if (this.channelBindings != null) {
			this.channelBindings.remove(name);
		}
	}

	@Override
	public AsyncApi30OperationBindings createOperationBindings() {
		AsyncApi30OperationBindingsImpl node = new AsyncApi30OperationBindingsImpl();
		node.setParent(this);
		return node;
	}

	@Override
	public Map getOperationBindings() {
		return operationBindings;
	}

	@Override
	public void addOperationBinding(String name, AsyncApiOperationBindings value) {
		if (this.operationBindings == null) {
			this.operationBindings = new LinkedHashMap<>();
		}
		this.operationBindings.put(name, value);
	}

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

	@Override
	public void removeOperationBinding(String name) {
		if (this.operationBindings != null) {
			this.operationBindings.remove(name);
		}
	}

	@Override
	public AsyncApi30MessageBindings createMessageBindings() {
		AsyncApi30MessageBindingsImpl node = new AsyncApi30MessageBindingsImpl();
		node.setParent(this);
		return node;
	}

	@Override
	public Map getMessageBindings() {
		return messageBindings;
	}

	@Override
	public void addMessageBinding(String name, AsyncApiMessageBindings value) {
		if (this.messageBindings == null) {
			this.messageBindings = new LinkedHashMap<>();
		}
		this.messageBindings.put(name, value);
	}

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

	@Override
	public void removeMessageBinding(String name) {
		if (this.messageBindings != null) {
			this.messageBindings.remove(name);
		}
	}

	@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.visitComponents(this);
	}

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy