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

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

  restApiId: string | core.StringOut;

  validateRequestBody?: boolean | core.BooleanOut;

  validateRequestParameters?: boolean | core.BooleanOut;
}

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

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

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

  @core.attr(Boolean)
  public validateRequestBody?: boolean | core.BooleanOut;

  @core.attr(Boolean)
  public validateRequestParameters?: boolean | core.BooleanOut;

  constructor(name: string, args?: RequestValidatorArgs) {
    super(name, "aws_api_gateway_request_validator", args);
  }

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