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

export interface DelegatedAdministratorArgs extends core.ResourceArgs {
  accountId: string | core.StringOut;

  servicePrincipal: string | core.StringOut;
}

export class DelegatedAdministrator extends core.Resource<DelegatedAdministratorArgs> {
  @core.attr(String)
  public accountId!: string | core.StringOut;

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

  @core.attr(String, { computed: true })
  public delegationEnabledDate!: 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 joinedMethod!: string | core.StringOut;

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

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

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

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

  constructor(name: string, args?: DelegatedAdministratorArgs) {
    super(name, "aws_organizations_delegated_administrator", args);
  }

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