# WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1

import datetime
import sys
import types
import typing
import uuid as _uuid
from builtins import property as _property

import winrt._winrt
import winrt.system
import winrt.windows.devices.bluetooth
import winrt.windows.devices.enumeration
import winrt.windows.foundation
import winrt.windows.foundation.collections
import winrt.windows.storage.streams

from winrt.windows.devices.bluetooth.genericattributeprofile import GattCharacteristicProperties, GattClientCharacteristicConfigurationDescriptorValue, GattCommunicationStatus, GattOpenStatus, GattProtectionLevel, GattRequestState, GattServiceProviderAdvertisementStatus, GattSessionStatus, GattSharingMode, GattWriteOption

Self = typing.TypeVar('Self')

@typing.final
class GattCharacteristic_Static(type):
    def convert_short_id_to_uuid(cls, short_id: winrt.system.UInt16, /) -> _uuid.UUID: ...

@typing.final
class GattCharacteristic(winrt.system.Object, metaclass=GattCharacteristic_Static):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattCharacteristic: ...
    def get_all_descriptors(self) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[GattDescriptor]]: ...
    def get_descriptors(self, descriptor_uuid: _uuid.UUID, /) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[GattDescriptor]]: ...
    @typing.overload
    def get_descriptors_async(self) -> winrt.windows.foundation.IAsyncOperation[GattDescriptorsResult]: ...
    @typing.overload
    def get_descriptors_async(self, cache_mode: winrt.windows.devices.bluetooth.BluetoothCacheMode, /) -> winrt.windows.foundation.IAsyncOperation[GattDescriptorsResult]: ...
    @typing.overload
    def get_descriptors_for_uuid_async(self, descriptor_uuid: _uuid.UUID, /) -> winrt.windows.foundation.IAsyncOperation[GattDescriptorsResult]: ...
    @typing.overload
    def get_descriptors_for_uuid_async(self, descriptor_uuid: _uuid.UUID, cache_mode: winrt.windows.devices.bluetooth.BluetoothCacheMode, /) -> winrt.windows.foundation.IAsyncOperation[GattDescriptorsResult]: ...
    def read_client_characteristic_configuration_descriptor_async(self) -> winrt.windows.foundation.IAsyncOperation[GattReadClientCharacteristicConfigurationDescriptorResult]: ...
    @typing.overload
    def read_value_async(self) -> winrt.windows.foundation.IAsyncOperation[GattReadResult]: ...
    @typing.overload
    def read_value_async(self, cache_mode: winrt.windows.devices.bluetooth.BluetoothCacheMode, /) -> winrt.windows.foundation.IAsyncOperation[GattReadResult]: ...
    def write_client_characteristic_configuration_descriptor_async(self, client_characteristic_configuration_descriptor_value: GattClientCharacteristicConfigurationDescriptorValue, /) -> winrt.windows.foundation.IAsyncOperation[GattCommunicationStatus]: ...
    def write_client_characteristic_configuration_descriptor_with_result_async(self, client_characteristic_configuration_descriptor_value: GattClientCharacteristicConfigurationDescriptorValue, /) -> winrt.windows.foundation.IAsyncOperation[GattWriteResult]: ...
    @typing.overload
    def write_value_async(self, value: typing.Optional[winrt.windows.storage.streams.IBuffer], /) -> winrt.windows.foundation.IAsyncOperation[GattCommunicationStatus]: ...
    @typing.overload
    def write_value_async(self, value: typing.Optional[winrt.windows.storage.streams.IBuffer], write_option: GattWriteOption, /) -> winrt.windows.foundation.IAsyncOperation[GattCommunicationStatus]: ...
    @typing.overload
    def write_value_with_result_async(self, value: typing.Optional[winrt.windows.storage.streams.IBuffer], /) -> winrt.windows.foundation.IAsyncOperation[GattWriteResult]: ...
    @typing.overload
    def write_value_with_result_async(self, value: typing.Optional[winrt.windows.storage.streams.IBuffer], write_option: GattWriteOption, /) -> winrt.windows.foundation.IAsyncOperation[GattWriteResult]: ...
    def add_value_changed(self, value_changed_handler: winrt.windows.foundation.TypedEventHandler[GattCharacteristic, GattValueChangedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_value_changed(self, value_changed_event_cookie: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def protection_level(self) -> GattProtectionLevel: ...
    @protection_level.setter
    def protection_level(self, value: GattProtectionLevel) -> None: ...
    @_property
    def attribute_handle(self) -> winrt.system.UInt16: ...
    @_property
    def characteristic_properties(self) -> GattCharacteristicProperties: ...
    @_property
    def presentation_formats(self) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[GattPresentationFormat]]: ...
    @_property
    def user_description(self) -> str: ...
    @_property
    def uuid(self) -> _uuid.UUID: ...
    @_property
    def service(self) -> typing.Optional[GattDeviceService]: ...

@typing.final
class GattCharacteristicUuids_Static(type):
    @_property
    def heart_rate_measurement(cls) -> _uuid.UUID: ...
    @_property
    def battery_level(cls) -> _uuid.UUID: ...
    @_property
    def blood_pressure_feature(cls) -> _uuid.UUID: ...
    @_property
    def blood_pressure_measurement(cls) -> _uuid.UUID: ...
    @_property
    def body_sensor_location(cls) -> _uuid.UUID: ...
    @_property
    def csc_feature(cls) -> _uuid.UUID: ...
    @_property
    def csc_measurement(cls) -> _uuid.UUID: ...
    @_property
    def glucose_feature(cls) -> _uuid.UUID: ...
    @_property
    def glucose_measurement(cls) -> _uuid.UUID: ...
    @_property
    def glucose_measurement_context(cls) -> _uuid.UUID: ...
    @_property
    def heart_rate_control_point(cls) -> _uuid.UUID: ...
    @_property
    def intermediate_cuff_pressure(cls) -> _uuid.UUID: ...
    @_property
    def intermediate_temperature(cls) -> _uuid.UUID: ...
    @_property
    def measurement_interval(cls) -> _uuid.UUID: ...
    @_property
    def record_access_control_point(cls) -> _uuid.UUID: ...
    @_property
    def rsc_feature(cls) -> _uuid.UUID: ...
    @_property
    def rsc_measurement(cls) -> _uuid.UUID: ...
    @_property
    def s_c_control_point(cls) -> _uuid.UUID: ...
    @_property
    def sensor_location(cls) -> _uuid.UUID: ...
    @_property
    def temperature_measurement(cls) -> _uuid.UUID: ...
    @_property
    def temperature_type(cls) -> _uuid.UUID: ...
    @_property
    def gap_peripheral_preferred_connection_parameters(cls) -> _uuid.UUID: ...
    @_property
    def gap_peripheral_privacy_flag(cls) -> _uuid.UUID: ...
    @_property
    def gap_reconnection_address(cls) -> _uuid.UUID: ...
    @_property
    def gatt_service_changed(cls) -> _uuid.UUID: ...
    @_property
    def hardware_revision_string(cls) -> _uuid.UUID: ...
    @_property
    def hid_control_point(cls) -> _uuid.UUID: ...
    @_property
    def hid_information(cls) -> _uuid.UUID: ...
    @_property
    def ieee1107320601_regulatory_certification_data_list(cls) -> _uuid.UUID: ...
    @_property
    def ln_control_point(cls) -> _uuid.UUID: ...
    @_property
    def ln_feature(cls) -> _uuid.UUID: ...
    @_property
    def local_time_information(cls) -> _uuid.UUID: ...
    @_property
    def location_and_speed(cls) -> _uuid.UUID: ...
    @_property
    def manufacturer_name_string(cls) -> _uuid.UUID: ...
    @_property
    def model_number_string(cls) -> _uuid.UUID: ...
    @_property
    def navigation(cls) -> _uuid.UUID: ...
    @_property
    def new_alert(cls) -> _uuid.UUID: ...
    @_property
    def pnp_id(cls) -> _uuid.UUID: ...
    @_property
    def position_quality(cls) -> _uuid.UUID: ...
    @_property
    def protocol_mode(cls) -> _uuid.UUID: ...
    @_property
    def cycling_power_feature(cls) -> _uuid.UUID: ...
    @_property
    def report(cls) -> _uuid.UUID: ...
    @_property
    def report_map(cls) -> _uuid.UUID: ...
    @_property
    def ringer_control_point(cls) -> _uuid.UUID: ...
    @_property
    def ringer_setting(cls) -> _uuid.UUID: ...
    @_property
    def scan_interval_window(cls) -> _uuid.UUID: ...
    @_property
    def scan_refresh(cls) -> _uuid.UUID: ...
    @_property
    def serial_number_string(cls) -> _uuid.UUID: ...
    @_property
    def software_revision_string(cls) -> _uuid.UUID: ...
    @_property
    def support_unread_alert_category(cls) -> _uuid.UUID: ...
    @_property
    def supported_new_alert_category(cls) -> _uuid.UUID: ...
    @_property
    def system_id(cls) -> _uuid.UUID: ...
    @_property
    def time_accuracy(cls) -> _uuid.UUID: ...
    @_property
    def time_source(cls) -> _uuid.UUID: ...
    @_property
    def time_update_control_point(cls) -> _uuid.UUID: ...
    @_property
    def time_update_state(cls) -> _uuid.UUID: ...
    @_property
    def time_with_dst(cls) -> _uuid.UUID: ...
    @_property
    def time_zone(cls) -> _uuid.UUID: ...
    @_property
    def tx_power_level(cls) -> _uuid.UUID: ...
    @_property
    def unread_alert_status(cls) -> _uuid.UUID: ...
    @_property
    def alert_category_id(cls) -> _uuid.UUID: ...
    @_property
    def alert_category_id_bit_mask(cls) -> _uuid.UUID: ...
    @_property
    def alert_level(cls) -> _uuid.UUID: ...
    @_property
    def alert_notification_control_point(cls) -> _uuid.UUID: ...
    @_property
    def alert_status(cls) -> _uuid.UUID: ...
    @_property
    def boot_keyboard_input_report(cls) -> _uuid.UUID: ...
    @_property
    def boot_keyboard_output_report(cls) -> _uuid.UUID: ...
    @_property
    def boot_mouse_input_report(cls) -> _uuid.UUID: ...
    @_property
    def current_time(cls) -> _uuid.UUID: ...
    @_property
    def cycling_power_control_point(cls) -> _uuid.UUID: ...
    @_property
    def reference_time_information(cls) -> _uuid.UUID: ...
    @_property
    def cycling_power_measurement(cls) -> _uuid.UUID: ...
    @_property
    def cycling_power_vector(cls) -> _uuid.UUID: ...
    @_property
    def date_time(cls) -> _uuid.UUID: ...
    @_property
    def day_date_time(cls) -> _uuid.UUID: ...
    @_property
    def day_of_week(cls) -> _uuid.UUID: ...
    @_property
    def dst_offset(cls) -> _uuid.UUID: ...
    @_property
    def exact_time256(cls) -> _uuid.UUID: ...
    @_property
    def firmware_revision_string(cls) -> _uuid.UUID: ...
    @_property
    def gap_appearance(cls) -> _uuid.UUID: ...
    @_property
    def gap_device_name(cls) -> _uuid.UUID: ...

@typing.final
class GattCharacteristicUuids(winrt.system.Object, metaclass=GattCharacteristicUuids_Static):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattCharacteristicUuids: ...

@typing.final
class GattCharacteristicsResult(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattCharacteristicsResult: ...
    @_property
    def characteristics(self) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[GattCharacteristic]]: ...
    @_property
    def protocol_error(self) -> typing.Optional[typing.Optional[winrt.system.UInt8]]: ...
    @_property
    def status(self) -> GattCommunicationStatus: ...

@typing.final
class GattClientNotificationResult(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattClientNotificationResult: ...
    @_property
    def protocol_error(self) -> typing.Optional[typing.Optional[winrt.system.UInt8]]: ...
    @_property
    def status(self) -> GattCommunicationStatus: ...
    @_property
    def subscribed_client(self) -> typing.Optional[GattSubscribedClient]: ...
    @_property
    def bytes_sent(self) -> winrt.system.UInt16: ...

@typing.final
class GattDescriptor_Static(type):
    def convert_short_id_to_uuid(cls, short_id: winrt.system.UInt16, /) -> _uuid.UUID: ...

@typing.final
class GattDescriptor(winrt.system.Object, metaclass=GattDescriptor_Static):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattDescriptor: ...
    @typing.overload
    def read_value_async(self) -> winrt.windows.foundation.IAsyncOperation[GattReadResult]: ...
    @typing.overload
    def read_value_async(self, cache_mode: winrt.windows.devices.bluetooth.BluetoothCacheMode, /) -> winrt.windows.foundation.IAsyncOperation[GattReadResult]: ...
    def write_value_async(self, value: typing.Optional[winrt.windows.storage.streams.IBuffer], /) -> winrt.windows.foundation.IAsyncOperation[GattCommunicationStatus]: ...
    def write_value_with_result_async(self, value: typing.Optional[winrt.windows.storage.streams.IBuffer], /) -> winrt.windows.foundation.IAsyncOperation[GattWriteResult]: ...
    @_property
    def protection_level(self) -> GattProtectionLevel: ...
    @protection_level.setter
    def protection_level(self, value: GattProtectionLevel) -> None: ...
    @_property
    def attribute_handle(self) -> winrt.system.UInt16: ...
    @_property
    def uuid(self) -> _uuid.UUID: ...

@typing.final
class GattDescriptorUuids_Static(type):
    @_property
    def characteristic_aggregate_format(cls) -> _uuid.UUID: ...
    @_property
    def characteristic_extended_properties(cls) -> _uuid.UUID: ...
    @_property
    def characteristic_presentation_format(cls) -> _uuid.UUID: ...
    @_property
    def characteristic_user_description(cls) -> _uuid.UUID: ...
    @_property
    def client_characteristic_configuration(cls) -> _uuid.UUID: ...
    @_property
    def server_characteristic_configuration(cls) -> _uuid.UUID: ...

@typing.final
class GattDescriptorUuids(winrt.system.Object, metaclass=GattDescriptorUuids_Static):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattDescriptorUuids: ...

@typing.final
class GattDescriptorsResult(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattDescriptorsResult: ...
    @_property
    def descriptors(self) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[GattDescriptor]]: ...
    @_property
    def protocol_error(self) -> typing.Optional[typing.Optional[winrt.system.UInt8]]: ...
    @_property
    def status(self) -> GattCommunicationStatus: ...

@typing.final
class GattDeviceService_Static(type):
    def convert_short_id_to_uuid(cls, short_id: winrt.system.UInt16, /) -> _uuid.UUID: ...
    @typing.overload
    def from_id_async(cls, device_id: str, /) -> winrt.windows.foundation.IAsyncOperation[GattDeviceService]: ...
    @typing.overload
    def from_id_async(cls, device_id: str, sharing_mode: GattSharingMode, /) -> winrt.windows.foundation.IAsyncOperation[GattDeviceService]: ...
    @typing.overload
    def get_device_selector_for_bluetooth_device_id(cls, bluetooth_device_id: typing.Optional[winrt.windows.devices.bluetooth.BluetoothDeviceId], /) -> str: ...
    @typing.overload
    def get_device_selector_for_bluetooth_device_id(cls, bluetooth_device_id: typing.Optional[winrt.windows.devices.bluetooth.BluetoothDeviceId], cache_mode: winrt.windows.devices.bluetooth.BluetoothCacheMode, /) -> str: ...
    @typing.overload
    def get_device_selector_for_bluetooth_device_id_and_uuid(cls, bluetooth_device_id: typing.Optional[winrt.windows.devices.bluetooth.BluetoothDeviceId], service_uuid: _uuid.UUID, /) -> str: ...
    @typing.overload
    def get_device_selector_for_bluetooth_device_id_and_uuid(cls, bluetooth_device_id: typing.Optional[winrt.windows.devices.bluetooth.BluetoothDeviceId], service_uuid: _uuid.UUID, cache_mode: winrt.windows.devices.bluetooth.BluetoothCacheMode, /) -> str: ...
    def get_device_selector_from_short_id(cls, service_short_id: winrt.system.UInt16, /) -> str: ...
    def get_device_selector_from_uuid(cls, service_uuid: _uuid.UUID, /) -> str: ...

@typing.final
class GattDeviceService(winrt.system.Object, metaclass=GattDeviceService_Static):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattDeviceService: ...
    def close(self) -> None: ...
    def get_all_characteristics(self) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[GattCharacteristic]]: ...
    def get_all_included_services(self) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[GattDeviceService]]: ...
    def get_characteristics(self, characteristic_uuid: _uuid.UUID, /) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[GattCharacteristic]]: ...
    @typing.overload
    def get_characteristics_async(self) -> winrt.windows.foundation.IAsyncOperation[GattCharacteristicsResult]: ...
    @typing.overload
    def get_characteristics_async(self, cache_mode: winrt.windows.devices.bluetooth.BluetoothCacheMode, /) -> winrt.windows.foundation.IAsyncOperation[GattCharacteristicsResult]: ...
    @typing.overload
    def get_characteristics_for_uuid_async(self, characteristic_uuid: _uuid.UUID, /) -> winrt.windows.foundation.IAsyncOperation[GattCharacteristicsResult]: ...
    @typing.overload
    def get_characteristics_for_uuid_async(self, characteristic_uuid: _uuid.UUID, cache_mode: winrt.windows.devices.bluetooth.BluetoothCacheMode, /) -> winrt.windows.foundation.IAsyncOperation[GattCharacteristicsResult]: ...
    def get_included_services(self, service_uuid: _uuid.UUID, /) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[GattDeviceService]]: ...
    @typing.overload
    def get_included_services_async(self) -> winrt.windows.foundation.IAsyncOperation[GattDeviceServicesResult]: ...
    @typing.overload
    def get_included_services_async(self, cache_mode: winrt.windows.devices.bluetooth.BluetoothCacheMode, /) -> winrt.windows.foundation.IAsyncOperation[GattDeviceServicesResult]: ...
    @typing.overload
    def get_included_services_for_uuid_async(self, service_uuid: _uuid.UUID, /) -> winrt.windows.foundation.IAsyncOperation[GattDeviceServicesResult]: ...
    @typing.overload
    def get_included_services_for_uuid_async(self, service_uuid: _uuid.UUID, cache_mode: winrt.windows.devices.bluetooth.BluetoothCacheMode, /) -> winrt.windows.foundation.IAsyncOperation[GattDeviceServicesResult]: ...
    def open_async(self, sharing_mode: GattSharingMode, /) -> winrt.windows.foundation.IAsyncOperation[GattOpenStatus]: ...
    def request_access_async(self) -> winrt.windows.foundation.IAsyncOperation[winrt.windows.devices.enumeration.DeviceAccessStatus]: ...
    @_property
    def attribute_handle(self) -> winrt.system.UInt16: ...
    @_property
    def device_id(self) -> str: ...
    @_property
    def uuid(self) -> _uuid.UUID: ...
    @_property
    def device(self) -> typing.Optional[winrt.windows.devices.bluetooth.BluetoothLEDevice]: ...
    @_property
    def parent_services(self) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[GattDeviceService]]: ...
    @_property
    def device_access_information(self) -> typing.Optional[winrt.windows.devices.enumeration.DeviceAccessInformation]: ...
    @_property
    def session(self) -> typing.Optional[GattSession]: ...
    @_property
    def sharing_mode(self) -> GattSharingMode: ...

@typing.final
class GattDeviceServicesResult(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattDeviceServicesResult: ...
    @_property
    def protocol_error(self) -> typing.Optional[typing.Optional[winrt.system.UInt8]]: ...
    @_property
    def services(self) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[GattDeviceService]]: ...
    @_property
    def status(self) -> GattCommunicationStatus: ...

@typing.final
class GattLocalCharacteristic(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattLocalCharacteristic: ...
    def create_descriptor_async(self, descriptor_uuid: _uuid.UUID, parameters: typing.Optional[GattLocalDescriptorParameters], /) -> winrt.windows.foundation.IAsyncOperation[GattLocalDescriptorResult]: ...
    @typing.overload
    def notify_value_async(self, value: typing.Optional[winrt.windows.storage.streams.IBuffer], /) -> winrt.windows.foundation.IAsyncOperation[winrt.windows.foundation.collections.IVectorView[GattClientNotificationResult]]: ...
    @typing.overload
    def notify_value_async(self, value: typing.Optional[winrt.windows.storage.streams.IBuffer], subscribed_client: typing.Optional[GattSubscribedClient], /) -> winrt.windows.foundation.IAsyncOperation[GattClientNotificationResult]: ...
    def add_read_requested(self, handler: winrt.windows.foundation.TypedEventHandler[GattLocalCharacteristic, GattReadRequestedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_read_requested(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_subscribed_clients_changed(self, handler: winrt.windows.foundation.TypedEventHandler[GattLocalCharacteristic, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_subscribed_clients_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_write_requested(self, handler: winrt.windows.foundation.TypedEventHandler[GattLocalCharacteristic, GattWriteRequestedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_write_requested(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def characteristic_properties(self) -> GattCharacteristicProperties: ...
    @_property
    def descriptors(self) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[GattLocalDescriptor]]: ...
    @_property
    def presentation_formats(self) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[GattPresentationFormat]]: ...
    @_property
    def read_protection_level(self) -> GattProtectionLevel: ...
    @_property
    def static_value(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...
    @_property
    def subscribed_clients(self) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[GattSubscribedClient]]: ...
    @_property
    def user_description(self) -> str: ...
    @_property
    def uuid(self) -> _uuid.UUID: ...
    @_property
    def write_protection_level(self) -> GattProtectionLevel: ...

@typing.final
class GattLocalCharacteristicParameters(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattLocalCharacteristicParameters: ...
    def __new__(cls: typing.Type[GattLocalCharacteristicParameters]) -> GattLocalCharacteristicParameters:...
    @_property
    def write_protection_level(self) -> GattProtectionLevel: ...
    @write_protection_level.setter
    def write_protection_level(self, value: GattProtectionLevel) -> None: ...
    @_property
    def user_description(self) -> str: ...
    @user_description.setter
    def user_description(self, value: str) -> None: ...
    @_property
    def static_value(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...
    @static_value.setter
    def static_value(self, value: typing.Optional[winrt.windows.storage.streams.IBuffer]) -> None: ...
    @_property
    def read_protection_level(self) -> GattProtectionLevel: ...
    @read_protection_level.setter
    def read_protection_level(self, value: GattProtectionLevel) -> None: ...
    @_property
    def characteristic_properties(self) -> GattCharacteristicProperties: ...
    @characteristic_properties.setter
    def characteristic_properties(self, value: GattCharacteristicProperties) -> None: ...
    @_property
    def presentation_formats(self) -> typing.Optional[winrt.windows.foundation.collections.IVector[GattPresentationFormat]]: ...

@typing.final
class GattLocalCharacteristicResult(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattLocalCharacteristicResult: ...
    @_property
    def characteristic(self) -> typing.Optional[GattLocalCharacteristic]: ...
    @_property
    def error(self) -> winrt.windows.devices.bluetooth.BluetoothError: ...

@typing.final
class GattLocalDescriptor(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattLocalDescriptor: ...
    def add_read_requested(self, handler: winrt.windows.foundation.TypedEventHandler[GattLocalDescriptor, GattReadRequestedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_read_requested(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_write_requested(self, handler: winrt.windows.foundation.TypedEventHandler[GattLocalDescriptor, GattWriteRequestedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_write_requested(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def read_protection_level(self) -> GattProtectionLevel: ...
    @_property
    def static_value(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...
    @_property
    def uuid(self) -> _uuid.UUID: ...
    @_property
    def write_protection_level(self) -> GattProtectionLevel: ...

@typing.final
class GattLocalDescriptorParameters(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattLocalDescriptorParameters: ...
    def __new__(cls: typing.Type[GattLocalDescriptorParameters]) -> GattLocalDescriptorParameters:...
    @_property
    def write_protection_level(self) -> GattProtectionLevel: ...
    @write_protection_level.setter
    def write_protection_level(self, value: GattProtectionLevel) -> None: ...
    @_property
    def static_value(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...
    @static_value.setter
    def static_value(self, value: typing.Optional[winrt.windows.storage.streams.IBuffer]) -> None: ...
    @_property
    def read_protection_level(self) -> GattProtectionLevel: ...
    @read_protection_level.setter
    def read_protection_level(self, value: GattProtectionLevel) -> None: ...

@typing.final
class GattLocalDescriptorResult(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattLocalDescriptorResult: ...
    @_property
    def descriptor(self) -> typing.Optional[GattLocalDescriptor]: ...
    @_property
    def error(self) -> winrt.windows.devices.bluetooth.BluetoothError: ...

@typing.final
class GattLocalService(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattLocalService: ...
    def create_characteristic_async(self, characteristic_uuid: _uuid.UUID, parameters: typing.Optional[GattLocalCharacteristicParameters], /) -> winrt.windows.foundation.IAsyncOperation[GattLocalCharacteristicResult]: ...
    @_property
    def characteristics(self) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[GattLocalCharacteristic]]: ...
    @_property
    def uuid(self) -> _uuid.UUID: ...

@typing.final
class GattPresentationFormat_Static(type):
    def from_parts(cls, format_type: winrt.system.UInt8, exponent: winrt.system.Int32, unit: winrt.system.UInt16, namespace_id: winrt.system.UInt8, description: winrt.system.UInt16, /) -> typing.Optional[GattPresentationFormat]: ...
    @_property
    def bluetooth_sig_assigned_numbers(cls) -> winrt.system.UInt8: ...

@typing.final
class GattPresentationFormat(winrt.system.Object, metaclass=GattPresentationFormat_Static):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattPresentationFormat: ...
    @_property
    def description(self) -> winrt.system.UInt16: ...
    @_property
    def exponent(self) -> winrt.system.Int32: ...
    @_property
    def format_type(self) -> winrt.system.UInt8: ...
    @_property
    def namespace(self) -> winrt.system.UInt8: ...
    @_property
    def unit(self) -> winrt.system.UInt16: ...

@typing.final
class GattPresentationFormatTypes_Static(type):
    @_property
    def bit2(cls) -> winrt.system.UInt8: ...
    @_property
    def boolean(cls) -> winrt.system.UInt8: ...
    @_property
    def d_uint16(cls) -> winrt.system.UInt8: ...
    @_property
    def float(cls) -> winrt.system.UInt8: ...
    @_property
    def float32(cls) -> winrt.system.UInt8: ...
    @_property
    def float64(cls) -> winrt.system.UInt8: ...
    @_property
    def nibble(cls) -> winrt.system.UInt8: ...
    @_property
    def s_float(cls) -> winrt.system.UInt8: ...
    @_property
    def s_int12(cls) -> winrt.system.UInt8: ...
    @_property
    def s_int128(cls) -> winrt.system.UInt8: ...
    @_property
    def s_int16(cls) -> winrt.system.UInt8: ...
    @_property
    def s_int24(cls) -> winrt.system.UInt8: ...
    @_property
    def s_int32(cls) -> winrt.system.UInt8: ...
    @_property
    def s_int48(cls) -> winrt.system.UInt8: ...
    @_property
    def s_int64(cls) -> winrt.system.UInt8: ...
    @_property
    def s_int8(cls) -> winrt.system.UInt8: ...
    @_property
    def struct(cls) -> winrt.system.UInt8: ...
    @_property
    def uint12(cls) -> winrt.system.UInt8: ...
    @_property
    def uint128(cls) -> winrt.system.UInt8: ...
    @_property
    def uint16(cls) -> winrt.system.UInt8: ...
    @_property
    def uint24(cls) -> winrt.system.UInt8: ...
    @_property
    def uint32(cls) -> winrt.system.UInt8: ...
    @_property
    def uint48(cls) -> winrt.system.UInt8: ...
    @_property
    def uint64(cls) -> winrt.system.UInt8: ...
    @_property
    def uint8(cls) -> winrt.system.UInt8: ...
    @_property
    def utf16(cls) -> winrt.system.UInt8: ...
    @_property
    def utf8(cls) -> winrt.system.UInt8: ...

@typing.final
class GattPresentationFormatTypes(winrt.system.Object, metaclass=GattPresentationFormatTypes_Static):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattPresentationFormatTypes: ...

@typing.final
class GattProtocolError_Static(type):
    @_property
    def attribute_not_found(cls) -> winrt.system.UInt8: ...
    @_property
    def attribute_not_long(cls) -> winrt.system.UInt8: ...
    @_property
    def insufficient_authentication(cls) -> winrt.system.UInt8: ...
    @_property
    def insufficient_authorization(cls) -> winrt.system.UInt8: ...
    @_property
    def insufficient_encryption(cls) -> winrt.system.UInt8: ...
    @_property
    def insufficient_encryption_key_size(cls) -> winrt.system.UInt8: ...
    @_property
    def insufficient_resources(cls) -> winrt.system.UInt8: ...
    @_property
    def invalid_attribute_value_length(cls) -> winrt.system.UInt8: ...
    @_property
    def invalid_handle(cls) -> winrt.system.UInt8: ...
    @_property
    def invalid_offset(cls) -> winrt.system.UInt8: ...
    @_property
    def invalid_pdu(cls) -> winrt.system.UInt8: ...
    @_property
    def prepare_queue_full(cls) -> winrt.system.UInt8: ...
    @_property
    def read_not_permitted(cls) -> winrt.system.UInt8: ...
    @_property
    def request_not_supported(cls) -> winrt.system.UInt8: ...
    @_property
    def unlikely_error(cls) -> winrt.system.UInt8: ...
    @_property
    def unsupported_group_type(cls) -> winrt.system.UInt8: ...
    @_property
    def write_not_permitted(cls) -> winrt.system.UInt8: ...

@typing.final
class GattProtocolError(winrt.system.Object, metaclass=GattProtocolError_Static):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattProtocolError: ...

@typing.final
class GattReadClientCharacteristicConfigurationDescriptorResult(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattReadClientCharacteristicConfigurationDescriptorResult: ...
    @_property
    def client_characteristic_configuration_descriptor(self) -> GattClientCharacteristicConfigurationDescriptorValue: ...
    @_property
    def status(self) -> GattCommunicationStatus: ...
    @_property
    def protocol_error(self) -> typing.Optional[typing.Optional[winrt.system.UInt8]]: ...

@typing.final
class GattReadRequest(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattReadRequest: ...
    def respond_with_protocol_error(self, protocol_error: winrt.system.UInt8, /) -> None: ...
    def respond_with_value(self, value: typing.Optional[winrt.windows.storage.streams.IBuffer], /) -> None: ...
    def add_state_changed(self, handler: winrt.windows.foundation.TypedEventHandler[GattReadRequest, GattRequestStateChangedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_state_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def length(self) -> winrt.system.UInt32: ...
    @_property
    def offset(self) -> winrt.system.UInt32: ...
    @_property
    def state(self) -> GattRequestState: ...

@typing.final
class GattReadRequestedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattReadRequestedEventArgs: ...
    def get_deferral(self) -> typing.Optional[winrt.windows.foundation.Deferral]: ...
    def get_request_async(self) -> winrt.windows.foundation.IAsyncOperation[GattReadRequest]: ...
    @_property
    def session(self) -> typing.Optional[GattSession]: ...

@typing.final
class GattReadResult(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattReadResult: ...
    @_property
    def status(self) -> GattCommunicationStatus: ...
    @_property
    def value(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...
    @_property
    def protocol_error(self) -> typing.Optional[typing.Optional[winrt.system.UInt8]]: ...

@typing.final
class GattReliableWriteTransaction(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattReliableWriteTransaction: ...
    def __new__(cls: typing.Type[GattReliableWriteTransaction]) -> GattReliableWriteTransaction:...
    def commit_async(self) -> winrt.windows.foundation.IAsyncOperation[GattCommunicationStatus]: ...
    def commit_with_result_async(self) -> winrt.windows.foundation.IAsyncOperation[GattWriteResult]: ...
    def write_value(self, characteristic: typing.Optional[GattCharacteristic], value: typing.Optional[winrt.windows.storage.streams.IBuffer], /) -> None: ...

@typing.final
class GattRequestStateChangedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattRequestStateChangedEventArgs: ...
    @_property
    def error(self) -> winrt.windows.devices.bluetooth.BluetoothError: ...
    @_property
    def state(self) -> GattRequestState: ...

@typing.final
class GattServiceProvider_Static(type):
    def create_async(cls, service_uuid: _uuid.UUID, /) -> winrt.windows.foundation.IAsyncOperation[GattServiceProviderResult]: ...

@typing.final
class GattServiceProvider(winrt.system.Object, metaclass=GattServiceProvider_Static):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattServiceProvider: ...
    @typing.overload
    def start_advertising(self) -> None: ...
    @typing.overload
    def start_advertising(self, parameters: typing.Optional[GattServiceProviderAdvertisingParameters], /) -> None: ...
    def stop_advertising(self) -> None: ...
    def add_advertisement_status_changed(self, handler: winrt.windows.foundation.TypedEventHandler[GattServiceProvider, GattServiceProviderAdvertisementStatusChangedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_advertisement_status_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def advertisement_status(self) -> GattServiceProviderAdvertisementStatus: ...
    @_property
    def service(self) -> typing.Optional[GattLocalService]: ...

@typing.final
class GattServiceProviderAdvertisementStatusChangedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattServiceProviderAdvertisementStatusChangedEventArgs: ...
    @_property
    def error(self) -> winrt.windows.devices.bluetooth.BluetoothError: ...
    @_property
    def status(self) -> GattServiceProviderAdvertisementStatus: ...

@typing.final
class GattServiceProviderAdvertisingParameters(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattServiceProviderAdvertisingParameters: ...
    def __new__(cls: typing.Type[GattServiceProviderAdvertisingParameters]) -> GattServiceProviderAdvertisingParameters:...
    @_property
    def is_discoverable(self) -> bool: ...
    @is_discoverable.setter
    def is_discoverable(self, value: bool) -> None: ...
    @_property
    def is_connectable(self) -> bool: ...
    @is_connectable.setter
    def is_connectable(self, value: bool) -> None: ...
    @_property
    def service_data(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...
    @service_data.setter
    def service_data(self, value: typing.Optional[winrt.windows.storage.streams.IBuffer]) -> None: ...

@typing.final
class GattServiceProviderResult(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattServiceProviderResult: ...
    @_property
    def error(self) -> winrt.windows.devices.bluetooth.BluetoothError: ...
    @_property
    def service_provider(self) -> typing.Optional[GattServiceProvider]: ...

@typing.final
class GattServiceUuids_Static(type):
    @_property
    def battery(cls) -> _uuid.UUID: ...
    @_property
    def blood_pressure(cls) -> _uuid.UUID: ...
    @_property
    def cycling_speed_and_cadence(cls) -> _uuid.UUID: ...
    @_property
    def generic_access(cls) -> _uuid.UUID: ...
    @_property
    def generic_attribute(cls) -> _uuid.UUID: ...
    @_property
    def glucose(cls) -> _uuid.UUID: ...
    @_property
    def health_thermometer(cls) -> _uuid.UUID: ...
    @_property
    def heart_rate(cls) -> _uuid.UUID: ...
    @_property
    def running_speed_and_cadence(cls) -> _uuid.UUID: ...
    @_property
    def alert_notification(cls) -> _uuid.UUID: ...
    @_property
    def current_time(cls) -> _uuid.UUID: ...
    @_property
    def cycling_power(cls) -> _uuid.UUID: ...
    @_property
    def device_information(cls) -> _uuid.UUID: ...
    @_property
    def human_interface_device(cls) -> _uuid.UUID: ...
    @_property
    def immediate_alert(cls) -> _uuid.UUID: ...
    @_property
    def link_loss(cls) -> _uuid.UUID: ...
    @_property
    def location_and_navigation(cls) -> _uuid.UUID: ...
    @_property
    def next_dst_change(cls) -> _uuid.UUID: ...
    @_property
    def phone_alert_status(cls) -> _uuid.UUID: ...
    @_property
    def reference_time_update(cls) -> _uuid.UUID: ...
    @_property
    def scan_parameters(cls) -> _uuid.UUID: ...
    @_property
    def tx_power(cls) -> _uuid.UUID: ...

@typing.final
class GattServiceUuids(winrt.system.Object, metaclass=GattServiceUuids_Static):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattServiceUuids: ...

@typing.final
class GattSession_Static(type):
    def from_device_id_async(cls, device_id: typing.Optional[winrt.windows.devices.bluetooth.BluetoothDeviceId], /) -> winrt.windows.foundation.IAsyncOperation[GattSession]: ...

@typing.final
class GattSession(winrt.system.Object, metaclass=GattSession_Static):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattSession: ...
    def close(self) -> None: ...
    def add_max_pdu_size_changed(self, handler: winrt.windows.foundation.TypedEventHandler[GattSession, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_max_pdu_size_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_session_status_changed(self, handler: winrt.windows.foundation.TypedEventHandler[GattSession, GattSessionStatusChangedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_session_status_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def maintain_connection(self) -> bool: ...
    @maintain_connection.setter
    def maintain_connection(self, value: bool) -> None: ...
    @_property
    def can_maintain_connection(self) -> bool: ...
    @_property
    def device_id(self) -> typing.Optional[winrt.windows.devices.bluetooth.BluetoothDeviceId]: ...
    @_property
    def max_pdu_size(self) -> winrt.system.UInt16: ...
    @_property
    def session_status(self) -> GattSessionStatus: ...

@typing.final
class GattSessionStatusChangedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattSessionStatusChangedEventArgs: ...
    @_property
    def error(self) -> winrt.windows.devices.bluetooth.BluetoothError: ...
    @_property
    def status(self) -> GattSessionStatus: ...

@typing.final
class GattSubscribedClient(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattSubscribedClient: ...
    def add_max_notification_size_changed(self, handler: winrt.windows.foundation.TypedEventHandler[GattSubscribedClient, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_max_notification_size_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def max_notification_size(self) -> winrt.system.UInt16: ...
    @_property
    def session(self) -> typing.Optional[GattSession]: ...

@typing.final
class GattValueChangedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattValueChangedEventArgs: ...
    @_property
    def characteristic_value(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...
    @_property
    def timestamp(self) -> datetime.datetime: ...

@typing.final
class GattWriteRequest(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattWriteRequest: ...
    def respond(self) -> None: ...
    def respond_with_protocol_error(self, protocol_error: winrt.system.UInt8, /) -> None: ...
    def add_state_changed(self, handler: winrt.windows.foundation.TypedEventHandler[GattWriteRequest, GattRequestStateChangedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_state_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def offset(self) -> winrt.system.UInt32: ...
    @_property
    def option(self) -> GattWriteOption: ...
    @_property
    def state(self) -> GattRequestState: ...
    @_property
    def value(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...

@typing.final
class GattWriteRequestedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattWriteRequestedEventArgs: ...
    def get_deferral(self) -> typing.Optional[winrt.windows.foundation.Deferral]: ...
    def get_request_async(self) -> winrt.windows.foundation.IAsyncOperation[GattWriteRequest]: ...
    @_property
    def session(self) -> typing.Optional[GattSession]: ...

@typing.final
class GattWriteResult(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GattWriteResult: ...
    @_property
    def protocol_error(self) -> typing.Optional[typing.Optional[winrt.system.UInt8]]: ...
    @_property
    def status(self) -> GattCommunicationStatus: ...

