Class SubmissionRequirement

java.lang.Object
software.amazon.awssdk.services.abusesignal.model.SubmissionRequirement
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<SubmissionRequirement.Builder,SubmissionRequirement>

@Generated("software.amazon.awssdk:codegen") public final class SubmissionRequirement extends Object implements SdkPojo, Serializable, ToCopyableBuilder<SubmissionRequirement.Builder,SubmissionRequirement>

Describes one specific submission requirement that a well-formed report did not meet. The service returns this structure in the unmetRequirements list of a SubmissionRequirementException (HTTP 422).

See Also:
  • Method Details

    • code

      public final String code()

      A stable, dot-namespaced identifier for the submission requirement that the report did not meet (for example, rule.timestamp.too_old). The set of codes is append-only, so treat an unrecognized value as opaque. This value is absent when the requirement that the report did not meet does not publish an identifier.

      The service checks the following submission requirements:

      • rule.source_identifier.too_long (source_identifier) – The value exceeds the maximum accepted length of 253 characters (the DNS hostname limit).

      • rule.source_identifier.forbidden_characters (source_identifier) – The value contains characters that are never valid in an address ({, }, *, or ` ). These are common template-injection and command-injection markers.

      • rule.source_identifier.malformed (source_identifier) – The value is not a valid IPv4 address, IPv6 address, URL, or domain name.

      • rule.timestamp.unparseable (timestamp) – The value could not be parsed as an RFC 3339 date-time.

      • rule.timestamp.in_future (timestamp) – The value is dated further into the future than the accepted clock-skew tolerance (a default of 1 hour).

      • rule.timestamp.too_old (timestamp) – The value predates the submission lookback window (a default of 90 days). For content that is still accessible, set timestamp to the time you most recently observed it.

      • rule.evidence.content_type_mismatch (evidence) – The decoded payload of an evidence item does not match its declared content_type. The path identifies the item, for example /evidence/0.

      Submission requirement thresholds are configuration-driven and can change over time. The set of codes is append-only, so treat an unrecognized code as opaque.

      Returns:
      A stable, dot-namespaced identifier for the submission requirement that the report did not meet (for example, rule.timestamp.too_old). The set of codes is append-only, so treat an unrecognized value as opaque. This value is absent when the requirement that the report did not meet does not publish an identifier.

      The service checks the following submission requirements:

      • rule.source_identifier.too_long (source_identifier) – The value exceeds the maximum accepted length of 253 characters (the DNS hostname limit).

      • rule.source_identifier.forbidden_characters (source_identifier) – The value contains characters that are never valid in an address ({, }, *, or `). These are common template-injection and command-injection markers.

      • rule.source_identifier.malformed (source_identifier) – The value is not a valid IPv4 address, IPv6 address, URL, or domain name.

      • rule.timestamp.unparseable (timestamp) – The value could not be parsed as an RFC 3339 date-time.

      • rule.timestamp.in_future (timestamp) – The value is dated further into the future than the accepted clock-skew tolerance (a default of 1 hour).

      • rule.timestamp.too_old (timestamp) – The value predates the submission lookback window (a default of 90 days). For content that is still accessible, set timestamp to the time you most recently observed it.

      • rule.evidence.content_type_mismatch (evidence) – The decoded payload of an evidence item does not match its declared content_type. The path identifies the item, for example /evidence/0.

      Submission requirement thresholds are configuration-driven and can change over time. The set of codes is append-only, so treat an unrecognized code as opaque.

    • path

      public final String path()

      A JSON Pointer expression to the report member that did not meet the requirement. An empty string refers to the report as a whole.

      Returns:
      A JSON Pointer expression to the report member that did not meet the requirement. An empty string refers to the report as a whole.
    • message

      public final String message()

      A detailed, human-readable description of the unmet submission requirement.

      Returns:
      A detailed, human-readable description of the unmet submission requirement.
    • toBuilder

      public SubmissionRequirement.Builder 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 interface ToCopyableBuilder<SubmissionRequirement.Builder,SubmissionRequirement>
      Returns:
      a builder for type T
    • builder

      public static SubmissionRequirement.Builder builder()
    • serializableBuilderClass

      public static Class<? extends SubmissionRequirement.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      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 an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo
      Returns:
      The mapping between the field name and its corresponding field.