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

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

  criteria: string | core.StringOut;

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

  exists?: string | core.StringOut;

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

export class Filter extends core.Schema<FilterArgs> {
  @core.attr(String, { computed: true, kind: "array" })
  public contains?: core.Array<string> | core.ArrayOut<core.StringOut>;

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

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

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

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

export interface ArchiveRuleArgs extends core.ResourceArgs {
  analyzerName: string | core.StringOut;

  filter: core.Array<Filter> | core.ArrayOut<Filter>;

  ruleName: string | core.StringOut;
}

export class ArchiveRule extends core.Resource<ArchiveRuleArgs> {
  @core.attr(String)
  public analyzerName!: string | core.StringOut;

  @core.attr(Filter, { kind: "array" })
  public filter!: core.Array<Filter> | core.ArrayOut<Filter>;

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

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

  constructor(name: string, args?: ArchiveRuleArgs) {
    super(name, "aws_accessanalyzer_archive_rule", args);
  }

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