Class SchemaArray.BuilderBase<BUILDER extends SchemaArray.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends SchemaArray>

java.lang.Object
io.helidon.json.schema.SchemaItem.BuilderBase<BUILDER,PROTOTYPE>
io.helidon.json.schema.SchemaArray.BuilderBase<BUILDER,PROTOTYPE>
Type Parameters:
BUILDER - type of the builder extending this abstract builder
PROTOTYPE - type of the prototype interface that would be built by Prototype.Builder.buildPrototype()
All Implemented Interfaces:
Prototype.Builder<BUILDER,PROTOTYPE>
Direct Known Subclasses:
SchemaArray.Builder
Enclosing interface:
SchemaArray

public abstract static class SchemaArray.BuilderBase<BUILDER extends SchemaArray.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends SchemaArray> extends SchemaItem.BuilderBase<BUILDER,PROTOTYPE> implements Prototype.Builder<BUILDER,PROTOTYPE>
Fluent API builder base for SchemaArray.
  • Constructor Details

    • BuilderBase

      protected BuilderBase()
      Protected to support extensibility.
  • Method Details

    • from

      public BUILDER from(SchemaArray prototype)
      Update this builder from an existing prototype instance. This method disables automatic service discovery.
      Parameters:
      prototype - existing prototype to update this builder from
      Returns:
      updated builder instance
    • from

      public BUILDER from(SchemaArray.BuilderBase<?,?> builder)
      Update this builder from an existing prototype builder instance.
      Parameters:
      builder - existing builder prototype to update this builder from
      Returns:
      updated builder instance
    • clearMaxItems

      public BUILDER clearMaxItems()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • maxItems

      public BUILDER maxItems(int maxItems)
      Max number of items an array can have.
      Parameters:
      maxItems - max array size
      Returns:
      updated builder instance
      See Also:
    • clearMinItems

      public BUILDER clearMinItems()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • minItems

      public BUILDER minItems(int minItems)
      Min number of items an array can have.
      Parameters:
      minItems - min array size
      Returns:
      updated builder instance
      See Also:
    • clearUniqueItems

      public BUILDER clearUniqueItems()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • uniqueItems

      public BUILDER uniqueItems(boolean uniqueItems)
      Whether the array can contain duplicate values.
      Parameters:
      uniqueItems - duplicate values allowed
      Returns:
      updated builder instance
      See Also:
    • clearItemsObject

      public BUILDER clearItemsObject()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • itemsObject

      public BUILDER itemsObject(SchemaObject itemsObject)
      Array items should be validated as an objects.
      Parameters:
      itemsObject - json object schema
      Returns:
      updated builder instance
      See Also:
    • itemsObject

      public BUILDER itemsObject(Consumer<SchemaObject.Builder> consumer)
      Array items should be validated as an objects.
      Parameters:
      consumer - json object schema
      Returns:
      updated builder instance
      See Also:
    • clearItemsArray

      public BUILDER clearItemsArray()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • itemsArray

      public BUILDER itemsArray(SchemaArray itemsArray)
      Array items should be validated as an arrays.
      Parameters:
      itemsArray - json array schema
      Returns:
      updated builder instance
      See Also:
    • itemsArray

      public BUILDER itemsArray(Consumer<SchemaArray.Builder> consumer)
      Array items should be validated as an arrays.
      Parameters:
      consumer - json array schema
      Returns:
      updated builder instance
      See Also:
    • clearItemsNumber

      public BUILDER clearItemsNumber()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • itemsNumber

      public BUILDER itemsNumber(SchemaNumber itemsNumber)
      Array items should be validated as a number.
      Parameters:
      itemsNumber - json number schema
      Returns:
      updated builder instance
      See Also:
    • itemsNumber

      public BUILDER itemsNumber(Consumer<SchemaNumber.Builder> consumer)
      Array items should be validated as a number.
      Parameters:
      consumer - json number schema
      Returns:
      updated builder instance
      See Also:
    • clearItemsInteger

      public BUILDER clearItemsInteger()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • itemsInteger

      public BUILDER itemsInteger(SchemaInteger itemsInteger)
      Array items should be validated as an integer.
      Parameters:
      itemsInteger - json integer schema
      Returns:
      updated builder instance
      See Also:
    • itemsInteger

      public BUILDER itemsInteger(Consumer<SchemaInteger.Builder> consumer)
      Array items should be validated as an integer.
      Parameters:
      consumer - json integer schema
      Returns:
      updated builder instance
      See Also:
    • clearItemsString

      public BUILDER clearItemsString()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • itemsString

      public BUILDER itemsString(SchemaString itemsString)
      Array items should be validated as a string.
      Parameters:
      itemsString - json string schema
      Returns:
      updated builder instance
      See Also:
    • itemsString

      public BUILDER itemsString(Consumer<SchemaString.Builder> consumer)
      Array items should be validated as a string.
      Parameters:
      consumer - json string schema
      Returns:
      updated builder instance
      See Also:
    • clearItemsBoolean

      public BUILDER clearItemsBoolean()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • itemsBoolean

      public BUILDER itemsBoolean(SchemaBoolean itemsBoolean)
      Array items should be validated as a boolean.
      Parameters:
      itemsBoolean - json boolean schema
      Returns:
      updated builder instance
      See Also:
    • itemsBoolean

      public BUILDER itemsBoolean(Consumer<SchemaBoolean.Builder> consumer)
      Array items should be validated as a boolean.
      Parameters:
      consumer - json boolean schema
      Returns:
      updated builder instance
      See Also:
    • clearItemsNull

      public BUILDER clearItemsNull()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • itemsNull

      public BUILDER itemsNull(SchemaNull itemsNull)
      Array items should be validated as an null.
      Parameters:
      itemsNull - json array schema
      Returns:
      updated builder instance
      See Also:
    • itemsNull

      public BUILDER itemsNull(Consumer<SchemaNull.Builder> consumer)
      Array items should be validated as an null.
      Parameters:
      consumer - json array schema
      Returns:
      updated builder instance
      See Also:
    • maxItems

      public Optional<Integer> maxItems()
      Max number of items an array can have.
      Returns:
      the max items
    • minItems

      public Optional<Integer> minItems()
      Min number of items an array can have.
      Returns:
      the min items
    • uniqueItems

      public Optional<Boolean> uniqueItems()
      Whether the array can contain duplicate values.
      Returns:
      the unique items
    • itemsObject

      public Optional<SchemaObject> itemsObject()
      Array items should be validated as an objects.
      Returns:
      the items object
    • itemsArray

      public Optional<SchemaArray> itemsArray()
      Array items should be validated as an arrays.
      Returns:
      the items array
    • itemsNumber

      public Optional<SchemaNumber> itemsNumber()
      Array items should be validated as a number.
      Returns:
      the items number
    • itemsInteger

      public Optional<SchemaInteger> itemsInteger()
      Array items should be validated as an integer.
      Returns:
      the items integer
    • itemsString

      public Optional<SchemaString> itemsString()
      Array items should be validated as a string.
      Returns:
      the items string
    • itemsBoolean

      public Optional<SchemaBoolean> itemsBoolean()
      Array items should be validated as a boolean.
      Returns:
      the items boolean
    • itemsNull

      public Optional<SchemaNull> itemsNull()
      Array items should be validated as an null.
      Returns:
      the items null
    • toString

      public String toString()
      Overrides:
      toString in class SchemaItem.BuilderBase<BUILDER extends SchemaArray.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends SchemaArray>
    • preBuildPrototype

      protected void preBuildPrototype()
      Handles providers and decorators.
      Overrides:
      preBuildPrototype in class SchemaItem.BuilderBase<BUILDER extends SchemaArray.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends SchemaArray>
    • validatePrototype

      protected void validatePrototype()
      Validates required properties.
      Overrides:
      validatePrototype in class SchemaItem.BuilderBase<BUILDER extends SchemaArray.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends SchemaArray>