Package clusterless.commons.naming
Class Ref
- java.lang.Object
-
- clusterless.commons.naming.Ref
-
public final class Ref extends java.lang.Object
Creates an identifier to use as an export/import key for provider output/export values.aws:qualifier:[stage:]scopeName:scopeVersion:resourceNS:resourceType:resourceName
Where the qualifier represents the type of value being exported/imported: - id - name - arn Where stage is the stage of the deployment, such as dev, test, prod, etc. It is optional. scopeName and scopeVersion are analogous to project names and versions. Resources are identified by a namespace, type, and name.ref:aws:id:project-a:20230101:core:compute:spot ref:aws:id:dev:project-a:20230101:core:compute:spot
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRef.Qualifier
-
Constructor Summary
Constructors Constructor Description Ref()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RefarnRef()booleanequals(java.lang.Object o)java.lang.StringexportName()inthashCode()static RefidRef()static booleanisRef(java.lang.String value)Labellabel()static RefnameRef()Labelprovider()static java.util.Optional<java.lang.String>provider(java.lang.String value)Ref.Qualifierqualifier()static java.util.Optional<Ref.Qualifier>qualifier(java.lang.String value)static Refref()LabelresourceLabel()FixedresourceName()FixedresourceNs()FixedresourceType()Fixedscope()FixedscopeVersion()Stagestage()java.lang.StringtoString()RefwithProvider(Fixed provider)RefwithProvider(Label provider)RefwithProvider(java.lang.String provider)RefwithQualifier(Ref.Qualifier qualifier)RefwithResourceName(Fixed resourceName)RefwithResourceName(Label resourceName)RefwithResourceName(java.lang.String resourceName)RefwithResourceNs(Fixed resourceNs)RefwithResourceNs(Label resourceNs)RefwithResourceNs(java.lang.String resourceNs)RefwithResourceType(Fixed resourceType)RefwithResourceType(Label resourceType)RefwithResourceType(java.lang.String resourceType)RefwithScope(Fixed scope)RefwithScope(Label scope)RefwithScope(java.lang.String scope)RefwithScopeVersion(Fixed scopeVersion)RefwithScopeVersion(Version scopeVersion)RefwithScopeVersion(java.lang.String scopeVersion)RefwithStage(Stage stage)
-
-
-
Constructor Detail
-
Ref
public Ref()
-
-
Method Detail
-
isRef
public static boolean isRef(java.lang.String value)
-
qualifier
public static java.util.Optional<Ref.Qualifier> qualifier(java.lang.String value)
-
provider
public static java.util.Optional<java.lang.String> provider(java.lang.String value)
-
withProvider
public Ref withProvider(java.lang.String provider)
-
withProvider
public Ref withProvider(Label provider)
-
withProvider
public Ref withProvider(Fixed provider)
-
withScopeVersion
public Ref withScopeVersion(java.lang.String scopeVersion)
-
withScopeVersion
public Ref withScopeVersion(Fixed scopeVersion)
-
withScopeVersion
public Ref withScopeVersion(Version scopeVersion)
-
withResourceNs
public Ref withResourceNs(java.lang.String resourceNs)
-
withResourceNs
public Ref withResourceNs(Label resourceNs)
-
withResourceNs
public Ref withResourceNs(Fixed resourceNs)
-
withResourceType
public Ref withResourceType(java.lang.String resourceType)
-
withResourceType
public Ref withResourceType(Label resourceType)
-
withResourceType
public Ref withResourceType(Fixed resourceType)
-
withResourceName
public Ref withResourceName(java.lang.String resourceName)
-
withResourceName
public Ref withResourceName(Label resourceName)
-
withResourceName
public Ref withResourceName(Fixed resourceName)
-
withQualifier
public Ref withQualifier(Ref.Qualifier qualifier)
-
scopeVersion
public Fixed scopeVersion()
-
resourceNs
public Fixed resourceNs()
-
resourceType
public Fixed resourceType()
-
resourceName
public Fixed resourceName()
-
qualifier
public Ref.Qualifier qualifier()
-
resourceLabel
public Label resourceLabel()
-
exportName
public java.lang.String exportName()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-