All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.vulpine.lib.json.schema.v4.impl.ObjectChildSchemaImpl 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.ObjectNode;
import io.vulpine.lib.json.schema.v4.ObjectChildSchema;
import io.vulpine.lib.json.schema.SchemaBuilder;
import io.vulpine.lib.json.schema.v4.ObjectSchema;
import io.vulpine.lib.json.schema.v4.UntypedChildSchema;
import io.vulpine.lib.json.schema.v4.impl.lib.Setter;

import java.math.BigInteger;

class ObjectChildSchemaImpl

extends ObjectSchemaImpl implements ObjectChildSchema

{ private final P parent; private final Setter setter; ObjectChildSchemaImpl( P parent, ObjectMapper jax, ObjectNode raw, Setter setter ) { super(jax, raw); this.parent = parent; this.setter = setter; } // ┌─────────────────────────────────────────────────────┐ // │ │ // │ Interface implementation │ // │ │ // └─────────────────────────────────────────────────────┘ @Override public P close() { setter.accept(this); return parent; } // ┌─────────────────────────────────────────────────────┐ // │ │ // │ Return type overrides │ // │ │ // └─────────────────────────────────────────────────────┘ @Override public UntypedChildSchema> optionalProperty(String name) { return new UntypedChildSchemaImpl<>(this, jax(), newObj(), v -> optionalProperty(name, v)); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

optionalProperty(String name, SchemaBuilder node) { return (ObjectChildSchemaImpl

) super.optionalProperty(name, node); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

removeOptionalProperties() { return (ObjectChildSchemaImpl

) super.removeOptionalProperties(); } @Override public UntypedChildSchema> requiredProperty(String k) { return new UntypedChildSchemaImpl<>(this, jax(), newObj(), v -> requiredProperty(k, v)); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

requiredProperty(String k, SchemaBuilder v) { return (ObjectChildSchemaImpl

) super.requiredProperty(k, v); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

removeRequiredProperties() { return (ObjectChildSchemaImpl

) super.removeRequiredProperties(); } @Override public UntypedChildSchema> patternProperty(String x) { return new UntypedChildSchemaImpl<>(this, jax(), newObj(), v -> patternProperty(x, v)); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

patternProperty(String k, SchemaBuilder v) { return (ObjectChildSchemaImpl

) super.patternProperty(k, v); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

removePatternProperties() { return (ObjectChildSchemaImpl

) super.removePatternProperties(); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

additionalProperties(boolean val) { return (ObjectChildSchemaImpl

) super.additionalProperties(val); } @Override public UntypedChildSchema> additionalProperties() { return new UntypedChildSchemaImpl<>(this, jax(), newObj(), this::additionalProperties); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

additionalProperties(SchemaBuilder node) { return (ObjectChildSchemaImpl

) super.additionalProperties(node); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

removeAdditionalProperties() { return (ObjectChildSchemaImpl

) super.removeAdditionalProperties(); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

enumValues(ObjectNode... types) { return (ObjectChildSchemaImpl

) super.enumValues(types); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

maxProperties(int val) { return (ObjectChildSchemaImpl

) super.maxProperties(val); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

maxProperties(long val) { return (ObjectChildSchemaImpl

) super.maxProperties(val); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

maxProperties(BigInteger val) { return (ObjectChildSchemaImpl

) super.maxProperties(val); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

removeMaxProperties() { return (ObjectChildSchemaImpl

) super.removeMaxProperties(); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

minProperties(int val) { return (ObjectChildSchemaImpl

) super.minProperties(val); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

minProperties(long val) { return (ObjectChildSchemaImpl

) super.minProperties(val); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

minProperties(BigInteger val) { return (ObjectChildSchemaImpl

) super.minProperties(val); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

removeMinProperties() { return (ObjectChildSchemaImpl

) super.removeMinProperties(); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

id(String id) { return (ObjectChildSchemaImpl

) super.id(id); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

removeId() { return (ObjectChildSchemaImpl

) super.removeId(); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

$schema(String path) { return (ObjectChildSchemaImpl

) super.$schema(path); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

remove$Schema() { return (ObjectChildSchemaImpl

) super.remove$Schema(); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

$ref(String path) { return (ObjectChildSchemaImpl

) super.$ref(path); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

remove$Ref() { return (ObjectChildSchemaImpl

) super.remove$Ref(); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

description(String desc) { return (ObjectChildSchemaImpl

) super.description(desc); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

removeDescription() { return (ObjectChildSchemaImpl

) super.removeDescription(); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

title(String title) { return (ObjectChildSchemaImpl

) super.title(title); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

removeTitle() { return (ObjectChildSchemaImpl

) super.removeTitle(); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

removeDefault() { return (ObjectChildSchemaImpl

) super.removeDefault(); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

removeEnum() { return (ObjectChildSchemaImpl

) super.removeEnum(); } @Override public UntypedChildSchema> definition(String k) { return new UntypedChildSchemaImpl<>(this, jax(), newObj(), v -> definition(k, v)); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

definition(String name, SchemaBuilder schema) { return (ObjectChildSchemaImpl

) super.definition(name, schema); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

removeDefinition(String name) { return (ObjectChildSchemaImpl

) super.removeDefinition(name); } @Override @SuppressWarnings("unchecked") public ObjectChildSchemaImpl

removeDefinitions() { return (ObjectChildSchemaImpl

) super.removeDefinitions(); } @Override public ArrayChildSchemaImpl

orAsArray() { return new ArrayChildSchemaImpl<>(parent, jax(), copy(), setter); } @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 StringChildSchemaImpl

orAsString() { return new StringChildSchemaImpl<>(parent, jax(), copy(), setter); } @Override @SuppressWarnings("unchecked") public ObjectChildSchema

defaultValue(JsonNode val) { return (ObjectChildSchema

) super.defaultValue(val); } @Override @SuppressWarnings("unchecked") public UntypedChildSchema> not() { return (UntypedChildSchema>) super.not(); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy