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 DsSnapshotArgs {
  filter?: core.Array<Filter> | core.ArrayOut<Filter>;

  mostRecent?: boolean | core.BooleanOut;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  constructor(name: string, args?: DsSnapshotArgs) {
    super(name, "aws_ebs_snapshot", args);
  }

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