Record Class EstateReport
java.lang.Object
java.lang.Record
com.eqixiac.equinix.design.estate.EstateReport
- Record Components:
scope- the scope analysedinventoryAsOf- when the inventory was takeninventorySource- where the inventory came fromgeneratedAt- when the report was generatedcounts- resource type to countutilization- what utilisation data was availablefindings- every finding, in priority ordercategoryTotals- per category: count, priced monthly saving per currency, unpriced countaddressableMonthlySaving- currency to the total addressable monthly savingunpriced- the findings whose financial effect could not be priced, with reasonsactions- the prioritised action list (one per finding)coverageGaps- what could not be readnotAnalysed- what was not analysed and whywarnings- loud warnings (truncation, rule failures)rulesRun- the rules that rancollection- how the inventory was collectedreportingCurrency- the currency every priced figure was restated in (nullon reports written before reporting currencies existed)currencyNotes- what was converted, at which rates, and any rate source that fell back
public record EstateReport(EstateScope scope, Instant inventoryAsOf, String inventorySource, Instant generatedAt, Map<String,Integer> counts, EstateReport.UtilizationSummary utilization, List<EstateFinding> findings, List<EstateReport.CategoryTotal> categoryTotals, Map<String, EstateReport.SavingTotal> addressableMonthlySaving, List<EstateReport.UnpricedItem> unpriced, List<EstateReport.ActionItem> actions, List<EstateInventory.CoverageGap> coverageGaps, List<String> notAnalysed, List<String> warnings, List<String> rulesRun, EstateInventory.CollectionStats collection, String reportingCurrency, List<String> currencyNotes)
extends Record
The result of an estate analysis: findings in priority order, totals, the addressable saving per
currency, coverage gaps, and what was not analysed.
Money is never added across currencies. The addressable saving counts only priced positive savings; when several findings save money on the same resource (for example a smaller tier and a term), only the largest is counted, because they do not simply add. Unpriced findings are listed separately with their reasons. Priority is severity weight × confidence weight × (1 + log10(1 + monthly saving)), ties broken by severity, category and id, so the order is deterministic.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordOne entry of the prioritised action list.static final recordTotals for one category.static final recordAn addressable saving in one currency.static final recordA finding whose financial effect could not be priced.static final recordWhat utilisation data the analysis had. -
Constructor Summary
ConstructorsConstructorDescriptionEstateReport(EstateScope scope, Instant inventoryAsOf, String inventorySource, Instant generatedAt, Map<String, Integer> counts, EstateReport.UtilizationSummary utilization, List<EstateFinding> findings, List<EstateReport.CategoryTotal> categoryTotals, Map<String, EstateReport.SavingTotal> addressableMonthlySaving, List<EstateReport.UnpricedItem> unpriced, List<EstateReport.ActionItem> actions, List<EstateInventory.CoverageGap> coverageGaps, List<String> notAnalysed, List<String> warnings, List<String> rulesRun, EstateInventory.CollectionStats collection, String reportingCurrency, List<String> currencyNotes) Copies the collections. -
Method Summary
Modifier and TypeMethodDescriptionactions()Returns the value of theactionsrecord component.Returns the value of theaddressableMonthlySavingrecord component.static EstateReportassemble(EstateInventory inventory, UtilizationSnapshot utilization, List<EstateFinding> findings, List<String> notAnalysed, List<String> warnings, List<String> rulesRun, Instant generatedAt) Assembles a report from findings: orders them, totals them and builds the action list.static EstateReportassemble(EstateInventory inventory, UtilizationSnapshot utilization, List<EstateFinding> findings, List<String> notAnalysed, List<String> warnings, List<String> rulesRun, Instant generatedAt, String reportingCurrency, List<String> currencyNotes) Asassemble(EstateInventory, UtilizationSnapshot, List, List, List, List, Instant), stating the reporting currency and what was converted into it.Returns the value of thecategoryTotalsrecord component.Returns the value of thecollectionrecord component.counts()Returns the value of thecountsrecord component.Returns the value of thecoverageGapsrecord component.Returns the value of thecurrencyNotesrecord component.final booleanIndicates whether some other object is "equal to" this one.findings()Returns the value of thefindingsrecord component.findings(FindingCategory category) The findings of one category.static EstateReportReads a report written bytoJson().Returns the value of thegeneratedAtrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theinventoryAsOfrecord component.Returns the value of theinventorySourcerecord component.Returns the value of thenotAnalysedrecord component.static doubleThe priority of a finding (higher first).Returns the value of thereportingCurrencyrecord component.rulesRun()Returns the value of therulesRunrecord component.scope()Returns the value of thescoperecord component.toJson()Serializes the report to JSON.Renders the report as Markdown.final StringtoString()Returns a string representation of this record class.unpriced()Returns the value of theunpricedrecord component.Returns the value of theutilizationrecord component.warnings()Returns the value of thewarningsrecord component.
-
Constructor Details
-
EstateReport
public EstateReport(EstateScope scope, Instant inventoryAsOf, String inventorySource, Instant generatedAt, Map<String, Integer> counts, EstateReport.UtilizationSummary utilization, List<EstateFinding> findings, List<EstateReport.CategoryTotal> categoryTotals, Map<String, EstateReport.SavingTotal> addressableMonthlySaving, List<EstateReport.UnpricedItem> unpriced, List<EstateReport.ActionItem> actions, List<EstateInventory.CoverageGap> coverageGaps, List<String> notAnalysed, List<String> warnings, List<String> rulesRun, EstateInventory.CollectionStats collection, String reportingCurrency, List<String> currencyNotes) Copies the collections.
-
-
Method Details
-
assemble
public static EstateReport assemble(EstateInventory inventory, UtilizationSnapshot utilization, List<EstateFinding> findings, List<String> notAnalysed, List<String> warnings, List<String> rulesRun, Instant generatedAt) Assembles a report from findings: orders them, totals them and builds the action list.- Parameters:
inventory- the inventory analysedutilization- the utilisation usedfindings- the findings, in any ordernotAnalysed- what was not analysed and whywarnings- warnings to surfacerulesRun- the rules that rangeneratedAt- the generation time- Returns:
- the report
-
assemble
public static EstateReport assemble(EstateInventory inventory, UtilizationSnapshot utilization, List<EstateFinding> findings, List<String> notAnalysed, List<String> warnings, List<String> rulesRun, Instant generatedAt, String reportingCurrency, List<String> currencyNotes) Asassemble(EstateInventory, UtilizationSnapshot, List, List, List, List, Instant), stating the reporting currency and what was converted into it.- Parameters:
inventory- the inventory analysedutilization- the utilisation usedfindings- the findings, in any ordernotAnalysed- what was not analysed and whywarnings- warnings to surfacerulesRun- the rules that rangeneratedAt- the generation timereportingCurrency- the currency priced figures were restated in, ornullcurrencyNotes- conversion advisories and rate-source fallbacks- Returns:
- the report
-
priority
The priority of a finding (higher first).- Parameters:
f- the finding- Returns:
- severity weight × confidence weight × (1 + log10(1 + monthly saving))
-
findings
The findings of one category.- Parameters:
category- the category- Returns:
- the findings, in priority order
-
toJson
-
fromJson
Reads a report written bytoJson().- Parameters:
json- the JSON document- Returns:
- the report
-
toMarkdown
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object). -
scope
-
inventoryAsOf
Returns the value of theinventoryAsOfrecord component.- Returns:
- the value of the
inventoryAsOfrecord component
-
inventorySource
Returns the value of theinventorySourcerecord component.- Returns:
- the value of the
inventorySourcerecord component
-
generatedAt
Returns the value of thegeneratedAtrecord component.- Returns:
- the value of the
generatedAtrecord component
-
counts
-
utilization
Returns the value of theutilizationrecord component.- Returns:
- the value of the
utilizationrecord component
-
findings
-
categoryTotals
Returns the value of thecategoryTotalsrecord component.- Returns:
- the value of the
categoryTotalsrecord component
-
addressableMonthlySaving
Returns the value of theaddressableMonthlySavingrecord component.- Returns:
- the value of the
addressableMonthlySavingrecord component
-
unpriced
-
actions
-
coverageGaps
Returns the value of thecoverageGapsrecord component.- Returns:
- the value of the
coverageGapsrecord component
-
notAnalysed
Returns the value of thenotAnalysedrecord component.- Returns:
- the value of the
notAnalysedrecord component
-
warnings
-
rulesRun
-
collection
Returns the value of thecollectionrecord component.- Returns:
- the value of the
collectionrecord component
-
reportingCurrency
Returns the value of thereportingCurrencyrecord component.- Returns:
- the value of the
reportingCurrencyrecord component
-
currencyNotes
Returns the value of thecurrencyNotesrecord component.- Returns:
- the value of the
currencyNotesrecord component
-