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

export interface IncludeMapArgs extends core.SchemaArgs {
  account?: core.Array<string> | core.ArrayOut<core.StringOut>;

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

export class IncludeMap extends core.Schema<IncludeMapArgs> {
  @core.attr(String, { kind: "array" })
  public account?: core.Array<string> | core.ArrayOut<core.StringOut>;

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

export interface SecurityServicePolicyDataArgs extends core.SchemaArgs {
  managedServiceData?: string | core.StringOut;

  type: string | core.StringOut;
}

export class SecurityServicePolicyData extends core.Schema<SecurityServicePolicyDataArgs> {
  @core.attr(String)
  public managedServiceData?: string | core.StringOut;

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

export interface ExcludeMapArgs extends core.SchemaArgs {
  account?: core.Array<string> | core.ArrayOut<core.StringOut>;

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

export class ExcludeMap extends core.Schema<ExcludeMapArgs> {
  @core.attr(String, { kind: "array" })
  public account?: core.Array<string> | core.ArrayOut<core.StringOut>;

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

export interface PolicyArgs extends core.ResourceArgs {
  deleteAllPolicyResources?: boolean | core.BooleanOut;

  deleteUnusedFmManagedResources?: boolean | core.BooleanOut;

  excludeMap?: ExcludeMap;

  excludeResourceTags: boolean | core.BooleanOut;

  includeMap?: IncludeMap;

  name: string | core.StringOut;

  remediationEnabled?: boolean | core.BooleanOut;

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

  resourceType?: string | core.StringOut;

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

  securityServicePolicyData: SecurityServicePolicyData;

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

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

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

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

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

  @core.attr(ExcludeMap)
  public excludeMap?: ExcludeMap;

  @core.attr(Boolean)
  public excludeResourceTags!: boolean | core.BooleanOut;

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

  @core.attr(IncludeMap)
  public includeMap?: IncludeMap;

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

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

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

  @core.attr(String, { kind: "map" })
  public resourceTags?: core.Map<string, string> | core.MapOut<core.StringOut>;

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

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

  @core.attr(SecurityServicePolicyData)
  public securityServicePolicyData!: SecurityServicePolicyData;

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

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