Record Class SpecInputs
java.lang.Object
java.lang.Record
com.eqixiac.equinix.design.value.SpecInputs
- Record Components:
fingerprint- the spec's fingerprintcloud- the cloud being pricedprovider- its providerregion- its region, ornullegressGb- data leaving the cloud per month, GBbandwidthMbps- the Fabric tier the leg is sized tometro- the metro, ornullterm- the termassumptions- what was assumed where the spec was silent
public record SpecInputs(String fingerprint, CloudIntent cloud, CloudProviderType provider, String region, double egressGb, int bandwidthMbps, MetroCode metro, Term term, List<String> assumptions)
extends Record
The inputs the TCO and savings models take, derived from a
DesignSpec (and optionally the
portfolio a run chose) the same way the optimiser's RateCardCostModel reads them, so the three
price the same thing.
- cloud: the named cloud, else the first cloud that names a provider;
- provider, region and monthly egress: that cloud's
provider,regionandmonthlyEgressGb(0 when unset); - bandwidth: the sum of
bandwidthMbpsover the workloads that reach the cloud, rounded up to the Fabric tier (RateCardCostModel.tierFor(int)); 1000 Mbps when no workload is sized (stated as an assumption); - metro: the chosen portfolio's metro when it has one; for a larger portfolio its first metro (stated); with no portfolio, the spec's single required metro, else none (metro-agnostic);
- term:
commercial.term, elseTerm.MONTH_1(the cost model's default).
-
Constructor Summary
ConstructorsConstructorDescriptionSpecInputs(String fingerprint, CloudIntent cloud, CloudProviderType provider, String region, double egressGb, int bandwidthMbps, MetroCode metro, Term term, List<String> assumptions) Copies the assumptions. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theassumptionsrecord component.intReturns the value of thebandwidthMbpsrecord component.cloud()Returns the value of thecloudrecord component.static SpecInputsderive(DesignSpec spec, String cloudId, MetroPortfolio chosen) doubleegressGb()Returns the value of theegressGbrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefingerprintrecord component.final inthashCode()Returns a hash code value for this object.metro()Returns the value of themetrorecord component.provider()Returns the value of theproviderrecord component.region()Returns the value of theregionrecord component.term()Returns the value of thetermrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SpecInputs
public SpecInputs(String fingerprint, CloudIntent cloud, CloudProviderType provider, String region, double egressGb, int bandwidthMbps, MetroCode metro, Term term, List<String> assumptions) Copies the assumptions.
-
-
Method Details
-
derive
- Parameters:
spec- the design speccloudId- the cloud to price, ornullfor the first cloud with a providerchosen- the portfolio a run chose, ornull- Returns:
- the derived inputs
- Throws:
IllegalArgumentException- when the spec has no cloud with a provider, or the named cloud is unknown or names no provider
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
fingerprint
Returns the value of thefingerprintrecord component.- Returns:
- the value of the
fingerprintrecord component
-
cloud
-
provider
-
region
-
egressGb
-
bandwidthMbps
public int bandwidthMbps()Returns the value of thebandwidthMbpsrecord component.- Returns:
- the value of the
bandwidthMbpsrecord component
-
metro
-
term
-
assumptions
Returns the value of theassumptionsrecord component.- Returns:
- the value of the
assumptionsrecord component
-