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

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

  encrypted: boolean | core.BooleanOut;

  iops: number | core.NumberOut;

  kmsKeyId: string | core.StringOut;

  snapshotId: string | core.StringOut;

  throughput: number | core.NumberOut;

  volumeSize: number | core.NumberOut;

  volumeType: string | core.StringOut;
}

export class Ebs extends core.Schema<EbsArgs> {
  @core.attr(Boolean, { computed: true })
  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(String, { computed: true })
  public kmsKeyId!: string | core.StringOut;

  @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 BlockDeviceMappingArgs extends core.SchemaArgs {
  deviceName: string | core.StringOut;

  ebs: core.Array<Ebs> | core.ArrayOut<Ebs>;

  noDevice: string | core.StringOut;

  virtualName: string | core.StringOut;
}

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

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

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

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

export interface InstanceConfigurationArgs extends core.SchemaArgs {
  blockDeviceMapping:
    | core.Array<BlockDeviceMapping>
    | core.ArrayOut<BlockDeviceMapping>;

  image: string | core.StringOut;
}

export class InstanceConfiguration extends core.Schema<InstanceConfigurationArgs> {
  @core.attr(BlockDeviceMapping, { computed: true, kind: "array" })
  public blockDeviceMapping!:
    | core.Array<BlockDeviceMapping>
    | core.ArrayOut<BlockDeviceMapping>;

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

export interface TargetRepositoryArgs extends core.SchemaArgs {
  repositoryName: string | core.StringOut;

  service: string | core.StringOut;
}

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

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

export interface ParameterArgs extends core.SchemaArgs {
  name: string | core.StringOut;

  value: string | core.StringOut;
}

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

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

export interface ComponentArgs extends core.SchemaArgs {
  componentArn: string | core.StringOut;

  parameter: core.Array<Parameter> | core.ArrayOut<Parameter>;
}

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

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

export interface DsContainerRecipeArgs {
  arn: string | core.StringOut;

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

export class DsContainerRecipe extends core.Data<DsContainerRecipeArgs> {
  @core.attr(String)
  public arn!: string | core.StringOut;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  constructor(name: string, args?: DsContainerRecipeArgs) {
    super(name, "aws_imagebuilder_container_recipe", args);
  }

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