---
#------------------------------------------------------------
# This is the schema for product configuration version 2.0
#------------------------------------------------------------

#------------------------------------------------------------
# Type alias
#------------------------------------------------------------
type_alias:  
  rss_feed_type:
    type: map
    map_schema:
      source:
        required: yes
      name:
        required: yes
      url_root:
        type: http
        required: yes
      title_max_length:
        type: number
        required: yes
      description_max_length:
        type: number
        required: yes

  rss_feed_list_type:
    type: list
    list_type: rss_feed_type
    
  friend_menu_item_type:
    type: map
    map_schema:
      item_id: 
        type: number
        required: yes
      string:
        type: map
        map_schema:
          en-US:
            required: yes
          sv-SE:
            required: yes
          cs-CZ:
            required: yes
          da-DK:
            required: yes
          de-DE:
            required: yes
          es-ES:
            required: yes
          fi-FI:
            required: yes
          fr-FR:
            required: yes
          hu-HU:
            required: yes
          it-IT:
            required: yes
          ja-JP:
            required: yes
          ko-KO:
            required: yes
          nb-NO:
            required: yes
          nl-NL:
            required: yes
          pl-PL:
            required: yes
          pt-PT:
            required: yes
          pt-BR:
            required: yes
          ru-RU:
            required: yes
          zh-CN:
            required: yes
          zh-TW:
            required: yes

  uplay_type:
    type: map
    map_schema:
      game_code:                #deprecated!
      platform_code:
      initialize_user:
      achievements:
      achievements_sync_id:
      achievements_ingame_notification:
        type: yesno
      friend_menu_item_list:
        type: list
        list_type: friend_menu_item_type

  working_directory_type:
    type: map
    map_schema:
      register:
      append:
        
  exe_type:
    type: map
    map_schema:
      path:
        type: map
        required: yes
        map_schema:
          relative:
          register:
      arguments_register:
      arguments:
      play_arguments:
      working_directory:
        type: working_directory_type
        required: yes
      description:
      background_image:

  online_exe_type:
    type: map
    map_schema:
      path:
        type: map
        required: yes
        map_schema:
          relative:
          register:
      arguments:
      arguments_register:
      working_directory:
        type: working_directory_type
        required: yes
      description:
      background_image:
      evil_updater:
        type: exe_type
      shortcut_name:
        required: no
      icon_image:
        required: no
      
  exe_list_type:
    type: list
    list_type: exe_type

  online_exe_list_type:
    type: list
    list_type: online_exe_type
      
  start_game_online_type:
    type: map
    map_schema:
      overlay_supported:
        type: yesno
      overlay_required:
        type: yesno
      overlay_shop_enabled:
        type: yesno
      overlay_shop_url:
      overlay_shop_url_set_by_game:
        type: yesno
      after_game_report_enabled:
        type: yesno
      allow_multiple_instances:
        type: yesno
      executables:
        type: online_exe_list_type
        required: yes
      overlay_product_activation_enabled:
        type: yesno
      legacy_ticket_enabled:
        type: yesno
        
  start_game_offline_type:
    type: map
    map_schema:
      after_game_report_enabled:
        type: yesno
      allow_multiple_instances:
        type: yesno
      offline_arguments:
      executables:
        type: exe_list_type
        required: yes

  start_game_legacy_offline_type:
    type: map
    map_schema:
      executable:
        type: exe_type
        required: yes
  
  start_game_steam_type:
    type: map
    map_schema:
      overlay_supported:
        type: yesno
      overlay_required:
        type: yesno
      overlay_shop_enabled:
        type: yesno
      overlay_shop_url:
      overlay_product_activation_enabled:
        type: yesno
      legacy_ticket_enabled:
        type: yesno
      after_game_report_enabled:
        type: yesno
      legacy_offline_supported:
        type: yesno
      offline_supported:
        type: yesno
      offline_arguments:
      play_arguments:
      steam_app_id:
      steam_override_app_id:
      steam_override_app_id_addon_id:
      steam_installation_status_register:
      game_installation_status_register:
      installation_dependencies:
        type: list
        list_type: installation_dependencies_list_type
      
  start_game_third_party_steam_type:
    type: map
    map_schema:
      steam_app_id:
      steam_override_app_id:
      steam_override_app_id_addon_id:
      steam_installation_status_register:
      game_installation_status_register:
      installation_dependencies:
        type: list
        list_type: installation_dependencies_list_type
      
  start_game_type:
    type: map
    map_schema:
      online:
        type : start_game_online_type
      offline:
        type : start_game_offline_type
      legacy_offline:
        type : start_game_legacy_offline_type
      steam:
        type: start_game_steam_type
      third_party_steam:
        type: start_game_third_party_steam_type
 
  party_type:
    type: map
    map_schema:
      party_enabled:
        type: yesno
        required: yes
      max_party_size:
        type: number

  dlc_type:
    type: map
    map_schema:
      name:
      product_id:

  combined_path_type:
    type: list
    list_schema:
      type: map
      map_schema:
        register:
          required: no
        path:
          required: no

  register_or_path_type:
    type: map
    map_schema:
      register:
      path:

  third_party_platform_type:
    type: map
    map_schema:
      name:
        required: yes
      trade_mark_notice:
        required: no
      platform_installation_status:
        type: register_or_path_type
      game_activation_status:
        type: register_or_path_type
      game_start_url:
        type: combined_path_type
      game_start_working_dir:
        type: combined_path_type
      game_activation_url:
        type: combined_path_type

  additional_content_type:
    type: map
    map_schema:
      name:
      thumb_image_url:
      description:
      download_url:

  shortcut_type:
    type: map
    map_schema:
      name:
        required: yes
      exe_index:
        required: yes
      icon_image:
        required: yes

  installer_type:
    type: map
    map_schema:
      game_identifier:
        required: yes
      shortcut_name:
        required: no
      publisher:
        required: no
      help_url:
        required: no
      about_url:
        required: no
      upgraded_from_legacy:
        required: no
      shortcuts:
        type: list
        list_type: shortcut_type

  crash_reporting_type:
    type: map
    map_schema:
      space_id:
        required: yes
      app_id:
        required: no

  digital_distribution_type:
    type: map
    map_schema:
      version:
        required: yes

  custom_urls_list_type:
    type: map
    map_schema:
      url:
        required: yes
      title:
        required: yes

  installation_dependencies_list_type:
    type: map
    map_schema:
      register:
        required: yes

  addon_type:
    type: map
    map_schema:
      id:
        required: yes
      name:
        required: yes
      thumb_image:
      is_visible:
        type: yesno

  addons_list_type:
    type: list
    list_type: addon_type

  #------------------------------------------------------------
  # Root type
  #------------------------------------------------------------
  root_type:
    type: map
    map_schema:
      name:
        required: yes
      background_image:
        required: yes
      thumb_image:
        required: yes
      logo_image:
        required: no
      dialog_image:
        required: no
      icon_image:
        required: no
      release_date:
        required: no
      cdn_provider:
        required: no
      start_game:
        type: start_game_type
      uplay:
        type: uplay_type
      orbit_exited:
        type: yesno
      cd_key_required:
        type: yesno
      party:
        type: party_type
      news:
        type: rss_feed_list_type
      cloud_saves:
        type: yesno
        required: yes		
      facebook_url:
      homepage_url:
      help_url:
      forum_url:
      survey_url:
        type: http
        required: no
      settings_exe:
        type: exe_type
      after_game_report_ad:
        type: yesno
      windowed_mode:
        type: yesno
      force_safe_mode:
        type: yesno
      uplay_pipe_required:
        type: yesno
        required: no
      is_dlc:
        type: yesno
        required: no
      is_ulc:
        type: yesno
        required: no
      dlcs:
        type: list
        list_type: dlc_type
      third_party_platform:
        type: third_party_platform_type
      background_installer_enabled:
        type: yesno
      game_invites_enabled:
        type: yesno
        required: no
      game_streaming_enabled:
        type: yesno
        required: no
      display_name:
        required: no
      additional_content:
        type: list
        list_type: additional_content_type
      sort_string:
      installer:
        type: installer_type
      digital_distribution:
        type: digital_distribution_type
      override_uplayid:
        required: no
      uplay_required_version:
        required: no
      custom_urls:
        type: list
        list_type: custom_urls_list_type
      legacy_friends_nicks_enabled:
        type: yesno
      change_language_enabled:
        type: yesno
      background_color:
        required: no
      crash_reporting:
        type: crash_reporting_type
      addons:
        type: addons_list_type

  localization_type:
    type: map

#--------------------------------------------------------------
# Schema
#--------------------------------------------------------------
schema:
  type: map
  map_schema:
    # Specifies the version of the configuration
    version:
      required: yes
    # This is where the root of the configuration is found
    root:
      type: root_type
      required: yes
    # Localizations are optional and can be skipped
    localizations:
      type: map
      map_type: localization_type
          
