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

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

  scheduleExpression: string | core.StringOut;

  timezone?: string | core.StringOut;
}

export class Schedule extends core.Schema<ScheduleArgs> {
  @core.attr(String)
  public pipelineExecutionStartCondition?: string | core.StringOut;

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

  @core.attr(String, { computed: true })
  public timezone?: 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)
  public imageTestsEnabled?: boolean | core.BooleanOut;

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

export interface ImagePipelineArgs extends core.ResourceArgs {
  containerRecipeArn?: string | core.StringOut;

  description?: string | core.StringOut;

  distributionConfigurationArn?: string | core.StringOut;

  enhancedImageMetadataEnabled?: boolean | core.BooleanOut;

  imageRecipeArn?: string | core.StringOut;

  imageTestsConfiguration?: ImageTestsConfiguration;

  infrastructureConfigurationArn: string | core.StringOut;

  name: string | core.StringOut;

  schedule?: Schedule;

  status?: string | core.StringOut;

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

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

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

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

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

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

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

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

  @core.attr(ImageTestsConfiguration, { computed: true })
  public imageTestsConfiguration?: ImageTestsConfiguration;

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

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

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

  @core.attr(Schedule)
  public schedule?: Schedule;

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

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

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