# WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.7

import enum
import datetime
import sys
import types
import typing

import winsdk._winrt as _winrt
import winsdk.windows.foundation
import winsdk.windows.foundation.collections
import winsdk.windows.security.credentials
import winsdk.windows.system
import winsdk.windows.ui
import winsdk.windows.ui.shell

class UserActivityState(enum.IntEnum):
    NEW = 0
    PUBLISHED = 1

Self = typing.TypeVar('Self')

class UserActivity(_winrt.Object):
    fallback_uri: typing.Optional[winsdk.windows.foundation.Uri]
    content_uri: typing.Optional[winsdk.windows.foundation.Uri]
    content_type: str
    content_info: typing.Optional[IUserActivityContentInfo]
    activation_uri: typing.Optional[winsdk.windows.foundation.Uri]
    activity_id: str
    state: UserActivityState
    visual_elements: typing.Optional[UserActivityVisualElements]
    is_roamable: _winrt.Boolean
    @staticmethod
    def _from(obj: _winrt.Object) -> UserActivity: ...
    def __new__(cls: typing.Type[UserActivity], activity_id: str) -> UserActivity:...
    def create_session(self) -> typing.Optional[UserActivitySession]: ...
    def save_async(self) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    def to_json(self) -> str: ...
    @staticmethod
    def to_json_array(activities: typing.Iterable[UserActivity]) -> str: ...
    @staticmethod
    def try_parse_from_json(json: str) -> typing.Optional[UserActivity]: ...
    @staticmethod
    def try_parse_from_json_array(json: str) -> typing.Optional[winsdk.windows.foundation.collections.IVector[UserActivity]]: ...

class UserActivityAttribution(_winrt.Object):
    icon_uri: typing.Optional[winsdk.windows.foundation.Uri]
    alternate_text: str
    add_image_query: _winrt.Boolean
    @staticmethod
    def _from(obj: _winrt.Object) -> UserActivityAttribution: ...
    @typing.overload
    def __new__(cls: typing.Type[UserActivityAttribution], icon_uri: typing.Optional[winsdk.windows.foundation.Uri]) -> UserActivityAttribution:...
    @typing.overload
    def __new__(cls: typing.Type[UserActivityAttribution]) -> UserActivityAttribution:...

class UserActivityChannel(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> UserActivityChannel: ...
    def delete_activity_async(self, activity_id: str) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    def delete_all_activities_async(self) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    @staticmethod
    def disable_auto_session_creation() -> None: ...
    @staticmethod
    def get_default() -> typing.Optional[UserActivityChannel]: ...
    @staticmethod
    def get_for_user(user: typing.Optional[winsdk.windows.system.User]) -> typing.Optional[UserActivityChannel]: ...
    def get_or_create_user_activity_async(self, activity_id: str) -> winsdk.windows.foundation.IAsyncOperation[UserActivity]: ...
    def get_recent_user_activities_async(self, max_unique_activities: _winrt.Int32) -> winsdk.windows.foundation.IAsyncOperation[winsdk.windows.foundation.collections.IVector[UserActivitySessionHistoryItem]]: ...
    def get_session_history_items_for_user_activity_async(self, activity_id: str, start_time: datetime.datetime) -> winsdk.windows.foundation.IAsyncOperation[winsdk.windows.foundation.collections.IVector[UserActivitySessionHistoryItem]]: ...
    @staticmethod
    def try_get_for_web_account(account: typing.Optional[winsdk.windows.security.credentials.WebAccount]) -> typing.Optional[UserActivityChannel]: ...

class UserActivityContentInfo(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> UserActivityContentInfo: ...
    @staticmethod
    def from_json(value: str) -> typing.Optional[UserActivityContentInfo]: ...
    def to_json(self) -> str: ...

class UserActivityRequest(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> UserActivityRequest: ...
    def set_user_activity(self, activity: typing.Optional[UserActivity]) -> None: ...

class UserActivityRequestManager(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> UserActivityRequestManager: ...
    @staticmethod
    def get_for_current_view() -> typing.Optional[UserActivityRequestManager]: ...
    def add_user_activity_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[UserActivityRequestManager, UserActivityRequestedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_user_activity_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...

class UserActivityRequestedEventArgs(_winrt.Object):
    request: typing.Optional[UserActivityRequest]
    @staticmethod
    def _from(obj: _winrt.Object) -> UserActivityRequestedEventArgs: ...
    def get_deferral(self) -> typing.Optional[winsdk.windows.foundation.Deferral]: ...

class UserActivitySession(_winrt.Object):
    activity_id: str
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: _winrt.Object) -> UserActivitySession: ...
    def close(self) -> None: ...

class UserActivitySessionHistoryItem(_winrt.Object):
    end_time: typing.Optional[typing.Optional[datetime.datetime]]
    start_time: datetime.datetime
    user_activity: typing.Optional[UserActivity]
    @staticmethod
    def _from(obj: _winrt.Object) -> UserActivitySessionHistoryItem: ...

class UserActivityVisualElements(_winrt.Object):
    display_text: str
    description: str
    content: typing.Optional[winsdk.windows.ui.shell.IAdaptiveCard]
    background_color: winsdk.windows.ui.Color
    attribution: typing.Optional[UserActivityAttribution]
    attribution_display_text: str
    @staticmethod
    def _from(obj: _winrt.Object) -> UserActivityVisualElements: ...

class IUserActivityContentInfo(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> IUserActivityContentInfo: ...
    def to_json(self) -> str: ...

