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

export interface DelegatedServicesBlkArgs extends core.SchemaArgs {
  delegationEnabledDate: string | core.StringOut;

  servicePrincipal: string | core.StringOut;
}

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

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

export interface DsDelegatedServicesArgs {
  accountId: string | core.StringOut;
}

export class DsDelegatedServices extends core.Data<DsDelegatedServicesArgs> {
  @core.attr(String)
  public accountId!: string | core.StringOut;

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

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

  constructor(name: string, args?: DsDelegatedServicesArgs) {
    super(name, "aws_organizations_delegated_services", args);
  }

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