io.apicurio.datamodels.models.asyncapi.v23.AsyncApi23ComponentsImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of apicurio-data-models Show documentation
Show all versions of apicurio-data-models Show documentation
Open Source API Design Studio
The newest version!
package io.apicurio.datamodels.models.asyncapi.v23;
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.v23.visitors.AsyncApi23Visitor;
import io.apicurio.datamodels.models.visitors.Visitor;
import java.util.LinkedHashMap;
import java.util.Map;
public class AsyncApi23ComponentsImpl extends NodeImpl implements AsyncApi23Components {
private Map schemas;
private Map servers;
private Map channels;
private Map messages;
private Map securitySchemes;
private Map parameters;
private Map correlationIds;
private Map operationTraits;
private Map messageTraits;
private Map serverBindings;
private Map channelBindings;
private Map operationBindings;
private Map messageBindings;
private Map extensions;
@Override
public AsyncApi23Schema createSchema() {
AsyncApi23SchemaImpl node = new AsyncApi23SchemaImpl();
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 AsyncApi23Server createServer() {
AsyncApi23ServerImpl node = new AsyncApi23ServerImpl();
node.setParent(this);
return node;
}
@Override
public Map getServers() {
return servers;
}
@Override
public void addServer(String name, AsyncApi23Server 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 AsyncApi23ChannelItem createChannelItem() {
AsyncApi23ChannelItemImpl node = new AsyncApi23ChannelItemImpl();
node.setParent(this);
return node;
}
@Override
public Map getChannels() {
return channels;
}
@Override
public void addChannel(String name, AsyncApi23ChannelItem 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 AsyncApi23Message createMessage() {
AsyncApi23MessageImpl node = new AsyncApi23MessageImpl();
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 AsyncApi23SecurityScheme createSecurityScheme() {
AsyncApi23SecuritySchemeImpl node = new AsyncApi23SecuritySchemeImpl();
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 AsyncApi23Parameter createParameter() {
AsyncApi23ParameterImpl node = new AsyncApi23ParameterImpl();
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 AsyncApi23CorrelationID createCorrelationID() {
AsyncApi23CorrelationIDImpl node = new AsyncApi23CorrelationIDImpl();
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 AsyncApi23OperationTrait createOperationTrait() {
AsyncApi23OperationTraitImpl node = new AsyncApi23OperationTraitImpl();
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 AsyncApi23MessageTrait createMessageTrait() {
AsyncApi23MessageTraitImpl node = new AsyncApi23MessageTraitImpl();
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 AsyncApi23ServerBindings createServerBindings() {
AsyncApi23ServerBindingsImpl node = new AsyncApi23ServerBindingsImpl();
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 AsyncApi23ChannelBindings createChannelBindings() {
AsyncApi23ChannelBindingsImpl node = new AsyncApi23ChannelBindingsImpl();
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 AsyncApi23OperationBindings createOperationBindings() {
AsyncApi23OperationBindingsImpl node = new AsyncApi23OperationBindingsImpl();
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 AsyncApi23MessageBindings createMessageBindings() {
AsyncApi23MessageBindingsImpl node = new AsyncApi23MessageBindingsImpl();
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) {
AsyncApi23Visitor viz = (AsyncApi23Visitor) visitor;
viz.visitComponents(this);
}
@Override
public Node emptyClone() {
return new AsyncApi23ComponentsImpl();
}
}