"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.serializeEnterpriseConfigurationContentAndSharingV2025R0SharedLinkDefaultPermissionsSelectedField = serializeEnterpriseConfigurationContentAndSharingV2025R0SharedLinkDefaultPermissionsSelectedField;
exports.deserializeEnterpriseConfigurationContentAndSharingV2025R0SharedLinkDefaultPermissionsSelectedField = deserializeEnterpriseConfigurationContentAndSharingV2025R0SharedLinkDefaultPermissionsSelectedField;
exports.serializeEnterpriseConfigurationContentAndSharingV2025R0CollaborationPermissionsField = serializeEnterpriseConfigurationContentAndSharingV2025R0CollaborationPermissionsField;
exports.deserializeEnterpriseConfigurationContentAndSharingV2025R0CollaborationPermissionsField = deserializeEnterpriseConfigurationContentAndSharingV2025R0CollaborationPermissionsField;
exports.serializeEnterpriseConfigurationContentAndSharingV2025R0CollaborationRestrictionsField = serializeEnterpriseConfigurationContentAndSharingV2025R0CollaborationRestrictionsField;
exports.deserializeEnterpriseConfigurationContentAndSharingV2025R0CollaborationRestrictionsField = deserializeEnterpriseConfigurationContentAndSharingV2025R0CollaborationRestrictionsField;
exports.serializeEnterpriseConfigurationContentAndSharingV2025R0ExternalCollaborationStatusField = serializeEnterpriseConfigurationContentAndSharingV2025R0ExternalCollaborationStatusField;
exports.deserializeEnterpriseConfigurationContentAndSharingV2025R0ExternalCollaborationStatusField = deserializeEnterpriseConfigurationContentAndSharingV2025R0ExternalCollaborationStatusField;
exports.serializeEnterpriseConfigurationContentAndSharingV2025R0ExternalCollaborationAllowlistUsersField = serializeEnterpriseConfigurationContentAndSharingV2025R0ExternalCollaborationAllowlistUsersField;
exports.deserializeEnterpriseConfigurationContentAndSharingV2025R0ExternalCollaborationAllowlistUsersField = deserializeEnterpriseConfigurationContentAndSharingV2025R0ExternalCollaborationAllowlistUsersField;
exports.serializeEnterpriseConfigurationContentAndSharingV2025R0PermanentDeletionAllowlistUsersField = serializeEnterpriseConfigurationContentAndSharingV2025R0PermanentDeletionAllowlistUsersField;
exports.deserializeEnterpriseConfigurationContentAndSharingV2025R0PermanentDeletionAllowlistUsersField = deserializeEnterpriseConfigurationContentAndSharingV2025R0PermanentDeletionAllowlistUsersField;
exports.serializeEnterpriseConfigurationContentAndSharingV2025R0 = serializeEnterpriseConfigurationContentAndSharingV2025R0;
exports.deserializeEnterpriseConfigurationContentAndSharingV2025R0 = deserializeEnterpriseConfigurationContentAndSharingV2025R0;
const enterpriseFeatureSettingsItemV2025R0_1 = require("./enterpriseFeatureSettingsItemV2025R0");
const enterpriseFeatureSettingsItemV2025R0_2 = require("./enterpriseFeatureSettingsItemV2025R0");
const enterpriseConfigurationItemStringV2025R0_1 = require("./enterpriseConfigurationItemStringV2025R0");
const enterpriseConfigurationItemStringV2025R0_2 = require("./enterpriseConfigurationItemStringV2025R0");
const enterpriseConfigurationItemV2025R0_1 = require("./enterpriseConfigurationItemV2025R0");
const sharedLinkPermissionsV2025R0_1 = require("./sharedLinkPermissionsV2025R0");
const sharedLinkPermissionsV2025R0_2 = require("./sharedLinkPermissionsV2025R0");
const enterpriseConfigurationItemBooleanV2025R0_1 = require("./enterpriseConfigurationItemBooleanV2025R0");
const enterpriseConfigurationItemBooleanV2025R0_2 = require("./enterpriseConfigurationItemBooleanV2025R0");
const collaborationPermissionsV2025R0_1 = require("./collaborationPermissionsV2025R0");
const collaborationPermissionsV2025R0_2 = require("./collaborationPermissionsV2025R0");
const listUserV2025R0_1 = require("./listUserV2025R0");
const listUserV2025R0_2 = require("./listUserV2025R0");
const enterpriseConfigurationItemIntegerV2025R0_1 = require("./enterpriseConfigurationItemIntegerV2025R0");
const enterpriseConfigurationItemIntegerV2025R0_2 = require("./enterpriseConfigurationItemIntegerV2025R0");
const errors_1 = require("../../box/errors");
const json_1 = require("../../serialization/json");
const json_2 = require("../../serialization/json");
const json_3 = require("../../serialization/json");
const json_4 = require("../../serialization/json");
function serializeEnterpriseConfigurationContentAndSharingV2025R0SharedLinkDefaultPermissionsSelectedField(val) {
    const base = (0, enterpriseConfigurationItemV2025R0_1.serializeEnterpriseConfigurationItemV2025R0)(val);
    if (!(0, json_4.sdIsMap)(base)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting a map for "EnterpriseConfigurationContentAndSharingV2025R0SharedLinkDefaultPermissionsSelectedField"',
        });
    }
    return {
        ...base,
        ...{
            ['value']: val.value == void 0
                ? val.value
                : (0, sharedLinkPermissionsV2025R0_1.serializeSharedLinkPermissionsV2025R0)(val.value),
        },
    };
}
function deserializeEnterpriseConfigurationContentAndSharingV2025R0SharedLinkDefaultPermissionsSelectedField(val) {
    if (!(0, json_4.sdIsMap)(val)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting a map for "EnterpriseConfigurationContentAndSharingV2025R0SharedLinkDefaultPermissionsSelectedField"',
        });
    }
    const value = val.value == void 0
        ? void 0
        : (0, sharedLinkPermissionsV2025R0_2.deserializeSharedLinkPermissionsV2025R0)(val.value);
    if (!(val.is_used == void 0) && !(0, json_1.sdIsBoolean)(val.is_used)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting boolean for "is_used" of type "EnterpriseConfigurationContentAndSharingV2025R0SharedLinkDefaultPermissionsSelectedField"',
        });
    }
    const isUsed = val.is_used == void 0 ? void 0 : val.is_used;
    return {
        value: value,
        isUsed: isUsed,
    };
}
function serializeEnterpriseConfigurationContentAndSharingV2025R0CollaborationPermissionsField(val) {
    const base = (0, enterpriseConfigurationItemV2025R0_1.serializeEnterpriseConfigurationItemV2025R0)(val);
    if (!(0, json_4.sdIsMap)(base)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting a map for "EnterpriseConfigurationContentAndSharingV2025R0CollaborationPermissionsField"',
        });
    }
    return {
        ...base,
        ...{
            ['value']: val.value == void 0
                ? val.value
                : (0, collaborationPermissionsV2025R0_1.serializeCollaborationPermissionsV2025R0)(val.value),
        },
    };
}
function deserializeEnterpriseConfigurationContentAndSharingV2025R0CollaborationPermissionsField(val) {
    if (!(0, json_4.sdIsMap)(val)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting a map for "EnterpriseConfigurationContentAndSharingV2025R0CollaborationPermissionsField"',
        });
    }
    const value = val.value == void 0
        ? void 0
        : (0, collaborationPermissionsV2025R0_2.deserializeCollaborationPermissionsV2025R0)(val.value);
    if (!(val.is_used == void 0) && !(0, json_1.sdIsBoolean)(val.is_used)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting boolean for "is_used" of type "EnterpriseConfigurationContentAndSharingV2025R0CollaborationPermissionsField"',
        });
    }
    const isUsed = val.is_used == void 0 ? void 0 : val.is_used;
    return {
        value: value,
        isUsed: isUsed,
    };
}
function serializeEnterpriseConfigurationContentAndSharingV2025R0CollaborationRestrictionsField(val) {
    const base = (0, enterpriseConfigurationItemV2025R0_1.serializeEnterpriseConfigurationItemV2025R0)(val);
    if (!(0, json_4.sdIsMap)(base)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting a map for "EnterpriseConfigurationContentAndSharingV2025R0CollaborationRestrictionsField"',
        });
    }
    return {
        ...base,
        ...{
            ['value']: val.value == void 0
                ? val.value
                : val.value.map(function (item) {
                    return item;
                }),
        },
    };
}
function deserializeEnterpriseConfigurationContentAndSharingV2025R0CollaborationRestrictionsField(val) {
    if (!(0, json_4.sdIsMap)(val)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting a map for "EnterpriseConfigurationContentAndSharingV2025R0CollaborationRestrictionsField"',
        });
    }
    if (!(val.value == void 0) && !(0, json_3.sdIsList)(val.value)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting array for "value" of type "EnterpriseConfigurationContentAndSharingV2025R0CollaborationRestrictionsField"',
        });
    }
    const value = val.value == void 0
        ? void 0
        : (0, json_3.sdIsList)(val.value)
            ? val.value.map(function (itm) {
                if (!(0, json_2.sdIsString)(itm)) {
                    throw new errors_1.BoxSdkError({
                        message: 'Expecting string for "EnterpriseConfigurationContentAndSharingV2025R0CollaborationRestrictionsField"',
                    });
                }
                return itm;
            })
            : [];
    if (!(val.is_used == void 0) && !(0, json_1.sdIsBoolean)(val.is_used)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting boolean for "is_used" of type "EnterpriseConfigurationContentAndSharingV2025R0CollaborationRestrictionsField"',
        });
    }
    const isUsed = val.is_used == void 0 ? void 0 : val.is_used;
    return {
        value: value,
        isUsed: isUsed,
    };
}
function serializeEnterpriseConfigurationContentAndSharingV2025R0ExternalCollaborationStatusField(val) {
    const base = (0, enterpriseConfigurationItemV2025R0_1.serializeEnterpriseConfigurationItemV2025R0)(val);
    if (!(0, json_4.sdIsMap)(base)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting a map for "EnterpriseConfigurationContentAndSharingV2025R0ExternalCollaborationStatusField"',
        });
    }
    return { ...base, ...{ ['value']: val.value } };
}
function deserializeEnterpriseConfigurationContentAndSharingV2025R0ExternalCollaborationStatusField(val) {
    if (!(0, json_4.sdIsMap)(val)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting a map for "EnterpriseConfigurationContentAndSharingV2025R0ExternalCollaborationStatusField"',
        });
    }
    if (!(val.value == void 0) && !(0, json_2.sdIsString)(val.value)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting string for "value" of type "EnterpriseConfigurationContentAndSharingV2025R0ExternalCollaborationStatusField"',
        });
    }
    const value = val.value == void 0 ? void 0 : val.value;
    if (!(val.is_used == void 0) && !(0, json_1.sdIsBoolean)(val.is_used)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting boolean for "is_used" of type "EnterpriseConfigurationContentAndSharingV2025R0ExternalCollaborationStatusField"',
        });
    }
    const isUsed = val.is_used == void 0 ? void 0 : val.is_used;
    return {
        value: value,
        isUsed: isUsed,
    };
}
function serializeEnterpriseConfigurationContentAndSharingV2025R0ExternalCollaborationAllowlistUsersField(val) {
    const base = (0, enterpriseConfigurationItemV2025R0_1.serializeEnterpriseConfigurationItemV2025R0)(val);
    if (!(0, json_4.sdIsMap)(base)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting a map for "EnterpriseConfigurationContentAndSharingV2025R0ExternalCollaborationAllowlistUsersField"',
        });
    }
    return {
        ...base,
        ...{
            ['value']: val.value == void 0
                ? val.value
                : val.value.map(function (item) {
                    return (0, listUserV2025R0_1.serializeListUserV2025R0)(item);
                }),
        },
    };
}
function deserializeEnterpriseConfigurationContentAndSharingV2025R0ExternalCollaborationAllowlistUsersField(val) {
    if (!(0, json_4.sdIsMap)(val)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting a map for "EnterpriseConfigurationContentAndSharingV2025R0ExternalCollaborationAllowlistUsersField"',
        });
    }
    if (!(val.value == void 0) && !(0, json_3.sdIsList)(val.value)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting array for "value" of type "EnterpriseConfigurationContentAndSharingV2025R0ExternalCollaborationAllowlistUsersField"',
        });
    }
    const value = val.value == void 0
        ? void 0
        : (0, json_3.sdIsList)(val.value)
            ? val.value.map(function (itm) {
                return (0, listUserV2025R0_2.deserializeListUserV2025R0)(itm);
            })
            : [];
    if (!(val.is_used == void 0) && !(0, json_1.sdIsBoolean)(val.is_used)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting boolean for "is_used" of type "EnterpriseConfigurationContentAndSharingV2025R0ExternalCollaborationAllowlistUsersField"',
        });
    }
    const isUsed = val.is_used == void 0 ? void 0 : val.is_used;
    return {
        value: value,
        isUsed: isUsed,
    };
}
function serializeEnterpriseConfigurationContentAndSharingV2025R0PermanentDeletionAllowlistUsersField(val) {
    const base = (0, enterpriseConfigurationItemV2025R0_1.serializeEnterpriseConfigurationItemV2025R0)(val);
    if (!(0, json_4.sdIsMap)(base)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting a map for "EnterpriseConfigurationContentAndSharingV2025R0PermanentDeletionAllowlistUsersField"',
        });
    }
    return {
        ...base,
        ...{
            ['value']: val.value == void 0
                ? val.value
                : val.value.map(function (item) {
                    return (0, listUserV2025R0_1.serializeListUserV2025R0)(item);
                }),
        },
    };
}
function deserializeEnterpriseConfigurationContentAndSharingV2025R0PermanentDeletionAllowlistUsersField(val) {
    if (!(0, json_4.sdIsMap)(val)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting a map for "EnterpriseConfigurationContentAndSharingV2025R0PermanentDeletionAllowlistUsersField"',
        });
    }
    if (!(val.value == void 0) && !(0, json_3.sdIsList)(val.value)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting array for "value" of type "EnterpriseConfigurationContentAndSharingV2025R0PermanentDeletionAllowlistUsersField"',
        });
    }
    const value = val.value == void 0
        ? void 0
        : (0, json_3.sdIsList)(val.value)
            ? val.value.map(function (itm) {
                return (0, listUserV2025R0_2.deserializeListUserV2025R0)(itm);
            })
            : [];
    if (!(val.is_used == void 0) && !(0, json_1.sdIsBoolean)(val.is_used)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting boolean for "is_used" of type "EnterpriseConfigurationContentAndSharingV2025R0PermanentDeletionAllowlistUsersField"',
        });
    }
    const isUsed = val.is_used == void 0 ? void 0 : val.is_used;
    return {
        value: value,
        isUsed: isUsed,
    };
}
function serializeEnterpriseConfigurationContentAndSharingV2025R0(val) {
    return {
        ['enterprise_feature_settings']: val.enterpriseFeatureSettings == void 0
            ? val.enterpriseFeatureSettings
            : val.enterpriseFeatureSettings.map(function (item) {
                return (0, enterpriseFeatureSettingsItemV2025R0_1.serializeEnterpriseFeatureSettingsItemV2025R0)(item);
            }),
        ['sharing_item_type']: val.sharingItemType == void 0
            ? val.sharingItemType
            : (0, enterpriseConfigurationItemStringV2025R0_1.serializeEnterpriseConfigurationItemStringV2025R0)(val.sharingItemType),
        ['shared_link_company_definition']: val.sharedLinkCompanyDefinition == void 0
            ? val.sharedLinkCompanyDefinition
            : (0, enterpriseConfigurationItemStringV2025R0_1.serializeEnterpriseConfigurationItemStringV2025R0)(val.sharedLinkCompanyDefinition),
        ['shared_link_access']: val.sharedLinkAccess == void 0
            ? val.sharedLinkAccess
            : (0, enterpriseConfigurationItemStringV2025R0_1.serializeEnterpriseConfigurationItemStringV2025R0)(val.sharedLinkAccess),
        ['shared_link_default_access']: val.sharedLinkDefaultAccess == void 0
            ? val.sharedLinkDefaultAccess
            : (0, enterpriseConfigurationItemStringV2025R0_1.serializeEnterpriseConfigurationItemStringV2025R0)(val.sharedLinkDefaultAccess),
        ['shared_link_default_permissions_selected']: val.sharedLinkDefaultPermissionsSelected == void 0
            ? val.sharedLinkDefaultPermissionsSelected
            : serializeEnterpriseConfigurationContentAndSharingV2025R0SharedLinkDefaultPermissionsSelectedField(val.sharedLinkDefaultPermissionsSelected),
        ['is_open_custom_urls_disabled']: val.isOpenCustomUrlsDisabled == void 0
            ? val.isOpenCustomUrlsDisabled
            : (0, enterpriseConfigurationItemBooleanV2025R0_1.serializeEnterpriseConfigurationItemBooleanV2025R0)(val.isOpenCustomUrlsDisabled),
        ['is_custom_domain_hidden_in_shared_link']: val.isCustomDomainHiddenInSharedLink == void 0
            ? val.isCustomDomainHiddenInSharedLink
            : (0, enterpriseConfigurationItemBooleanV2025R0_1.serializeEnterpriseConfigurationItemBooleanV2025R0)(val.isCustomDomainHiddenInSharedLink),
        ['collaboration_permissions']: val.collaborationPermissions == void 0
            ? val.collaborationPermissions
            : serializeEnterpriseConfigurationContentAndSharingV2025R0CollaborationPermissionsField(val.collaborationPermissions),
        ['default_collaboration_role']: val.defaultCollaborationRole == void 0
            ? val.defaultCollaborationRole
            : (0, enterpriseConfigurationItemStringV2025R0_1.serializeEnterpriseConfigurationItemStringV2025R0)(val.defaultCollaborationRole),
        ['is_invite_privilege_restricted']: val.isInvitePrivilegeRestricted == void 0
            ? val.isInvitePrivilegeRestricted
            : (0, enterpriseConfigurationItemBooleanV2025R0_1.serializeEnterpriseConfigurationItemBooleanV2025R0)(val.isInvitePrivilegeRestricted),
        ['collaboration_restrictions']: val.collaborationRestrictions == void 0
            ? val.collaborationRestrictions
            : serializeEnterpriseConfigurationContentAndSharingV2025R0CollaborationRestrictionsField(val.collaborationRestrictions),
        ['is_collaborator_invite_links_disabled']: val.isCollaboratorInviteLinksDisabled == void 0
            ? val.isCollaboratorInviteLinksDisabled
            : (0, enterpriseConfigurationItemBooleanV2025R0_1.serializeEnterpriseConfigurationItemBooleanV2025R0)(val.isCollaboratorInviteLinksDisabled),
        ['is_invite_group_collaborator_disabled']: val.isInviteGroupCollaboratorDisabled == void 0
            ? val.isInviteGroupCollaboratorDisabled
            : (0, enterpriseConfigurationItemBooleanV2025R0_1.serializeEnterpriseConfigurationItemBooleanV2025R0)(val.isInviteGroupCollaboratorDisabled),
        ['is_ownership_transfer_restricted']: val.isOwnershipTransferRestricted == void 0
            ? val.isOwnershipTransferRestricted
            : (0, enterpriseConfigurationItemBooleanV2025R0_1.serializeEnterpriseConfigurationItemBooleanV2025R0)(val.isOwnershipTransferRestricted),
        ['external_collaboration_status']: val.externalCollaborationStatus == void 0
            ? val.externalCollaborationStatus
            : serializeEnterpriseConfigurationContentAndSharingV2025R0ExternalCollaborationStatusField(val.externalCollaborationStatus),
        ['external_collaboration_allowlist_users']: val.externalCollaborationAllowlistUsers == void 0
            ? val.externalCollaborationAllowlistUsers
            : serializeEnterpriseConfigurationContentAndSharingV2025R0ExternalCollaborationAllowlistUsersField(val.externalCollaborationAllowlistUsers),
        ['is_watermarking_enterprise_feature_enabled']: val.isWatermarkingEnterpriseFeatureEnabled == void 0
            ? val.isWatermarkingEnterpriseFeatureEnabled
            : (0, enterpriseConfigurationItemBooleanV2025R0_1.serializeEnterpriseConfigurationItemBooleanV2025R0)(val.isWatermarkingEnterpriseFeatureEnabled),
        ['is_root_content_creation_restricted']: val.isRootContentCreationRestricted == void 0
            ? val.isRootContentCreationRestricted
            : (0, enterpriseConfigurationItemBooleanV2025R0_1.serializeEnterpriseConfigurationItemBooleanV2025R0)(val.isRootContentCreationRestricted),
        ['is_tag_creation_restricted']: val.isTagCreationRestricted == void 0
            ? val.isTagCreationRestricted
            : (0, enterpriseConfigurationItemBooleanV2025R0_1.serializeEnterpriseConfigurationItemBooleanV2025R0)(val.isTagCreationRestricted),
        ['tag_creation_restriction']: val.tagCreationRestriction == void 0
            ? val.tagCreationRestriction
            : (0, enterpriseConfigurationItemStringV2025R0_1.serializeEnterpriseConfigurationItemStringV2025R0)(val.tagCreationRestriction),
        ['is_email_uploads_enabled']: val.isEmailUploadsEnabled == void 0
            ? val.isEmailUploadsEnabled
            : (0, enterpriseConfigurationItemBooleanV2025R0_1.serializeEnterpriseConfigurationItemBooleanV2025R0)(val.isEmailUploadsEnabled),
        ['is_custom_settings_enabled']: val.isCustomSettingsEnabled == void 0
            ? val.isCustomSettingsEnabled
            : (0, enterpriseConfigurationItemBooleanV2025R0_1.serializeEnterpriseConfigurationItemBooleanV2025R0)(val.isCustomSettingsEnabled),
        ['is_forms_login_required']: val.isFormsLoginRequired == void 0
            ? val.isFormsLoginRequired
            : (0, enterpriseConfigurationItemBooleanV2025R0_1.serializeEnterpriseConfigurationItemBooleanV2025R0)(val.isFormsLoginRequired),
        ['is_forms_branding_default_enabled']: val.isFormsBrandingDefaultEnabled == void 0
            ? val.isFormsBrandingDefaultEnabled
            : (0, enterpriseConfigurationItemBooleanV2025R0_1.serializeEnterpriseConfigurationItemBooleanV2025R0)(val.isFormsBrandingDefaultEnabled),
        ['is_cc_free_trial_active']: val.isCcFreeTrialActive == void 0
            ? val.isCcFreeTrialActive
            : (0, enterpriseConfigurationItemBooleanV2025R0_1.serializeEnterpriseConfigurationItemBooleanV2025R0)(val.isCcFreeTrialActive),
        ['is_file_request_editors_allowed']: val.isFileRequestEditorsAllowed == void 0
            ? val.isFileRequestEditorsAllowed
            : (0, enterpriseConfigurationItemBooleanV2025R0_1.serializeEnterpriseConfigurationItemBooleanV2025R0)(val.isFileRequestEditorsAllowed),
        ['is_file_request_branding_default_enabled']: val.isFileRequestBrandingDefaultEnabled == void 0
            ? val.isFileRequestBrandingDefaultEnabled
            : (0, enterpriseConfigurationItemBooleanV2025R0_1.serializeEnterpriseConfigurationItemBooleanV2025R0)(val.isFileRequestBrandingDefaultEnabled),
        ['is_file_request_login_required']: val.isFileRequestLoginRequired == void 0
            ? val.isFileRequestLoginRequired
            : (0, enterpriseConfigurationItemBooleanV2025R0_1.serializeEnterpriseConfigurationItemBooleanV2025R0)(val.isFileRequestLoginRequired),
        ['is_shared_links_expiration_enabled']: val.isSharedLinksExpirationEnabled == void 0
            ? val.isSharedLinksExpirationEnabled
            : (0, enterpriseConfigurationItemBooleanV2025R0_1.serializeEnterpriseConfigurationItemBooleanV2025R0)(val.isSharedLinksExpirationEnabled),
        ['shared_links_expiration_days']: val.sharedLinksExpirationDays == void 0
            ? val.sharedLinksExpirationDays
            : (0, enterpriseConfigurationItemIntegerV2025R0_1.serializeEnterpriseConfigurationItemIntegerV2025R0)(val.sharedLinksExpirationDays),
        ['is_public_shared_links_expiration_enabled']: val.isPublicSharedLinksExpirationEnabled == void 0
            ? val.isPublicSharedLinksExpirationEnabled
            : (0, enterpriseConfigurationItemBooleanV2025R0_1.serializeEnterpriseConfigurationItemBooleanV2025R0)(val.isPublicSharedLinksExpirationEnabled),
        ['public_shared_links_expiration_days']: val.publicSharedLinksExpirationDays == void 0
            ? val.publicSharedLinksExpirationDays
            : (0, enterpriseConfigurationItemIntegerV2025R0_1.serializeEnterpriseConfigurationItemIntegerV2025R0)(val.publicSharedLinksExpirationDays),
        ['shared_expiration_target']: val.sharedExpirationTarget == void 0
            ? val.sharedExpirationTarget
            : (0, enterpriseConfigurationItemStringV2025R0_1.serializeEnterpriseConfigurationItemStringV2025R0)(val.sharedExpirationTarget),
        ['is_shared_links_expiration_notification_enabled']: val.isSharedLinksExpirationNotificationEnabled == void 0
            ? val.isSharedLinksExpirationNotificationEnabled
            : (0, enterpriseConfigurationItemBooleanV2025R0_1.serializeEnterpriseConfigurationItemBooleanV2025R0)(val.isSharedLinksExpirationNotificationEnabled),
        ['shared_links_expiration_notification_days']: val.sharedLinksExpirationNotificationDays == void 0
            ? val.sharedLinksExpirationNotificationDays
            : (0, enterpriseConfigurationItemIntegerV2025R0_1.serializeEnterpriseConfigurationItemIntegerV2025R0)(val.sharedLinksExpirationNotificationDays),
        ['is_shared_links_expiration_notification_prevented']: val.isSharedLinksExpirationNotificationPrevented == void 0
            ? val.isSharedLinksExpirationNotificationPrevented
            : (0, enterpriseConfigurationItemBooleanV2025R0_1.serializeEnterpriseConfigurationItemBooleanV2025R0)(val.isSharedLinksExpirationNotificationPrevented),
        ['is_auto_delete_enabled']: val.isAutoDeleteEnabled == void 0
            ? val.isAutoDeleteEnabled
            : (0, enterpriseConfigurationItemBooleanV2025R0_1.serializeEnterpriseConfigurationItemBooleanV2025R0)(val.isAutoDeleteEnabled),
        ['auto_delete_days']: val.autoDeleteDays == void 0
            ? val.autoDeleteDays
            : (0, enterpriseConfigurationItemIntegerV2025R0_1.serializeEnterpriseConfigurationItemIntegerV2025R0)(val.autoDeleteDays),
        ['is_auto_delete_expiration_modification_prevented']: val.isAutoDeleteExpirationModificationPrevented == void 0
            ? val.isAutoDeleteExpirationModificationPrevented
            : (0, enterpriseConfigurationItemBooleanV2025R0_1.serializeEnterpriseConfigurationItemBooleanV2025R0)(val.isAutoDeleteExpirationModificationPrevented),
        ['auto_delete_target']: val.autoDeleteTarget == void 0
            ? val.autoDeleteTarget
            : (0, enterpriseConfigurationItemStringV2025R0_1.serializeEnterpriseConfigurationItemStringV2025R0)(val.autoDeleteTarget),
        ['is_collaboration_expiration_enabled']: val.isCollaborationExpirationEnabled == void 0
            ? val.isCollaborationExpirationEnabled
            : (0, enterpriseConfigurationItemBooleanV2025R0_1.serializeEnterpriseConfigurationItemBooleanV2025R0)(val.isCollaborationExpirationEnabled),
        ['collaboration_expiration_days']: val.collaborationExpirationDays == void 0
            ? val.collaborationExpirationDays
            : (0, enterpriseConfigurationItemIntegerV2025R0_1.serializeEnterpriseConfigurationItemIntegerV2025R0)(val.collaborationExpirationDays),
        ['is_collaboration_expiration_modification_prevented']: val.isCollaborationExpirationModificationPrevented == void 0
            ? val.isCollaborationExpirationModificationPrevented
            : (0, enterpriseConfigurationItemBooleanV2025R0_1.serializeEnterpriseConfigurationItemBooleanV2025R0)(val.isCollaborationExpirationModificationPrevented),
        ['is_collaboration_expiration_notification_enabled']: val.isCollaborationExpirationNotificationEnabled == void 0
            ? val.isCollaborationExpirationNotificationEnabled
            : (0, enterpriseConfigurationItemBooleanV2025R0_1.serializeEnterpriseConfigurationItemBooleanV2025R0)(val.isCollaborationExpirationNotificationEnabled),
        ['collaboration_expiration_target']: val.collaborationExpirationTarget == void 0
            ? val.collaborationExpirationTarget
            : (0, enterpriseConfigurationItemStringV2025R0_1.serializeEnterpriseConfigurationItemStringV2025R0)(val.collaborationExpirationTarget),
        ['trash_auto_clear_time']: val.trashAutoClearTime == void 0
            ? val.trashAutoClearTime
            : (0, enterpriseConfigurationItemIntegerV2025R0_1.serializeEnterpriseConfigurationItemIntegerV2025R0)(val.trashAutoClearTime),
        ['permanent_deletion_access']: val.permanentDeletionAccess == void 0
            ? val.permanentDeletionAccess
            : (0, enterpriseConfigurationItemStringV2025R0_1.serializeEnterpriseConfigurationItemStringV2025R0)(val.permanentDeletionAccess),
        ['permanent_deletion_allowlist_users']: val.permanentDeletionAllowlistUsers == void 0
            ? val.permanentDeletionAllowlistUsers
            : serializeEnterpriseConfigurationContentAndSharingV2025R0PermanentDeletionAllowlistUsersField(val.permanentDeletionAllowlistUsers),
    };
}
function deserializeEnterpriseConfigurationContentAndSharingV2025R0(val) {
    if (!(0, json_4.sdIsMap)(val)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting a map for "EnterpriseConfigurationContentAndSharingV2025R0"',
        });
    }
    if (!(val.enterprise_feature_settings == void 0) &&
        !(0, json_3.sdIsList)(val.enterprise_feature_settings)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting array for "enterprise_feature_settings" of type "EnterpriseConfigurationContentAndSharingV2025R0"',
        });
    }
    const enterpriseFeatureSettings = val.enterprise_feature_settings == void 0
        ? void 0
        : (0, json_3.sdIsList)(val.enterprise_feature_settings)
            ? val.enterprise_feature_settings.map(function (itm) {
                return (0, enterpriseFeatureSettingsItemV2025R0_2.deserializeEnterpriseFeatureSettingsItemV2025R0)(itm);
            })
            : [];
    const sharingItemType = val.sharing_item_type == void 0
        ? void 0
        : (0, enterpriseConfigurationItemStringV2025R0_2.deserializeEnterpriseConfigurationItemStringV2025R0)(val.sharing_item_type);
    const sharedLinkCompanyDefinition = val.shared_link_company_definition == void 0
        ? void 0
        : (0, enterpriseConfigurationItemStringV2025R0_2.deserializeEnterpriseConfigurationItemStringV2025R0)(val.shared_link_company_definition);
    const sharedLinkAccess = val.shared_link_access == void 0
        ? void 0
        : (0, enterpriseConfigurationItemStringV2025R0_2.deserializeEnterpriseConfigurationItemStringV2025R0)(val.shared_link_access);
    const sharedLinkDefaultAccess = val.shared_link_default_access == void 0
        ? void 0
        : (0, enterpriseConfigurationItemStringV2025R0_2.deserializeEnterpriseConfigurationItemStringV2025R0)(val.shared_link_default_access);
    const sharedLinkDefaultPermissionsSelected = val.shared_link_default_permissions_selected == void 0
        ? void 0
        : deserializeEnterpriseConfigurationContentAndSharingV2025R0SharedLinkDefaultPermissionsSelectedField(val.shared_link_default_permissions_selected);
    const isOpenCustomUrlsDisabled = val.is_open_custom_urls_disabled == void 0
        ? void 0
        : (0, enterpriseConfigurationItemBooleanV2025R0_2.deserializeEnterpriseConfigurationItemBooleanV2025R0)(val.is_open_custom_urls_disabled);
    const isCustomDomainHiddenInSharedLink = val.is_custom_domain_hidden_in_shared_link == void 0
        ? void 0
        : (0, enterpriseConfigurationItemBooleanV2025R0_2.deserializeEnterpriseConfigurationItemBooleanV2025R0)(val.is_custom_domain_hidden_in_shared_link);
    const collaborationPermissions = val.collaboration_permissions == void 0
        ? void 0
        : deserializeEnterpriseConfigurationContentAndSharingV2025R0CollaborationPermissionsField(val.collaboration_permissions);
    const defaultCollaborationRole = val.default_collaboration_role == void 0
        ? void 0
        : (0, enterpriseConfigurationItemStringV2025R0_2.deserializeEnterpriseConfigurationItemStringV2025R0)(val.default_collaboration_role);
    const isInvitePrivilegeRestricted = val.is_invite_privilege_restricted == void 0
        ? void 0
        : (0, enterpriseConfigurationItemBooleanV2025R0_2.deserializeEnterpriseConfigurationItemBooleanV2025R0)(val.is_invite_privilege_restricted);
    const collaborationRestrictions = val.collaboration_restrictions == void 0
        ? void 0
        : deserializeEnterpriseConfigurationContentAndSharingV2025R0CollaborationRestrictionsField(val.collaboration_restrictions);
    const isCollaboratorInviteLinksDisabled = val.is_collaborator_invite_links_disabled == void 0
        ? void 0
        : (0, enterpriseConfigurationItemBooleanV2025R0_2.deserializeEnterpriseConfigurationItemBooleanV2025R0)(val.is_collaborator_invite_links_disabled);
    const isInviteGroupCollaboratorDisabled = val.is_invite_group_collaborator_disabled == void 0
        ? void 0
        : (0, enterpriseConfigurationItemBooleanV2025R0_2.deserializeEnterpriseConfigurationItemBooleanV2025R0)(val.is_invite_group_collaborator_disabled);
    const isOwnershipTransferRestricted = val.is_ownership_transfer_restricted == void 0
        ? void 0
        : (0, enterpriseConfigurationItemBooleanV2025R0_2.deserializeEnterpriseConfigurationItemBooleanV2025R0)(val.is_ownership_transfer_restricted);
    const externalCollaborationStatus = val.external_collaboration_status == void 0
        ? void 0
        : deserializeEnterpriseConfigurationContentAndSharingV2025R0ExternalCollaborationStatusField(val.external_collaboration_status);
    const externalCollaborationAllowlistUsers = val.external_collaboration_allowlist_users == void 0
        ? void 0
        : deserializeEnterpriseConfigurationContentAndSharingV2025R0ExternalCollaborationAllowlistUsersField(val.external_collaboration_allowlist_users);
    const isWatermarkingEnterpriseFeatureEnabled = val.is_watermarking_enterprise_feature_enabled == void 0
        ? void 0
        : (0, enterpriseConfigurationItemBooleanV2025R0_2.deserializeEnterpriseConfigurationItemBooleanV2025R0)(val.is_watermarking_enterprise_feature_enabled);
    const isRootContentCreationRestricted = val.is_root_content_creation_restricted == void 0
        ? void 0
        : (0, enterpriseConfigurationItemBooleanV2025R0_2.deserializeEnterpriseConfigurationItemBooleanV2025R0)(val.is_root_content_creation_restricted);
    const isTagCreationRestricted = val.is_tag_creation_restricted == void 0
        ? void 0
        : (0, enterpriseConfigurationItemBooleanV2025R0_2.deserializeEnterpriseConfigurationItemBooleanV2025R0)(val.is_tag_creation_restricted);
    const tagCreationRestriction = val.tag_creation_restriction == void 0
        ? void 0
        : (0, enterpriseConfigurationItemStringV2025R0_2.deserializeEnterpriseConfigurationItemStringV2025R0)(val.tag_creation_restriction);
    const isEmailUploadsEnabled = val.is_email_uploads_enabled == void 0
        ? void 0
        : (0, enterpriseConfigurationItemBooleanV2025R0_2.deserializeEnterpriseConfigurationItemBooleanV2025R0)(val.is_email_uploads_enabled);
    const isCustomSettingsEnabled = val.is_custom_settings_enabled == void 0
        ? void 0
        : (0, enterpriseConfigurationItemBooleanV2025R0_2.deserializeEnterpriseConfigurationItemBooleanV2025R0)(val.is_custom_settings_enabled);
    const isFormsLoginRequired = val.is_forms_login_required == void 0
        ? void 0
        : (0, enterpriseConfigurationItemBooleanV2025R0_2.deserializeEnterpriseConfigurationItemBooleanV2025R0)(val.is_forms_login_required);
    const isFormsBrandingDefaultEnabled = val.is_forms_branding_default_enabled == void 0
        ? void 0
        : (0, enterpriseConfigurationItemBooleanV2025R0_2.deserializeEnterpriseConfigurationItemBooleanV2025R0)(val.is_forms_branding_default_enabled);
    const isCcFreeTrialActive = val.is_cc_free_trial_active == void 0
        ? void 0
        : (0, enterpriseConfigurationItemBooleanV2025R0_2.deserializeEnterpriseConfigurationItemBooleanV2025R0)(val.is_cc_free_trial_active);
    const isFileRequestEditorsAllowed = val.is_file_request_editors_allowed == void 0
        ? void 0
        : (0, enterpriseConfigurationItemBooleanV2025R0_2.deserializeEnterpriseConfigurationItemBooleanV2025R0)(val.is_file_request_editors_allowed);
    const isFileRequestBrandingDefaultEnabled = val.is_file_request_branding_default_enabled == void 0
        ? void 0
        : (0, enterpriseConfigurationItemBooleanV2025R0_2.deserializeEnterpriseConfigurationItemBooleanV2025R0)(val.is_file_request_branding_default_enabled);
    const isFileRequestLoginRequired = val.is_file_request_login_required == void 0
        ? void 0
        : (0, enterpriseConfigurationItemBooleanV2025R0_2.deserializeEnterpriseConfigurationItemBooleanV2025R0)(val.is_file_request_login_required);
    const isSharedLinksExpirationEnabled = val.is_shared_links_expiration_enabled == void 0
        ? void 0
        : (0, enterpriseConfigurationItemBooleanV2025R0_2.deserializeEnterpriseConfigurationItemBooleanV2025R0)(val.is_shared_links_expiration_enabled);
    const sharedLinksExpirationDays = val.shared_links_expiration_days == void 0
        ? void 0
        : (0, enterpriseConfigurationItemIntegerV2025R0_2.deserializeEnterpriseConfigurationItemIntegerV2025R0)(val.shared_links_expiration_days);
    const isPublicSharedLinksExpirationEnabled = val.is_public_shared_links_expiration_enabled == void 0
        ? void 0
        : (0, enterpriseConfigurationItemBooleanV2025R0_2.deserializeEnterpriseConfigurationItemBooleanV2025R0)(val.is_public_shared_links_expiration_enabled);
    const publicSharedLinksExpirationDays = val.public_shared_links_expiration_days == void 0
        ? void 0
        : (0, enterpriseConfigurationItemIntegerV2025R0_2.deserializeEnterpriseConfigurationItemIntegerV2025R0)(val.public_shared_links_expiration_days);
    const sharedExpirationTarget = val.shared_expiration_target == void 0
        ? void 0
        : (0, enterpriseConfigurationItemStringV2025R0_2.deserializeEnterpriseConfigurationItemStringV2025R0)(val.shared_expiration_target);
    const isSharedLinksExpirationNotificationEnabled = val.is_shared_links_expiration_notification_enabled == void 0
        ? void 0
        : (0, enterpriseConfigurationItemBooleanV2025R0_2.deserializeEnterpriseConfigurationItemBooleanV2025R0)(val.is_shared_links_expiration_notification_enabled);
    const sharedLinksExpirationNotificationDays = val.shared_links_expiration_notification_days == void 0
        ? void 0
        : (0, enterpriseConfigurationItemIntegerV2025R0_2.deserializeEnterpriseConfigurationItemIntegerV2025R0)(val.shared_links_expiration_notification_days);
    const isSharedLinksExpirationNotificationPrevented = val.is_shared_links_expiration_notification_prevented == void 0
        ? void 0
        : (0, enterpriseConfigurationItemBooleanV2025R0_2.deserializeEnterpriseConfigurationItemBooleanV2025R0)(val.is_shared_links_expiration_notification_prevented);
    const isAutoDeleteEnabled = val.is_auto_delete_enabled == void 0
        ? void 0
        : (0, enterpriseConfigurationItemBooleanV2025R0_2.deserializeEnterpriseConfigurationItemBooleanV2025R0)(val.is_auto_delete_enabled);
    const autoDeleteDays = val.auto_delete_days == void 0
        ? void 0
        : (0, enterpriseConfigurationItemIntegerV2025R0_2.deserializeEnterpriseConfigurationItemIntegerV2025R0)(val.auto_delete_days);
    const isAutoDeleteExpirationModificationPrevented = val.is_auto_delete_expiration_modification_prevented == void 0
        ? void 0
        : (0, enterpriseConfigurationItemBooleanV2025R0_2.deserializeEnterpriseConfigurationItemBooleanV2025R0)(val.is_auto_delete_expiration_modification_prevented);
    const autoDeleteTarget = val.auto_delete_target == void 0
        ? void 0
        : (0, enterpriseConfigurationItemStringV2025R0_2.deserializeEnterpriseConfigurationItemStringV2025R0)(val.auto_delete_target);
    const isCollaborationExpirationEnabled = val.is_collaboration_expiration_enabled == void 0
        ? void 0
        : (0, enterpriseConfigurationItemBooleanV2025R0_2.deserializeEnterpriseConfigurationItemBooleanV2025R0)(val.is_collaboration_expiration_enabled);
    const collaborationExpirationDays = val.collaboration_expiration_days == void 0
        ? void 0
        : (0, enterpriseConfigurationItemIntegerV2025R0_2.deserializeEnterpriseConfigurationItemIntegerV2025R0)(val.collaboration_expiration_days);
    const isCollaborationExpirationModificationPrevented = val.is_collaboration_expiration_modification_prevented == void 0
        ? void 0
        : (0, enterpriseConfigurationItemBooleanV2025R0_2.deserializeEnterpriseConfigurationItemBooleanV2025R0)(val.is_collaboration_expiration_modification_prevented);
    const isCollaborationExpirationNotificationEnabled = val.is_collaboration_expiration_notification_enabled == void 0
        ? void 0
        : (0, enterpriseConfigurationItemBooleanV2025R0_2.deserializeEnterpriseConfigurationItemBooleanV2025R0)(val.is_collaboration_expiration_notification_enabled);
    const collaborationExpirationTarget = val.collaboration_expiration_target == void 0
        ? void 0
        : (0, enterpriseConfigurationItemStringV2025R0_2.deserializeEnterpriseConfigurationItemStringV2025R0)(val.collaboration_expiration_target);
    const trashAutoClearTime = val.trash_auto_clear_time == void 0
        ? void 0
        : (0, enterpriseConfigurationItemIntegerV2025R0_2.deserializeEnterpriseConfigurationItemIntegerV2025R0)(val.trash_auto_clear_time);
    const permanentDeletionAccess = val.permanent_deletion_access == void 0
        ? void 0
        : (0, enterpriseConfigurationItemStringV2025R0_2.deserializeEnterpriseConfigurationItemStringV2025R0)(val.permanent_deletion_access);
    const permanentDeletionAllowlistUsers = val.permanent_deletion_allowlist_users == void 0
        ? void 0
        : deserializeEnterpriseConfigurationContentAndSharingV2025R0PermanentDeletionAllowlistUsersField(val.permanent_deletion_allowlist_users);
    return {
        enterpriseFeatureSettings: enterpriseFeatureSettings,
        sharingItemType: sharingItemType,
        sharedLinkCompanyDefinition: sharedLinkCompanyDefinition,
        sharedLinkAccess: sharedLinkAccess,
        sharedLinkDefaultAccess: sharedLinkDefaultAccess,
        sharedLinkDefaultPermissionsSelected: sharedLinkDefaultPermissionsSelected,
        isOpenCustomUrlsDisabled: isOpenCustomUrlsDisabled,
        isCustomDomainHiddenInSharedLink: isCustomDomainHiddenInSharedLink,
        collaborationPermissions: collaborationPermissions,
        defaultCollaborationRole: defaultCollaborationRole,
        isInvitePrivilegeRestricted: isInvitePrivilegeRestricted,
        collaborationRestrictions: collaborationRestrictions,
        isCollaboratorInviteLinksDisabled: isCollaboratorInviteLinksDisabled,
        isInviteGroupCollaboratorDisabled: isInviteGroupCollaboratorDisabled,
        isOwnershipTransferRestricted: isOwnershipTransferRestricted,
        externalCollaborationStatus: externalCollaborationStatus,
        externalCollaborationAllowlistUsers: externalCollaborationAllowlistUsers,
        isWatermarkingEnterpriseFeatureEnabled: isWatermarkingEnterpriseFeatureEnabled,
        isRootContentCreationRestricted: isRootContentCreationRestricted,
        isTagCreationRestricted: isTagCreationRestricted,
        tagCreationRestriction: tagCreationRestriction,
        isEmailUploadsEnabled: isEmailUploadsEnabled,
        isCustomSettingsEnabled: isCustomSettingsEnabled,
        isFormsLoginRequired: isFormsLoginRequired,
        isFormsBrandingDefaultEnabled: isFormsBrandingDefaultEnabled,
        isCcFreeTrialActive: isCcFreeTrialActive,
        isFileRequestEditorsAllowed: isFileRequestEditorsAllowed,
        isFileRequestBrandingDefaultEnabled: isFileRequestBrandingDefaultEnabled,
        isFileRequestLoginRequired: isFileRequestLoginRequired,
        isSharedLinksExpirationEnabled: isSharedLinksExpirationEnabled,
        sharedLinksExpirationDays: sharedLinksExpirationDays,
        isPublicSharedLinksExpirationEnabled: isPublicSharedLinksExpirationEnabled,
        publicSharedLinksExpirationDays: publicSharedLinksExpirationDays,
        sharedExpirationTarget: sharedExpirationTarget,
        isSharedLinksExpirationNotificationEnabled: isSharedLinksExpirationNotificationEnabled,
        sharedLinksExpirationNotificationDays: sharedLinksExpirationNotificationDays,
        isSharedLinksExpirationNotificationPrevented: isSharedLinksExpirationNotificationPrevented,
        isAutoDeleteEnabled: isAutoDeleteEnabled,
        autoDeleteDays: autoDeleteDays,
        isAutoDeleteExpirationModificationPrevented: isAutoDeleteExpirationModificationPrevented,
        autoDeleteTarget: autoDeleteTarget,
        isCollaborationExpirationEnabled: isCollaborationExpirationEnabled,
        collaborationExpirationDays: collaborationExpirationDays,
        isCollaborationExpirationModificationPrevented: isCollaborationExpirationModificationPrevented,
        isCollaborationExpirationNotificationEnabled: isCollaborationExpirationNotificationEnabled,
        collaborationExpirationTarget: collaborationExpirationTarget,
        trashAutoClearTime: trashAutoClearTime,
        permanentDeletionAccess: permanentDeletionAccess,
        permanentDeletionAllowlistUsers: permanentDeletionAllowlistUsers,
    };
}
//# sourceMappingURL=enterpriseConfigurationContentAndSharingV2025R0.js.map