io.apicurio.datamodels.models.openapi.v30.OpenApi30ContactImpl 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.openapi.v30;
import com.fasterxml.jackson.databind.JsonNode;
import io.apicurio.datamodels.models.Node;
import io.apicurio.datamodels.models.NodeImpl;
import io.apicurio.datamodels.models.openapi.v30.visitors.OpenApi30Visitor;
import io.apicurio.datamodels.models.visitors.Visitor;
import java.util.LinkedHashMap;
import java.util.Map;
public class OpenApi30ContactImpl extends NodeImpl implements OpenApi30Contact {
private String name;
private String url;
private String email;
private Map extensions;
@Override
public String getName() {
return name;
}
@Override
public void setName(String value) {
this.name = value;
}
@Override
public String getUrl() {
return url;
}
@Override
public void setUrl(String value) {
this.url = value;
}
@Override
public String getEmail() {
return email;
}
@Override
public void setEmail(String value) {
this.email = 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) {
OpenApi30Visitor viz = (OpenApi30Visitor) visitor;
viz.visitContact(this);
}
@Override
public Node emptyClone() {
return new OpenApi30ContactImpl();
}
}