Class OntologyInductionFailure

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

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

Details of why an ontology induction is FAILED. Use code to decide how to respond. message is a human-readable description that you shouldn't parse. Both members are always present together.

See Also:
  • Method Details

    • code

      public final String code()

      A code that identifies why the induction failed. Codes include the following:

      • INPUT_UNREADABLE - AWS Context couldn't read an uploaded document.

      • TOO_MANY_DOCUMENTS - The request has more documents than one induction accepts.

      • SEED_INVALID - The seed ontology's source document was deleted, is larger than 400,000 bytes, or doesn't parse.

      • FRAGMENT_EMPTY - The induction found nothing to induce in the documents, and there is no seed to start from.

      • FRAGMENT_FAILED - Inducing from a document failed after retries.

      • DOCUMENT_FILTERED - The model that drafts the ontology refused to process a document.

      • MERGE_FAILED - Merging the results from the documents failed after retries.

      • INDUCED_TOO_LARGE - The draft is larger than the maximum size of an ontology.

      • DRAFT_WRITE_FAILED - AWS Context couldn't save the draft.

      • TIMED_OUT - The induction didn't finish within its time limit.

      • RUN_STOPPED - The run stopped before it finished.

      If AWS Context rejects the induced draft, code is the code that CreateOntology reports for the same problem (see OntologyIssueCode), for example RDF_PARSE_ERROR or NO_CLASSES .

      For INPUT_UNREADABLE, TOO_MANY_DOCUMENTS, SEED_INVALID, FRAGMENT_EMPTY, DOCUMENT_FILTERED, and INDUCED_TOO_LARGE, fix the input, and then start a new induction. For the other codes, start a new induction with the same input. New codes can be added, so handle a code that you don't recognize. Use code, not message, to decide how to respond.

      Returns:
      A code that identifies why the induction failed. Codes include the following:

      • INPUT_UNREADABLE - AWS Context couldn't read an uploaded document.

      • TOO_MANY_DOCUMENTS - The request has more documents than one induction accepts.

      • SEED_INVALID - The seed ontology's source document was deleted, is larger than 400,000 bytes, or doesn't parse.

      • FRAGMENT_EMPTY - The induction found nothing to induce in the documents, and there is no seed to start from.

      • FRAGMENT_FAILED - Inducing from a document failed after retries.

      • DOCUMENT_FILTERED - The model that drafts the ontology refused to process a document.

      • MERGE_FAILED - Merging the results from the documents failed after retries.

      • INDUCED_TOO_LARGE - The draft is larger than the maximum size of an ontology.

      • DRAFT_WRITE_FAILED - AWS Context couldn't save the draft.

      • TIMED_OUT - The induction didn't finish within its time limit.

      • RUN_STOPPED - The run stopped before it finished.

      If AWS Context rejects the induced draft, code is the code that CreateOntology reports for the same problem (see OntologyIssueCode), for example RDF_PARSE_ERROR or NO_CLASSES.

      For INPUT_UNREADABLE, TOO_MANY_DOCUMENTS, SEED_INVALID, FRAGMENT_EMPTY, DOCUMENT_FILTERED, and INDUCED_TOO_LARGE, fix the input, and then start a new induction. For the other codes, start a new induction with the same input. New codes can be added, so handle a code that you don't recognize. Use code, not message, to decide how to respond.

    • message

      public final String message()

      A human-readable description of why the induction failed. Use code, not message, to decide how to respond.

      Returns:
      A human-readable description of why the induction failed. Use code, not message , to decide how to respond.
    • 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<OntologyInductionFailure.Builder,OntologyInductionFailure>
      Returns:
      a builder for type T
    • builder

      public static OntologyInductionFailure.Builder builder()
    • serializableBuilderClass

      public static Class<? extends OntologyInductionFailure.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.