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

export interface ScheduleArgs extends core.SchemaArgs {
  pipelineExecutionStartCondition: string | core.StringOut;

  scheduleExpression: string | core.StringOut;
}

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

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

export interface ImageTestsConfigurationArgs extends core.SchemaArgs {
  imageTestsEnabled: boolean | core.BooleanOut;

  timeoutMinutes: number | core.NumberOut;
}

export class ImageTestsConfiguration extends core.Schema<ImageTestsConfigurationArgs> {
  @core.attr(Boolean, { computed: true })
  public imageTestsEnabled!: boolean | core.BooleanOut;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  constructor(name: string, args?: DsImagePipelineArgs) {
    super(name, "aws_imagebuilder_image_pipeline", args);
  }

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