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

export interface TargetsArgs extends core.SchemaArgs {
  key: string | core.StringOut;

  values: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export class Targets extends core.Schema<TargetsArgs> {
  @core.attr(String)
  public key!: string | core.StringOut;

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

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

  name?: string | core.StringOut;

  ownerInformation?: string | core.StringOut;

  resourceType: string | core.StringOut;

  targets: core.Array<Targets> | core.ArrayOut<Targets>;

  windowId: string | core.StringOut;
}

export class MaintenanceWindowTarget extends core.Resource<MaintenanceWindowTargetArgs> {
  @core.attr(String)
  public description?: 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 ownerInformation?: string | core.StringOut;

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

  @core.attr(Targets, { kind: "array" })
  public targets!: core.Array<Targets> | core.ArrayOut<Targets>;

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

  constructor(name: string, args?: MaintenanceWindowTargetArgs) {
    super(name, "aws_ssm_maintenance_window_target", args);
  }

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