import * as core from "@terrascript/core";

export interface AccountPasswordPolicyArgs extends core.ResourceArgs {
  allowUsersToChangePassword?: boolean | core.BooleanOut;

  hardExpiry?: boolean | core.BooleanOut;

  maxPasswordAge?: number | core.NumberOut;

  minimumPasswordLength?: number | core.NumberOut;

  passwordReusePrevention?: number | core.NumberOut;

  requireLowercaseCharacters?: boolean | core.BooleanOut;

  requireNumbers?: boolean | core.BooleanOut;

  requireSymbols?: boolean | core.BooleanOut;

  requireUppercaseCharacters?: boolean | core.BooleanOut;
}

export class AccountPasswordPolicy extends core.Resource<AccountPasswordPolicyArgs> {
  @core.attr(Boolean)
  public allowUsersToChangePassword?: boolean | core.BooleanOut;

  @core.attr(Boolean, { computed: true })
  public expirePasswords!: boolean | core.BooleanOut;

  @core.attr(Boolean, { computed: true })
  public hardExpiry?: boolean | core.BooleanOut;

  @core.attr(String, { computed: true })
  public id!: string | core.StringOut;

  @core.attr(Number, { computed: true })
  public maxPasswordAge?: number | core.NumberOut;

  @core.attr(Number)
  public minimumPasswordLength?: number | core.NumberOut;

  @core.attr(Number, { computed: true })
  public passwordReusePrevention?: number | core.NumberOut;

  @core.attr(Boolean, { computed: true })
  public requireLowercaseCharacters?: boolean | core.BooleanOut;

  @core.attr(Boolean, { computed: true })
  public requireNumbers?: boolean | core.BooleanOut;

  @core.attr(Boolean, { computed: true })
  public requireSymbols?: boolean | core.BooleanOut;

  @core.attr(Boolean, { computed: true })
  public requireUppercaseCharacters?: boolean | core.BooleanOut;

  constructor(name: string, args?: AccountPasswordPolicyArgs) {
    super(name, "aws_iam_account_password_policy", args);
  }

  public override getNamespace(): string {
    return "aws_iam";
  }
}
