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

export interface AccountAggregationSourceArgs extends core.SchemaArgs {
  accountIds: core.Array<string> | core.ArrayOut<core.StringOut>;

  allRegions?: boolean | core.BooleanOut;

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

export class AccountAggregationSource extends core.Schema<AccountAggregationSourceArgs> {
  @core.attr(String, { kind: "array" })
  public accountIds!: core.Array<string> | core.ArrayOut<core.StringOut>;

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

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

export interface OrganizationAggregationSourceArgs extends core.SchemaArgs {
  allRegions?: boolean | core.BooleanOut;

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

  roleArn: string | core.StringOut;
}

export class OrganizationAggregationSource extends core.Schema<OrganizationAggregationSourceArgs> {
  @core.attr(Boolean)
  public allRegions?: boolean | core.BooleanOut;

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

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

export interface ConfigurationAggregatorArgs extends core.ResourceArgs {
  accountAggregationSource?: AccountAggregationSource;

  name: string | core.StringOut;

  organizationAggregationSource?: OrganizationAggregationSource;

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

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

export class ConfigurationAggregator extends core.Resource<ConfigurationAggregatorArgs> {
  @core.attr(AccountAggregationSource)
  public accountAggregationSource?: AccountAggregationSource;

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

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

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

  @core.attr(OrganizationAggregationSource)
  public organizationAggregationSource?: OrganizationAggregationSource;

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

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