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

export interface AuthenticationModeArgs extends core.SchemaArgs {
  passwordCount: number | core.NumberOut;

  passwords: core.Array<string> | core.ArrayOut<core.StringOut>;

  type: string | core.StringOut;
}

export class AuthenticationMode extends core.Schema<AuthenticationModeArgs> {
  @core.attr(Number, { computed: true })
  public passwordCount!: number | core.NumberOut;

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

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

export interface UserArgs extends core.ResourceArgs {
  accessString: string | core.StringOut;

  authenticationMode: AuthenticationMode;

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

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

  userName: string | core.StringOut;
}

export class User extends core.Resource<UserArgs> {
  @core.attr(String)
  public accessString!: string | core.StringOut;

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

  @core.attr(AuthenticationMode)
  public authenticationMode!: AuthenticationMode;

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

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

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

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

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

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

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