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

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

  id: string | core.StringOut;

  name: string | core.StringOut;
}

export class Children extends core.Schema<ChildrenArgs> {
  @core.attr(String, { computed: true })
  public arn!: 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 DsOrganizationalUnitsArgs {
  parentId: string | core.StringOut;
}

export class DsOrganizationalUnits extends core.Data<DsOrganizationalUnitsArgs> {
  @core.attr(Children, { computed: true, kind: "array" })
  public children!: core.Array<Children> | core.ArrayOut<Children>;

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

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

  constructor(name: string, args?: DsOrganizationalUnitsArgs) {
    super(name, "aws_organizations_organizational_units", args);
  }

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