@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableFieldConstraints extends Object implements FieldConstraints
FieldConstraints.
Use the builder to create immutable instances:
ImmutableFieldConstraints.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableFieldConstraints.Builder
Builds instances of type
ImmutableFieldConstraints. |
| Modifier and Type | Method and Description |
|---|---|
String |
allowedDateFormat()
Allowed data format for the field.
|
RangeConstraint |
allowedLengthRange()
Min and Max range of the length of the value.
|
RangeConstraint |
allowedValueRange()
Min and Max range of value of this field.
|
com.google.common.collect.ImmutableList<String> |
allowedValues()
List of allowed values for this field.
|
String |
allowedValuesRegexPattern()
Value of the field should match with this regex pattern.
|
static ImmutableFieldConstraints.Builder |
builder()
Creates a builder for
ImmutableFieldConstraints. |
static ImmutableFieldConstraints |
copyOf(FieldConstraints instance)
Creates an immutable copy of a
FieldConstraints value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableFieldConstraints that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
allowedLengthRange, allowedValueRange, allowedValues, allowedValuesRegexPattern, allowedDateFormat. |
String |
toString()
Prints the immutable value
FieldConstraints with attribute values. |
ImmutableFieldConstraints |
withAllowedDateFormat(String value)
Copy the current immutable object by setting a value for the
allowedDateFormat attribute. |
ImmutableFieldConstraints |
withAllowedLengthRange(RangeConstraint value)
Copy the current immutable object by setting a value for the
allowedLengthRange attribute. |
ImmutableFieldConstraints |
withAllowedValueRange(RangeConstraint value)
Copy the current immutable object by setting a value for the
allowedValueRange attribute. |
ImmutableFieldConstraints |
withAllowedValues(Iterable<String> elements)
Copy the current immutable object with elements that replace the content of
allowedValues. |
ImmutableFieldConstraints |
withAllowedValues(String... elements)
Copy the current immutable object with elements that replace the content of
allowedValues. |
ImmutableFieldConstraints |
withAllowedValuesRegexPattern(String value)
Copy the current immutable object by setting a value for the
allowedValuesRegexPattern attribute. |
@Nullable public RangeConstraint allowedLengthRange()
allowedLengthRange in interface FieldConstraints@Nullable public RangeConstraint allowedValueRange()
allowedValueRange in interface FieldConstraints@Nullable public com.google.common.collect.ImmutableList<String> allowedValues()
allowedValues in interface FieldConstraints@Nullable public String allowedValuesRegexPattern()
allowedValuesRegexPattern in interface FieldConstraints@Nullable public String allowedDateFormat()
allowedDateFormat in interface FieldConstraintspublic final ImmutableFieldConstraints withAllowedLengthRange(@Nullable RangeConstraint value)
allowedLengthRange attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for allowedLengthRange (can be null)this objectpublic final ImmutableFieldConstraints withAllowedValueRange(@Nullable RangeConstraint value)
allowedValueRange attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for allowedValueRange (can be null)this objectpublic final ImmutableFieldConstraints withAllowedValues(@Nullable String... elements)
allowedValues.elements - The elements to setthis objectpublic final ImmutableFieldConstraints withAllowedValues(@Nullable Iterable<String> elements)
allowedValues.
A shallow reference equality check is used to prevent copying of the same value by returning this.elements - An iterable of allowedValues elements to setthis objectpublic final ImmutableFieldConstraints withAllowedValuesRegexPattern(@Nullable String value)
allowedValuesRegexPattern attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for allowedValuesRegexPattern (can be null)this objectpublic final ImmutableFieldConstraints withAllowedDateFormat(@Nullable String value)
allowedDateFormat attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for allowedDateFormat (can be null)this objectpublic boolean equals(@Nullable Object another)
ImmutableFieldConstraints that have equal attribute values.public int hashCode()
allowedLengthRange, allowedValueRange, allowedValues, allowedValuesRegexPattern, allowedDateFormat.public String toString()
FieldConstraints with attribute values.public static ImmutableFieldConstraints copyOf(FieldConstraints instance)
FieldConstraints value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static ImmutableFieldConstraints.Builder builder()
ImmutableFieldConstraints.
ImmutableFieldConstraints.builder()
.allowedLengthRange(com.amazonaws.appflow.custom.connector.model.metadata.RangeConstraint | null) // nullable allowedLengthRange
.allowedValueRange(com.amazonaws.appflow.custom.connector.model.metadata.RangeConstraint | null) // nullable allowedValueRange
.allowedValues(List<String> | null) // nullable allowedValues
.allowedValuesRegexPattern(String | null) // nullable allowedValuesRegexPattern
.allowedDateFormat(String | null) // nullable allowedDateFormat
.build();
Copyright © 2021–2022 Amazon Web Services. All rights reserved.