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

export interface RecordingGroupArgs extends core.SchemaArgs {
  allSupported?: boolean | core.BooleanOut;

  includeGlobalResourceTypes?: boolean | core.BooleanOut;

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

export class RecordingGroup extends core.Schema<RecordingGroupArgs> {
  @core.attr(Boolean)
  public allSupported?: boolean | core.BooleanOut;

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

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

export interface ConfigurationRecorderArgs extends core.ResourceArgs {
  name?: string | core.StringOut;

  recordingGroup?: RecordingGroup;

  roleArn: string | core.StringOut;
}

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

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

  @core.attr(RecordingGroup, { computed: true })
  public recordingGroup?: RecordingGroup;

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

  constructor(name: string, args?: ConfigurationRecorderArgs) {
    super(name, "aws_config_configuration_recorder", args);
  }

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