Class AwsPartition
- java.lang.Object
-
- software.amazon.smithy.rulesengine.language.syntax.SyntaxElement
-
- software.amazon.smithy.rulesengine.language.syntax.expressions.Expression
-
- software.amazon.smithy.rulesengine.language.syntax.expressions.functions.LibraryFunction
-
- software.amazon.smithy.rulesengine.aws.language.functions.AwsPartition
-
- All Implemented Interfaces:
FromSourceLocation
,ToNode
,TypeCheck
,ToCondition
,ToExpression
public final class AwsPartition extends LibraryFunction
An AWS rule-set function for mapping a region string to a partition.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AwsPartition.Definition
AFunctionDefinition
for theAwsPartition
function.
-
Field Summary
Fields Modifier and Type Field Description static Identifier
DNS_SUFFIX
static Identifier
DUAL_STACK_DNS_SUFFIX
static java.lang.String
ID
static Identifier
IMPLICIT_GLOBAL_REGION
static Identifier
INFERRED
static Identifier
NAME
static Identifier
SUPPORTS_DUAL_STACK
static Identifier
SUPPORTS_FIPS
-
Fields inherited from class software.amazon.smithy.rulesengine.language.syntax.expressions.functions.LibraryFunction
definition, functionNode
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
accept(ExpressionVisitor<T> visitor)
Invoke theExpressionVisitor
functions for this expression.static AwsPartition.Definition
getDefinition()
Gets theFunctionDefinition
implementation.static AwsPartition
ofExpressions(ToExpression arg1)
Creates aAwsPartition
function from the given expressions.static void
overridePartitions(Partitions partitions)
Overrides the partitions provided by default.-
Methods inherited from class software.amazon.smithy.rulesengine.language.syntax.expressions.functions.LibraryFunction
equals, expectOneArgument, getArguments, getName, getSourceLocation, hashCode, toNode, toString, typeCheckLocal
-
Methods inherited from class software.amazon.smithy.rulesengine.language.syntax.expressions.Expression
fromNode, getLiteral, getReference, of, of, of, parseShortform, toConditionBuilder, toExpression, type, typeCheck
-
Methods inherited from class software.amazon.smithy.rulesengine.language.syntax.SyntaxElement
booleanEqual, getAttr, getAttr, isSet, isValidHostLabel, not, parseUrl, stringEqual, substring, template
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.smithy.rulesengine.language.syntax.ToCondition
toCondition, toCondition
-
-
-
-
Field Detail
-
ID
public static final java.lang.String ID
- See Also:
- Constant Field Values
-
NAME
public static final Identifier NAME
-
DNS_SUFFIX
public static final Identifier DNS_SUFFIX
-
DUAL_STACK_DNS_SUFFIX
public static final Identifier DUAL_STACK_DNS_SUFFIX
-
SUPPORTS_FIPS
public static final Identifier SUPPORTS_FIPS
-
SUPPORTS_DUAL_STACK
public static final Identifier SUPPORTS_DUAL_STACK
-
IMPLICIT_GLOBAL_REGION
public static final Identifier IMPLICIT_GLOBAL_REGION
-
INFERRED
public static final Identifier INFERRED
-
-
Method Detail
-
overridePartitions
public static void overridePartitions(Partitions partitions)
Overrides the partitions provided by default.- Parameters:
partitions
- A list of partitions to set.
-
getDefinition
public static AwsPartition.Definition getDefinition()
Gets theFunctionDefinition
implementation.- Returns:
- the function definition.
-
ofExpressions
public static AwsPartition ofExpressions(ToExpression arg1)
Creates aAwsPartition
function from the given expressions.- Parameters:
arg1
- the region to retrieve partition information from.- Returns:
- The resulting
AwsPartition
function.
-
accept
public <T> T accept(ExpressionVisitor<T> visitor)
Description copied from class:Expression
Invoke theExpressionVisitor
functions for this expression.- Specified by:
accept
in classExpression
- Type Parameters:
T
- the visitor return type.- Parameters:
visitor
- the visitor to be invoked.- Returns:
- the return value of the visitor.
-
-