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

export interface ThrottleSettingsArgs extends core.SchemaArgs {
  burstLimit: number | core.NumberOut;

  rateLimit: number | core.NumberOut;
}

export class ThrottleSettings extends core.Schema<ThrottleSettingsArgs> {
  @core.attr(Number, { computed: true })
  public burstLimit!: number | core.NumberOut;

  @core.attr(Number, { computed: true })
  public rateLimit!: number | core.NumberOut;
}

export interface AccountArgs extends core.ResourceArgs {
  cloudwatchRoleArn?: string | core.StringOut;
}

export class Account extends core.Resource<AccountArgs> {
  @core.attr(String)
  public cloudwatchRoleArn?: string | core.StringOut;

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

  @core.attr(ThrottleSettings, { computed: true, kind: "array" })
  public throttleSettings!:
    | core.Array<ThrottleSettings>
    | core.ArrayOut<ThrottleSettings>;

  constructor(name: string, args?: AccountArgs) {
    super(name, "aws_api_gateway_account", args);
  }

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