Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.reprezen.kaizen.oasparser.ovl3.ExampleImpl Maven / Gradle / Ivy
package com.reprezen.kaizen.oasparser.ovl3;
import java.util.Map;
import javax.annotation.Generated;
import com.fasterxml.jackson.databind.JsonNode;
import com.reprezen.jsonoverlay.Builder;
import com.reprezen.jsonoverlay.IJsonOverlay;
import com.reprezen.jsonoverlay.JsonOverlay;
import com.reprezen.jsonoverlay.MapOverlay;
import com.reprezen.jsonoverlay.ObjectOverlay;
import com.reprezen.jsonoverlay.Overlay;
import com.reprezen.jsonoverlay.OverlayFactory;
import com.reprezen.jsonoverlay.PropertiesOverlay;
import com.reprezen.jsonoverlay.ReferenceManager;
import com.reprezen.jsonoverlay.StringOverlay;
import com.reprezen.kaizen.oasparser.model3.Example;
import com.reprezen.kaizen.oasparser.model3.OpenApi3;
public class ExampleImpl extends PropertiesOverlay implements Example {
private Overlay overlay = Overlay.of(this);
@Override
public String getName() {
return overlay.getParent() instanceof MapOverlay> ? overlay.getPathInParent() : null;
}
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public ExampleImpl(JsonNode json, JsonOverlay> parent, ReferenceManager refMgr) {
super(json, parent, factory, refMgr);
}
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public ExampleImpl(Example example, JsonOverlay> parent, ReferenceManager refMgr) {
super(example, parent, factory, refMgr);
}
// Summary
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public String getSummary() {
return _get("summary", String.class);
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public void setSummary(String summary) {
_setScalar("summary", summary, String.class);
}
// Description
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public String getDescription() {
return _get("description", String.class);
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public void setDescription(String description) {
_setScalar("description", description, String.class);
}
// Value
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public Object getValue() {
return _get("value", Object.class);
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public void setValue(Object value) {
_setScalar("value", value, Object.class);
}
// ExternalValue
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public String getExternalValue() {
return _get("externalValue", String.class);
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public void setExternalValue(String externalValue) {
_setScalar("externalValue", externalValue, String.class);
}
// Extension
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public Map getExtensions() {
return _getMap("extensions", Object.class);
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public Map getExtensions(boolean elaborate) {
return _getMap("extensions", elaborate, Object.class);
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public boolean hasExtensions() {
return _isPresent("extensions");
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public boolean hasExtension(String name) {
return _getMap("extensions", Object.class).containsKey(name);
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public Object getExtension(String name) {
return _get("extensions", name, Object.class);
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public void setExtensions(Map extensions) {
_setMap("extensions", extensions, Object.class);
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public void setExtension(String name, Object extension) {
_set("extensions", name, extension, Object.class);
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public void removeExtension(String name) {
_remove("extensions", name, Object.class);
}
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public static final String F_summary = "summary";
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public static final String F_description = "description";
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public static final String F_value = "value";
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public static final String F_externalValue = "externalValue";
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public static final String F_extensions = "extensions";
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
protected void _elaborateJson() {
super._elaborateJson();
_createScalar("summary", "summary", StringOverlay.factory);
_createScalar("description", "description", StringOverlay.factory);
_createScalar("value", "value", ObjectOverlay.factory);
_createScalar("externalValue", "externalValue", StringOverlay.factory);
_createMap("extensions", "", ObjectOverlay.factory, "x-.+");
}
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public static OverlayFactory factory = new OverlayFactory() {
@Override
protected Class extends JsonOverlay super Example>> getOverlayClass() {
return ExampleImpl.class;
}
@Override
public JsonOverlay _create(Example example, JsonOverlay> parent, ReferenceManager refMgr) {
JsonOverlay> overlay;
overlay = new ExampleImpl(example, parent, refMgr);
@SuppressWarnings("unchecked")
JsonOverlay castOverlay = (JsonOverlay) overlay;
return castOverlay;
}
@Override
public JsonOverlay _create(JsonNode json, JsonOverlay> parent, ReferenceManager refMgr) {
JsonOverlay> overlay;
overlay = new ExampleImpl(json, parent, refMgr);
@SuppressWarnings("unchecked")
JsonOverlay castOverlay = (JsonOverlay) overlay;
return castOverlay;
}
@Override
protected boolean isExtendedType() {
return false;
}
};
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
private static Class extends Example> getSubtypeOf(Example example) {
return Example.class;
}
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
private static Class extends Example> getSubtypeOf(JsonNode json) {
return Example.class;
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public Class> _getModelType() {
return OpenApi3.class;
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
protected OverlayFactory> _getFactory() {
return factory;
}
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public static > Builder builder(OV modelMember) {
return new Builder(factory, modelMember);
}
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public static > Example create(OV modelMember) {
return (Example) builder(modelMember).build();
}
}