import { serializeHubParagraphTextBlockV2025R0 } from './hubParagraphTextBlockV2025R0.js';
import { deserializeHubParagraphTextBlockV2025R0 } from './hubParagraphTextBlockV2025R0.js';
import { serializeHubSectionTitleTextBlockV2025R0 } from './hubSectionTitleTextBlockV2025R0.js';
import { deserializeHubSectionTitleTextBlockV2025R0 } from './hubSectionTitleTextBlockV2025R0.js';
import { serializeHubCalloutBoxTextBlockV2025R0 } from './hubCalloutBoxTextBlockV2025R0.js';
import { deserializeHubCalloutBoxTextBlockV2025R0 } from './hubCalloutBoxTextBlockV2025R0.js';
import { serializeHubItemListBlockV2025R0 } from './hubItemListBlockV2025R0.js';
import { deserializeHubItemListBlockV2025R0 } from './hubItemListBlockV2025R0.js';
import { serializeHubDividerBlockV2025R0 } from './hubDividerBlockV2025R0.js';
import { deserializeHubDividerBlockV2025R0 } from './hubDividerBlockV2025R0.js';
import { BoxSdkError } from '../../box/errors.js';
import { sdIsMap } from '../../serialization/json.js';
export function serializeHubDocumentBlockEntryV2025R0(val) {
    if (val.type == 'paragraph') {
        return serializeHubParagraphTextBlockV2025R0(val);
    }
    if (val.type == 'section_title') {
        return serializeHubSectionTitleTextBlockV2025R0(val);
    }
    if (val.type == 'callout_box') {
        return serializeHubCalloutBoxTextBlockV2025R0(val);
    }
    if (val.type == 'item_list') {
        return serializeHubItemListBlockV2025R0(val);
    }
    if (val.type == 'divider') {
        return serializeHubDividerBlockV2025R0(val);
    }
    throw new BoxSdkError({ message: 'unknown type' });
}
export function deserializeHubDocumentBlockEntryV2025R0(val) {
    if (!sdIsMap(val)) {
        throw new BoxSdkError({
            message: 'Expecting a map for "HubDocumentBlockEntryV2025R0"',
        });
    }
    if (val.type == 'paragraph') {
        return deserializeHubParagraphTextBlockV2025R0(val);
    }
    if (val.type == 'section_title') {
        return deserializeHubSectionTitleTextBlockV2025R0(val);
    }
    if (val.type == 'callout_box') {
        return deserializeHubCalloutBoxTextBlockV2025R0(val);
    }
    if (val.type == 'item_list') {
        return deserializeHubItemListBlockV2025R0(val);
    }
    if (val.type == 'divider') {
        return deserializeHubDividerBlockV2025R0(val);
    }
    throw new BoxSdkError({
        message: "Can't deserialize HubDocumentBlockEntryV2025R0",
    });
}
//# sourceMappingURL=hubDocumentBlockEntryV2025R0.js.map