io.vulpine.lib.json.schema.v4.impl.StringChildSchemaImpl Maven / Gradle / Ivy
Show all versions of json-schema-builder Show documentation
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.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.BigInteger;
class StringChildSchemaImpl
extends StringSchemaImpl
implements StringChildSchema
{
private final Setter setter;
private final P parent;
StringChildSchemaImpl(
P parent,
ObjectMapper jax,
ObjectNode raw,
Setter setter
) {
super(jax, raw);
this.parent = parent;
this.setter = setter;
}
// ┌─────────────────────────────────────────────────────┐
// │ │
// │ Interface implementations │
// │ │
// └─────────────────────────────────────────────────────┘
@Override
public P close()
{
setter.accept(this);
return parent;
}
// ┌─────────────────────────────────────────────────────┐
// │ │
// │ Return type overrides │
// │ │
// └─────────────────────────────────────────────────────┘
@Override
@SuppressWarnings("unchecked")
public StringChildSchemaImpl
defaultValue(String val)
{
return (StringChildSchemaImpl
) super.defaultValue(val);
}
@Override
@SuppressWarnings("unchecked")
public StringChildSchemaImpl
maxLength(int val)
{
return (StringChildSchemaImpl
) super.maxLength(val);
}
@Override
@SuppressWarnings("unchecked")
public StringChildSchemaImpl
maxLength(long val)
{
return (StringChildSchemaImpl
) super.maxLength(val);
}
@Override
@SuppressWarnings("unchecked")
public StringChildSchemaImpl
maxLength(BigInteger val)
{
return (StringChildSchemaImpl
) super.maxLength(val);
}
@Override
@SuppressWarnings("unchecked")
public StringChildSchemaImpl
removeMaxLength()
{
return (StringChildSchemaImpl
) super.removeMaxLength();
}
@Override
@SuppressWarnings("unchecked")
public StringChildSchemaImpl
minLength(int val)
{
return (StringChildSchemaImpl
) super.minLength(val);
}
@Override
@SuppressWarnings("unchecked")
public StringChildSchemaImpl
minLength(long val)
{
return (StringChildSchemaImpl
) super.minLength(val);
}
@Override
@SuppressWarnings("unchecked")
public StringChildSchemaImpl
minLength(BigInteger val)
{
return (StringChildSchemaImpl
) super.minLength(val);
}
@Override
@SuppressWarnings("unchecked")
public StringChildSchemaImpl
removeMinLength()
{
return (StringChildSchemaImpl
) super.removeMinLength();
}
@Override
@SuppressWarnings("unchecked")
public StringChildSchemaImpl
pattern(String pattern)
{
return (StringChildSchemaImpl
) super.pattern(pattern);
}
@Override
@SuppressWarnings("unchecked")
public StringChildSchemaImpl
removePattern()
{
return (StringChildSchemaImpl
) super.removePattern();
}
@Override
@SuppressWarnings("unchecked")
public StringChildSchemaImpl
enumValues(String... vals)
{
return (StringChildSchemaImpl
) super.enumValues(vals);
}
@Override
@SuppressWarnings("unchecked")
public StringChildSchemaImpl
format(Format format)
{
return (StringChildSchemaImpl
) super.format(format);
}
@Override
@SuppressWarnings("unchecked")
public StringChildSchemaImpl
format(String format)
{
return (StringChildSchemaImpl
) super.format(format);
}
@Override
@SuppressWarnings("unchecked")
public StringChildSchemaImpl
removeFormat()
{
return (StringChildSchemaImpl
) super.removeFormat();
}
@Override
@SuppressWarnings("unchecked")
public StringChildSchemaImpl
id(String id)
{
return (StringChildSchemaImpl
) super.id(id);
}
@Override
@SuppressWarnings("unchecked")
public StringChildSchemaImpl
removeId()
{
return (StringChildSchemaImpl
) super.removeId();
}
@Override
@SuppressWarnings("unchecked")
public StringChildSchemaImpl
$schema(String path)
{
return (StringChildSchemaImpl
) super.$schema(path);
}
@Override
@SuppressWarnings("unchecked")
public StringChildSchemaImpl
remove$Schema()
{
return (StringChildSchemaImpl
) super.remove$Schema();
}
@Override
@SuppressWarnings("unchecked")
public StringChildSchemaImpl
$ref(String path)
{
return (StringChildSchemaImpl
) super.$ref(path);
}
@Override
@SuppressWarnings("unchecked")
public StringChildSchemaImpl
remove$Ref()
{
return (StringChildSchemaImpl
) super.remove$Ref();
}
@Override
@SuppressWarnings("unchecked")
public StringChildSchemaImpl
description(String desc)
{
return (StringChildSchemaImpl
) super.description(desc);
}
@Override
@SuppressWarnings("unchecked")
public StringChildSchemaImpl
removeDescription()
{
return (StringChildSchemaImpl
) super.removeDescription();
}
@Override
@SuppressWarnings("unchecked")
public StringChildSchemaImpl
title(String title)
{
return (StringChildSchemaImpl
) super.title(title);
}
@Override
@SuppressWarnings("unchecked")
public StringChildSchemaImpl
removeTitle()
{
return (StringChildSchemaImpl
) super.removeTitle();
}
@Override
@SuppressWarnings("unchecked")
public StringChildSchemaImpl
removeDefault()
{
return (StringChildSchemaImpl
) super.removeDefault();
}
@Override
@SuppressWarnings("unchecked")
public StringChildSchemaImpl
removeEnum()
{
return (StringChildSchemaImpl
) super.removeEnum();
}
@Override
public ArrayChildSchema
orAsArray()
{
return new ArrayChildSchemaImpl<>(parent, jax(), copy(), setter);
}
@Override
public BooleanChildSchema
orAsBoolean()
{
return new BooleanChildSchemaImpl<>(parent, jax(), copy(), setter);
}
@Override
public IntegerChildSchema
orAsInteger()
{
return new IntegerChildSchemaImpl<>(parent, jax(), copy(), setter);
}
@Override
public NullChildSchema
orAsNull()
{
return new NullChildSchemaImpl<>(parent, jax(), copy(), setter);
}
@Override
public NumberChildSchema
orAsNumber()
{
return new NumberChildSchemaImpl<>(parent, jax(), copy(), setter);
}
@Override
public ObjectChildSchema
orAsObject()
{
return new ObjectChildSchemaImpl<>(parent, jax(), copy(), setter);
}
@Override
@SuppressWarnings("unchecked")
public UntypedChildSchema extends StringChildSchema
>
definition(String name)
{
return (UntypedChildSchema extends StringChildSchema
>)
super.definition(name);
}
@Override
@SuppressWarnings("unchecked")
public StringChildSchemaImpl
definition(String name, SchemaBuilder schema)
{
return (StringChildSchemaImpl
) super.definition(name, schema);
}
@Override
@SuppressWarnings("unchecked")
public StringChildSchemaImpl
removeDefinition(String name)
{
return (StringChildSchemaImpl
) super.removeDefinition(name);
}
@Override
@SuppressWarnings("unchecked")
public StringChildSchemaImpl
removeDefinitions()
{
return (StringChildSchemaImpl
) super.removeDefinitions();
}
@Override
@SuppressWarnings("unchecked")
public StringChildSchema
defaultValue(JsonNode val)
{
return (StringChildSchema
) super.defaultValue(val);
}
@Override
@SuppressWarnings("unchecked")
public UntypedChildSchema extends StringChildSchema
> not()
{
return (UntypedChildSchema extends StringChildSchema
>) super.not();
}
}