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

export interface PolicyTypesArgs extends core.SchemaArgs {
  status: string | core.StringOut;

  type: string | core.StringOut;
}

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

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

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

  id: string | core.StringOut;

  name: string | core.StringOut;

  policyTypes: core.Array<PolicyTypes> | core.ArrayOut<PolicyTypes>;
}

export class Roots extends core.Schema<RootsArgs> {
  @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;

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

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

  email: string | core.StringOut;

  id: string | core.StringOut;

  name: string | core.StringOut;

  status: string | core.StringOut;
}

export class NonMasterAccounts extends core.Schema<NonMasterAccountsArgs> {
  @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;

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

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

  email: string | core.StringOut;

  id: string | core.StringOut;

  name: string | core.StringOut;

  status: 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;

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

export interface OrganizationArgs extends core.ResourceArgs {
  awsServiceAccessPrincipals?:
    | core.Array<string>
    | core.ArrayOut<core.StringOut>;

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

  featureSet?: string | core.StringOut;
}

export class Organization extends core.Resource<OrganizationArgs> {
  @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, { kind: "array" })
  public awsServiceAccessPrincipals?:
    | core.Array<string>
    | core.ArrayOut<core.StringOut>;

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

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

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

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

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

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

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

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

  constructor(name: string, args?: OrganizationArgs) {
    super(name, "aws_organizations_organization", args);
  }

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