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

export interface MemberArgs extends core.ResourceArgs {
  /**
   * (Required) The ID of the member AWS account.
   */
  accountId: string | core.StringOut;

  /**
   * (Required) The email of the member AWS account.
   */
  email: string | core.StringOut;

  /**
   * (Optional) Boolean whether to invite the account to Security Hub as a member. Defaults to `false`.
   */
  invite?: boolean | core.BooleanOut;
}

export class Member extends core.Resource<MemberArgs> {
  /**
   * (Required) The ID of the member AWS account.
   */
  @core.attr(String)
  public accountId!: string | core.StringOut;

  /**
   * (Required) The email of the member AWS account.
   */
  @core.attr(String)
  public email!: string | core.StringOut;

  /**
   * The ID of the member AWS account (matches `account_id`).
   */
  @core.attr(String, { computed: true })
  public id!: string | core.StringOut;

  /**
   * (Optional) Boolean whether to invite the account to Security Hub as a member. Defaults to `false`.
   */
  @core.attr(Boolean)
  public invite?: boolean | core.BooleanOut;

  /**
   * The ID of the master Security Hub AWS account.
   */
  @core.attr(String, { computed: true })
  public masterId!: string | core.StringOut;

  /**
   * The status of the member account relationship.
   */
  @core.attr(String, { computed: true })
  public memberStatus!: string | core.StringOut;

  constructor(name: string, args?: MemberArgs) {
    super(name, "aws_securityhub_member", args);
  }

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