Class X12ValidationRule
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<X12ValidationRule.Builder,
X12ValidationRule>
Represents a single validation rule that can be applied during X12 EDI processing. This is a union type that can contain one of several specific validation rule types: code list validation rules for modifying allowed element codes, element length validation rules for enforcing custom length constraints, or element requirement validation rules for changing mandatory/optional status. Each validation rule targets specific aspects of EDI document validation to ensure compliance with trading partner requirements and business rules.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
static enum
-
Method Summary
Modifier and TypeMethodDescriptionstatic X12ValidationRule.Builder
builder()
Specifies a code list validation rule that modifies the allowed code values for a specific X12 element.Specifies an element length validation rule that defines custom length constraints for a specific X12 element.Specifies an element requirement validation rule that modifies whether a specific X12 element is required or optional within a segment.final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.static X12ValidationRule
fromCodeListValidationRule
(Consumer<X12CodeListValidationRule.Builder> codeListValidationRule) Create an instance of this class withcodeListValidationRule()
initialized to the given value.static X12ValidationRule
fromCodeListValidationRule
(X12CodeListValidationRule codeListValidationRule) Create an instance of this class withcodeListValidationRule()
initialized to the given value.static X12ValidationRule
fromElementLengthValidationRule
(Consumer<X12ElementLengthValidationRule.Builder> elementLengthValidationRule) Create an instance of this class withelementLengthValidationRule()
initialized to the given value.static X12ValidationRule
fromElementLengthValidationRule
(X12ElementLengthValidationRule elementLengthValidationRule) Create an instance of this class withelementLengthValidationRule()
initialized to the given value.static X12ValidationRule
fromElementRequirementValidationRule
(Consumer<X12ElementRequirementValidationRule.Builder> elementRequirementValidationRule) Create an instance of this class withelementRequirementValidationRule()
initialized to the given value.static X12ValidationRule
fromElementRequirementValidationRule
(X12ElementRequirementValidationRule elementRequirementValidationRule) Create an instance of this class withelementRequirementValidationRule()
initialized to the given value.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) final int
hashCode()
static Class
<? extends X12ValidationRule.Builder> Take this object and create a builder that contains all of the current property values of this object.final String
toString()
Returns a string representation of this object.type()
Retrieve an enum value representing which member of this object is populated.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
codeListValidationRule
Specifies a code list validation rule that modifies the allowed code values for a specific X12 element. This rule enables you to customize which codes are considered valid for an element, allowing for trading partner-specific code requirements.
- Returns:
- Specifies a code list validation rule that modifies the allowed code values for a specific X12 element. This rule enables you to customize which codes are considered valid for an element, allowing for trading partner-specific code requirements.
-
elementLengthValidationRule
Specifies an element length validation rule that defines custom length constraints for a specific X12 element. This rule allows you to enforce minimum and maximum length requirements that may differ from the standard X12 specification.
- Returns:
- Specifies an element length validation rule that defines custom length constraints for a specific X12 element. This rule allows you to enforce minimum and maximum length requirements that may differ from the standard X12 specification.
-
elementRequirementValidationRule
Specifies an element requirement validation rule that modifies whether a specific X12 element is required or optional within a segment. This rule provides flexibility to accommodate different trading partner requirements for element presence.
- Returns:
- Specifies an element requirement validation rule that modifies whether a specific X12 element is required or optional within a segment. This rule provides flexibility to accommodate different trading partner requirements for element presence.
-
toBuilder
Description copied from interface:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<X12ValidationRule.Builder,
X12ValidationRule> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojo
Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in interfaceSdkPojo
- Parameters:
obj
- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
fromCodeListValidationRule
public static X12ValidationRule fromCodeListValidationRule(X12CodeListValidationRule codeListValidationRule) Create an instance of this class withcodeListValidationRule()
initialized to the given value.Specifies a code list validation rule that modifies the allowed code values for a specific X12 element. This rule enables you to customize which codes are considered valid for an element, allowing for trading partner-specific code requirements.
- Parameters:
codeListValidationRule
- Specifies a code list validation rule that modifies the allowed code values for a specific X12 element. This rule enables you to customize which codes are considered valid for an element, allowing for trading partner-specific code requirements.
-
fromCodeListValidationRule
public static X12ValidationRule fromCodeListValidationRule(Consumer<X12CodeListValidationRule.Builder> codeListValidationRule) Create an instance of this class withcodeListValidationRule()
initialized to the given value.Specifies a code list validation rule that modifies the allowed code values for a specific X12 element. This rule enables you to customize which codes are considered valid for an element, allowing for trading partner-specific code requirements.
- Parameters:
codeListValidationRule
- Specifies a code list validation rule that modifies the allowed code values for a specific X12 element. This rule enables you to customize which codes are considered valid for an element, allowing for trading partner-specific code requirements.
-
fromElementLengthValidationRule
public static X12ValidationRule fromElementLengthValidationRule(X12ElementLengthValidationRule elementLengthValidationRule) Create an instance of this class withelementLengthValidationRule()
initialized to the given value.Specifies an element length validation rule that defines custom length constraints for a specific X12 element. This rule allows you to enforce minimum and maximum length requirements that may differ from the standard X12 specification.
- Parameters:
elementLengthValidationRule
- Specifies an element length validation rule that defines custom length constraints for a specific X12 element. This rule allows you to enforce minimum and maximum length requirements that may differ from the standard X12 specification.
-
fromElementLengthValidationRule
public static X12ValidationRule fromElementLengthValidationRule(Consumer<X12ElementLengthValidationRule.Builder> elementLengthValidationRule) Create an instance of this class withelementLengthValidationRule()
initialized to the given value.Specifies an element length validation rule that defines custom length constraints for a specific X12 element. This rule allows you to enforce minimum and maximum length requirements that may differ from the standard X12 specification.
- Parameters:
elementLengthValidationRule
- Specifies an element length validation rule that defines custom length constraints for a specific X12 element. This rule allows you to enforce minimum and maximum length requirements that may differ from the standard X12 specification.
-
fromElementRequirementValidationRule
public static X12ValidationRule fromElementRequirementValidationRule(X12ElementRequirementValidationRule elementRequirementValidationRule) Create an instance of this class withelementRequirementValidationRule()
initialized to the given value.Specifies an element requirement validation rule that modifies whether a specific X12 element is required or optional within a segment. This rule provides flexibility to accommodate different trading partner requirements for element presence.
- Parameters:
elementRequirementValidationRule
- Specifies an element requirement validation rule that modifies whether a specific X12 element is required or optional within a segment. This rule provides flexibility to accommodate different trading partner requirements for element presence.
-
fromElementRequirementValidationRule
public static X12ValidationRule fromElementRequirementValidationRule(Consumer<X12ElementRequirementValidationRule.Builder> elementRequirementValidationRule) Create an instance of this class withelementRequirementValidationRule()
initialized to the given value.Specifies an element requirement validation rule that modifies whether a specific X12 element is required or optional within a segment. This rule provides flexibility to accommodate different trading partner requirements for element presence.
- Parameters:
elementRequirementValidationRule
- Specifies an element requirement validation rule that modifies whether a specific X12 element is required or optional within a segment. This rule provides flexibility to accommodate different trading partner requirements for element presence.
-
type
Retrieve an enum value representing which member of this object is populated. When this class is returned in a service response, this will beX12ValidationRule.Type.UNKNOWN_TO_SDK_VERSION
if the service returned a member that is only known to a newer SDK version. When this class is created directly in your code, this will beX12ValidationRule.Type.UNKNOWN_TO_SDK_VERSION
if zero members are set, andnull
if more than one member is set. -
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToField
in interfaceSdkPojo
- Returns:
- The mapping between the field name and its corresponding field.
-