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

export interface CompositeAlarmArgs extends core.ResourceArgs {
  actionsEnabled?: boolean | core.BooleanOut;

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

  alarmDescription?: string | core.StringOut;

  alarmName: string | core.StringOut;

  alarmRule: string | core.StringOut;

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

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

  tags?: core.Map<string, string> | core.MapOut<core.StringOut>;

  tagsAll?: core.Map<string, string> | core.MapOut<core.StringOut>;
}

export class CompositeAlarm extends core.Resource<CompositeAlarmArgs> {
  @core.attr(Boolean)
  public actionsEnabled?: boolean | core.BooleanOut;

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

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

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

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

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

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

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

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

  @core.attr(String, { kind: "map" })
  public tags?: core.Map<string, string> | core.MapOut<core.StringOut>;

  @core.attr(String, { computed: true, kind: "map" })
  public tagsAll?: core.Map<string, string> | core.MapOut<core.StringOut>;

  constructor(name: string, args?: CompositeAlarmArgs) {
    super(name, "aws_cloudwatch_composite_alarm", args);
  }

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