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

export interface SourceArgs extends core.SchemaArgs {
  configuration: string | core.StringOut;

  name: string | core.StringOut;

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

export class Source extends core.Schema<SourceArgs> {
  @core.attr(String, { computed: true })
  public configuration!: string | core.StringOut;

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

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

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

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

export class PatchFilter extends core.Schema<PatchFilterArgs> {
  @core.attr(String, { computed: true })
  public key!: string | core.StringOut;

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

export interface ApprovalRuleArgs extends core.SchemaArgs {
  approveAfterDays: number | core.NumberOut;

  approveUntilDate: string | core.StringOut;

  complianceLevel: string | core.StringOut;

  enableNonSecurity: boolean | core.BooleanOut;

  patchFilter: core.Array<PatchFilter> | core.ArrayOut<PatchFilter>;
}

export class ApprovalRule extends core.Schema<ApprovalRuleArgs> {
  @core.attr(Number, { computed: true })
  public approveAfterDays!: number | core.NumberOut;

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

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

  @core.attr(Boolean, { computed: true })
  public enableNonSecurity!: boolean | core.BooleanOut;

  @core.attr(PatchFilter, { computed: true, kind: "array" })
  public patchFilter!: core.Array<PatchFilter> | core.ArrayOut<PatchFilter>;
}

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

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

export class GlobalFilter extends core.Schema<GlobalFilterArgs> {
  @core.attr(String, { computed: true })
  public key!: string | core.StringOut;

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

export interface DsPatchBaselineArgs {
  defaultBaseline?: boolean | core.BooleanOut;

  namePrefix?: string | core.StringOut;

  operatingSystem?: string | core.StringOut;

  owner: string | core.StringOut;
}

export class DsPatchBaseline extends core.Data<DsPatchBaselineArgs> {
  @core.attr(ApprovalRule, { computed: true, kind: "array" })
  public approvalRule!: core.Array<ApprovalRule> | core.ArrayOut<ApprovalRule>;

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

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

  @core.attr(Boolean, { computed: true })
  public approvedPatchesEnableNonSecurity!: boolean | core.BooleanOut;

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

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

  @core.attr(GlobalFilter, { computed: true, kind: "array" })
  public globalFilter!: core.Array<GlobalFilter> | core.ArrayOut<GlobalFilter>;

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

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

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

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

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

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

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

  @core.attr(Source, { computed: true, kind: "array" })
  public source!: core.Array<Source> | core.ArrayOut<Source>;

  constructor(name: string, args?: DsPatchBaselineArgs) {
    super(name, "aws_ssm_patch_baseline", args);
  }

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