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

export interface GeoMatchConstraintArgs extends core.SchemaArgs {
  type: string | core.StringOut;

  value: string | core.StringOut;
}

export class GeoMatchConstraint extends core.Schema<GeoMatchConstraintArgs> {
  @core.attr(String)
  public type!: string | core.StringOut;

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

export interface GeoMatchSetArgs extends core.ResourceArgs {
  geoMatchConstraint?:
    | core.Array<GeoMatchConstraint>
    | core.ArrayOut<GeoMatchConstraint>;

  name: string | core.StringOut;
}

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

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

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

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

  constructor(name: string, args?: GeoMatchSetArgs) {
    super(name, "aws_waf_geo_match_set", args);
  }

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