Record Class PlanDiff
java.lang.Object
java.lang.Record
com.eqixiac.equinix.design.plan.PlanDiff
- Record Components:
planId- the plan id compareddeploymentName- the plan's deployment nameprojectId- the project searched, ornullresources- one verdict per planned element, in creation orderunmanaged- marked live resources the plan does not containnotes- read failures and scope caveatsreadAt- when the live state was read
public record PlanDiff(String planId, String deploymentName, String projectId, List<ResourceDrift> resources, List<UnmanagedResource> unmanaged, List<String> notes, Instant readAt)
extends Record
A plan compared with live state: one
ResourceDrift per planned element, the live resources
that carry the plan's marker but are not in it, and notes on anything that could not be read.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedeploymentNamerecord component.The verdict for a key.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisInSync()Whether live state matches the plan exactly: nothing missing, different or unreadable, and no unmanaged resource.notes()Returns the value of thenotesrecord component.planId()Returns the value of theplanIdrecord component.Returns the value of theprojectIdrecord component.readAt()Returns the value of thereadAtrecord component.Returns the value of theresourcesrecord component.A readable report.final StringtoString()Returns a string representation of this record class.Returns the value of theunmanagedrecord component.withStatus(DriftStatus status) The verdicts with a given status.
-
Constructor Details
-
PlanDiff
public PlanDiff(String planId, String deploymentName, String projectId, List<ResourceDrift> resources, List<UnmanagedResource> unmanaged, List<String> notes, Instant readAt) Makes every list immutable and non-null.
-
-
Method Details
-
drift
The verdict for a key.- Parameters:
key- the logical key- Returns:
- the verdict, or empty when the plan has no such key
-
withStatus
The verdicts with a given status.- Parameters:
status- the status- Returns:
- the matching verdicts, in creation order
-
isInSync
public boolean isInSync()Whether live state matches the plan exactly: nothing missing, different or unreadable, and no unmanaged resource.- Returns:
truewhen in sync
-
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). -
planId
-
deploymentName
Returns the value of thedeploymentNamerecord component.- Returns:
- the value of the
deploymentNamerecord component
-
projectId
-
resources
-
unmanaged
-
notes
-
readAt
-