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

export interface AuthArgs extends core.SchemaArgs {
  authScheme: string | core.StringOut;

  description: string | core.StringOut;

  iamAuth: string | core.StringOut;

  secretArn: string | core.StringOut;

  username: string | core.StringOut;
}

export class Auth extends core.Schema<AuthArgs> {
  @core.attr(String, { computed: true })
  public authScheme!: string | core.StringOut;

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

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

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

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

export interface DsDbProxyArgs {
  name: string | core.StringOut;
}

export class DsDbProxy extends core.Data<DsDbProxyArgs> {
  @core.attr(String, { computed: true })
  public arn!: string | core.StringOut;

  @core.attr(Auth, { computed: true, kind: "array" })
  public auth!: core.Array<Auth> | core.ArrayOut<Auth>;

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

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

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

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

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

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

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

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

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

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

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

  constructor(name: string, args?: DsDbProxyArgs) {
    super(name, "aws_db_proxy", args);
  }

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