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 RootBlockDeviceArgs extends core.SchemaArgs {
  deleteOnTermination?: boolean | core.BooleanOut;

  iops?: 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(Number, { computed: true })
  public iops?: 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 EbsBlockDeviceArgs extends core.SchemaArgs {
  deleteOnTermination?: boolean | core.BooleanOut;

  deviceName: string | core.StringOut;

  iops?: number | core.NumberOut;

  snapshotId?: string | core.StringOut;

  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(Number, { computed: true })
  public iops?: number | core.NumberOut;

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

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

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

export interface InstanceArgs extends core.ResourceArgs {
  agentVersion?: string | core.StringOut;

  amiId?: string | core.StringOut;

  architecture?: string | core.StringOut;

  autoScalingType?: string | core.StringOut;

  availabilityZone?: string | core.StringOut;

  createdAt?: string | core.StringOut;

  deleteEbs?: boolean | core.BooleanOut;

  deleteEip?: boolean | core.BooleanOut;

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

  ebsOptimized?: boolean | core.BooleanOut;

  ecsClusterArn?: string | core.StringOut;

  elasticIp?: string | core.StringOut;

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

  hostname?: string | core.StringOut;

  infrastructureClass?: string | core.StringOut;

  installUpdatesOnBoot?: boolean | core.BooleanOut;

  instanceProfileArn?: string | core.StringOut;

  instanceType?: string | core.StringOut;

  layerIds: core.Array<string> | core.ArrayOut<core.StringOut>;

  os?: string | core.StringOut;

  rootBlockDevice?:
    | core.Array<RootBlockDevice>
    | core.ArrayOut<RootBlockDevice>;

  rootDeviceType?: string | core.StringOut;

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

  sshKeyName?: string | core.StringOut;

  stackId: string | core.StringOut;

  state?: string | core.StringOut;

  status?: string | core.StringOut;

  subnetId?: string | core.StringOut;

  tenancy?: string | core.StringOut;

  virtualizationType?: string | core.StringOut;
}

export class Instance extends core.Resource<InstanceArgs> {
  @core.attr(String)
  public agentVersion?: string | core.StringOut;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  constructor(name: string, args?: InstanceArgs) {
    super(name, "aws_opsworks_instance", args);
  }

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