io.vulpine.lib.json.schema.v4.impl.ArrayChildSchemaImpl Maven / Gradle / Ivy
package io.vulpine.lib.json.schema.v4.impl;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import io.vulpine.lib.json.schema.SchemaBuilder;
import io.vulpine.lib.json.schema.v4.*;
import io.vulpine.lib.json.schema.v4.impl.lib.Setter;
import java.math.BigDecimal;
import java.math.BigInteger;
class ArrayChildSchemaImpl
extends ArraySchemaImpl
implements ArrayChildSchema
{
private final Setter setter;
private final P parent;
ArrayChildSchemaImpl(
P parent,
ObjectMapper mapper,
ObjectNode schema,
Setter setter
) {
super(mapper, schema);
this.parent = parent;
this.setter = setter;
}
// ┌─────────────────────────────────────────────────────┐
// │ │
// │ Interface implementations │
// │ │
// └─────────────────────────────────────────────────────┘
@Override
public P close()
{
setter.accept(this);
return parent;
}
// ┌─────────────────────────────────────────────────────┐
// │ │
// │ Return type overrides │
// │ │
// └─────────────────────────────────────────────────────┘
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
defaultValue(ArrayNode node)
{
return (ArrayChildSchema
) super.defaultValue(node);
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
defaultValue(String... node)
{
return (ArrayChildSchema
) super.defaultValue(node);
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
defaultValue(Object[] node)
{
return (ArrayChildSchema
) super.defaultValue(node);
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
defaultValue(boolean... node)
{
return (ArrayChildSchema
) super.defaultValue(node);
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
defaultValue(byte... node)
{
return (ArrayChildSchema
) super.defaultValue(node);
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
defaultValue(double... node)
{
return (ArrayChildSchema
) super.defaultValue(node);
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
defaultValue(float... node)
{
return (ArrayChildSchema
) super.defaultValue(node);
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
defaultValue(int... node)
{
return (ArrayChildSchema
) super.defaultValue(node);
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
defaultValue(long... node)
{
return (ArrayChildSchema
) super.defaultValue(node);
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
defaultValue(short... node)
{
return (ArrayChildSchema
) super.defaultValue(node);
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
defaultValue(BigInteger... node)
{
return (ArrayChildSchema
) super.defaultValue(node);
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
defaultValue(BigDecimal... node)
{
return (ArrayChildSchema
) super.defaultValue(node);
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
maxItems(BigInteger val)
{
return (ArrayChildSchema
) super.maxItems(val);
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
maxItems(long val)
{
return (ArrayChildSchema
) super.maxItems(val);
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
maxItems(int val)
{
return (ArrayChildSchema
) super.maxItems(val);
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
removeMaxItems()
{
return (ArrayChildSchema
) super.removeMaxItems();
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
minItems(BigInteger val)
{
return (ArrayChildSchema
) super.minItems(val);
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
minItems(long val)
{
return (ArrayChildSchema
) super.minItems(val);
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
minItems(int val)
{
return (ArrayChildSchema
) super.minItems(val);
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
removeMinItems()
{
return (ArrayChildSchema
) super.removeMinItems();
}
@Override
@SuppressWarnings("unchecked")
public UntypedChildSchema extends ArrayChildSchema
> additionalItems()
{
return (UntypedChildSchema extends ArrayChildSchema
>) super.additionalItems();
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
additionalItems(SchemaBuilder val)
{
return (ArrayChildSchema
) super.additionalItems(val);
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
removeAdditionalItems()
{
return (ArrayChildSchema
) super.removeAdditionalItems();
}
@Override
@SuppressWarnings("unchecked")
public UntypedChildSchema extends ArrayChildSchema
> items()
{
return (UntypedChildSchema extends ArrayChildSchema
>) super.items();
}
@Override
@SuppressWarnings("unchecked")
public SchemaSet extends ArrayChildSchema
> itemsArray()
{
return (SchemaSet extends ArrayChildSchema
>) super.itemsArray();
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
items(SchemaBuilder val)
{
return (ArrayChildSchema
) super.items(val);
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
removeItems()
{
return (ArrayChildSchema
) super.removeItems();
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
enumValues(ArrayNode... vals)
{
return (ArrayChildSchema
) super.enumValues(vals);
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
uniqueItems(boolean flag)
{
return (ArrayChildSchema
) super.uniqueItems(flag);
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
removeUniqueItems()
{
return (ArrayChildSchema
) super.removeUniqueItems();
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
id(String id)
{
return (ArrayChildSchema
) super.id(id);
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
removeId()
{
return (ArrayChildSchema
) super.removeId();
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
$schema(String path)
{
return (ArrayChildSchema
) super.$schema(path);
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
remove$Schema()
{
return (ArrayChildSchema
) super.remove$Schema();
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
$ref(String path)
{
return (ArrayChildSchema
) super.$ref(path);
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
remove$Ref()
{
return (ArrayChildSchema
) super.remove$Ref();
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
description(String desc)
{
return (ArrayChildSchema
) super.description(desc);
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
removeDescription()
{
return (ArrayChildSchema
) super.removeDescription();
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
title(String title)
{
return (ArrayChildSchema
) super.title(title);
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
removeTitle()
{
return (ArrayChildSchema
) super.removeTitle();
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
removeDefault()
{
return (ArrayChildSchema
) super.removeDefault();
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
removeEnum()
{
return (ArrayChildSchema
) super.removeEnum();
}
@Override
public BooleanChildSchemaImpl
orAsBoolean()
{
return new BooleanChildSchemaImpl<>(parent, jax(), copy(), setter);
}
@Override
public IntegerChildSchemaImpl
orAsInteger()
{
return new IntegerChildSchemaImpl<>(parent, jax(), copy(), setter);
}
@Override
public NullChildSchemaImpl
orAsNull()
{
return new NullChildSchemaImpl<>(parent, jax(), copy(), setter);
}
@Override
public NumberChildSchemaImpl
orAsNumber()
{
return new NumberChildSchemaImpl<>(parent, jax(), copy(), setter);
}
@Override
public ObjectChildSchemaImpl
orAsObject()
{
return new ObjectChildSchemaImpl<>(parent, jax(), copy(), setter);
}
@Override
public StringChildSchemaImpl
orAsString()
{
return new StringChildSchemaImpl<>(parent, jax(), copy(), setter);
}
@Override
@SuppressWarnings("unchecked")
public UntypedChildSchema extends ArrayChildSchema
>
definition(String name)
{
return (UntypedChildSchema extends ArrayChildSchema
>)
super.definition(name);
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
definition(
String name, SchemaBuilder schema
)
{
return (ArrayChildSchema
) super.definition(name, schema);
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
removeDefinition(String name)
{
return (ArrayChildSchema
) super.removeDefinition(name);
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
removeDefinitions()
{
return (ArrayChildSchema
) super.removeDefinitions();
}
@Override
@SuppressWarnings("unchecked")
public ArrayChildSchema
defaultValue(JsonNode val)
{
return (ArrayChildSchema
) super.defaultValue(val);
}
@Override
@SuppressWarnings("unchecked")
public UntypedChildSchema extends ArrayChildSchema
> not()
{
return (UntypedChildSchema extends ArrayChildSchema
>) super.not();
}
}