int32_t getWebACLMaxInspectionBytes(Lmdb_WebACLHandle *handle, GokuLmdbString http_source_string) {
    int max_inspection_bytes = 64 * 1024;
    if (handle) {
        try {
            std::string http_source(reinterpret_cast(http_source_string.value));
            const goku::apiv2::lmdb::types::WebACL *webACL = (const goku::apiv2::lmdb::types::WebACL *) handle-&gt;webACL;
            const goku::apiv2::lmdb::types::AssociationConfig *associationConfig = webACL-&gt;associationConfig();
            const flatbuffers::Vector &gt;
                    *resourceTypeVec = associationConfig-&gt;requestBodyAssociatedResourceTypeConfig();

            std::unordered_map  sourceMap = {
                    {"CF",         goku::apiv2::lmdb::types::AssociatedResourceType_CLOUDFRONT},
                    {"ALB",        goku::apiv2::lmdb::types::AssociatedResourceType_APPLICATION_LOAD_BALANCER},
                    {"APIGW",      goku::apiv2::lmdb::types::AssociatedResourceType_API_GATEWAY},
                    {"APPSYNC",    goku::apiv2::lmdb::types::AssociatedResourceType_APPSYNC},
                    {"COGNITOIDP", goku::apiv2::lmdb::types::AssociatedResourceType_COGNITO_USER_POOL},
                    {"APPRUNNER",  goku::apiv2::lmdb::types::AssociatedResourceType_CLOUDFRONT},
                    {"-",          goku::apiv2::lmdb::types::AssociatedResourceType_CLOUDFRONT}
            };

            auto it = sourceMap.find(http_source);
            if (it != sourceMap.end()) {
                goku::apiv2::lmdb::types::AssociatedResourceType associatedResourceType = it-&gt;second;  //the assoc res
                // Find AssociatedResourceType in the RequestBodyAssociatedResourceTypeConfig
                for (const auto &amp;requestBodyAssociatedResourceTypeConfig: *resourceTypeVec) {
                    if (requestBodyAssociatedResourceTypeConfig-&gt;associatedResourceType() ==
                        associatedResourceType) {
                        // Get the SizeInspectionLimit from the RequestBodyAssociatedResourceTypeConfig
                        goku::apiv2::lmdb::types::SizeInspectionLimit sizeInspectionLimit = requestBodyAssociatedResourceTypeConfig-&gt;defaultSizeInspectionLimit();
                        // Use the SizeInspectionLimit to determine the max_inspection_bytes
                        switch (sizeInspectionLimit) {
                            case goku::apiv2::lmdb::types::SizeInspectionLimit_KB_8:
                                max_inspection_bytes = 8 * 1024;
                                break;
                            case goku::apiv2::lmdb::types::SizeInspectionLimit_KB_16:
                                max_inspection_bytes = 16 * 1024;
                                break;
                            case goku::apiv2::lmdb::types::SizeInspectionLimit_KB_32:
                                max_inspection_bytes = 32 * 1024;
                                break;
                            case goku::apiv2::lmdb::types::SizeInspectionLimit_KB_64:
                                max_inspection_bytes = 64 * 1024;
                                break;
                            default:
                                max_inspection_bytes = 8 * 1024;
                                break;
                        }
                        break;
                    }
                }
            }
        }
        catch (const std::exception &amp;e) {
            LOG4CPLUS_ERROR(handle-&gt;loggerHandle-&gt;logger,
                            "lmdbDeserializer:GetWebACLMaxInspectionBytes: Caught std::exception: " &lt;&lt; e.what());
        } catch (...) {
            LOG4CPLUS_ERROR(handle-&gt;loggerHandle-&gt;logger,
                            "lmdbDeserializer:GetWebACLMaxInspectionBytes: Caught unknown exception");
        }
    }
        return max_inspection_bytes;
}