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

export interface EbsArgs extends core.SchemaArgs {
  deleteOnTermination?: string | core.StringOut;

  encrypted?: string | core.StringOut;

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

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

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

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

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

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

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

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

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

  ebs?: Ebs;

  noDevice?: boolean | core.BooleanOut;

  virtualName?: string | core.StringOut;
}

export class BlockDeviceMapping extends core.Schema<BlockDeviceMappingArgs> {
  @core.attr(String)
  public deviceName?: string | core.StringOut;

  @core.attr(Ebs)
  public ebs?: Ebs;

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

  @core.attr(String)
  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, { kind: "array" })
  public blockDeviceMapping?:
    | core.Array<BlockDeviceMapping>
    | core.ArrayOut<BlockDeviceMapping>;

  @core.attr(String)
  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)
  public repositoryName!: string | core.StringOut;

  @core.attr(String)
  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)
  public name!: string | core.StringOut;

  @core.attr(String)
  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)
  public componentArn!: string | core.StringOut;

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

export interface ContainerRecipeArgs extends core.ResourceArgs {
  component: core.Array<Component> | core.ArrayOut<Component>;

  containerType: string | core.StringOut;

  description?: string | core.StringOut;

  dockerfileTemplateData?: string | core.StringOut;

  dockerfileTemplateUri?: string | core.StringOut;

  instanceConfiguration?: InstanceConfiguration;

  kmsKeyId?: string | core.StringOut;

  name: string | core.StringOut;

  parentImage: string | core.StringOut;

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

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

  targetRepository: TargetRepository;

  version: string | core.StringOut;

  workingDirectory?: string | core.StringOut;
}

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

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

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

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

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

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

  @core.attr(String)
  public dockerfileTemplateUri?: 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)
  public instanceConfiguration?: InstanceConfiguration;

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

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

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

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

  @core.attr(TargetRepository)
  public targetRepository!: TargetRepository;

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

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

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

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