# 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.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(_winrt.Object):
    duration: datetime.timedelta
    dwell_time: datetime.timedelta
    geoshape: typing.Optional[winsdk.windows.devices.geolocation.IGeoshape]
    id: str
    monitored_states: MonitoredGeofenceStates
    single_use: _winrt.Boolean
    start_time: datetime.datetime
    @staticmethod
    def _from(obj: _winrt.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: _winrt.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: _winrt.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: _winrt.Boolean, dwell_time: datetime.timedelta, start_time: datetime.datetime, duration: datetime.timedelta) -> Geofence:...

class GeofenceMonitor(_winrt.Object):
    geofences: typing.Optional[winsdk.windows.foundation.collections.IVector[Geofence]]
    last_known_geoposition: typing.Optional[winsdk.windows.devices.geolocation.Geoposition]
    status: GeofenceMonitorStatus
    current: typing.Optional[GeofenceMonitor]
    @staticmethod
    def _from(obj: _winrt.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, _winrt.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, _winrt.Object]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_status_changed(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...

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

