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

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

  virtualName: string | core.StringOut;
}

export class EphemeralBlockDevice extends core.Schema<EphemeralBlockDeviceArgs> {
  @core.attr(String)
  public deviceName!: string | core.StringOut;

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

export interface EbsBlockDeviceArgs extends core.SchemaArgs {
  deleteOnTermination?: boolean | core.BooleanOut;

  deviceName: string | core.StringOut;

  encrypted?: boolean | core.BooleanOut;

  iops?: number | core.NumberOut;

  outpostArn?: string | core.StringOut;

  snapshotId?: string | core.StringOut;

  throughput?: number | core.NumberOut;

  volumeSize?: number | core.NumberOut;

  volumeType?: string | core.StringOut;
}

export class EbsBlockDevice extends core.Schema<EbsBlockDeviceArgs> {
  @core.attr(Boolean)
  public deleteOnTermination?: boolean | core.BooleanOut;

  @core.attr(String)
  public deviceName!: string | core.StringOut;

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

  @core.attr(Number)
  public iops?: number | core.NumberOut;

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

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

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

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

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

export interface AmiArgs extends core.ResourceArgs {
  architecture?: string | core.StringOut;

  bootMode?: string | core.StringOut;

  deprecationTime?: string | core.StringOut;

  description?: string | core.StringOut;

  ebsBlockDevice?: core.Array<EbsBlockDevice> | core.ArrayOut<EbsBlockDevice>;

  enaSupport?: boolean | core.BooleanOut;

  ephemeralBlockDevice?:
    | core.Array<EphemeralBlockDevice>
    | core.ArrayOut<EphemeralBlockDevice>;

  imageLocation?: string | core.StringOut;

  kernelId?: string | core.StringOut;

  name: string | core.StringOut;

  ramdiskId?: string | core.StringOut;

  rootDeviceName?: string | core.StringOut;

  sriovNetSupport?: string | core.StringOut;

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

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

  tpmSupport?: string | core.StringOut;

  virtualizationType?: string | core.StringOut;
}

export class Ami extends core.Resource<AmiArgs> {
  @core.attr(String)
  public architecture?: string | core.StringOut;

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

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

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

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

  @core.attr(EbsBlockDevice, { computed: true, kind: "array" })
  public ebsBlockDevice?:
    | core.Array<EbsBlockDevice>
    | core.ArrayOut<EbsBlockDevice>;

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

  @core.attr(EphemeralBlockDevice, { computed: true, kind: "array" })
  public ephemeralBlockDevice?:
    | core.Array<EphemeralBlockDevice>
    | core.ArrayOut<EphemeralBlockDevice>;

  @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 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(String)
  public kernelId?: string | core.StringOut;

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

  @core.attr(String)
  public name!: string | core.StringOut;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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