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

  textTransformation: string | core.StringOut;
}

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

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

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

  sqlInjectionMatchTuples?:
    | core.Array<SqlInjectionMatchTuples>
    | core.ArrayOut<SqlInjectionMatchTuples>;
}

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

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

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

  constructor(name: string, args?: SqlInjectionMatchSetArgs) {
    super(name, "aws_waf_sql_injection_match_set", args);
  }

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