/**
 * Generated by orval 🍺
 * Do not edit manually.
 * messages API
 * This is the messages API schema.
 * OpenAPI spec version: 1.0.0 (v1.0)
 */
import type { MailboxAccessNestedUser } from "./mailbox_access_nested_user";
import type { MailboxAdminCreateContact } from "./mailbox_admin_create_contact";

/**
 * Serialize Mailbox details for create admin endpoint, including users with access and
metadata.
 */
export interface MailboxAdminCreate {
  /** primary key for the record as UUID */
  readonly id: string;
  readonly local_part: string;
  readonly domain_name: string;
  /** Whether this mailbox identifies a person (i.e. is not an alias or a group) */
  readonly is_identity: boolean;
  /**
   * primary key for the record as UUID
   * @nullable
   */
  alias_of?: string | null;
  readonly accesses: readonly MailboxAccessNestedUser[];
  /** date and time at which a record was created */
  readonly created_at: string;
  /** date and time at which a record was last updated */
  readonly updated_at: string;
  readonly can_reset_password: boolean;
  /** @nullable */
  readonly contact: MailboxAdminCreateContact;
  /**
   * Most recent ``accessed_at`` across all mailbox accesses.
   * @nullable
   */
  readonly last_accessed_at: string | null;
  /**
   * Whether the Keycloak user backing this mailbox carries the KEYCLOAK_TOTP_ROLE_ID realm role. ``null`` when the feature is disabled or the role id isn't configured.
   * @nullable
   */
  readonly has_mandatory_totp: boolean | null;
  /**
   * Fake method just to make the OpenAPI schema valid.
   * @nullable
   */
  readonly one_time_password: string | null;
}
