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

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)
  public key!: string | core.StringOut;

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

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)
  public configuration!: string | core.StringOut;

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

  @core.attr(String, { 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)
  public key!: string | core.StringOut;

  @core.attr(String, { 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)
  public approveAfterDays?: number | core.NumberOut;

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

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

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

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

export interface PatchBaselineArgs extends core.ResourceArgs {
  approvalRule?: core.Array<ApprovalRule> | core.ArrayOut<ApprovalRule>;

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

  approvedPatchesComplianceLevel?: string | core.StringOut;

  approvedPatchesEnableNonSecurity?: boolean | core.BooleanOut;

  description?: string | core.StringOut;

  globalFilter?: core.Array<GlobalFilter> | core.ArrayOut<GlobalFilter>;

  name: string | core.StringOut;

  operatingSystem?: string | core.StringOut;

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

  rejectedPatchesAction?: string | core.StringOut;

  source?: core.Array<Source> | core.ArrayOut<Source>;

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

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

export class PatchBaseline extends core.Resource<PatchBaselineArgs> {
  @core.attr(ApprovalRule, { kind: "array" })
  public approvalRule?: core.Array<ApprovalRule> | core.ArrayOut<ApprovalRule>;

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

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

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

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

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

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

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

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

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

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

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

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

  @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?: PatchBaselineArgs) {
    super(name, "aws_ssm_patch_baseline", args);
  }

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