Class GetOntologyResponse

All Implemented Interfaces:
SdkPojo, ToCopyableBuilder<GetOntologyResponse.Builder,GetOntologyResponse>

@Generated("software.amazon.awssdk:codegen") public final class GetOntologyResponse extends ContextResponse implements ToCopyableBuilder<GetOntologyResponse.Builder,GetOntologyResponse>

The resolved ontology version's metadata and template, and the ontology's status. With sourceFormat, the response carries no template, and source carries the version's source document, or the draft on a DRAFT, with or without version. A DRAFT also returns revisionId, and the draft's warnings in validationIssues.

  • Method Details

    • arn

      public final String arn()

      The ARN of the ontology. It has no account for an AWS managed ontology, and includes the account for a customer-owned one. Use it to address the same ontology again.

      Returns:
      The ARN of the ontology. It has no account for an AWS managed ontology, and includes the account for a customer-owned one. Use it to address the same ontology again.
    • version

      public final String version()

      The version of the ontology, in MAJOR.MINOR.PATCH form, for example 1.0.0.

      Returns:
      The version of the ontology, in MAJOR.MINOR.PATCH form, for example 1.0.0.
    • template

      public final String template()

      The serialized template JSON for this version (see OntologyTemplate).

      Returns:
      The serialized template JSON for this version (see OntologyTemplate).
    • createdAt

      public final Instant createdAt()

      When this version was created. Absent when the stored version carries no creation time.

      Returns:
      When this version was created. Absent when the stored version carries no creation time.
    • publishedAt

      public final Instant publishedAt()

      Publish time of the DEFAULT version. Absent for non-default versions, and while the ontology is DRAFT: a DRAFT ontology stays a draft until you publish it in the AWS Context console.

      Returns:
      Publish time of the DEFAULT version. Absent for non-default versions, and while the ontology is DRAFT: a DRAFT ontology stays a draft until you publish it in the AWS Context console.
    • name

      public final String name()

      The ontology's current display name. The same for every version. Absent for an AWS managed ontology, which has no name, and for a customer-owned ontology that was created without a name and hasn't been named since.

      Returns:
      The ontology's current display name. The same for every version. Absent for an AWS managed ontology, which has no name, and for a customer-owned ontology that was created without a name and hasn't been named since.
    • description

      public final String description()

      The ontology's description. The same for every version. Absent when the ontology has none.

      Returns:
      The ontology's description. The same for every version. Absent when the ontology has none.
    • derivationVersion

      public final String derivationVersion()

      Identifies the derivation rules that produced this template. Node ID formulas don't change after a version is published.

      Returns:
      Identifies the derivation rules that produced this template. Node ID formulas don't change after a version is published.
    • id

      public final String id()

      The ID of the ontology, assigned by AWS Context.

      Returns:
      The ID of the ontology, assigned by AWS Context.
    • status

      public final OntologyStatus status()

      The ontology's status. PUBLISHED for every ontology CreateOntology made. Check it before using the template: a DRAFT ontology stays a draft until you publish it in the AWS Context console, and until then its template is the empty template of version 1.0.0 and GetOntology returns the draft.

      If the service returns an enum value that is not available in the current SDK version, status will return OntologyStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from statusAsString().

      Returns:
      The ontology's status. PUBLISHED for every ontology CreateOntology made. Check it before using the template: a DRAFT ontology stays a draft until you publish it in the AWS Context console, and until then its template is the empty template of version 1.0.0 and GetOntology returns the draft.
      See Also:
    • statusAsString

      public final String statusAsString()

      The ontology's status. PUBLISHED for every ontology CreateOntology made. Check it before using the template: a DRAFT ontology stays a draft until you publish it in the AWS Context console, and until then its template is the empty template of version 1.0.0 and GetOntology returns the draft.

      If the service returns an enum value that is not available in the current SDK version, status will return OntologyStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from statusAsString().

      Returns:
      The ontology's status. PUBLISHED for every ontology CreateOntology made. Check it before using the template: a DRAFT ontology stays a draft until you publish it in the AWS Context console, and until then its template is the empty template of version 1.0.0 and GetOntology returns the draft.
      See Also:
    • updatedAt

      public final Instant updatedAt()

      When the ontology itself last changed. Equal to the ontology's creation time until the first update. The top-level createdAt (from the version fields) is the returned version's creation time, not the ontology's.

      Returns:
      When the ontology itself last changed. Equal to the ontology's creation time until the first update. The top-level createdAt (from the version fields) is the returned version's creation time, not the ontology's.
    • ontologyInductionId

      public final String ontologyInductionId()

      The induction that made the ontology. Absent for an ontology CreateOntology made.

      Returns:
      The induction that made the ontology. Absent for an ontology CreateOntology made.
    • source

      public final String source()

      The source document of the returned version, or the draft of a DRAFT ontology, with or without version. Set only when the request set sourceFormat. Absent otherwise.

      Returns:
      The source document of the returned version, or the draft of a DRAFT ontology, with or without version. Set only when the request set sourceFormat. Absent otherwise.
    • sourceFormat

      public final OntologySourceFormat sourceFormat()

      The format of the version's source document. On a DRAFT, TURTLE, the format of the draft. Set whether or not the request asked for source, and a source in the response is in this format. On an AWS managed ontology, it names the format that its template was derived from, but its source is never returned (see sourceFormat on the request).

      If the service returns an enum value that is not available in the current SDK version, sourceFormat will return OntologySourceFormat.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from sourceFormatAsString().

      Returns:
      The format of the version's source document. On a DRAFT, TURTLE, the format of the draft. Set whether or not the request asked for source, and a source in the response is in this format. On an AWS managed ontology, it names the format that its template was derived from, but its source is never returned (see sourceFormat on the request).
      See Also:
    • sourceFormatAsString

      public final String sourceFormatAsString()

      The format of the version's source document. On a DRAFT, TURTLE, the format of the draft. Set whether or not the request asked for source, and a source in the response is in this format. On an AWS managed ontology, it names the format that its template was derived from, but its source is never returned (see sourceFormat on the request).

      If the service returns an enum value that is not available in the current SDK version, sourceFormat will return OntologySourceFormat.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from sourceFormatAsString().

      Returns:
      The format of the version's source document. On a DRAFT, TURTLE, the format of the draft. Set whether or not the request asked for source, and a source in the response is in this format. On an AWS managed ontology, it names the format that its template was derived from, but its source is never returned (see sourceFormat on the request).
      See Also:
    • revisionId

      public final String revisionId()

      The revision of the draft. Set only for a DRAFT ontology.

      Returns:
      The revision of the draft. Set only for a DRAFT ontology.
    • hasValidationIssues

      public final boolean hasValidationIssues()
      For responses, this returns true if the service returned a value for the ValidationIssues property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • validationIssues

      public final List<OntologyValidationIssue> validationIssues()

      Non-fatal warnings raised while deriving the returned version. On a DRAFT, the warnings from deriving the draft.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasValidationIssues() method.

      Returns:
      Non-fatal warnings raised while deriving the returned version. On a DRAFT, the warnings from deriving the draft.
    • toBuilder

      public GetOntologyResponse.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<GetOntologyResponse.Builder,GetOntologyResponse>
      Specified by:
      toBuilder in class AwsResponse
      Returns:
      a builder for type T
    • builder

      public static GetOntologyResponse.Builder builder()
    • serializableBuilderClass

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

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

      public final boolean equals(Object obj)
      Overrides:
      equals in class AwsResponse
    • 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)
      Description copied from class: SdkResponse
      Used to retrieve the value of a field from any class that extends SdkResponse. The field name specified should match the member name from the corresponding service-2.json model specified in the codegen-resources folder for a given service. The class specifies what class to cast the returned value to. If the returned value is also a modeled class, the SdkResponse.getValueForField(String, Class) method will again be available.
      Overrides:
      getValueForField in class SdkResponse
      Parameters:
      fieldName - The name of the member to be retrieved.
      clazz - The class to cast the returned object to.
      Returns:
      Optional containing the casted return value
    • 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.