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

import enum
import sys
import types
import typing
import uuid

import winsdk._winrt as _winrt

try:
    import winsdk.windows.applicationmodel.activation
except Exception:
    pass

try:
    import winsdk.windows.applicationmodel.calls.background
except Exception:
    pass

try:
    import winsdk.windows.devices.bluetooth
except Exception:
    pass

try:
    import winsdk.windows.devices.bluetooth.advertisement
except Exception:
    pass

try:
    import winsdk.windows.devices.bluetooth.background
except Exception:
    pass

try:
    import winsdk.windows.devices.bluetooth.genericattributeprofile
except Exception:
    pass

try:
    import winsdk.windows.devices.geolocation
except Exception:
    pass

try:
    import winsdk.windows.devices.sensors
except Exception:
    pass

try:
    import winsdk.windows.devices.smartcards
except Exception:
    pass

try:
    import winsdk.windows.devices.sms
except Exception:
    pass

try:
    import winsdk.windows.foundation
except Exception:
    pass

try:
    import winsdk.windows.foundation.collections
except Exception:
    pass

try:
    import winsdk.windows.networking
except Exception:
    pass

try:
    import winsdk.windows.networking.sockets
except Exception:
    pass

try:
    import winsdk.windows.storage
except Exception:
    pass

try:
    import winsdk.windows.storage.provider
except Exception:
    pass

try:
    import winsdk.windows.system
except Exception:
    pass

try:
    import winsdk.windows.ui.notifications
except Exception:
    pass

class ApplicationTriggerResult(enum.IntEnum):
    ALLOWED = 0
    CURRENTLY_RUNNING = 1
    DISABLED_BY_POLICY = 2
    UNKNOWN_ERROR = 3

class BackgroundAccessRequestKind(enum.IntEnum):
    ALWAYS_ALLOWED = 0
    ALLOWED_SUBJECT_TO_SYSTEM_POLICY = 1

class BackgroundAccessStatus(enum.IntEnum):
    UNSPECIFIED = 0
    ALLOWED_WITH_ALWAYS_ON_REAL_TIME_CONNECTIVITY = 1
    ALLOWED_MAY_USE_ACTIVE_REAL_TIME_CONNECTIVITY = 2
    DENIED = 3
    ALWAYS_ALLOWED = 4
    ALLOWED_SUBJECT_TO_SYSTEM_POLICY = 5
    DENIED_BY_SYSTEM_POLICY = 6
    DENIED_BY_USER = 7

class BackgroundTaskCancellationReason(enum.IntEnum):
    ABORT = 0
    TERMINATING = 1
    LOGGING_OFF = 2
    SERVICING_UPDATE = 3
    IDLE_TASK = 4
    UNINSTALL = 5
    CONDITION_LOSS = 6
    SYSTEM_POLICY = 7
    QUIET_HOURS_ENTERED = 8
    EXECUTION_TIME_EXCEEDED = 9
    RESOURCE_REVOCATION = 10
    ENERGY_SAVER = 11

class BackgroundTaskThrottleCounter(enum.IntEnum):
    ALL = 0
    CPU = 1
    NETWORK = 2

class BackgroundWorkCostValue(enum.IntEnum):
    LOW = 0
    MEDIUM = 1
    HIGH = 2

class CustomSystemEventTriggerRecurrence(enum.IntEnum):
    ONCE = 0
    ALWAYS = 1

class DeviceTriggerResult(enum.IntEnum):
    ALLOWED = 0
    DENIED_BY_USER = 1
    DENIED_BY_SYSTEM = 2
    LOW_BATTERY = 3

class LocationTriggerType(enum.IntEnum):
    GEOFENCE = 0

class MediaProcessingTriggerResult(enum.IntEnum):
    ALLOWED = 0
    CURRENTLY_RUNNING = 1
    DISABLED_BY_POLICY = 2
    UNKNOWN_ERROR = 3

class SystemConditionType(enum.IntEnum):
    INVALID = 0
    USER_PRESENT = 1
    USER_NOT_PRESENT = 2
    INTERNET_AVAILABLE = 3
    INTERNET_NOT_AVAILABLE = 4
    SESSION_CONNECTED = 5
    SESSION_DISCONNECTED = 6
    FREE_NETWORK_AVAILABLE = 7
    BACKGROUND_WORK_COST_NOT_HIGH = 8

class SystemTriggerType(enum.IntEnum):
    INVALID = 0
    SMS_RECEIVED = 1
    USER_PRESENT = 2
    USER_AWAY = 3
    NETWORK_STATE_CHANGE = 4
    CONTROL_CHANNEL_RESET = 5
    INTERNET_AVAILABLE = 6
    SESSION_CONNECTED = 7
    SERVICING_COMPLETE = 8
    LOCK_SCREEN_APPLICATION_ADDED = 9
    LOCK_SCREEN_APPLICATION_REMOVED = 10
    TIME_ZONE_CHANGE = 11
    ONLINE_ID_CONNECTED_STATE_CHANGE = 12
    BACKGROUND_WORK_COST_CHANGE = 13
    POWER_STATE_CHANGE = 14
    DEFAULT_SIGN_IN_ACCOUNT_CHANGE = 15

class ActivitySensorTrigger(IBackgroundTrigger, _winrt.Object):
    minimum_report_interval: _winrt.UInt32
    report_interval: _winrt.UInt32
    subscribed_activities: winsdk.windows.foundation.collections.IVector[winsdk.windows.devices.sensors.ActivityType]
    supported_activities: winsdk.windows.foundation.collections.IVectorView[winsdk.windows.devices.sensors.ActivityType]
    @staticmethod
    def _from(obj: _winrt.Object) -> ActivitySensorTrigger: ...
    @typing.overload
    def __init__(self, report_interval_in_milliseconds: _winrt.UInt32) -> None: ...

class ApplicationTrigger(IBackgroundTrigger, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> ApplicationTrigger: ...
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def request_async(self) -> winsdk.windows.foundation.IAsyncOperation[ApplicationTriggerResult]: ...
    @typing.overload
    def request_async(self, arguments: winsdk.windows.foundation.collections.ValueSet) -> winsdk.windows.foundation.IAsyncOperation[ApplicationTriggerResult]: ...

class ApplicationTriggerDetails(_winrt.Object):
    arguments: winsdk.windows.foundation.collections.ValueSet
    @staticmethod
    def _from(obj: _winrt.Object) -> ApplicationTriggerDetails: ...

class AppointmentStoreNotificationTrigger(IBackgroundTrigger, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> AppointmentStoreNotificationTrigger: ...
    @typing.overload
    def __init__(self) -> None: ...

class BackgroundExecutionManager(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> BackgroundExecutionManager: ...
    @typing.overload
    @staticmethod
    def get_access_status() -> BackgroundAccessStatus: ...
    @typing.overload
    @staticmethod
    def get_access_status(application_id: str) -> BackgroundAccessStatus: ...
    @typing.overload
    @staticmethod
    def get_access_status_for_modern_standby() -> BackgroundAccessStatus: ...
    @typing.overload
    @staticmethod
    def get_access_status_for_modern_standby(application_id: str) -> BackgroundAccessStatus: ...
    @typing.overload
    @staticmethod
    def remove_access() -> None: ...
    @typing.overload
    @staticmethod
    def remove_access(application_id: str) -> None: ...
    @typing.overload
    @staticmethod
    def request_access_async() -> winsdk.windows.foundation.IAsyncOperation[BackgroundAccessStatus]: ...
    @typing.overload
    @staticmethod
    def request_access_async(application_id: str) -> winsdk.windows.foundation.IAsyncOperation[BackgroundAccessStatus]: ...
    @typing.overload
    @staticmethod
    def request_access_kind_async(requested_access: BackgroundAccessRequestKind, reason: str) -> winsdk.windows.foundation.IAsyncOperation[_winrt.Boolean]: ...
    @typing.overload
    @staticmethod
    def request_access_kind_for_modern_standby_async(requested_access: BackgroundAccessRequestKind, reason: str) -> winsdk.windows.foundation.IAsyncOperation[_winrt.Boolean]: ...

class BackgroundTaskBuilder(_winrt.Object):
    task_entry_point: str
    name: str
    cancel_on_condition_loss: _winrt.Boolean
    is_network_requested: _winrt.Boolean
    task_group: BackgroundTaskRegistrationGroup
    @staticmethod
    def _from(obj: _winrt.Object) -> BackgroundTaskBuilder: ...
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def add_condition(self, condition: IBackgroundCondition) -> None: ...
    @typing.overload
    def register(self) -> BackgroundTaskRegistration: ...
    @typing.overload
    def set_task_entry_point_clsid(self, task_entry_point: uuid.UUID) -> None: ...
    @typing.overload
    def set_trigger(self, trigger: IBackgroundTrigger) -> None: ...

class BackgroundTaskCompletedEventArgs(_winrt.Object):
    instance_id: uuid.UUID
    @staticmethod
    def _from(obj: _winrt.Object) -> BackgroundTaskCompletedEventArgs: ...
    @typing.overload
    def check_result(self) -> None: ...

class BackgroundTaskDeferral(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> BackgroundTaskDeferral: ...
    @typing.overload
    def complete(self) -> None: ...

class BackgroundTaskProgressEventArgs(_winrt.Object):
    instance_id: uuid.UUID
    progress: _winrt.UInt32
    @staticmethod
    def _from(obj: _winrt.Object) -> BackgroundTaskProgressEventArgs: ...

class BackgroundTaskRegistration(IBackgroundTaskRegistration, IBackgroundTaskRegistration2, IBackgroundTaskRegistration3, _winrt.Object):
    name: str
    task_id: uuid.UUID
    trigger: IBackgroundTrigger
    task_group: BackgroundTaskRegistrationGroup
    all_tasks: winsdk.windows.foundation.collections.IMapView[uuid.UUID, IBackgroundTaskRegistration]
    all_task_groups: winsdk.windows.foundation.collections.IMapView[str, BackgroundTaskRegistrationGroup]
    @staticmethod
    def _from(obj: _winrt.Object) -> BackgroundTaskRegistration: ...
    @typing.overload
    @staticmethod
    def get_task_group(group_id: str) -> BackgroundTaskRegistrationGroup: ...
    @typing.overload
    def unregister(self, cancel_task: _winrt.Boolean) -> None: ...
    @typing.overload
    def add_completed(self, handler: BackgroundTaskCompletedEventHandler) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_completed(self, cookie: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_progress(self, handler: BackgroundTaskProgressEventHandler) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_progress(self, cookie: winsdk.windows.foundation.EventRegistrationToken) -> None: ...

class BackgroundTaskRegistrationGroup(_winrt.Object):
    all_tasks: winsdk.windows.foundation.collections.IMapView[uuid.UUID, BackgroundTaskRegistration]
    id: str
    name: str
    @staticmethod
    def _from(obj: _winrt.Object) -> BackgroundTaskRegistrationGroup: ...
    @typing.overload
    def __init__(self, id: str) -> None: ...
    @typing.overload
    def __init__(self, id: str, name: str) -> None: ...
    @typing.overload
    def add_background_activated(self, handler: winsdk.windows.foundation.TypedEventHandler[BackgroundTaskRegistrationGroup, winsdk.windows.applicationmodel.activation.BackgroundActivatedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_background_activated(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...

class BackgroundWorkCost(_winrt.Object):
    current_background_work_cost: BackgroundWorkCostValue
    @staticmethod
    def _from(obj: _winrt.Object) -> BackgroundWorkCost: ...

class BluetoothLEAdvertisementPublisherTrigger(IBackgroundTrigger, _winrt.Object):
    advertisement: winsdk.windows.devices.bluetooth.advertisement.BluetoothLEAdvertisement
    use_extended_format: _winrt.Boolean
    preferred_transmit_power_level_in_d_bm: typing.Optional[_winrt.Int16]
    is_anonymous: _winrt.Boolean
    include_transmit_power_level: _winrt.Boolean
    @staticmethod
    def _from(obj: _winrt.Object) -> BluetoothLEAdvertisementPublisherTrigger: ...
    @typing.overload
    def __init__(self) -> None: ...

class BluetoothLEAdvertisementWatcherTrigger(IBackgroundTrigger, _winrt.Object):
    signal_strength_filter: winsdk.windows.devices.bluetooth.BluetoothSignalStrengthFilter
    advertisement_filter: winsdk.windows.devices.bluetooth.advertisement.BluetoothLEAdvertisementFilter
    max_out_of_range_timeout: winsdk.windows.foundation.TimeSpan
    max_sampling_interval: winsdk.windows.foundation.TimeSpan
    min_out_of_range_timeout: winsdk.windows.foundation.TimeSpan
    min_sampling_interval: winsdk.windows.foundation.TimeSpan
    allow_extended_advertisements: _winrt.Boolean
    @staticmethod
    def _from(obj: _winrt.Object) -> BluetoothLEAdvertisementWatcherTrigger: ...
    @typing.overload
    def __init__(self) -> None: ...

class CachedFileUpdaterTrigger(IBackgroundTrigger, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> CachedFileUpdaterTrigger: ...
    @typing.overload
    def __init__(self) -> None: ...

class CachedFileUpdaterTriggerDetails(_winrt.Object):
    can_request_user_input: _winrt.Boolean
    update_request: winsdk.windows.storage.provider.FileUpdateRequest
    update_target: winsdk.windows.storage.provider.CachedFileTarget
    @staticmethod
    def _from(obj: _winrt.Object) -> CachedFileUpdaterTriggerDetails: ...

class ChatMessageNotificationTrigger(IBackgroundTrigger, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> ChatMessageNotificationTrigger: ...
    @typing.overload
    def __init__(self) -> None: ...

class ChatMessageReceivedNotificationTrigger(IBackgroundTrigger, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> ChatMessageReceivedNotificationTrigger: ...
    @typing.overload
    def __init__(self) -> None: ...

class CommunicationBlockingAppSetAsActiveTrigger(IBackgroundTrigger, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> CommunicationBlockingAppSetAsActiveTrigger: ...
    @typing.overload
    def __init__(self) -> None: ...

class ContactStoreNotificationTrigger(IBackgroundTrigger, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> ContactStoreNotificationTrigger: ...
    @typing.overload
    def __init__(self) -> None: ...

class ContentPrefetchTrigger(IBackgroundTrigger, _winrt.Object):
    wait_interval: winsdk.windows.foundation.TimeSpan
    @staticmethod
    def _from(obj: _winrt.Object) -> ContentPrefetchTrigger: ...
    @typing.overload
    def __init__(self, wait_interval: winsdk.windows.foundation.TimeSpan) -> None: ...
    @typing.overload
    def __init__(self) -> None: ...

class ConversationalAgentTrigger(IBackgroundTrigger, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> ConversationalAgentTrigger: ...
    @typing.overload
    def __init__(self) -> None: ...

class CustomSystemEventTrigger(IBackgroundTrigger, _winrt.Object):
    recurrence: CustomSystemEventTriggerRecurrence
    trigger_id: str
    @staticmethod
    def _from(obj: _winrt.Object) -> CustomSystemEventTrigger: ...
    @typing.overload
    def __init__(self, trigger_id: str, recurrence: CustomSystemEventTriggerRecurrence) -> None: ...

class DeviceConnectionChangeTrigger(IBackgroundTrigger, _winrt.Object):
    maintain_connection: _winrt.Boolean
    can_maintain_connection: _winrt.Boolean
    device_id: str
    @staticmethod
    def _from(obj: _winrt.Object) -> DeviceConnectionChangeTrigger: ...
    @typing.overload
    @staticmethod
    def from_id_async(device_id: str) -> winsdk.windows.foundation.IAsyncOperation[DeviceConnectionChangeTrigger]: ...

class DeviceManufacturerNotificationTrigger(IBackgroundTrigger, _winrt.Object):
    one_shot: _winrt.Boolean
    trigger_qualifier: str
    @staticmethod
    def _from(obj: _winrt.Object) -> DeviceManufacturerNotificationTrigger: ...
    @typing.overload
    def __init__(self, trigger_qualifier: str, one_shot: _winrt.Boolean) -> None: ...

class DeviceServicingTrigger(IBackgroundTrigger, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> DeviceServicingTrigger: ...
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def request_async(self, device_id: str, expected_duration: winsdk.windows.foundation.TimeSpan) -> winsdk.windows.foundation.IAsyncOperation[DeviceTriggerResult]: ...
    @typing.overload
    def request_async(self, device_id: str, expected_duration: winsdk.windows.foundation.TimeSpan, arguments: str) -> winsdk.windows.foundation.IAsyncOperation[DeviceTriggerResult]: ...

class DeviceUseTrigger(IBackgroundTrigger, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> DeviceUseTrigger: ...
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def request_async(self, device_id: str) -> winsdk.windows.foundation.IAsyncOperation[DeviceTriggerResult]: ...
    @typing.overload
    def request_async(self, device_id: str, arguments: str) -> winsdk.windows.foundation.IAsyncOperation[DeviceTriggerResult]: ...

class DeviceWatcherTrigger(IBackgroundTrigger, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> DeviceWatcherTrigger: ...

class EmailStoreNotificationTrigger(IBackgroundTrigger, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> EmailStoreNotificationTrigger: ...
    @typing.overload
    def __init__(self) -> None: ...

class GattCharacteristicNotificationTrigger(IBackgroundTrigger, _winrt.Object):
    characteristic: winsdk.windows.devices.bluetooth.genericattributeprofile.GattCharacteristic
    event_triggering_mode: winsdk.windows.devices.bluetooth.background.BluetoothEventTriggeringMode
    @staticmethod
    def _from(obj: _winrt.Object) -> GattCharacteristicNotificationTrigger: ...
    @typing.overload
    def __init__(self, characteristic: winsdk.windows.devices.bluetooth.genericattributeprofile.GattCharacteristic, event_triggering_mode: winsdk.windows.devices.bluetooth.background.BluetoothEventTriggeringMode) -> None: ...
    @typing.overload
    def __init__(self, characteristic: winsdk.windows.devices.bluetooth.genericattributeprofile.GattCharacteristic) -> None: ...

class GattServiceProviderTrigger(IBackgroundTrigger, _winrt.Object):
    advertising_parameters: winsdk.windows.devices.bluetooth.genericattributeprofile.GattServiceProviderAdvertisingParameters
    service: winsdk.windows.devices.bluetooth.genericattributeprofile.GattLocalService
    trigger_id: str
    @staticmethod
    def _from(obj: _winrt.Object) -> GattServiceProviderTrigger: ...
    @typing.overload
    @staticmethod
    def create_async(trigger_id: str, service_uuid: uuid.UUID) -> winsdk.windows.foundation.IAsyncOperation[GattServiceProviderTriggerResult]: ...

class GattServiceProviderTriggerResult(_winrt.Object):
    error: winsdk.windows.devices.bluetooth.BluetoothError
    trigger: GattServiceProviderTrigger
    @staticmethod
    def _from(obj: _winrt.Object) -> GattServiceProviderTriggerResult: ...

class GeovisitTrigger(IBackgroundTrigger, _winrt.Object):
    monitoring_scope: winsdk.windows.devices.geolocation.VisitMonitoringScope
    @staticmethod
    def _from(obj: _winrt.Object) -> GeovisitTrigger: ...
    @typing.overload
    def __init__(self) -> None: ...

class LocationTrigger(IBackgroundTrigger, _winrt.Object):
    trigger_type: LocationTriggerType
    @staticmethod
    def _from(obj: _winrt.Object) -> LocationTrigger: ...
    @typing.overload
    def __init__(self, trigger_type: LocationTriggerType) -> None: ...

class MaintenanceTrigger(IBackgroundTrigger, _winrt.Object):
    freshness_time: _winrt.UInt32
    one_shot: _winrt.Boolean
    @staticmethod
    def _from(obj: _winrt.Object) -> MaintenanceTrigger: ...
    @typing.overload
    def __init__(self, freshness_time: _winrt.UInt32, one_shot: _winrt.Boolean) -> None: ...

class MediaProcessingTrigger(IBackgroundTrigger, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> MediaProcessingTrigger: ...
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def request_async(self) -> winsdk.windows.foundation.IAsyncOperation[MediaProcessingTriggerResult]: ...
    @typing.overload
    def request_async(self, arguments: winsdk.windows.foundation.collections.ValueSet) -> winsdk.windows.foundation.IAsyncOperation[MediaProcessingTriggerResult]: ...

class MobileBroadbandDeviceServiceNotificationTrigger(IBackgroundTrigger, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> MobileBroadbandDeviceServiceNotificationTrigger: ...
    @typing.overload
    def __init__(self) -> None: ...

class MobileBroadbandPcoDataChangeTrigger(IBackgroundTrigger, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> MobileBroadbandPcoDataChangeTrigger: ...
    @typing.overload
    def __init__(self) -> None: ...

class MobileBroadbandPinLockStateChangeTrigger(IBackgroundTrigger, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> MobileBroadbandPinLockStateChangeTrigger: ...
    @typing.overload
    def __init__(self) -> None: ...

class MobileBroadbandRadioStateChangeTrigger(IBackgroundTrigger, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> MobileBroadbandRadioStateChangeTrigger: ...
    @typing.overload
    def __init__(self) -> None: ...

class MobileBroadbandRegistrationStateChangeTrigger(IBackgroundTrigger, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> MobileBroadbandRegistrationStateChangeTrigger: ...
    @typing.overload
    def __init__(self) -> None: ...

class NetworkOperatorDataUsageTrigger(IBackgroundTrigger, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> NetworkOperatorDataUsageTrigger: ...
    @typing.overload
    def __init__(self) -> None: ...

class NetworkOperatorHotspotAuthenticationTrigger(IBackgroundTrigger, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> NetworkOperatorHotspotAuthenticationTrigger: ...
    @typing.overload
    def __init__(self) -> None: ...

class NetworkOperatorNotificationTrigger(IBackgroundTrigger, _winrt.Object):
    network_account_id: str
    @staticmethod
    def _from(obj: _winrt.Object) -> NetworkOperatorNotificationTrigger: ...
    @typing.overload
    def __init__(self, network_account_id: str) -> None: ...

class PaymentAppCanMakePaymentTrigger(IBackgroundTrigger, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> PaymentAppCanMakePaymentTrigger: ...
    @typing.overload
    def __init__(self) -> None: ...

class PhoneTrigger(IBackgroundTrigger, _winrt.Object):
    one_shot: _winrt.Boolean
    trigger_type: winsdk.windows.applicationmodel.calls.background.PhoneTriggerType
    @staticmethod
    def _from(obj: _winrt.Object) -> PhoneTrigger: ...
    @typing.overload
    def __init__(self, type: winsdk.windows.applicationmodel.calls.background.PhoneTriggerType, one_shot: _winrt.Boolean) -> None: ...

class PushNotificationTrigger(IBackgroundTrigger, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> PushNotificationTrigger: ...
    @typing.overload
    def __init__(self, application_id: str) -> None: ...
    @typing.overload
    def __init__(self) -> None: ...

class RcsEndUserMessageAvailableTrigger(IBackgroundTrigger, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> RcsEndUserMessageAvailableTrigger: ...
    @typing.overload
    def __init__(self) -> None: ...

class RfcommConnectionTrigger(IBackgroundTrigger, _winrt.Object):
    remote_host_name: winsdk.windows.networking.HostName
    protection_level: winsdk.windows.networking.sockets.SocketProtectionLevel
    allow_multiple_connections: _winrt.Boolean
    inbound_connection: winsdk.windows.devices.bluetooth.background.RfcommInboundConnectionInformation
    outbound_connection: winsdk.windows.devices.bluetooth.background.RfcommOutboundConnectionInformation
    @staticmethod
    def _from(obj: _winrt.Object) -> RfcommConnectionTrigger: ...
    @typing.overload
    def __init__(self) -> None: ...

class SecondaryAuthenticationFactorAuthenticationTrigger(IBackgroundTrigger, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> SecondaryAuthenticationFactorAuthenticationTrigger: ...
    @typing.overload
    def __init__(self) -> None: ...

class SensorDataThresholdTrigger(IBackgroundTrigger, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> SensorDataThresholdTrigger: ...
    @typing.overload
    def __init__(self, threshold: winsdk.windows.devices.sensors.ISensorDataThreshold) -> None: ...

class SmartCardTrigger(IBackgroundTrigger, _winrt.Object):
    trigger_type: winsdk.windows.devices.smartcards.SmartCardTriggerType
    @staticmethod
    def _from(obj: _winrt.Object) -> SmartCardTrigger: ...
    @typing.overload
    def __init__(self, trigger_type: winsdk.windows.devices.smartcards.SmartCardTriggerType) -> None: ...

class SmsMessageReceivedTrigger(IBackgroundTrigger, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> SmsMessageReceivedTrigger: ...
    @typing.overload
    def __init__(self, filter_rules: winsdk.windows.devices.sms.SmsFilterRules) -> None: ...

class SocketActivityTrigger(IBackgroundTrigger, _winrt.Object):
    is_wake_from_low_power_supported: _winrt.Boolean
    @staticmethod
    def _from(obj: _winrt.Object) -> SocketActivityTrigger: ...
    @typing.overload
    def __init__(self) -> None: ...

class StorageLibraryChangeTrackerTrigger(IBackgroundTrigger, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> StorageLibraryChangeTrackerTrigger: ...
    @typing.overload
    def __init__(self, tracker: winsdk.windows.storage.StorageLibraryChangeTracker) -> None: ...

class StorageLibraryContentChangedTrigger(IBackgroundTrigger, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> StorageLibraryContentChangedTrigger: ...
    @typing.overload
    @staticmethod
    def create(storage_library: winsdk.windows.storage.StorageLibrary) -> StorageLibraryContentChangedTrigger: ...
    @typing.overload
    @staticmethod
    def create_from_libraries(storage_libraries: typing.Iterable[winsdk.windows.storage.StorageLibrary]) -> StorageLibraryContentChangedTrigger: ...

class SystemCondition(IBackgroundCondition, _winrt.Object):
    condition_type: SystemConditionType
    @staticmethod
    def _from(obj: _winrt.Object) -> SystemCondition: ...
    @typing.overload
    def __init__(self, condition_type: SystemConditionType) -> None: ...

class SystemTrigger(IBackgroundTrigger, _winrt.Object):
    one_shot: _winrt.Boolean
    trigger_type: SystemTriggerType
    @staticmethod
    def _from(obj: _winrt.Object) -> SystemTrigger: ...
    @typing.overload
    def __init__(self, trigger_type: SystemTriggerType, one_shot: _winrt.Boolean) -> None: ...

class TetheringEntitlementCheckTrigger(IBackgroundTrigger, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> TetheringEntitlementCheckTrigger: ...
    @typing.overload
    def __init__(self) -> None: ...

class TimeTrigger(IBackgroundTrigger, _winrt.Object):
    freshness_time: _winrt.UInt32
    one_shot: _winrt.Boolean
    @staticmethod
    def _from(obj: _winrt.Object) -> TimeTrigger: ...
    @typing.overload
    def __init__(self, freshness_time: _winrt.UInt32, one_shot: _winrt.Boolean) -> None: ...

class ToastNotificationActionTrigger(IBackgroundTrigger, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> ToastNotificationActionTrigger: ...
    @typing.overload
    def __init__(self, application_id: str) -> None: ...
    @typing.overload
    def __init__(self) -> None: ...

class ToastNotificationHistoryChangedTrigger(IBackgroundTrigger, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> ToastNotificationHistoryChangedTrigger: ...
    @typing.overload
    def __init__(self, application_id: str) -> None: ...
    @typing.overload
    def __init__(self) -> None: ...

class UserNotificationChangedTrigger(IBackgroundTrigger, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> UserNotificationChangedTrigger: ...
    @typing.overload
    def __init__(self, notification_kinds: winsdk.windows.ui.notifications.NotificationKinds) -> None: ...

class IBackgroundCondition(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> IBackgroundCondition: ...

class IBackgroundTask(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> IBackgroundTask: ...
    @typing.overload
    def run(self, task_instance: IBackgroundTaskInstance) -> None: ...

class IBackgroundTaskInstance(_winrt.Object):
    instance_id: uuid.UUID
    progress: _winrt.UInt32
    suspended_count: _winrt.UInt32
    task: BackgroundTaskRegistration
    trigger_details: _winrt.Object
    @staticmethod
    def _from(obj: _winrt.Object) -> IBackgroundTaskInstance: ...
    @typing.overload
    def get_deferral(self) -> BackgroundTaskDeferral: ...
    @typing.overload
    def add_canceled(self, cancel_handler: BackgroundTaskCanceledEventHandler) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_canceled(self, cookie: winsdk.windows.foundation.EventRegistrationToken) -> None: ...

class IBackgroundTaskInstance2(IBackgroundTaskInstance, _winrt.Object):
    instance_id: uuid.UUID
    progress: _winrt.UInt32
    suspended_count: _winrt.UInt32
    task: BackgroundTaskRegistration
    trigger_details: _winrt.Object
    @staticmethod
    def _from(obj: _winrt.Object) -> IBackgroundTaskInstance2: ...
    @typing.overload
    def get_throttle_count(self, counter: BackgroundTaskThrottleCounter) -> _winrt.UInt32: ...
    @typing.overload
    def get_deferral(self) -> BackgroundTaskDeferral: ...
    @typing.overload
    def add_canceled(self, cancel_handler: BackgroundTaskCanceledEventHandler) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_canceled(self, cookie: winsdk.windows.foundation.EventRegistrationToken) -> None: ...

class IBackgroundTaskInstance4(IBackgroundTaskInstance, _winrt.Object):
    user: winsdk.windows.system.User
    instance_id: uuid.UUID
    progress: _winrt.UInt32
    suspended_count: _winrt.UInt32
    task: BackgroundTaskRegistration
    trigger_details: _winrt.Object
    @staticmethod
    def _from(obj: _winrt.Object) -> IBackgroundTaskInstance4: ...
    @typing.overload
    def get_deferral(self) -> BackgroundTaskDeferral: ...
    @typing.overload
    def add_canceled(self, cancel_handler: BackgroundTaskCanceledEventHandler) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_canceled(self, cookie: winsdk.windows.foundation.EventRegistrationToken) -> None: ...

class IBackgroundTaskRegistration(_winrt.Object):
    name: str
    task_id: uuid.UUID
    @staticmethod
    def _from(obj: _winrt.Object) -> IBackgroundTaskRegistration: ...
    @typing.overload
    def unregister(self, cancel_task: _winrt.Boolean) -> None: ...
    @typing.overload
    def add_completed(self, handler: BackgroundTaskCompletedEventHandler) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_completed(self, cookie: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_progress(self, handler: BackgroundTaskProgressEventHandler) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_progress(self, cookie: winsdk.windows.foundation.EventRegistrationToken) -> None: ...

class IBackgroundTaskRegistration2(IBackgroundTaskRegistration, _winrt.Object):
    trigger: IBackgroundTrigger
    name: str
    task_id: uuid.UUID
    @staticmethod
    def _from(obj: _winrt.Object) -> IBackgroundTaskRegistration2: ...
    @typing.overload
    def unregister(self, cancel_task: _winrt.Boolean) -> None: ...
    @typing.overload
    def add_completed(self, handler: BackgroundTaskCompletedEventHandler) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_completed(self, cookie: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_progress(self, handler: BackgroundTaskProgressEventHandler) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_progress(self, cookie: winsdk.windows.foundation.EventRegistrationToken) -> None: ...

class IBackgroundTaskRegistration3(IBackgroundTaskRegistration, _winrt.Object):
    task_group: BackgroundTaskRegistrationGroup
    name: str
    task_id: uuid.UUID
    @staticmethod
    def _from(obj: _winrt.Object) -> IBackgroundTaskRegistration3: ...
    @typing.overload
    def unregister(self, cancel_task: _winrt.Boolean) -> None: ...
    @typing.overload
    def add_completed(self, handler: BackgroundTaskCompletedEventHandler) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_completed(self, cookie: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_progress(self, handler: BackgroundTaskProgressEventHandler) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_progress(self, cookie: winsdk.windows.foundation.EventRegistrationToken) -> None: ...

class IBackgroundTrigger(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> IBackgroundTrigger: ...

BackgroundTaskCanceledEventHandler = typing.Callable[[IBackgroundTaskInstance, BackgroundTaskCancellationReason], None]

BackgroundTaskCompletedEventHandler = typing.Callable[[BackgroundTaskRegistration, BackgroundTaskCompletedEventArgs], None]

BackgroundTaskProgressEventHandler = typing.Callable[[BackgroundTaskRegistration, BackgroundTaskProgressEventArgs], None]

