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

export interface AccountsArgs extends core.SchemaArgs {
  arn: string | core.StringOut;

  email: string | core.StringOut;

  id: string | core.StringOut;

  name: string | core.StringOut;
}

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

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

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

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

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

  parentId: string | core.StringOut;

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

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

export class OrganizationalUnit extends core.Resource<OrganizationalUnitArgs> {
  @core.attr(Accounts, { computed: true, kind: "array" })
  public accounts!: core.Array<Accounts> | core.ArrayOut<Accounts>;

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

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

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