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

export interface EncryptionConfigurationArgs extends core.SchemaArgs {
  encryptionType: string | core.StringOut;

  kmsKey: string | core.StringOut;
}

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

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

export interface ImageScanningConfigurationArgs extends core.SchemaArgs {
  scanOnPush: boolean | core.BooleanOut;
}

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

export interface DsRepositoryArgs {
  name: string | core.StringOut;

  registryId?: string | core.StringOut;

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

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

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

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

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

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

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

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

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

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

  constructor(name: string, args?: DsRepositoryArgs) {
    super(name, "aws_ecr_repository", args);
  }

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