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 XssMatchTuplesArgs extends core.SchemaArgs {
  fieldToMatch: FieldToMatch;

  textTransformation: string | core.StringOut;
}

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

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

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

  xssMatchTuples?: core.Array<XssMatchTuples> | core.ArrayOut<XssMatchTuples>;
}

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

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

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

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

  constructor(name: string, args?: XssMatchSetArgs) {
    super(name, "aws_waf_xss_match_set", args);
  }

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