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

export interface CloudwatchEventApiDestinationArgs extends core.ResourceArgs {
  connectionArn: string | core.StringOut;

  description?: string | core.StringOut;

  httpMethod: string | core.StringOut;

  invocationEndpoint: string | core.StringOut;

  invocationRateLimitPerSecond?: number | core.NumberOut;

  name: string | core.StringOut;
}

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

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

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

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

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

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

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

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

  constructor(name: string, args?: CloudwatchEventApiDestinationArgs) {
    super(name, "aws_cloudwatch_event_api_destination", args);
  }

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