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

export interface RealtimeMetricsSubscriptionConfigArgs extends core.SchemaArgs {
  realtimeMetricsSubscriptionStatus: string | core.StringOut;
}

export class RealtimeMetricsSubscriptionConfig extends core.Schema<RealtimeMetricsSubscriptionConfigArgs> {
  @core.attr(String)
  public realtimeMetricsSubscriptionStatus!: string | core.StringOut;
}

export interface MonitoringSubscriptionBlkArgs extends core.SchemaArgs {
  realtimeMetricsSubscriptionConfig: RealtimeMetricsSubscriptionConfig;
}

export class MonitoringSubscriptionBlk extends core.Schema<MonitoringSubscriptionBlkArgs> {
  @core.attr(RealtimeMetricsSubscriptionConfig)
  public realtimeMetricsSubscriptionConfig!: RealtimeMetricsSubscriptionConfig;
}

export interface MonitoringSubscriptionArgs extends core.ResourceArgs {
  distributionId: string | core.StringOut;

  monitoringSubscription: MonitoringSubscriptionBlk;
}

export class MonitoringSubscription extends core.Resource<MonitoringSubscriptionArgs> {
  @core.attr(String)
  public distributionId!: string | core.StringOut;

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

  @core.attr(MonitoringSubscriptionBlk)
  public monitoringSubscription!: MonitoringSubscriptionBlk;

  constructor(name: string, args?: MonitoringSubscriptionArgs) {
    super(name, "aws_cloudfront_monitoring_subscription", args);
  }

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