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

  includePublicKey?: boolean | core.BooleanOut;

  keyName?: string | core.StringOut;

  keyPairId?: string | core.StringOut;

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

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

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

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

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

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

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

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

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

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

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

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

  constructor(name: string, args?: DsKeyPairArgs) {
    super(name, "aws_key_pair", args);
  }

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