io.apicurio.datamodels.models.asyncapi.v30.AsyncApi30ChannelImpl 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.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 AsyncApi30ChannelImpl extends NodeImpl implements AsyncApi30Channel {
private String $ref;
private String address;
private Map messages;
private String title;
private String summary;
private String description;
private List servers;
private AsyncApi30Parameters parameters;
private List tags;
private AsyncApi30ExternalDocumentation externalDocs;
private AsyncApi30ChannelBindings bindings;
private Map extensions;
@Override
public String get$ref() {
return $ref;
}
@Override
public void set$ref(String value) {
this.$ref = value;
}
@Override
public String getAddress() {
return address;
}
@Override
public void setAddress(String value) {
this.address = value;
}
@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, AsyncApi30Message 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 String getTitle() {
return title;
}
@Override
public void setTitle(String value) {
this.title = value;
}
@Override
public String getSummary() {
return summary;
}
@Override
public void setSummary(String value) {
this.summary = value;
}
@Override
public String getDescription() {
return description;
}
@Override
public void setDescription(String value) {
this.description = value;
}
@Override
public AsyncApi30Reference createReference() {
AsyncApi30ReferenceImpl node = new AsyncApi30ReferenceImpl();
node.setParent(this);
return node;
}
@Override
public List getServers() {
return servers;
}
@Override
public void addServer(AsyncApi30Reference value) {
if (this.servers == null) {
this.servers = new ArrayList<>();
}
this.servers.add(value);
}
@Override
public void clearServers() {
if (this.servers != null) {
this.servers.clear();
}
}
@Override
public void removeServer(AsyncApi30Reference value) {
if (this.servers != null) {
this.servers.remove(value);
}
}
@Override
public AsyncApi30Parameters getParameters() {
return parameters;
}
@Override
public void setParameters(AsyncApi30Parameters value) {
this.parameters = value;
}
@Override
public AsyncApi30Parameters createParameters() {
AsyncApi30ParametersImpl node = new AsyncApi30ParametersImpl();
node.setParent(this);
return node;
}
@Override
public AsyncApi30Tag createTag() {
AsyncApi30TagImpl node = new AsyncApi30TagImpl();
node.setParent(this);
return node;
}
@Override
public List getTags() {
return tags;
}
@Override
public void addTag(AsyncApi30Tag value) {
if (this.tags == null) {
this.tags = new ArrayList<>();
}
this.tags.add(value);
}
@Override
public void clearTags() {
if (this.tags != null) {
this.tags.clear();
}
}
@Override
public void removeTag(AsyncApi30Tag value) {
if (this.tags != null) {
this.tags.remove(value);
}
}
@Override
public AsyncApi30ExternalDocumentation getExternalDocs() {
return externalDocs;
}
@Override
public void setExternalDocs(AsyncApi30ExternalDocumentation value) {
this.externalDocs = value;
}
@Override
public AsyncApi30ExternalDocumentation createExternalDocumentation() {
AsyncApi30ExternalDocumentationImpl node = new AsyncApi30ExternalDocumentationImpl();
node.setParent(this);
return node;
}
@Override
public AsyncApi30ChannelBindings getBindings() {
return bindings;
}
@Override
public void setBindings(AsyncApi30ChannelBindings value) {
this.bindings = value;
}
@Override
public AsyncApi30ChannelBindings createChannelBindings() {
AsyncApi30ChannelBindingsImpl node = new AsyncApi30ChannelBindingsImpl();
node.setParent(this);
return node;
}
@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.visitChannel(this);
}
@Override
public Node emptyClone() {
return new AsyncApi30ChannelImpl();
}
}