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

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

  deviceName: string | core.StringOut;

  encrypted?: boolean | core.BooleanOut;

  iops?: number | core.NumberOut;

  noDevice?: boolean | core.BooleanOut;

  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, { computed: true })
  public encrypted?: boolean | core.BooleanOut;

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

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

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

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

  noDevice?: boolean | core.BooleanOut;

  virtualName?: string | core.StringOut;
}

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

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

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

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

  encrypted?: boolean | core.BooleanOut;

  iops?: number | core.NumberOut;

  throughput?: number | core.NumberOut;

  volumeSize?: number | core.NumberOut;

  volumeType?: string | core.StringOut;
}

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

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

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

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

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

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

export interface MetadataOptionsArgs extends core.SchemaArgs {
  httpEndpoint?: string | core.StringOut;

  httpPutResponseHopLimit?: number | core.NumberOut;

  httpTokens?: string | core.StringOut;
}

export class MetadataOptions extends core.Schema<MetadataOptionsArgs> {
  @core.attr(String, { computed: true })
  public httpEndpoint?: string | core.StringOut;

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

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

export interface LaunchConfigurationArgs extends core.ResourceArgs {
  associatePublicIpAddress?: boolean | core.BooleanOut;

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

  ebsOptimized?: boolean | core.BooleanOut;

  enableMonitoring?: boolean | core.BooleanOut;

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

  iamInstanceProfile?: string | core.StringOut;

  imageId: string | core.StringOut;

  instanceType: string | core.StringOut;

  keyName?: string | core.StringOut;

  metadataOptions?: MetadataOptions;

  name?: string | core.StringOut;

  namePrefix?: string | core.StringOut;

  placementTenancy?: string | core.StringOut;

  rootBlockDevice?: RootBlockDevice;

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

  spotPrice?: string | core.StringOut;

  userData?: string | core.StringOut;

  userDataBase64?: string | core.StringOut;

  vpcClassicLinkId?: string | core.StringOut;

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

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

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

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

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

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

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

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

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

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

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

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

  @core.attr(MetadataOptions, { computed: true })
  public metadataOptions?: MetadataOptions;

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

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

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

  @core.attr(RootBlockDevice, { computed: true })
  public rootBlockDevice?: RootBlockDevice;

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

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

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

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

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

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

  constructor(name: string, args?: LaunchConfigurationArgs) {
    super(name, "aws_launch_configuration", args);
  }

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