# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: service_usernews.proto
# plugin: python-betterproto
# Last updated 09/09/2021
from dataclasses import dataclass

import betterproto

from .msg import UnifiedMessage


class GetAppDetailsSpotlightRequest(UnifiedMessage, um_name="UserNews.GetAppDetailsSpotlight"):
    appid: int = betterproto.uint32_field(1)
    include_already_seen: bool = betterproto.bool_field(2)


class GetAppDetailsSpotlightResponse(UnifiedMessage, um_name="UserNews.GetAppDetailsSpotlight"):
    @dataclass(eq=False, repr=False)
    class FeaturedEvent(betterproto.Message):
        event_type: int = betterproto.uint32_field(1)
        event_time: int = betterproto.uint32_field(2)
        clan_id: int = betterproto.fixed64_field(3)
        clan_announcementid: int = betterproto.fixed64_field(4)
        appid: int = betterproto.uint32_field(5)
        rtime32_last_modified: int = betterproto.uint32_field(6)

    events: list[FeaturedEvent] = betterproto.message_field(1)


class GetUserNewsRequest(UnifiedMessage, um_name="UserNews.GetUserNews"):
    count: int = betterproto.uint32_field(1)
    starttime: int = betterproto.uint32_field(2)
    endtime: int = betterproto.uint32_field(3)
    language: str = betterproto.string_field(4)
    filterflags: int = betterproto.uint32_field(5)
    filterappid: int = betterproto.uint32_field(6)


class GetUserNewsResponse(UnifiedMessage, um_name="UserNews.GetUserNews"):
    @dataclass(eq=False, repr=False)
    class Event(betterproto.Message):
        eventtype: int = betterproto.uint32_field(1)
        eventtime: int = betterproto.uint32_field(2)
        steamid_actor: int = betterproto.fixed64_field(3)
        steamid_target: int = betterproto.fixed64_field(4)
        gameid: int = betterproto.fixed64_field(5)
        packageid: int = betterproto.uint32_field(6)
        shortcutid: int = betterproto.uint32_field(7)
        achievement_names: list[str] = betterproto.string_field(8)
        clan_eventid: int = betterproto.fixed64_field(9)
        clan_announcementid: int = betterproto.fixed64_field(10)
        publishedfileid: int = betterproto.fixed64_field(11)
        event_last_mod_time: int = betterproto.uint32_field(12)
        appids: list[int] = betterproto.uint32_field(13)

    news: list[Event] = betterproto.message_field(1)

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

        @dataclass(eq=False, repr=False)
        class Achievement(betterproto.Message):
            name: str = betterproto.string_field(1)
            display_name: str = betterproto.string_field(2)
            display_description: str = betterproto.string_field(3)
            icon: str = betterproto.string_field(4)
            unlocked_pct: float = betterproto.float_field(5)
            hidden: bool = betterproto.bool_field(6)

        achievements: list[Achievement] = betterproto.message_field(2)

    achievement_display_data: list[AchievementDisplayData] = betterproto.message_field(2)
