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

export interface AuthorizerArgs extends core.ResourceArgs {
  authorizerCredentials?: string | core.StringOut;

  authorizerResultTtlInSeconds?: number | core.NumberOut;

  authorizerUri?: string | core.StringOut;

  identitySource?: string | core.StringOut;

  identityValidationExpression?: string | core.StringOut;

  name: string | core.StringOut;

  providerArns?: core.Array<string> | core.ArrayOut<core.StringOut>;

  restApiId: string | core.StringOut;

  type?: string | core.StringOut;
}

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

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

  @core.attr(Number)
  public authorizerResultTtlInSeconds?: number | core.NumberOut;

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

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

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

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

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

  @core.attr(String, { kind: "array" })
  public providerArns?: core.Array<string> | core.ArrayOut<core.StringOut>;

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

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

  constructor(name: string, args?: AuthorizerArgs) {
    super(name, "aws_api_gateway_authorizer", args);
  }

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