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

export interface FilterArgs extends core.SchemaArgs {
  name: string | core.StringOut;

  values: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export class Filter extends core.Schema<FilterArgs> {
  @core.attr(String)
  public name!: string | core.StringOut;

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

export interface DsVolumeArgs {
  filter?: core.Array<Filter> | core.ArrayOut<Filter>;

  mostRecent?: boolean | core.BooleanOut;

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

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

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

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

  @core.attr(Filter, { kind: "array" })
  public filter?: core.Array<Filter> | core.ArrayOut<Filter>;

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

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

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

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

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

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

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

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

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

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

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

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

  constructor(name: string, args?: DsVolumeArgs) {
    super(name, "aws_ebs_volume", args);
  }

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