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

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

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

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

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

export interface ComplianceDetailsArgs extends core.SchemaArgs {
  complianceStatus: boolean | core.BooleanOut;

  keysWithNoncompliantValues:
    | core.Array<string>
    | core.ArrayOut<core.StringOut>;

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

export class ComplianceDetails extends core.Schema<ComplianceDetailsArgs> {
  @core.attr(Boolean, { computed: true })
  public complianceStatus!: boolean | core.BooleanOut;

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

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

export interface ResourceTagMappingListArgs extends core.SchemaArgs {
  complianceDetails:
    | core.Array<ComplianceDetails>
    | core.ArrayOut<ComplianceDetails>;

  resourceArn: string | core.StringOut;

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

export class ResourceTagMappingList extends core.Schema<ResourceTagMappingListArgs> {
  @core.attr(ComplianceDetails, { computed: true, kind: "array" })
  public complianceDetails!:
    | core.Array<ComplianceDetails>
    | core.ArrayOut<ComplianceDetails>;

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

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

export interface DsApiResourcesArgs {
  excludeCompliantResources?: boolean | core.BooleanOut;

  includeComplianceDetails?: boolean | core.BooleanOut;

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

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

  tagFilter?: core.Array<TagFilter> | core.ArrayOut<TagFilter>;
}

export class DsApiResources extends core.Data<DsApiResourcesArgs> {
  @core.attr(Boolean)
  public excludeCompliantResources?: boolean | core.BooleanOut;

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

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

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

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

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

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

  constructor(name: string, args?: DsApiResourcesArgs) {
    super(name, "aws_resourcegroupstaggingapi_resources", args);
  }

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