package awscognito

import (
	"github.com/aws/aws-cdk-go/awscdk/v2"
)

// Password policy for User Pools.
//
// Example:
//   cognito.NewUserPool(this, jsii.String("myuserpool"), &UserPoolProps{
//   	// ...
//   	PasswordPolicy: &PasswordPolicy{
//   		MinLength: jsii.Number(12),
//   		RequireLowercase: jsii.Boolean(true),
//   		RequireUppercase: jsii.Boolean(true),
//   		RequireDigits: jsii.Boolean(true),
//   		RequireSymbols: jsii.Boolean(true),
//   		TempPasswordValidity: awscdk.Duration_Days(jsii.Number(3)),
//   	},
//   })
//
type PasswordPolicy struct {
	// Minimum length required for a user's password.
	// Default: 8.
	//
	MinLength *float64 `field:"optional" json:"minLength" yaml:"minLength"`
	// The number of previous passwords that you want Amazon Cognito to restrict each user from reusing.
	//
	// `passwordHistorySize` can not be set when `featurePlan` is `FeaturePlan.LITE`.
	// Default: undefined - Cognito default setting is no restriction.
	//
	PasswordHistorySize *float64 `field:"optional" json:"passwordHistorySize" yaml:"passwordHistorySize"`
	// Whether the user is required to have digits in their password.
	// Default: true.
	//
	RequireDigits *bool `field:"optional" json:"requireDigits" yaml:"requireDigits"`
	// Whether the user is required to have lowercase characters in their password.
	// Default: true.
	//
	RequireLowercase *bool `field:"optional" json:"requireLowercase" yaml:"requireLowercase"`
	// Whether the user is required to have symbols in their password.
	// Default: true.
	//
	RequireSymbols *bool `field:"optional" json:"requireSymbols" yaml:"requireSymbols"`
	// Whether the user is required to have uppercase characters in their password.
	// Default: true.
	//
	RequireUppercase *bool `field:"optional" json:"requireUppercase" yaml:"requireUppercase"`
	// The length of time the temporary password generated by an admin is valid.
	//
	// This must be provided as whole days, like Duration.days(3) or Duration.hours(48).
	// Fractional days, such as Duration.hours(20), will generate an error.
	// Default: Duration.days(7)
	//
	TempPasswordValidity awscdk.Duration `field:"optional" json:"tempPasswordValidity" yaml:"tempPasswordValidity"`
}

