from features.basic_features import *
from features.census_features import *
from features.datetime_features import *
from features.combination_features import *


__all__ = ['features']


basic_feature_map = {
    # defender state
    'engine_version': EngineVersion,
    'app_version': AppVersion,
    'av_sig_version': AvSigVersion,

    # antivirus
    'av_product_states_id': AVProductStatesId,
    'is_av_product_states_id_53447': IsAVProductStatesId53447,
    'av_products_installed': AVProductsInstalled,
    'av_products_enabled': AVProductsEnabled,

    # geolocation
    'country_id': CountryId,
    'city_id': CityId,
    'organization_id': OrganizationId,
    'geo_name_id': GeoNameId,
    'locale_english_name_id': LocaleEnglishNameId,

    # os
    'os_suite': OsSuite,
    'os_build_lab': OsBuildLab,
    'os_build_lab_split_0': OsBuildLabSplit0,
    'os_build_lab_split_1': OsBuildLabSplit1,
    'sku_edition': SkuEdition,

    # misc
    'rtp_state_bitfield': RtpStateBitfield,
    'is_protected': IsProtected,
    's_mode': SMode,
    'ie_ver_id': IeVerId,
    'smart_screen': SmartScreen,
    'is_smart_screen_exists_not_set': IsSmartScreenExistsNotSet,
    'is_smart_screen_require_admin': IsSmartScreenRequireAdmin,
    'is_smart_screen_off': IsSmartScreenOff,
    'is_smart_screen_on': IsSmartScreenOn,
    'is_smart_screen_warn': IsSmartScreenWarn,
    'is_smart_screen_block': IsSmartScreenBlock,
    'is_smart_screen_prompt': IsSmartScreenPrompt,
    'is_smart_screen_no_exist': IsSmartScreenNoExist,

    # wdft
    'wdft_is_gamer': WdftIsGamer,
    'wdft_region_id': WdftRegionId,
}


census_feature_map = {
    # formfactor
    'census_mdc2_form_factor': CensusMDC2FormFactor,
    'census_chassis_type_name': CensusChassisTypeName,
    'census_power_platform_role_name': CensusPowerPlatformRoleName,

    # oem info
    'census_oem_name_id': CensusOEMNameId,
    'census_oem_model_id': CensusOEMModelId,

    # os
    'census_os_version': CensusOSVersion,
    'census_os_build_number': CensusOSBuildNumber,
    'census_os_build_revision': CensusOSBuildRevision,
    'census_os_architecture': CensusOSArchitecture,
    'census_os_branch': CensusOSBranch,
    'census_os_edition': CensusOSEdition,
    'census_os_sku_name': CensusOSSkuName,
    'census_os_install_type_name': CensusOSInstallTypeName,
    'census_os_install_language_id': CensusOSInstallLanguageId,
    'census_os_ui_locale_id': CensusOsUILocaleId,
    'census_os_wu_auto_update_options_name': CensusOsWUAutoUpdateOptionsName,
    'census_genuine_state_name': CensusGenuineStateName,
    'census_activation_channel': CensusActivationChannel,

    # cpu
    'census_processor_core_count': CensusProcessorCoreCount,
    'census_processor_manufacturer_id': CensusProcessorManufacturerId,
    'census_processor_model_id': CensusProcessorModelId,

    # ram
    'census_total_physical_ram': CensusTotalPhysicalRAM,

    # disk
    'census_primary_disk_type_name': CensusPrimaryDiskTypeName,
    'census_system_volume_total_capacity': CensusSystemVolumeTotalCapacity,
    'census_primary_disk_total_capacity': CensusPrimaryDiskTotalCapacity,
    'census_primary_drive_c_ratio': CensusPrimaryDriveCRatio,
    'census_none_primary_drive_mb': CensusNonePrimaryDriveMB,

    # display
    'census_internal_primary_diagonal_display_size_in_inches': CensusInternalPrimaryDiagonalDisplaySizeInInches,
    'census_internal_primary_display_resolution_horizontal': CensusInternalPrimaryDisplayResolutionHorizontal,
    'census_internal_primary_display_resolution_vertical': CensusInternalPrimaryDisplayResolutionVertical,
    'census_aspect_ratio': CensusAspectRatio,
    'census_monitor_dots_per_inch': CensusMonitorDotsPerInch,
    'census_display_mega_pixels': CensusDisplayMegaPixels,

    # firmware
    'census_firmware_manufacturer_id': CensusFirmwareManufacturerId,
    'census_firmware_version_id': CensusFirmwareVersionId,

    # misc.
    'census_is_secure_boot_enabled': CensusIsSecureBootEnabled,
    'census_is_touch_enabled': CensusIsTouchEnabled,
    'census_is_always_on_always_connected_capable': CensusIsAlwaysOnAlwaysConnectedCapable,
}


datetime_feature_map = {
    'date': Date,
    'day': Day,
    'hour': Hour,
    'minute': Minute,
    'hour_minute': HourMinute,
    'day_of_week': DayOfWeek,
    'os_build_release_year_month': OSBuildReleaseYearMonth,
    'os_version_not_updated_weeks_4': OSVersionNotUpdatedWeeks4,
    'os_version_not_updated_weeks_8': OSVersionNotUpdatedWeeks8,
    'os_version_not_updated_weeks_12': OSVersionNotUpdatedWeeks12,
}


combination_feature_map = {
    # count features
    'count_versions_engine_av_sig': CountVersionsEngineAvSig,
    'count_versions_engine_app': CountVersionsEngineApp,
    'count_versions_engine_os': CountVersionsEngineOS,
    'count_versions_av_sig_app': CountVersionsAvSigApp,
    'count_versions_av_sig_os': CountVersionsAvSigOS,
    'count_versions_app_os': CountVersionsAppOS,
    'count_versions_os_install_type_1': CountVersionsOSInstallType1,
    'count_versions_os_install_type_2': CountVersionsOSInstallType2,
    'count_versions_os_install_type_3': CountVersionsOSInstallType3,
    'count_versions_os_install_type_4': CountVersionsOSInstallType4,
    'count_versions_os_install_type_5': CountVersionsOSInstallType5,
    'count_versions_os_install_type_6': CountVersionsOSInstallType6,
    'count_versions_av_product_states_1': CountVersionsAVProductStates1,
    'count_versions_av_product_states_2': CountVersionsAVProductStates2,
    'count_versions_av_product_states_3': CountVersionsAVProductStates3,
    'count_versions_av_product_states_4': CountVersionsAVProductStates4,
    'count_versions_av_product_states_5': CountVersionsAVProductStates5,
    'count_versions_av_product_states_6': CountVersionsAVProductStates6,
    'count_versions_av_products_installed_1': CountVersionsAVProductsInstalled1,
    'count_versions_av_products_installed_2': CountVersionsAVProductsInstalled2,
    'count_versions_av_products_installed_3': CountVersionsAVProductsInstalled3,
    'count_versions_av_products_installed_4': CountVersionsAVProductsInstalled4,
    'count_versions_av_products_installed_5': CountVersionsAVProductsInstalled5,
    'count_versions_av_products_installed_6': CountVersionsAVProductsInstalled6,
    'count_versions_smart_screen_1': CountVersionsSmartScreen1,
    'count_versions_smart_screen_2': CountVersionsSmartScreen2,
    'count_versions_smart_screen_3': CountVersionsSmartScreen3,
    'count_versions_smart_screen_4': CountVersionsSmartScreen4,
    'count_versions_smart_screen_5': CountVersionsSmartScreen5,
    'count_versions_smart_screen_6': CountVersionsSmartScreen6,
    'count_week_av_product_states': CountWeekAVProductStates,
    'count_week_av_products_installed': CountWeekAVProductsInstalled,
    'count_week_smart_screen': CountWeekSmartScreen,
    'count_week_os_install_type_name': CountWeekOSInstallTypeName,
    'count_region_av_product_states': CountRegionAVProductStates,
    'count_region_av_products_installed': CountRegionAVProductsInstalled,
    'count_region_smart_screen': CountRegionSmartScreen,
    'count_region_os_install_type_name': CountRegionOSInstallTypeName,
    'count_country_av_product_states': CountCountryAVProductStates,
    'count_country_av_products_installed': CountCountryAVProductsInstalled,
    'count_country_smart_screen': CountCountrySmartScreen,
    'count_country_os_install_type_name': CountCountryOSInstallTypeName,
    'count_city_av_product_states': CountCityAVProductStates,
    'count_city_av_products_installed': CountCityAVProductsInstalled,
    'count_city_smart_screen': CountCitySmartScreen,
    'count_city_os_install_type_name': CountCityOSInstallTypeName,
    'count_av_product_states_av_products_installed': CountAVProductStatesAVProductsInstalled,
    'count_av_product_states_smart_screen': CountAVProductStatesSmartScreen,
    'count_av_product_states_os_install_type': CountAVProductStatesOSInstallType,
    'count_av_products_installed_smart_screen': CountAVProductsInstalledSmartScreen,
    'count_av_products_installed_os_install_type': CountAVProductsInstalledOSInstallType,
    'count_smart_screen_os_install_type': CountSmartScreenOSInstallType,

    # aggregate features
    'version_aggs_1': VersionAggs1,
    'version_aggs_2': VersionAggs2,
    'version_aggs_3': VersionAggs3,
    'version_aggs_4': VersionAggs4,
    'version_aggs_5': VersionAggs5,
    'version_aggs_6': VersionAggs6,

    # arithmetic features
    'mul_system_volume_total_capacity_processor_core_count': MulSystemVolumeTotalCapacityProcessorCoreCount,
    'div_system_volume_total_capacity_processor_core_count': DivSystemVolumeTotalCapacityProcessorCoreCount,
    'mul_primary_disk_total_capacity_processor_core_count': MulPrimaryDiskTotalCapacityProcessorCoreCount,
    'div_primary_disk_total_capacity_processor_core_count': DivPrimaryDiskTotalCapacityProcessorCoreCount,
    'mul_total_physical_ram_processor_core_count': MulTotalPhysicalRAMProcessorCoreCount,
    'div_total_physical_ram_processor_core_count': DivTotalPhysicalRAMProcessorCoreCount,
    'mul_display_size_inches_processor_core_count': MulDisplaySizeInchesProcessorCoreCount,
    'div_display_size_inches_processor_core_count': DivDisplaySizeInchesProcessorCoreCount,
    'mul_display_resolution_horizontal_processor_core_count': MulDisplayResolutionHorizontalProcessorCoreCount,
    'div_display_resolution_horizontal_processor_core_count': DivDisplayResolutionHorizontalProcessorCoreCount,
    'mul_display_resolution_vertical_processor_core_count': MulDisplayResolutionVerticalProcessorCoreCount,
    'div_display_resolution_vertical_processor_core_count': DivDisplayResolutionVerticalProcessorCoreCount,
    'div_system_volume_total_capacity_total_physical_ram': DivSystemVolumeTotalCapacityTotalPhysicalRAM,
    'div_primary_disk_total_capacity_total_physical_ram': DivPrimaryDiskTotalCapacityTotalPhysicalRAM,
    'div_display_size_inches_total_physical_ram': DivDisplaySizeInchesTotalPhysicalRAM,
    'div_display_resolution_horizontal_total_physical_ram': DivDisplayResolutionHorizontalTotalPhysicalRAM,
    'div_display_resolution_vertical_total_physical_ram': DivDisplayResolutionVerticalTotalPhysicalRAM,

    # lda features
    'lda_engine_ver_av_products_installed_3': LDAEngineVerAVProductsInstalled3,
    'lda_app_ver_av_products_installed_3': LDAAppVerAVProductsInstalled3,
    'lda_av_sig_ver_av_products_installed_3': LDAAvSigVerAVProductsInstalled3,
    'lda_av_product_states_av_products_installed_3': LDAAvProductStatesAVProductsInstalled3,
    'lda_country_av_products_installed_3': LDACountryAVProductsInstalled3,
    'lda_city_av_products_installed_3': LDACityAVProductsInstalled3,
    'lda_geo_name_av_products_installed_3': LDAGeoNameAVProductsInstalled3,
    'lda_locale_english_name_av_products_installed_3': LDALocaleEnglishNameAVProductsInstalled3,
    'lda_os_build_lab_av_products_installed_3':LDAOsBuildLabAVProductsInstalled3,
    'lda_oem_model_av_products_installed_3': LDAOemModelAVProductsInstalled3,
    'lda_processor_model_av_products_installed_3': LDAProcessorModelAVProductsInstalled3,
    'lda_census_os_ver_av_products_installed_3': LDACensusOSVerAVProductsInstalled3,
    'lda_firmware_ver_av_products_installed_3': LDAFirmwareVerAVProductsInstalled3,
    'lda_region_av_products_installed_3': LDARegionAVProductsInstalled3,
    'lda_engine_ver_smart_screen_3': LDAEngineVerSmartScreen3,
    'lda_app_ver_smart_screen_3': LDAAppVerSmartScreen3,
    'lda_av_sig_ver_smart_screen_3': LDAAvSigVerSmartScreen3,
    'lda_av_product_states_smart_screen_3': LDAAvProductStatesSmartScreen3,
    'lda_country_smart_screen_3': LDACountrySmartScreen3,
    'lda_city_smart_screen_3': LDACitySmartScreen3,
    'lda_geo_name_smart_screen_3': LDAGeoNameSmartScreen3,
    'lda_locale_english_name_smart_screen_3': LDALocaleEnglishNameSmartScreen3,
    'lda_os_build_lab_smart_screen_3': LDAOsBuildLabSmartScreen3,
    'lda_oem_model_smart_screen_3': LDAOemModelSmartScreen3,
    'lda_processor_model_smart_screen_3': LDAProcessorModelSmartScreen3,
    'lda_census_os_ver_smart_screen_3': LDACensusOSVerSmartScreen3,
    'lda_firmware_ver_smart_screen_3': LDAFirmwareVerSmartScreen3,
    'lda_region_smart_screen_3': LDARegionSmartScreen3,
    'lda_engine_ver_activation_channel_3': LDAEngineVerActivationChannel3,
    'lda_app_ver_activation_channel_3': LDAAppVerActivationChannel3,
    'lda_av_sig_ver_activation_channel_3': LDAAvSigVerActivationChannel3,
    'lda_av_product_states_activation_channel_3': LDAAvProductStatesActivationChannel3,
    'lda_country_activation_channel_3': LDACountryActivationChannel3,
    'lda_city_activation_channel_3': LDACityActivationChannel3,
    'lda_geo_name_activation_channel_3': LDAGeoNameActivationChannel3,
    'lda_locale_english_name_activation_channel_3': LDALocaleEnglishNameActivationChannel3,
    'lda_os_build_lab_activation_channel_3': LDAOsBuildLabActivationChannel3,
    'lda_oem_model_activation_channel_3': LDAOemModelActivationChannel3,
    'lda_processor_model_activation_channel_3': LDAProcessorModelActivationChannel3,
    'lda_census_os_ver_activation_channel_3': LDACensusOSVerActivationChannel3,
    'lda_firmware_ver_activation_channel_3': LDAFirmwareVerActivationChannel3,
    'lda_region_activation_channel_3': LDARegionActivationChannel3,
}


features = {
    # basic features
    **basic_feature_map,

    # census features
    **census_feature_map,

    # datetime features
    **datetime_feature_map,

    # combination features
    **combination_feature_map,
}

