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

  positionalConstraint: string | core.StringOut;

  targetString?: string | core.StringOut;

  textTransformation: string | core.StringOut;
}

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

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

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

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

export interface ByteMatchSetArgs extends core.ResourceArgs {
  byteMatchTuples?:
    | core.Array<ByteMatchTuples>
    | core.ArrayOut<ByteMatchTuples>;

  name: string | core.StringOut;
}

export class ByteMatchSet extends core.Resource<ByteMatchSetArgs> {
  @core.attr(ByteMatchTuples, { kind: "array" })
  public byteMatchTuples?:
    | core.Array<ByteMatchTuples>
    | core.ArrayOut<ByteMatchTuples>;

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

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

  constructor(name: string, args?: ByteMatchSetArgs) {
    super(name, "aws_waf_byte_match_set", args);
  }

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