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

export interface CriterionArgs extends core.SchemaArgs {
  eq?: core.Array<string> | core.ArrayOut<core.StringOut>;

  eqExactMatch?: core.Array<string> | core.ArrayOut<core.StringOut>;

  field: string | core.StringOut;

  gt?: string | core.StringOut;

  gte?: string | core.StringOut;

  lt?: string | core.StringOut;

  lte?: string | core.StringOut;

  neq?: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export class Criterion extends core.Schema<CriterionArgs> {
  @core.attr(String, { kind: "array" })
  public eq?: core.Array<string> | core.ArrayOut<core.StringOut>;

  @core.attr(String, { kind: "array" })
  public eqExactMatch?: core.Array<string> | core.ArrayOut<core.StringOut>;

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

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

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

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

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

  @core.attr(String, { kind: "array" })
  public neq?: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export interface FindingCriteriaArgs extends core.SchemaArgs {
  criterion?: core.Array<Criterion> | core.ArrayOut<Criterion>;
}

export class FindingCriteria extends core.Schema<FindingCriteriaArgs> {
  @core.attr(Criterion, { kind: "array" })
  public criterion?: core.Array<Criterion> | core.ArrayOut<Criterion>;
}

export interface FindingsFilterArgs extends core.ResourceArgs {
  action: string | core.StringOut;

  description?: string | core.StringOut;

  findingCriteria: FindingCriteria;

  name?: string | core.StringOut;

  namePrefix?: string | core.StringOut;

  position?: number | core.NumberOut;

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

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

export class FindingsFilter extends core.Resource<FindingsFilterArgs> {
  @core.attr(String)
  public action!: string | core.StringOut;

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

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

  @core.attr(FindingCriteria)
  public findingCriteria!: FindingCriteria;

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

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

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

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

  @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?: FindingsFilterArgs) {
    super(name, "aws_macie2_findings_filter", args);
  }

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