Class Finding

    • Method Detail

      • arn

        public final String arn()

        The ARN that specifies the finding.

        Returns:
        The ARN that specifies the finding.
      • schemaVersion

        public final Integer schemaVersion()

        The schema version of this data type.

        Returns:
        The schema version of this data type.
      • service

        public final String service()

        The data element is set to "Inspector".

        Returns:
        The data element is set to "Inspector".
      • assetType

        public final AssetType assetType()

        The type of the host from which the finding is generated.

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

        Returns:
        The type of the host from which the finding is generated.
        See Also:
        AssetType
      • assetTypeAsString

        public final String assetTypeAsString()

        The type of the host from which the finding is generated.

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

        Returns:
        The type of the host from which the finding is generated.
        See Also:
        AssetType
      • assetAttributes

        public final AssetAttributes assetAttributes()

        A collection of attributes of the host from which the finding is generated.

        Returns:
        A collection of attributes of the host from which the finding is generated.
      • id

        public final String id()

        The ID of the finding.

        Returns:
        The ID of the finding.
      • title

        public final String title()

        The name of the finding.

        Returns:
        The name of the finding.
      • description

        public final String description()

        The description of the finding.

        Returns:
        The description of the finding.
      • recommendation

        public final String recommendation()

        The recommendation for the finding.

        Returns:
        The recommendation for the finding.
      • severity

        public final Severity severity()

        The finding severity. Values can be set to High, Medium, Low, and Informational.

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

        Returns:
        The finding severity. Values can be set to High, Medium, Low, and Informational.
        See Also:
        Severity
      • severityAsString

        public final String severityAsString()

        The finding severity. Values can be set to High, Medium, Low, and Informational.

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

        Returns:
        The finding severity. Values can be set to High, Medium, Low, and Informational.
        See Also:
        Severity
      • numericSeverity

        public final Double numericSeverity()

        The numeric value of the finding severity.

        Returns:
        The numeric value of the finding severity.
      • confidence

        public final Integer confidence()

        This data element is currently not used.

        Returns:
        This data element is currently not used.
      • indicatorOfCompromise

        public final Boolean indicatorOfCompromise()

        This data element is currently not used.

        Returns:
        This data element is currently not used.
      • hasAttributes

        public final boolean hasAttributes()
        For responses, this returns true if the service returned a value for the Attributes 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.
      • attributes

        public final List<Attribute> attributes()

        The system-defined attributes for the finding.

        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 hasAttributes() method.

        Returns:
        The system-defined attributes for the finding.
      • hasUserAttributes

        public final boolean hasUserAttributes()
        For responses, this returns true if the service returned a value for the UserAttributes 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.
      • userAttributes

        public final List<Attribute> userAttributes()

        The user-defined attributes that are assigned to the finding.

        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 hasUserAttributes() method.

        Returns:
        The user-defined attributes that are assigned to the finding.
      • createdAt

        public final Instant createdAt()

        The time when the finding was generated.

        Returns:
        The time when the finding was generated.
      • serializableBuilderClass

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

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

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • 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)