Class CustomAttributeConfig.Builder
java.lang.Object
software.amazon.awscdk.services.cognito.CustomAttributeConfig.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CustomAttributeConfig>
- Enclosing interface:
CustomAttributeConfig
@Stability(Stable)
public static final class CustomAttributeConfig.Builder
extends Object
implements software.amazon.jsii.Builder<CustomAttributeConfig>
A builder for
CustomAttributeConfig
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofCustomAttributeConfig.getDataType()
Sets the value ofCustomAttributeConfig.getMutable()
numberConstraints
(NumberAttributeConstraints numberConstraints) Sets the value ofCustomAttributeConfig.getNumberConstraints()
stringConstraints
(StringAttributeConstraints stringConstraints) Sets the value ofCustomAttributeConfig.getStringConstraints()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
dataType
Sets the value ofCustomAttributeConfig.getDataType()
- Parameters:
dataType
- The data type of the custom attribute. This parameter is required.- Returns:
this
-
mutable
Sets the value ofCustomAttributeConfig.getMutable()
- Parameters:
mutable
- Specifies whether the value of the attribute can be changed. For any user pool attribute that's mapped to an identity provider attribute, you must set this parameter to true. Amazon Cognito updates mapped attributes when users sign in to your application through an identity provider. If an attribute is immutable, Amazon Cognito throws an error when it attempts to update the attribute.- Returns:
this
-
numberConstraints
@Stability(Stable) public CustomAttributeConfig.Builder numberConstraints(NumberAttributeConstraints numberConstraints) Sets the value ofCustomAttributeConfig.getNumberConstraints()
- Parameters:
numberConstraints
- The constraints for a custom attribute of the 'Number' data type.- Returns:
this
-
stringConstraints
@Stability(Stable) public CustomAttributeConfig.Builder stringConstraints(StringAttributeConstraints stringConstraints) Sets the value ofCustomAttributeConfig.getStringConstraints()
- Parameters:
stringConstraints
- The constraints for a custom attribute of 'String' data type.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CustomAttributeConfig>
- Returns:
- a new instance of
CustomAttributeConfig
- Throws:
NullPointerException
- if any required attribute was not provided
-