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 interfacestatic enum -
Method Summary
Modifier and TypeMethodDescriptionstatic X12ValidationRule.Builderbuilder()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 booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.static X12ValidationRulefromCodeListValidationRule(Consumer<X12CodeListValidationRule.Builder> codeListValidationRule) Create an instance of this class withcodeListValidationRule()initialized to the given value.static X12ValidationRulefromCodeListValidationRule(X12CodeListValidationRule codeListValidationRule) Create an instance of this class withcodeListValidationRule()initialized to the given value.static X12ValidationRulefromElementLengthValidationRule(Consumer<X12ElementLengthValidationRule.Builder> elementLengthValidationRule) Create an instance of this class withelementLengthValidationRule()initialized to the given value.static X12ValidationRulefromElementLengthValidationRule(X12ElementLengthValidationRule elementLengthValidationRule) Create an instance of this class withelementLengthValidationRule()initialized to the given value.static X12ValidationRulefromElementRequirementValidationRule(Consumer<X12ElementRequirementValidationRule.Builder> elementRequirementValidationRule) Create an instance of this class withelementRequirementValidationRule()initialized to the given value.static X12ValidationRulefromElementRequirementValidationRule(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 inthashCode()static Class<? extends X12ValidationRule.Builder> Take this object and create a builder that contains all of the current property values of this object.final StringtoString()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:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<X12ValidationRule.Builder,X12ValidationRule> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin 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_VERSIONif 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_VERSIONif zero members are set, andnullif more than one member is set. -
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo- Returns:
- The mapping between the field name and its corresponding field.
-