
com.pulumi.aws.cognito.outputs.UserPoolSchema Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws Show documentation
Show all versions of aws Show documentation
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.aws.cognito.outputs;
import com.pulumi.aws.cognito.outputs.UserPoolSchemaNumberAttributeConstraints;
import com.pulumi.aws.cognito.outputs.UserPoolSchemaStringAttributeConstraints;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class UserPoolSchema {
/**
* @return Attribute data type. Must be one of `Boolean`, `Number`, `String`, `DateTime`.
*
*/
private String attributeDataType;
/**
* @return Whether the attribute type is developer only.
*
*/
private @Nullable Boolean developerOnlyAttribute;
/**
* @return Whether the attribute can be changed once it has been created.
*
*/
private @Nullable Boolean mutable;
/**
* @return Name of the attribute.
*
*/
private String name;
/**
* @return Configuration block for the constraints for an attribute of the number type. Detailed below.
*
*/
private @Nullable UserPoolSchemaNumberAttributeConstraints numberAttributeConstraints;
/**
* @return Whether a user pool attribute is required. If the attribute is required and the user does not provide a value, registration or sign-in will fail.
*
*/
private @Nullable Boolean required;
/**
* @return Constraints for an attribute of the string type. Detailed below.
*
*/
private @Nullable UserPoolSchemaStringAttributeConstraints stringAttributeConstraints;
private UserPoolSchema() {}
/**
* @return Attribute data type. Must be one of `Boolean`, `Number`, `String`, `DateTime`.
*
*/
public String attributeDataType() {
return this.attributeDataType;
}
/**
* @return Whether the attribute type is developer only.
*
*/
public Optional developerOnlyAttribute() {
return Optional.ofNullable(this.developerOnlyAttribute);
}
/**
* @return Whether the attribute can be changed once it has been created.
*
*/
public Optional mutable() {
return Optional.ofNullable(this.mutable);
}
/**
* @return Name of the attribute.
*
*/
public String name() {
return this.name;
}
/**
* @return Configuration block for the constraints for an attribute of the number type. Detailed below.
*
*/
public Optional numberAttributeConstraints() {
return Optional.ofNullable(this.numberAttributeConstraints);
}
/**
* @return Whether a user pool attribute is required. If the attribute is required and the user does not provide a value, registration or sign-in will fail.
*
*/
public Optional required() {
return Optional.ofNullable(this.required);
}
/**
* @return Constraints for an attribute of the string type. Detailed below.
*
*/
public Optional stringAttributeConstraints() {
return Optional.ofNullable(this.stringAttributeConstraints);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(UserPoolSchema defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private String attributeDataType;
private @Nullable Boolean developerOnlyAttribute;
private @Nullable Boolean mutable;
private String name;
private @Nullable UserPoolSchemaNumberAttributeConstraints numberAttributeConstraints;
private @Nullable Boolean required;
private @Nullable UserPoolSchemaStringAttributeConstraints stringAttributeConstraints;
public Builder() {}
public Builder(UserPoolSchema defaults) {
Objects.requireNonNull(defaults);
this.attributeDataType = defaults.attributeDataType;
this.developerOnlyAttribute = defaults.developerOnlyAttribute;
this.mutable = defaults.mutable;
this.name = defaults.name;
this.numberAttributeConstraints = defaults.numberAttributeConstraints;
this.required = defaults.required;
this.stringAttributeConstraints = defaults.stringAttributeConstraints;
}
@CustomType.Setter
public Builder attributeDataType(String attributeDataType) {
if (attributeDataType == null) {
throw new MissingRequiredPropertyException("UserPoolSchema", "attributeDataType");
}
this.attributeDataType = attributeDataType;
return this;
}
@CustomType.Setter
public Builder developerOnlyAttribute(@Nullable Boolean developerOnlyAttribute) {
this.developerOnlyAttribute = developerOnlyAttribute;
return this;
}
@CustomType.Setter
public Builder mutable(@Nullable Boolean mutable) {
this.mutable = mutable;
return this;
}
@CustomType.Setter
public Builder name(String name) {
if (name == null) {
throw new MissingRequiredPropertyException("UserPoolSchema", "name");
}
this.name = name;
return this;
}
@CustomType.Setter
public Builder numberAttributeConstraints(@Nullable UserPoolSchemaNumberAttributeConstraints numberAttributeConstraints) {
this.numberAttributeConstraints = numberAttributeConstraints;
return this;
}
@CustomType.Setter
public Builder required(@Nullable Boolean required) {
this.required = required;
return this;
}
@CustomType.Setter
public Builder stringAttributeConstraints(@Nullable UserPoolSchemaStringAttributeConstraints stringAttributeConstraints) {
this.stringAttributeConstraints = stringAttributeConstraints;
return this;
}
public UserPoolSchema build() {
final var _resultValue = new UserPoolSchema();
_resultValue.attributeDataType = attributeDataType;
_resultValue.developerOnlyAttribute = developerOnlyAttribute;
_resultValue.mutable = mutable;
_resultValue.name = name;
_resultValue.numberAttributeConstraints = numberAttributeConstraints;
_resultValue.required = required;
_resultValue.stringAttributeConstraints = stringAttributeConstraints;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy