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

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

  blueprintId: string | core.StringOut;

  bundleId: string | core.StringOut;

  keyPairName?: string | core.StringOut;

  name: string | core.StringOut;

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

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

  userData?: string | core.StringOut;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  @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 userData?: string | core.StringOut;

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

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

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