@NotThreadSafe public static final class ImmutableFieldConstraints.Builder extends Object
ImmutableFieldConstraints.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
public final ImmutableFieldConstraints.Builder from(FieldConstraints instance)
FieldConstraints instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.
Collection elements and entries will be added, not replaced.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ImmutableFieldConstraints.Builder allowedLengthRange(@Nullable RangeConstraint allowedLengthRange)
allowedLengthRange attribute.allowedLengthRange - The value for allowedLengthRange (can be null)this builder for use in a chained invocationpublic final ImmutableFieldConstraints.Builder allowedValueRange(@Nullable RangeConstraint allowedValueRange)
allowedValueRange attribute.allowedValueRange - The value for allowedValueRange (can be null)this builder for use in a chained invocationpublic final ImmutableFieldConstraints.Builder addAllowedValues(String element)
allowedValues list.element - A allowedValues elementthis builder for use in a chained invocationpublic final ImmutableFieldConstraints.Builder addAllowedValues(String... elements)
allowedValues list.elements - An array of allowedValues elementsthis builder for use in a chained invocationpublic final ImmutableFieldConstraints.Builder allowedValues(@Nullable Iterable<String> elements)
allowedValues list.elements - An iterable of allowedValues elementsthis builder for use in a chained invocationpublic final ImmutableFieldConstraints.Builder addAllAllowedValues(Iterable<String> elements)
allowedValues list.elements - An iterable of allowedValues elementsthis builder for use in a chained invocationpublic final ImmutableFieldConstraints.Builder allowedValuesRegexPattern(@Nullable String allowedValuesRegexPattern)
allowedValuesRegexPattern attribute.allowedValuesRegexPattern - The value for allowedValuesRegexPattern (can be null)this builder for use in a chained invocationpublic final ImmutableFieldConstraints.Builder allowedDateFormat(@Nullable String allowedDateFormat)
allowedDateFormat attribute.allowedDateFormat - The value for allowedDateFormat (can be null)this builder for use in a chained invocationpublic ImmutableFieldConstraints build()
ImmutableFieldConstraints.IllegalStateException - if any required attributes are missingCopyright © 2021–2022 Amazon Web Services. All rights reserved.