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

export interface FieldToMatchArgs extends core.SchemaArgs {
  data?: string | core.StringOut;

  type: string | core.StringOut;
}

export class FieldToMatch extends core.Schema<FieldToMatchArgs> {
  @core.attr(String)
  public data?: string | core.StringOut;

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

export interface RegexMatchTupleArgs extends core.SchemaArgs {
  fieldToMatch: FieldToMatch;

  regexPatternSetId: string | core.StringOut;

  textTransformation: string | core.StringOut;
}

export class RegexMatchTuple extends core.Schema<RegexMatchTupleArgs> {
  @core.attr(FieldToMatch)
  public fieldToMatch!: FieldToMatch;

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

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

export interface RegexMatchSetArgs extends core.ResourceArgs {
  name: string | core.StringOut;

  regexMatchTuple?:
    | core.Array<RegexMatchTuple>
    | core.ArrayOut<RegexMatchTuple>;
}

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

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

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

  constructor(name: string, args?: RegexMatchSetArgs) {
    super(name, "aws_wafregional_regex_match_set", args);
  }

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