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

export interface BlockDeviceMappingsArgs extends core.SchemaArgs {
  deviceName: string | core.StringOut;

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

  noDevice: string | core.StringOut;

  virtualName: string | core.StringOut;
}

export class BlockDeviceMappings extends core.Schema<BlockDeviceMappingsArgs> {
  @core.attr(String, { computed: true })
  public deviceName!: string | core.StringOut;

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

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

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

export interface ProductCodesArgs extends core.SchemaArgs {
  productCodeId: string | core.StringOut;

  productCodeType: string | core.StringOut;
}

export class ProductCodes extends core.Schema<ProductCodesArgs> {
  @core.attr(String, { computed: true })
  public productCodeId!: string | core.StringOut;

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

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 DsAmiArgs {
  executableUsers?: core.Array<string> | core.ArrayOut<core.StringOut>;

  filter?: core.Array<Filter> | core.ArrayOut<Filter>;

  includeDeprecated?: boolean | core.BooleanOut;

  mostRecent?: boolean | core.BooleanOut;

  nameRegex?: string | core.StringOut;

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

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

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

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

  @core.attr(BlockDeviceMappings, { computed: true, kind: "array" })
  public blockDeviceMappings!:
    | core.Array<BlockDeviceMappings>
    | core.ArrayOut<BlockDeviceMappings>;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  @core.attr(ProductCodes, { computed: true, kind: "array" })
  public productCodes!: core.Array<ProductCodes> | core.ArrayOut<ProductCodes>;

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

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

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

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

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

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

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

  @core.attr(String, { computed: true, kind: "map" })
  public stateReason!: core.Map<string, string> | core.MapOut<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 tpmSupport!: string | core.StringOut;

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

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

  constructor(name: string, args?: DsAmiArgs) {
    super(name, "aws_ami", args);
  }

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