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

import enum
import datetime
import sys
import types
import typing

import winsdk.system
import winsdk.windows.devices.geolocation
import winsdk.windows.foundation
import winsdk.windows.foundation.collections

class GeofenceMonitorStatus(enum.IntEnum):
    READY = 0
    INITIALIZING = 1
    NO_DATA = 2
    DISABLED = 3
    NOT_INITIALIZED = 4
    NOT_AVAILABLE = 5

class GeofenceRemovalReason(enum.IntEnum):
    USED = 0
    EXPIRED = 1

class GeofenceState(enum.IntFlag):
    NONE = 0
    ENTERED = 0x1
    EXITED = 0x2
    REMOVED = 0x4

class MonitoredGeofenceStates(enum.IntFlag):
    NONE = 0
    ENTERED = 0x1
    EXITED = 0x2
    REMOVED = 0x4

Self = typing.TypeVar('Self')

class Geofence(winsdk.system.Object):
    duration: datetime.timedelta
    dwell_time: datetime.timedelta
    geoshape: typing.Optional[winsdk.windows.devices.geolocation.IGeoshape]
    id: str
    monitored_states: MonitoredGeofenceStates
    single_use: winsdk.system.Boolean
    start_time: datetime.datetime
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> Geofence: ...
    @typing.overload
    def __new__(cls: typing.Type[Geofence], id: str, geoshape: typing.Optional[winsdk.windows.devices.geolocation.IGeoshape]) -> Geofence:...
    @typing.overload
    def __new__(cls: typing.Type[Geofence], id: str, geoshape: typing.Optional[winsdk.windows.devices.geolocation.IGeoshape], monitored_states: MonitoredGeofenceStates, single_use: winsdk.system.Boolean) -> Geofence:...
    @typing.overload
    def __new__(cls: typing.Type[Geofence], id: str, geoshape: typing.Optional[winsdk.windows.devices.geolocation.IGeoshape], monitored_states: MonitoredGeofenceStates, single_use: winsdk.system.Boolean, dwell_time: datetime.timedelta) -> Geofence:...
    @typing.overload
    def __new__(cls: typing.Type[Geofence], id: str, geoshape: typing.Optional[winsdk.windows.devices.geolocation.IGeoshape], monitored_states: MonitoredGeofenceStates, single_use: winsdk.system.Boolean, dwell_time: datetime.timedelta, start_time: datetime.datetime, duration: datetime.timedelta) -> Geofence:...

class GeofenceMonitor(winsdk.system.Object):
    geofences: typing.Optional[winsdk.windows.foundation.collections.IVector[Geofence]]
    last_known_geoposition: typing.Optional[winsdk.windows.devices.geolocation.Geoposition]
    status: GeofenceMonitorStatus
    current: typing.ClassVar[typing.Optional[GeofenceMonitor]]
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> GeofenceMonitor: ...
    def read_reports(self) -> typing.Optional[winsdk.windows.foundation.collections.IVectorView[GeofenceStateChangeReport]]: ...
    def add_geofence_state_changed(self, event_handler: winsdk.windows.foundation.TypedEventHandler[GeofenceMonitor, winsdk.system.Object], /) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_geofence_state_changed(self, token: winsdk.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_status_changed(self, event_handler: winsdk.windows.foundation.TypedEventHandler[GeofenceMonitor, winsdk.system.Object], /) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_status_changed(self, token: winsdk.windows.foundation.EventRegistrationToken, /) -> None: ...

class GeofenceStateChangeReport(winsdk.system.Object):
    geofence: typing.Optional[Geofence]
    geoposition: typing.Optional[winsdk.windows.devices.geolocation.Geoposition]
    new_state: GeofenceState
    removal_reason: GeofenceRemovalReason
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> GeofenceStateChangeReport: ...

