Record Class EstateFinding

java.lang.Object
java.lang.Record
com.eqixiac.equinix.design.estate.EstateFinding
Record Components:
id - a stable id, for example RIGHT_SIZE_DOWN:connection:3a58dd05-...
category - the category
severity - the severity
title - a one-line summary
resources - the affected resources, in a fixed order
evidence - the figures that triggered the finding, with their source and time window
action - the recommended action, stated concretely
impact - the financial impact of the action
confidence - how sure the analyser is
assumptions - the assumptions the finding rests on
rule - the name of the rule that produced it

public record EstateFinding(String id, FindingCategory category, Severity severity, String title, List<EstateFinding.ResourceRef> resources, List<EstateFinding.Evidence> evidence, String action, FinancialImpact impact, Confidence confidence, List<String> assumptions, String rule) extends Record
One evidence-backed improvement to an existing estate.

The id() is stable: the same rule on the same estate gives the same id, so findings can be tracked between runs (for example "acknowledged", "fixed"). It is built from the category, the rule's own discriminator and the affected resource ids.

  • Constructor Details

  • Method Details

    • stableId

      public static String stableId(FindingCategory category, String discriminator, List<String> resourceIds)
      Builds a stable id.
      Parameters:
      category - the category
      discriminator - what distinguishes findings of one rule on the same resources (for example missing-secondary); may be null
      resourceIds - the affected resource ids
      Returns:
      the id
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • category

      public FindingCategory category()
      Returns the value of the category record component.
      Returns:
      the value of the category record component
    • severity

      public Severity severity()
      Returns the value of the severity record component.
      Returns:
      the value of the severity record component
    • title

      public String title()
      Returns the value of the title record component.
      Returns:
      the value of the title record component
    • resources

      public List<EstateFinding.ResourceRef> resources()
      Returns the value of the resources record component.
      Returns:
      the value of the resources record component
    • evidence

      public List<EstateFinding.Evidence> evidence()
      Returns the value of the evidence record component.
      Returns:
      the value of the evidence record component
    • action

      public String action()
      Returns the value of the action record component.
      Returns:
      the value of the action record component
    • impact

      public FinancialImpact impact()
      Returns the value of the impact record component.
      Returns:
      the value of the impact record component
    • confidence

      public Confidence confidence()
      Returns the value of the confidence record component.
      Returns:
      the value of the confidence record component
    • assumptions

      public List<String> assumptions()
      Returns the value of the assumptions record component.
      Returns:
      the value of the assumptions record component
    • rule

      public String rule()
      Returns the value of the rule record component.
      Returns:
      the value of the rule record component