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

export interface MaintenanceWindowArgs extends core.ResourceArgs {
  allowUnassociatedTargets?: boolean | core.BooleanOut;

  cutoff: number | core.NumberOut;

  description?: string | core.StringOut;

  duration: number | core.NumberOut;

  enabled?: boolean | core.BooleanOut;

  endDate?: string | core.StringOut;

  name: string | core.StringOut;

  schedule: string | core.StringOut;

  scheduleOffset?: number | core.NumberOut;

  scheduleTimezone?: string | core.StringOut;

  startDate?: string | core.StringOut;

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

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

export class MaintenanceWindow extends core.Resource<MaintenanceWindowArgs> {
  @core.attr(Boolean)
  public allowUnassociatedTargets?: boolean | core.BooleanOut;

  @core.attr(Number)
  public cutoff!: number | core.NumberOut;

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

  @core.attr(Number)
  public duration!: number | core.NumberOut;

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

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

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

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

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

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

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

  @core.attr(String)
  public startDate?: 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?: MaintenanceWindowArgs) {
    super(name, "aws_ssm_maintenance_window", args);
  }

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