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

  hostId?: string | core.StringOut;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  constructor(name: string, args?: DsHostArgs) {
    super(name, "aws_ec2_host", args);
  }

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