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

export interface S3DestinationArgs extends core.SchemaArgs {
  bucket: string | core.StringOut;

  encryptionDisabled?: boolean | core.BooleanOut;

  encryptionKey: string | core.StringOut;

  packaging?: string | core.StringOut;

  path?: string | core.StringOut;
}

export class S3Destination extends core.Schema<S3DestinationArgs> {
  @core.attr(String)
  public bucket!: string | core.StringOut;

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

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

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

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

export interface ExportConfigArgs extends core.SchemaArgs {
  s3Destination?: S3Destination;

  type: string | core.StringOut;
}

export class ExportConfig extends core.Schema<ExportConfigArgs> {
  @core.attr(S3Destination)
  public s3Destination?: S3Destination;

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

export interface ReportGroupArgs extends core.ResourceArgs {
  deleteReports?: boolean | core.BooleanOut;

  exportConfig: ExportConfig;

  name: string | core.StringOut;

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

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

  type: string | core.StringOut;
}

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

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

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

  @core.attr(ExportConfig)
  public exportConfig!: ExportConfig;

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

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

  constructor(name: string, args?: ReportGroupArgs) {
    super(name, "aws_codebuild_report_group", args);
  }

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