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

export interface CloudwatchEventRuleArgs extends core.ResourceArgs {
  description?: string | core.StringOut;

  eventBusName?: string | core.StringOut;

  eventPattern?: string | core.StringOut;

  isEnabled?: boolean | core.BooleanOut;

  name?: string | core.StringOut;

  namePrefix?: string | core.StringOut;

  roleArn?: string | core.StringOut;

  scheduleExpression?: string | core.StringOut;

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

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

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

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

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

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

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

  @core.attr(Boolean)
  public isEnabled?: boolean | core.BooleanOut;

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

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

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

  @core.attr(String)
  public scheduleExpression?: string | 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?: CloudwatchEventRuleArgs) {
    super(name, "aws_cloudwatch_event_rule", args);
  }

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