io.apicurio.datamodels.models.asyncapi.v26.AsyncApi26ServerImpl 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.v26;
import com.fasterxml.jackson.databind.JsonNode;
import io.apicurio.datamodels.models.Node;
import io.apicurio.datamodels.models.NodeImpl;
import io.apicurio.datamodels.models.ServerVariable;
import io.apicurio.datamodels.models.asyncapi.AsyncApiServerBindings;
import io.apicurio.datamodels.models.asyncapi.v26.visitors.AsyncApi26Visitor;
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 AsyncApi26ServerImpl extends NodeImpl implements AsyncApi26Server {
private String $ref;
private String url;
private String protocol;
private String protocolVersion;
private String description;
private Map variables;
private List security;
private List tags;
private AsyncApiServerBindings bindings;
private Map extensions;
@Override
public String get$ref() {
return $ref;
}
@Override
public void set$ref(String value) {
this.$ref = value;
}
@Override
public String getUrl() {
return url;
}
@Override
public void setUrl(String value) {
this.url = value;
}
@Override
public String getProtocol() {
return protocol;
}
@Override
public void setProtocol(String value) {
this.protocol = value;
}
@Override
public String getProtocolVersion() {
return protocolVersion;
}
@Override
public void setProtocolVersion(String value) {
this.protocolVersion = value;
}
@Override
public String getDescription() {
return description;
}
@Override
public void setDescription(String value) {
this.description = value;
}
@Override
public AsyncApi26ServerVariable createServerVariable() {
AsyncApi26ServerVariableImpl node = new AsyncApi26ServerVariableImpl();
node.setParent(this);
return node;
}
@Override
public Map getVariables() {
return variables;
}
@Override
public void addVariable(String name, ServerVariable value) {
if (this.variables == null) {
this.variables = new LinkedHashMap<>();
}
this.variables.put(name, value);
}
@Override
public void clearVariables() {
if (this.variables != null) {
this.variables.clear();
}
}
@Override
public void removeVariable(String name) {
if (this.variables != null) {
this.variables.remove(name);
}
}
@Override
public AsyncApi26SecurityRequirement createSecurityRequirement() {
AsyncApi26SecurityRequirementImpl node = new AsyncApi26SecurityRequirementImpl();
node.setParent(this);
return node;
}
@Override
public List getSecurity() {
return security;
}
@Override
public void addSecurity(AsyncApi26SecurityRequirement value) {
if (this.security == null) {
this.security = new ArrayList<>();
}
this.security.add(value);
}
@Override
public void clearSecurity() {
if (this.security != null) {
this.security.clear();
}
}
@Override
public void removeSecurity(AsyncApi26SecurityRequirement value) {
if (this.security != null) {
this.security.remove(value);
}
}
@Override
public AsyncApi26Tag createTag() {
AsyncApi26TagImpl node = new AsyncApi26TagImpl();
node.setParent(this);
return node;
}
@Override
public List getTags() {
return tags;
}
@Override
public void addTag(AsyncApi26Tag 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(AsyncApi26Tag value) {
if (this.tags != null) {
this.tags.remove(value);
}
}
@Override
public AsyncApiServerBindings getBindings() {
return bindings;
}
@Override
public void setBindings(AsyncApiServerBindings value) {
this.bindings = value;
}
@Override
public AsyncApi26ServerBindings createServerBindings() {
AsyncApi26ServerBindingsImpl node = new AsyncApi26ServerBindingsImpl();
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) {
AsyncApi26Visitor viz = (AsyncApi26Visitor) visitor;
viz.visitServer(this);
}
@Override
public Node emptyClone() {
return new AsyncApi26ServerImpl();
}
}