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

export interface RegularExpressionArgs extends core.SchemaArgs {
  regexString: string | core.StringOut;
}

export class RegularExpression extends core.Schema<RegularExpressionArgs> {
  @core.attr(String)
  public regexString!: string | core.StringOut;
}

export interface V2RegexPatternSetArgs extends core.ResourceArgs {
  description?: string | core.StringOut;

  name: string | core.StringOut;

  regularExpression?:
    | core.Array<RegularExpression>
    | core.ArrayOut<RegularExpression>;

  scope: string | core.StringOut;

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

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

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

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

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

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

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

  @core.attr(RegularExpression, { kind: "array" })
  public regularExpression?:
    | core.Array<RegularExpression>
    | core.ArrayOut<RegularExpression>;

  @core.attr(String)
  public scope!: 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?: V2RegexPatternSetArgs) {
    super(name, "aws_wafv2_regex_pattern_set", args);
  }

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