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

export interface DatabaseArgs extends core.ResourceArgs {
  applyImmediately?: boolean | core.BooleanOut;

  availabilityZone: string | core.StringOut;

  backupRetentionEnabled?: boolean | core.BooleanOut;

  blueprintId: string | core.StringOut;

  bundleId: string | core.StringOut;

  finalSnapshotName?: string | core.StringOut;

  masterDatabaseName: string | core.StringOut;

  masterPassword: string | core.StringOut;

  masterUsername: string | core.StringOut;

  preferredBackupWindow?: string | core.StringOut;

  preferredMaintenanceWindow?: string | core.StringOut;

  publiclyAccessible?: boolean | core.BooleanOut;

  relationalDatabaseName: string | core.StringOut;

  skipFinalSnapshot?: boolean | core.BooleanOut;

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

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

export class Database extends core.Resource<DatabaseArgs> {
  @core.attr(Boolean, { computed: true })
  public applyImmediately?: boolean | core.BooleanOut;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  @core.attr(String, { computed: true })
  public supportCode!: 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>;

  constructor(name: string, args?: DatabaseArgs) {
    super(name, "aws_lightsail_database", args);
  }

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