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

java.lang.Object
io.helidon.json.schema.SchemaItem.BuilderBase<BUILDER, PROTOTYPE>
io.helidon.json.schema.SchemaString.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:
SchemaString.Builder
Enclosing interface:
SchemaString

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

    • BuilderBase

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

    • from

      public BUILDER from(SchemaString 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(SchemaString.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
    • addEnumValue

      public BUILDER addEnumValue(String value)
      Add a string enum value.
      Parameters:
      value - string value to add
      Returns:
      updated builder instance
      Since:
      27.0.2
    • clearMaxLength

      public BUILDER clearMaxLength()
      Clear existing value of maxLength.
      Returns:
      updated builder instance
      See Also:
    • maxLength

      public BUILDER maxLength(long maxLength)
      Maximum length of the string.
      Parameters:
      maxLength - maximum string length
      Returns:
      updated builder instance
      See Also:
    • clearMinLength

      public BUILDER clearMinLength()
      Clear existing value of minLength.
      Returns:
      updated builder instance
      See Also:
    • minLength

      public BUILDER minLength(long minLength)
      Minimum length of the string.
      Parameters:
      minLength - minimum string length
      Returns:
      updated builder instance
      See Also:
    • clearPattern

      public BUILDER clearPattern()
      Clear existing value of pattern.
      Returns:
      updated builder instance
      See Also:
    • pattern

      public BUILDER pattern(String pattern)
      String pattern to follow.
      Parameters:
      pattern - string pattern
      Returns:
      updated builder instance
      See Also:
    • clearFormat

      public BUILDER clearFormat()
      Clear existing value of format.
      Returns:
      updated builder instance
      Since:
      27.0.2
      See Also:
    • format

      public BUILDER format(String format)
      String format, such as date, time, or date-time.
      Parameters:
      format - string format
      Returns:
      updated builder instance
      Since:
      27.0.2
      See Also:
    • clearEnumValues

      public BUILDER clearEnumValues()
      Clear existing value of enumValues.
      Returns:
      updated builder instance
      Since:
      27.0.2
      See Also:
    • enumValues

      public BUILDER enumValues(List<? extends JsonValue> enumValues)
      Values of the enum keyword, in declaration order. Entries of any JSON type are preserved, including JsonNull. The string type restriction applies independently of these values. When absent, no enum keyword restricts the string values. A present empty list generates an empty enum, which allows no values.
      Parameters:
      enumValues - enum values
      Returns:
      updated builder instance
      Since:
      27.0.2
      See Also:
    • addEnumValues

      public BUILDER addEnumValues(List<? extends JsonValue> enumValues)
      Values of the enum keyword, in declaration order. Entries of any JSON type are preserved, including JsonNull. The string type restriction applies independently of these values. When absent, no enum keyword restricts the string values. A present empty list generates an empty enum, which allows no values.
      Parameters:
      enumValues - add values to enum values
      Returns:
      updated builder instance
      Since:
      27.0.2
      See Also:
    • addEnumValue

      public BUILDER addEnumValue(JsonValue enumValue)
      Values of the enum keyword, in declaration order. Entries of any JSON type are preserved, including JsonNull. The string type restriction applies independently of these values. When absent, no enum keyword restricts the string values. A present empty list generates an empty enum, which allows no values.
      Parameters:
      enumValue - add single enum values
      Returns:
      updated builder instance
      Since:
      27.0.2
      See Also:
    • maxLength

      public Optional<Long> maxLength()
      Maximum length of the string.
      Returns:
      maximum string length
    • minLength

      public Optional<Long> minLength()
      Minimum length of the string.
      Returns:
      minimum string length
    • pattern

      public Optional<String> pattern()
      String pattern to follow.
      Returns:
      string pattern
    • format

      public Optional<String> format()
      String format, such as date, time, or date-time.
      Returns:
      string format
      Since:
      27.0.2
    • enumValues

      public Optional<List<JsonValue>> enumValues()
      Values of the enum keyword, in declaration order. Entries of any JSON type are preserved, including JsonNull. The string type restriction applies independently of these values. When absent, no enum keyword restricts the string values. A present empty list generates an empty enum, which allows no values.
      Returns:
      enum values
      Since:
      27.0.2
    • toString

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

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

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