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

export interface UserArgs extends core.ResourceArgs {
  attributes?: core.Map<string, string> | core.MapOut<core.StringOut>;

  clientMetadata?: core.Map<string, string> | core.MapOut<core.StringOut>;

  desiredDeliveryMediums?: core.Array<string> | core.ArrayOut<core.StringOut>;

  enabled?: boolean | core.BooleanOut;

  forceAliasCreation?: boolean | core.BooleanOut;

  messageAction?: string | core.StringOut;

  password?: string | core.StringOut;

  temporaryPassword?: string | core.StringOut;

  userPoolId: string | core.StringOut;

  username: string | core.StringOut;

  validationData?: core.Map<string, string> | core.MapOut<core.StringOut>;
}

export class User extends core.Resource<UserArgs> {
  @core.attr(String, { kind: "map" })
  public attributes?: core.Map<string, string> | core.MapOut<core.StringOut>;

  @core.attr(String, { kind: "map" })
  public clientMetadata?:
    | core.Map<string, string>
    | core.MapOut<core.StringOut>;

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

  @core.attr(String, { kind: "array" })
  public desiredDeliveryMediums?:
    | core.Array<string>
    | core.ArrayOut<core.StringOut>;

  @core.attr(Boolean)
  public enabled?: boolean | core.BooleanOut;

  @core.attr(Boolean)
  public forceAliasCreation?: boolean | core.BooleanOut;

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

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

  @core.attr(String)
  public messageAction?: string | core.StringOut;

  @core.attr(String, { computed: true, kind: "array" })
  public mfaSettingList!: core.Array<string> | core.ArrayOut<core.StringOut>;

  @core.attr(String)
  public password?: string | core.StringOut;

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

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

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

  @core.attr(String)
  public temporaryPassword?: string | core.StringOut;

  @core.attr(String)
  public userPoolId!: string | core.StringOut;

  @core.attr(String)
  public username!: string | core.StringOut;

  @core.attr(String, { kind: "map" })
  public validationData?:
    | core.Map<string, string>
    | core.MapOut<core.StringOut>;

  constructor(name: string, args?: UserArgs) {
    super(name, "aws_cognito_user", args);
  }

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