/*
 * Copyright (c) 2023-2025 Datalayer, Inc.
 * Distributed under the terms of the Modified BSD License.
 */
export class Inbound {
    id;
    subType;
    handle;
    payloadJson;
    creationDate;
    lastUpdateDate;
    constructor(u) {
        this.id = u.uid;
        this.subType = u.subType;
        this.handle = u.handle;
        this.payloadJson = u.payloadJson;
        this.creationDate = new Date(u.creationDate);
        this.lastUpdateDate = new Date(u.lastUpdateDate);
    }
}
/**
 * Convert the raw user object to {@link IInbound}.
 *
 * @param u Raw user object from DB
 * @returns Inbound
 */
export function asInbound(u) {
    return new Inbound(u);
}
