# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: steammessages_store.steamclient.proto, steammessages_storebrowse.steamclient.proto, service_storequery.proto
# plugin: python-betterproto
# Last updated 27/02/2022

from dataclasses import dataclass

import betterproto

from .msg import UnifiedMessage


class EContentDescriptorId(betterproto.Enum):
    FrequentNudityOrSexualContent = 1
    FrequentViolenceOrGore = 2
    StrongSexualContent = 3
    UNUSED_4 = 4
    AnyMatureContent = 5


class ESteamDeckCompatibilityCategory(betterproto.Enum):
    Unknown = 0
    Unsupported = 1
    Playable = 2
    Verified = 3


class EStoreItemType(betterproto.Enum):
    Invalid = -1
    App = 0
    Package = 1
    Bundle = 2
    MicroTransaction = 3
    Tag = 4
    Creator = 5
    HubCategory = 6


class EStoreAppType(betterproto.Enum):
    Game = 0
    Demo = 1
    Mod = 2
    Movie = 3
    DLC = 4
    Guide = 5
    Software = 6
    Video = 7
    Series = 8
    Episode = 9
    Hardware = 10
    Music = 11
    Beta = 12
    Tool = 13
    Advertising = 14


class EUserReviewScore(betterproto.Enum):
    NONE = 0
    OverwhelminglyNegative = 1
    VeryNegative = 2
    Negative = 3
    MostlyNegative = 4
    Mixed = 5
    MostlyPositive = 6
    Positive = 7
    VeryPositive = 8
    OverwhelminglyPositive = 9


class EStoreCategoryType(betterproto.Enum):
    Category = 0
    SupportedPlayers = 1
    Feature = 2
    ControllerSupport = 3
    CloudGaming = 4
    MAX = 5


class RegisterCDKeyRequest(UnifiedMessage, um_name="Store.RegisterCDKey"):
    activation_code: str = betterproto.string_field(1)
    purchase_platform: int = betterproto.int32_field(2)
    is_request_from_client: bool = betterproto.bool_field(3)


class RegisterCDKeyResponse(UnifiedMessage, um_name="Store.RegisterCDKey"):
    eresult: int = betterproto.int32_field(1)
    purchase_receipt_info: "PurchaseReceiptInfo" = betterproto.message_field(2)


@dataclass(eq=False, repr=False)
class PurchaseReceiptInfo(betterproto.Message):
    transactionid: int = betterproto.uint64_field(1)
    packageid: int = betterproto.uint32_field(2)
    purchase_status: int = betterproto.uint32_field(3)
    result_detail: int = betterproto.uint32_field(4)
    transaction_time: int = betterproto.uint32_field(5)
    payment_method: int = betterproto.uint32_field(6)
    base_price: int = betterproto.uint64_field(7)
    total_discount: int = betterproto.uint64_field(8)
    tax: int = betterproto.uint64_field(9)
    shipping: int = betterproto.uint64_field(10)
    currency_code: int = betterproto.uint32_field(11)
    country_code: str = betterproto.string_field(12)
    error_headline: str = betterproto.string_field(13)
    error_string: str = betterproto.string_field(14)
    error_link_text: str = betterproto.string_field(15)
    error_link_url: str = betterproto.string_field(16)
    error_appid: int = betterproto.uint32_field(17)
    line_items: "list[PurchaseReceiptInfoLineItem]" = betterproto.message_field(18)


@dataclass(eq=False, repr=False)
class PurchaseReceiptInfoLineItem(betterproto.Message):
    packageid: int = betterproto.uint32_field(1)
    appid: int = betterproto.uint32_field(2)
    line_item_description: str = betterproto.string_field(3)


@dataclass(eq=False, repr=False)
class StoreItemId(betterproto.Message):
    appid: int = betterproto.uint32_field(1)
    packageid: int = betterproto.uint32_field(2)
    bundleid: int = betterproto.uint32_field(3)
    tagid: int = betterproto.uint32_field(4)
    creatorid: int = betterproto.uint32_field(5)
    hubcategoryid: int = betterproto.uint32_field(6)


@dataclass(eq=False, repr=False)
class StoreBrowseContext(betterproto.Message):
    language: str = betterproto.string_field(1)
    elanguage: int = betterproto.int32_field(2)
    country_code: str = betterproto.string_field(3)
    steam_realm: int = betterproto.int32_field(4)


@dataclass(eq=False, repr=False)
class StoreBrowseItemDataRequest(betterproto.Message):
    include_assets: bool = betterproto.bool_field(1)
    include_release: bool = betterproto.bool_field(2)
    include_platforms: bool = betterproto.bool_field(3)
    include_all_purchase_options: bool = betterproto.bool_field(4)
    include_screenshots: bool = betterproto.bool_field(5)
    include_trailers: bool = betterproto.bool_field(6)
    include_ratings: bool = betterproto.bool_field(7)
    include_tag_count: int = betterproto.int32_field(8)
    include_reviews: bool = betterproto.bool_field(9)
    include_basic_info: bool = betterproto.bool_field(10)
    include_supported_languages: bool = betterproto.bool_field(11)


class GetItemsRequest(UnifiedMessage, um_name="StoreBrowse.GetItems"):
    ids: list[StoreItemId] = betterproto.message_field(1)
    context: "StoreBrowseContext" = betterproto.message_field(2)
    data_request: "StoreBrowseItemDataRequest" = betterproto.message_field(3)


@dataclass(eq=False, repr=False)
class StoreGameRating(betterproto.Message):
    type: str = betterproto.string_field(1)
    rating: str = betterproto.string_field(2)
    descriptors: list[str] = betterproto.string_field(3)
    interactive_elements: str = betterproto.string_field(4)
    required_age: int = betterproto.int32_field(10)
    use_age_gate: bool = betterproto.bool_field(11)
    image_url: str = betterproto.string_field(20)
    image_target: str = betterproto.string_field(21)


@dataclass(eq=False, repr=False)
class StoreItem(betterproto.Message):
    item_type: EStoreItemType = betterproto.enum_field(1)
    id: int = betterproto.uint32_field(2)
    success: int = betterproto.uint32_field(3)
    visible: bool = betterproto.bool_field(4)
    unvailable_for_country_restriction: bool = betterproto.bool_field(5)
    name: str = betterproto.string_field(6)
    store_url_path: str = betterproto.string_field(7)
    appid: int = betterproto.uint32_field(9)
    type: EStoreAppType = betterproto.enum_field(10)
    included_types: list[EStoreAppType] = betterproto.enum_field(11)
    included_appids: list[int] = betterproto.uint32_field(12)
    is_free: bool = betterproto.bool_field(13)
    is_early_access: bool = betterproto.bool_field(14)
    related_items: "StoreItemRelatedItems" = betterproto.message_field(15)
    content_descriptorids: list[EContentDescriptorId] = betterproto.enum_field(20)
    tagids: list[int] = betterproto.uint32_field(21)
    categories: "StoreItemCategories" = betterproto.message_field(22)
    reviews: "StoreItemReviews" = betterproto.message_field(23)
    basic_info: "StoreItemBasicInfo" = betterproto.message_field(24)
    tags: "list[StoreItemTag]" = betterproto.message_field(25)
    assets: "StoreItemAssets" = betterproto.message_field(30)
    release: "StoreItemReleaseInfo" = betterproto.message_field(31)
    platforms: "StoreItemPlatforms" = betterproto.message_field(32)
    game_rating: StoreGameRating = betterproto.message_field(33)
    best_purchase_option: "StoreItemPurchaseOption" = betterproto.message_field(40)
    purchase_options: "list[StoreItemPurchaseOption]" = betterproto.message_field(41)
    accessories: "list[StoreItemPurchaseOption]" = betterproto.message_field(42)
    screenshots: "StoreItemScreenshots" = betterproto.message_field(50)
    trailers: "StoreItemTrailers" = betterproto.message_field(51)
    supported_languages: "list[StoreItemSupportedLanguage]" = betterproto.message_field(52)
    store_url_path_override: str = betterproto.string_field(53)
    free_weekend: "StoreItemFreeWeekend" = betterproto.message_field(54)
    unlisted: bool = betterproto.bool_field(55)


@dataclass(eq=False, repr=False)
class StoreItemRelatedItems(betterproto.Message):
    parent_appid: int = betterproto.uint32_field(1)


@dataclass(eq=False, repr=False)
class StoreItemCategories(betterproto.Message):
    supported_player_categoryids: list[int] = betterproto.uint32_field(2)
    feature_categoryids: list[int] = betterproto.uint32_field(3)
    controller_categoryids: list[int] = betterproto.uint32_field(4)


@dataclass(eq=False, repr=False)
class StoreItemReviews(betterproto.Message):
    summary_filtered: "StoreItemReviewsStoreReviewSummary" = betterproto.message_field(1)
    summary_unfiltered: "StoreItemReviewsStoreReviewSummary" = betterproto.message_field(2)


@dataclass(eq=False, repr=False)
class StoreItemReviewsStoreReviewSummary(betterproto.Message):
    review_count: int = betterproto.uint32_field(1)
    percent_positive: int = betterproto.int32_field(2)
    review_score: EUserReviewScore = betterproto.enum_field(3)
    review_score_label: str = betterproto.string_field(4)


@dataclass(eq=False, repr=False)
class StoreItemBasicInfo(betterproto.Message):
    short_description: str = betterproto.string_field(1)
    publishers: "list[StoreItemBasicInfoCreatorHomeLink]" = betterproto.message_field(2)
    developers: "list[StoreItemBasicInfoCreatorHomeLink]" = betterproto.message_field(3)
    franchises: "list[StoreItemBasicInfoCreatorHomeLink]" = betterproto.message_field(4)
    capsule_headline: str = betterproto.string_field(5)


@dataclass(eq=False, repr=False)
class StoreItemBasicInfoCreatorHomeLink(betterproto.Message):
    name: str = betterproto.string_field(1)
    creator_clan_account_id: int = betterproto.uint32_field(2)


@dataclass(eq=False, repr=False)
class StoreItemTag(betterproto.Message):
    tagid: int = betterproto.uint32_field(1)
    weight: int = betterproto.uint32_field(2)


@dataclass(eq=False, repr=False)
class StoreItemAssets(betterproto.Message):
    asset_url_format: str = betterproto.string_field(1)
    main_capsule: str = betterproto.string_field(2)
    small_capsule: str = betterproto.string_field(3)
    header: str = betterproto.string_field(4)
    package_header: str = betterproto.string_field(5)
    page_background: str = betterproto.string_field(6)
    hero_capsule: str = betterproto.string_field(7)
    hero_capsule_2_x: str = betterproto.string_field(8)
    library_capsule: str = betterproto.string_field(9)
    library_capsule_2_x: str = betterproto.string_field(10)
    library_hero: str = betterproto.string_field(11)
    library_hero_2_x: str = betterproto.string_field(12)
    community_icon: str = betterproto.string_field(13)


@dataclass(eq=False, repr=False)
class StoreItemReleaseInfo(betterproto.Message):
    steam_release_date: int = betterproto.uint32_field(1)
    original_release_date: int = betterproto.uint32_field(2)
    original_steam_release_date: int = betterproto.uint32_field(3)
    is_coming_soon: bool = betterproto.bool_field(4)
    is_preload: bool = betterproto.bool_field(5)
    custom_release_date_message: str = betterproto.string_field(6)
    is_abridged_release_date: bool = betterproto.bool_field(7)
    coming_soon_display: str = betterproto.string_field(8)
    is_early_access: bool = betterproto.bool_field(10)
    mac_release_date: int = betterproto.uint32_field(20)
    linux_release_date: int = betterproto.uint32_field(21)


@dataclass(eq=False, repr=False)
class StoreItemPlatforms(betterproto.Message):
    windows: bool = betterproto.bool_field(1)
    mac: bool = betterproto.bool_field(2)
    steamos_linux: bool = betterproto.bool_field(3)
    vr_support: "StoreItemPlatformsVrSupport" = betterproto.message_field(10)
    steam_deck_compat_category: ESteamDeckCompatibilityCategory = betterproto.enum_field(11)


@dataclass(eq=False, repr=False)
class StoreItemPlatformsVrSupport(betterproto.Message):
    vrhmd: bool = betterproto.bool_field(1)
    vrhmd_only: bool = betterproto.bool_field(2)
    htc_vive: bool = betterproto.bool_field(40)
    oculus_rift: bool = betterproto.bool_field(41)
    windows_mr: bool = betterproto.bool_field(42)
    valve_index: bool = betterproto.bool_field(43)


@dataclass(eq=False, repr=False)
class StoreItemPurchaseOption(betterproto.Message):
    packageid: int = betterproto.int32_field(1)
    bundleid: int = betterproto.int32_field(2)
    purchase_option_name: str = betterproto.string_field(3)
    final_price_in_cents: int = betterproto.int64_field(5)
    original_price_in_cents: int = betterproto.int64_field(6)
    user_final_price_in_cents: int = betterproto.int64_field(7)
    formatted_final_price: str = betterproto.string_field(8)
    formatted_original_price: str = betterproto.string_field(9)
    discount_pct: int = betterproto.int32_field(10)
    user_discount_pct: int = betterproto.int32_field(11)
    bundle_discount_pct: int = betterproto.int32_field(12)
    active_discounts: "list[StoreItemPurchaseOptionDiscount]" = betterproto.message_field(20)
    user_active_discounts: "list[StoreItemPurchaseOptionDiscount]" = betterproto.message_field(21)
    inactive_discounts: "list[StoreItemPurchaseOptionDiscount]" = betterproto.message_field(22)
    user_can_purchase: bool = betterproto.bool_field(30)
    user_can_purchase_as_gift: bool = betterproto.bool_field(31)
    is_commercial_license: bool = betterproto.bool_field(40)
    should_suppress_discount_pct: bool = betterproto.bool_field(41)


@dataclass(eq=False, repr=False)
class StoreItemPurchaseOptionDiscount(betterproto.Message):
    discount_amount: int = betterproto.int64_field(1)
    discount_description: str = betterproto.string_field(2)
    discount_end_date: int = betterproto.uint32_field(3)


@dataclass(eq=False, repr=False)
class StoreItemScreenshots(betterproto.Message):
    all_ages_screenshots: "list[StoreItemScreenshotsScreenshot]" = betterproto.message_field(2)
    mature_content_screenshots: "list[StoreItemScreenshotsScreenshot]" = betterproto.message_field(3)


@dataclass(eq=False, repr=False)
class StoreItemScreenshotsScreenshot(betterproto.Message):
    filename: str = betterproto.string_field(1)
    ordinal: int = betterproto.int32_field(2)


@dataclass(eq=False, repr=False)
class StoreItemTrailers(betterproto.Message):
    highlights: "list[StoreItemTrailersTrailer]" = betterproto.message_field(1)
    other_trailers: "list[StoreItemTrailersTrailer]" = betterproto.message_field(2)


@dataclass(eq=False, repr=False)
class StoreItemTrailersVideoSource(betterproto.Message):
    filename: str = betterproto.string_field(1)
    type: str = betterproto.string_field(2)


@dataclass(eq=False, repr=False)
class StoreItemTrailersTrailer(betterproto.Message):
    trailer_name: str = betterproto.string_field(1)
    trailer_url_format: str = betterproto.string_field(2)
    trailer_480_p: list[StoreItemTrailersVideoSource] = betterproto.message_field(3)
    trailer_max: list[StoreItemTrailersVideoSource] = betterproto.message_field(4)
    microtrailer: list[StoreItemTrailersVideoSource] = betterproto.message_field(5)
    screenshot_medium: str = betterproto.string_field(10)
    screenshot_full: str = betterproto.string_field(11)
    trailer_base_id: int = betterproto.int32_field(12)


@dataclass(eq=False, repr=False)
class StoreItemSupportedLanguage(betterproto.Message):
    elanguage: int = betterproto.int32_field(1)
    supported: bool = betterproto.bool_field(2)
    full_audio: bool = betterproto.bool_field(3)
    subtitles: bool = betterproto.bool_field(4)


@dataclass(eq=False, repr=False)
class StoreItemFreeWeekend(betterproto.Message):
    start_time: int = betterproto.uint32_field(1)
    end_time: int = betterproto.uint32_field(2)
    text: str = betterproto.string_field(3)


class GetItemsResponse(UnifiedMessage, um_name="StoreBrowse.GetItems"):
    store_items: list[StoreItem] = betterproto.message_field(1)


class GetStoreCategoriesRequest(UnifiedMessage, um_name="StoreBrowse.GetStoreCategories"):
    language: str = betterproto.string_field(1)
    elanguage: int = betterproto.int32_field(2)


class GetStoreCategoriesResponse(UnifiedMessage, um_name="StoreBrowse.GetStoreCategories"):
    categories: "list[GetStoreCategoriesResponseCategory]" = betterproto.message_field(1)


@dataclass(eq=False, repr=False)
class GetStoreCategoriesResponseCategory(betterproto.Message):
    categoryid: int = betterproto.uint32_field(1)
    type: EStoreCategoryType = betterproto.enum_field(2)
    internal_name: str = betterproto.string_field(3)
    display_name: str = betterproto.string_field(4)
    image_url: str = betterproto.string_field(5)
    show_in_search: bool = betterproto.bool_field(6)


@dataclass(eq=False, repr=False)
class StorePageFilter(betterproto.Message):
    @dataclass(eq=False, repr=False)
    class SalePageFilter(betterproto.Message):
        sale_tagid: int = betterproto.uint32_field(1)

    sale_filter: SalePageFilter = betterproto.message_field(1)

    @dataclass(eq=False, repr=False)
    class ContentHubFilter(betterproto.Message):
        @dataclass(eq=False, repr=False)
        class OptInInfo(betterproto.Message):
            name: str = betterproto.string_field(1)
            optin_tagid: int = betterproto.uint32_field(2)
            prune_tagid: int = betterproto.uint32_field(3)
            optin_only: bool = betterproto.bool_field(4)

        hub_type: str = betterproto.string_field(1)
        hub_category: str = betterproto.string_field(2)
        hub_tagid: int = betterproto.uint32_field(3)
        discount_filter: int = betterproto.int32_field(4)
        optin: "OptInInfo" = betterproto.message_field(5)

    content_hub_filter: ContentHubFilter = betterproto.message_field(2)

    @dataclass(eq=False, repr=False)
    class StoreFilter(betterproto.Message):
        filter_json: str = betterproto.string_field(1)
        cache_key: str = betterproto.string_field(2)

    store_filters: list[StoreFilter] = betterproto.message_field(3)


class GetDLCForAppsRequest(UnifiedMessage, um_name="StoreBrowse.GetDLCForApps"):
    context: StoreBrowseContext = betterproto.message_field(1)
    store_page_filter: StorePageFilter = betterproto.message_field(2)
    appids: list[StoreItemId] = betterproto.message_field(3)
    steamid: int = betterproto.uint64_field(4)


@dataclass(eq=False, repr=False)
class GetDLCForAppsResponseDLCData(betterproto.Message):
    appid: int = betterproto.uint32_field(1)
    parentappid: int = betterproto.uint32_field(2)
    release_date: int = betterproto.uint32_field(3)
    coming_soon: bool = betterproto.bool_field(4)
    price: int = betterproto.int64_field(5)
    discount: int = betterproto.uint32_field(6)
    free: bool = betterproto.bool_field(7)


@dataclass(eq=False, repr=False)
class GetDLCForAppsResponsePlaytimeForApp(betterproto.Message):
    appid: int = betterproto.uint32_field(1)
    playtime: int = betterproto.uint32_field(2)
    last_played: int = betterproto.uint32_field(3)


class GetDLCForAppsResponse(UnifiedMessage, um_name="StoreBrowse.GetDLCForApps"):
    dlc_data: "list[GetDLCForAppsResponseDLCData]" = betterproto.message_field(1)
    playtime: "list[GetDLCForAppsResponsePlaytimeForApp]" = betterproto.message_field(2)


class QueryRequest(UnifiedMessage, um_name="StoreQuery.Query"):
    query_name: str = betterproto.string_field(1)

    @dataclass(eq=False, repr=False)
    class StoreQueryParams(betterproto.Message):
        start: int = betterproto.int32_field(1)
        count: int = betterproto.int32_field(2)
        sort: int = betterproto.int32_field(10)
        filters: "StoreQueryFilters" = betterproto.message_field(20)

    query: StoreQueryParams = betterproto.message_field(2)
    context: StoreBrowseContext = betterproto.message_field(3)
    data_request: StoreBrowseItemDataRequest = betterproto.message_field(4)
    override_country_code: str = betterproto.string_field(5)


class QueryResponse(UnifiedMessage, um_name="StoreQuery.Query"):
    metadata: "StoreQueryResultMetadata" = betterproto.message_field(1)
    ids: list[StoreItemId] = betterproto.message_field(2)
    store_items: list[StoreItem] = betterproto.message_field(3)


class SearchSuggestionsRequest(UnifiedMessage, um_name="StoreQuery.SearchSuggestions"):
    query_name: str = betterproto.string_field(1)
    context: StoreBrowseContext = betterproto.message_field(2)
    search_term: str = betterproto.string_field(3)
    max_results: int = betterproto.uint32_field(4)
    filters: "StoreQueryFilters" = betterproto.message_field(5)
    data_request: StoreBrowseItemDataRequest = betterproto.message_field(6)
    use_spellcheck: bool = betterproto.bool_field(7)
    search_tags: bool = betterproto.bool_field(8)
    search_creators: bool = betterproto.bool_field(9)
    prefilter_creators: bool = betterproto.bool_field(10)


class SearchSuggestionsResponse(UnifiedMessage, um_name="StoreQuery.SearchSuggestions"):
    metadata: "StoreQueryResultMetadata" = betterproto.message_field(1)
    ids: list[StoreItemId] = betterproto.message_field(2)
    store_items: list[StoreItem] = betterproto.message_field(3)


@dataclass(eq=False, repr=False)
class StoreQueryFilters(betterproto.Message):
    released_only: bool = betterproto.bool_field(1)
    coming_soon_only: bool = betterproto.bool_field(2)

    @dataclass(eq=False, repr=False)
    class TypeFilters(betterproto.Message):
        include_apps: bool = betterproto.bool_field(1)
        include_packages: bool = betterproto.bool_field(2)
        include_bundles: bool = betterproto.bool_field(3)
        include_games: bool = betterproto.bool_field(10)
        include_demos: bool = betterproto.bool_field(11)
        include_mods: bool = betterproto.bool_field(12)
        include_dlc: bool = betterproto.bool_field(13)
        include_software: bool = betterproto.bool_field(14)
        include_video: bool = betterproto.bool_field(15)
        include_hardware: bool = betterproto.bool_field(16)
        include_series: bool = betterproto.bool_field(17)
        include_music: bool = betterproto.bool_field(18)

    type_filters: TypeFilters = betterproto.message_field(3)

    @dataclass(eq=False, repr=False)
    class TagFilter(betterproto.Message):
        tagids: list[int] = betterproto.int32_field(1)

    tagids_must_match: list[TagFilter] = betterproto.message_field(10)
    tagids_exclude: list[int] = betterproto.uint32_field(11)
    content_descriptors_must_match: list[EContentDescriptorId] = betterproto.enum_field(15)
    content_descriptors_excluded: list[EContentDescriptorId] = betterproto.enum_field(16)
    regional_top_n_sellers: int = betterproto.int32_field(40)
    global_top_n_sellers: int = betterproto.int32_field(41)
    regional_long_term_top_n_sellers: int = betterproto.int32_field(42)
    global_long_term_top_n_sellers: int = betterproto.int32_field(43)
    store_page_filter: StorePageFilter = betterproto.message_field(44)
    parent_appids: list[int] = betterproto.uint32_field(45)


@dataclass(eq=False, repr=False)
class StoreQueryPerResultMetadata(betterproto.Message):
    id: StoreItemId = betterproto.message_field(1)
    score: float = betterproto.double_field(2)
    spellcheck_generated_result: bool = betterproto.bool_field(3)


@dataclass(eq=False, repr=False)
class StoreQueryResultMetadata(betterproto.Message):
    total_matching_records: int = betterproto.int32_field(1)
    start: int = betterproto.int32_field(2)
    count: int = betterproto.int32_field(3)
    per_result_metadata: list[StoreQueryPerResultMetadata] = betterproto.message_field(4)
    spellcheck_suggestions: list[str] = betterproto.string_field(5)
