Class ProviderSite
java.lang.Object
com.eqixiac.equinix.core.model.multicloud.ProviderSite
One side of a specification environment: a provider and that provider's own name for a site
(
environment.yaml#/ProviderSites: providerId, site,
displayName).
Beta: derived from the open specification at commit bbfc763 (see the package
documentation).
| Field | Specification field | Constraint |
|---|---|---|
providerRef | providerId | required |
site | site |
required, not blank; surrounding whitespace is trimmed; case is preserved |
displayName | displayName |
optional; null when the provider supplied none |
A site name is provider-specific: a cloud region for a cloud provider (the specification's
examples are us-east-1 and us-east4). The specification does not define what an
Equinix site name would be; a metro code is an assumption, not a verified value.
Equality compares all three fields exactly. Use matches(ProviderRef, String) for a
comparison that ignores displayName and the case of site.
Construct with of(ProviderRef, String) or the Lombok builder
(ProviderSite.builder().providerRef(...).site(...).displayName(...).build()).
- Author:
- ianjones
-
Method Summary
Modifier and TypeMethodDescriptionbooleanmatches(ProviderRef provider, String otherSite) Tests whether this is the given provider's given site.static ProviderSiteof(ProviderRef providerRef, String site) Creates a site without a display name.
-
Method Details
-
of
Creates a site without a display name.- Parameters:
providerRef- the providersite- the provider-specific site name- Returns:
- the provider site
- Throws:
NullPointerException- if either argument is nullIllegalArgumentException- ifsiteis blank
-
matches
Tests whether this is the given provider's given site.displayNameis not compared. The site comparison trimsotherSiteand ignores case.- Parameters:
provider- the provider to compare;nullnever matchesotherSite- the site name to compare;nullnever matches- Returns:
truewhen the provider is equal and the site names match
-