Record Class Constraints

java.lang.Object
java.lang.Record
com.arc_e_tect.gradle.apionly.transcriberj.model.Constraints
Record Components:
minLength - minLength
maxLength - maxLength
pattern - pattern
minimum - minimum
maximum - maximum
exclusiveMinimum - exclusiveMinimum: a number in OpenAPI 3.1, a boolean in 3.0
exclusiveMaximum - exclusiveMaximum: a number in OpenAPI 3.1, a boolean in 3.0
multipleOf - multipleOf
minItems - minItems
maxItems - maxItems
uniqueItems - uniqueItems
minProperties - minProperties
maxProperties - maxProperties

public record Constraints(Number minLength, Number maxLength, String pattern, Number minimum, Number maximum, Object exclusiveMinimum, Object exclusiveMaximum, Number multipleOf, Number minItems, Number maxItems, Boolean uniqueItems, Number minProperties, Number maxProperties) extends Record
A schema's validation keywords. Each is null when the schema does not declare it; numbers are as parsed.
  • Constructor Details

    • Constraints

      public Constraints(Number minLength, Number maxLength, String pattern, Number minimum, Number maximum, Object exclusiveMinimum, Object exclusiveMaximum, Number multipleOf, Number minItems, Number maxItems, Boolean uniqueItems, Number minProperties, Number maxProperties)
      Creates an instance of a Constraints record class.
      Parameters:
      minLength - the value for the minLength record component
      maxLength - the value for the maxLength record component
      pattern - the value for the pattern record component
      minimum - the value for the minimum record component
      maximum - the value for the maximum record component
      exclusiveMinimum - the value for the exclusiveMinimum record component
      exclusiveMaximum - the value for the exclusiveMaximum record component
      multipleOf - the value for the multipleOf record component
      minItems - the value for the minItems record component
      maxItems - the value for the maxItems record component
      uniqueItems - the value for the uniqueItems record component
      minProperties - the value for the minProperties record component
      maxProperties - the value for the maxProperties record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • minLength

      public Number minLength()
      Returns the value of the minLength record component.
      Returns:
      the value of the minLength record component
    • maxLength

      public Number maxLength()
      Returns the value of the maxLength record component.
      Returns:
      the value of the maxLength record component
    • pattern

      public String pattern()
      Returns the value of the pattern record component.
      Returns:
      the value of the pattern record component
    • minimum

      public Number minimum()
      Returns the value of the minimum record component.
      Returns:
      the value of the minimum record component
    • maximum

      public Number maximum()
      Returns the value of the maximum record component.
      Returns:
      the value of the maximum record component
    • exclusiveMinimum

      public Object exclusiveMinimum()
      Returns the value of the exclusiveMinimum record component.
      Returns:
      the value of the exclusiveMinimum record component
    • exclusiveMaximum

      public Object exclusiveMaximum()
      Returns the value of the exclusiveMaximum record component.
      Returns:
      the value of the exclusiveMaximum record component
    • multipleOf

      public Number multipleOf()
      Returns the value of the multipleOf record component.
      Returns:
      the value of the multipleOf record component
    • minItems

      public Number minItems()
      Returns the value of the minItems record component.
      Returns:
      the value of the minItems record component
    • maxItems

      public Number maxItems()
      Returns the value of the maxItems record component.
      Returns:
      the value of the maxItems record component
    • uniqueItems

      public Boolean uniqueItems()
      Returns the value of the uniqueItems record component.
      Returns:
      the value of the uniqueItems record component
    • minProperties

      public Number minProperties()
      Returns the value of the minProperties record component.
      Returns:
      the value of the minProperties record component
    • maxProperties

      public Number maxProperties()
      Returns the value of the maxProperties record component.
      Returns:
      the value of the maxProperties record component