Class FeatureFlag.Builder
- java.lang.Object
-
- software.amazon.awscdk.cloudassembly.schema.FeatureFlag.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<FeatureFlag>
- Enclosing interface:
- FeatureFlag
@Stability(Stable) public static final class FeatureFlag.Builder extends Object implements software.amazon.jsii.Builder<FeatureFlag>
A builder forFeatureFlag
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FeatureFlagbuild()Builds the configured instance.FeatureFlag.Builderexplanation(String explanation)Sets the value ofFeatureFlag.getExplanation()FeatureFlag.BuilderrecommendedValue(Object recommendedValue)Sets the value ofFeatureFlag.getRecommendedValue()FeatureFlag.BuilderunconfiguredBehavesLike(UnconfiguredBehavesLike unconfiguredBehavesLike)Sets the value ofFeatureFlag.getUnconfiguredBehavesLike()FeatureFlag.BuilderuserValue(Object userValue)Sets the value ofFeatureFlag.getUserValue()
-
-
-
Method Detail
-
explanation
@Stability(Stable) public FeatureFlag.Builder explanation(String explanation)
Sets the value ofFeatureFlag.getExplanation()- Parameters:
explanation- Explanation about the purpose of this flag that can be shown to the user.- Returns:
this
-
recommendedValue
@Stability(Stable) public FeatureFlag.Builder recommendedValue(Object recommendedValue)
Sets the value ofFeatureFlag.getRecommendedValue()- Parameters:
recommendedValue- The library-recommended value for this flag, if any. It is possible that there is no recommended value.- Returns:
this
-
unconfiguredBehavesLike
@Stability(Stable) public FeatureFlag.Builder unconfiguredBehavesLike(UnconfiguredBehavesLike unconfiguredBehavesLike)
Sets the value ofFeatureFlag.getUnconfiguredBehavesLike()- Parameters:
unconfiguredBehavesLike- The value of the flag that produces the same behavior as when the flag is not configured at all. The structure of this field is a historical accident. The type of this field should have been boolean, which should have contained the default value for the flag appropriate for the current version of the CDK library. We are not rectifying this accident because doing soInstead, the canonical way to access this value is by evaluating
unconfiguredBehavesLike?.v2 ?? false.- Returns:
this
-
userValue
@Stability(Stable) public FeatureFlag.Builder userValue(Object userValue)
Sets the value ofFeatureFlag.getUserValue()- Parameters:
userValue- The value configured by the user. This is the value configured at the root of the tree. Users may also have configured values at specific locations in the tree; we don't report on those.- Returns:
this
-
build
@Stability(Stable) public FeatureFlag build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<FeatureFlag>- Returns:
- a new instance of
FeatureFlag - Throws:
NullPointerException- if any required attribute was not provided
-
-