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

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.foundation as windows_foundation
import winrt.windows.foundation.collections as windows_foundation_collections

from winrt.windows.management.update import WindowsUpdateAdministratorOptions, WindowsUpdateAdministratorStatus, WindowsUpdateAttentionRequiredReason

Self = typing.TypeVar('Self')

@typing.final
class PreviewBuildsManager_Static(type):
    def get_default(cls) -> typing.Optional[PreviewBuildsManager]: ...
    def is_supported(cls) -> bool: ...

@typing.final
class PreviewBuildsManager(winrt.system.Object, metaclass=PreviewBuildsManager_Static):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> PreviewBuildsManager: ...
    def get_current_state(self) -> typing.Optional[PreviewBuildsState]: ...
    def sync_async(self) -> windows_foundation.IAsyncOperation[bool]: ...
    @_property
    def are_preview_builds_allowed(self) -> bool: ...
    @are_preview_builds_allowed.setter
    def are_preview_builds_allowed(self, value: bool) -> None: ...

@typing.final
class PreviewBuildsState(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> PreviewBuildsState: ...
    @_property
    def properties(self) -> typing.Optional[windows_foundation_collections.ValueSet]: ...

@typing.final
class WindowsUpdate(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> WindowsUpdate: ...
    def accept_eula(self) -> None: ...
    def get_property_value(self, property_name: str, /) -> typing.Optional[winrt.system.Object]: ...
    @_property
    def action_progress(self) -> typing.Optional[WindowsUpdateActionProgress]: ...
    @_property
    def action_result(self) -> typing.Optional[WindowsUpdateActionResult]: ...
    @_property
    def attention_required_info(self) -> typing.Optional[WindowsUpdateAttentionRequiredInfo]: ...
    @_property
    def current_action(self) -> str: ...
    @_property
    def deadline(self) -> typing.Optional[typing.Optional[datetime.datetime]]: ...
    @_property
    def description(self) -> str: ...
    @_property
    def eula_text(self) -> str: ...
    @_property
    def is_critical(self) -> bool: ...
    @_property
    def is_driver(self) -> bool: ...
    @_property
    def is_eula_accepted(self) -> bool: ...
    @_property
    def is_feature_update(self) -> bool: ...
    @_property
    def is_for_o_s(self) -> bool: ...
    @_property
    def is_mandatory(self) -> bool: ...
    @_property
    def is_minor_impact(self) -> bool: ...
    @_property
    def is_security(self) -> bool: ...
    @_property
    def is_seeker(self) -> bool: ...
    @_property
    def is_urgent(self) -> bool: ...
    @_property
    def more_info_url(self) -> typing.Optional[windows_foundation.Uri]: ...
    @_property
    def provider_id(self) -> str: ...
    @_property
    def support_url(self) -> typing.Optional[windows_foundation.Uri]: ...
    @_property
    def title(self) -> str: ...
    @_property
    def update_id(self) -> str: ...

@typing.final
class WindowsUpdateActionCompletedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> WindowsUpdateActionCompletedEventArgs: ...
    @_property
    def action(self) -> str: ...
    @_property
    def extended_error(self) -> windows_foundation.HResult: ...
    @_property
    def succeeded(self) -> bool: ...
    @_property
    def update(self) -> typing.Optional[WindowsUpdate]: ...

@typing.final
class WindowsUpdateActionProgress(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> WindowsUpdateActionProgress: ...
    @_property
    def action(self) -> str: ...
    @_property
    def progress(self) -> winrt.system.Double: ...

@typing.final
class WindowsUpdateActionResult(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> WindowsUpdateActionResult: ...
    @_property
    def action(self) -> str: ...
    @_property
    def extended_error(self) -> windows_foundation.HResult: ...
    @_property
    def succeeded(self) -> bool: ...
    @_property
    def timestamp(self) -> datetime.datetime: ...

@typing.final
class WindowsUpdateAdministrator_Static(type):
    def cancel_restart_request(cls, request_restart_token: str, /) -> None: ...
    def get_registered_administrator(cls, organization_name: str, /) -> typing.Optional[WindowsUpdateGetAdministratorResult]: ...
    def get_registered_administrator_name(cls) -> str: ...
    def register_for_administration(cls, organization_name: str, options: WindowsUpdateAdministratorOptions, /) -> WindowsUpdateAdministratorStatus: ...
    def request_restart(cls, restart_options: typing.Optional[WindowsUpdateRestartRequestOptions], /) -> str: ...
    def unregister_for_administration(cls, organization_name: str, /) -> WindowsUpdateAdministratorStatus: ...

@typing.final
class WindowsUpdateAdministrator(winrt.system.Object, metaclass=WindowsUpdateAdministrator_Static):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> WindowsUpdateAdministrator: ...
    def approve_windows_update(self, update_id: str, approval_data: typing.Optional[WindowsUpdateApprovalData], /) -> None: ...
    def approve_windows_update_action(self, update_id: str, action: str, /) -> None: ...
    def get_updates(self) -> typing.Optional[windows_foundation_collections.IVectorView[WindowsUpdate]]: ...
    def revoke_windows_update_action_approval(self, update_id: str, action: str, /) -> None: ...
    def revoke_windows_update_approval(self, update_id: str, /) -> None: ...
    def start_administrator_scan(self) -> None: ...

@typing.final
class WindowsUpdateApprovalData(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> WindowsUpdateApprovalData: ...
    def __new__(cls: typing.Type[WindowsUpdateApprovalData]) -> WindowsUpdateApprovalData: ...
    @_property
    def seeker(self) -> typing.Optional[typing.Optional[bool]]: ...
    @seeker.setter
    def seeker(self, value: typing.Optional[typing.Optional[bool]]) -> None: ...
    @_property
    def opt_out_of_auto_reboot(self) -> typing.Optional[typing.Optional[bool]]: ...
    @opt_out_of_auto_reboot.setter
    def opt_out_of_auto_reboot(self, value: typing.Optional[typing.Optional[bool]]) -> None: ...
    @_property
    def compliance_grace_period_in_days(self) -> typing.Optional[typing.Optional[winrt.system.Int32]]: ...
    @compliance_grace_period_in_days.setter
    def compliance_grace_period_in_days(self, value: typing.Optional[typing.Optional[winrt.system.Int32]]) -> None: ...
    @_property
    def compliance_deadline_in_days(self) -> typing.Optional[typing.Optional[winrt.system.Int32]]: ...
    @compliance_deadline_in_days.setter
    def compliance_deadline_in_days(self, value: typing.Optional[typing.Optional[winrt.system.Int32]]) -> None: ...
    @_property
    def allow_download_on_metered(self) -> typing.Optional[typing.Optional[bool]]: ...
    @allow_download_on_metered.setter
    def allow_download_on_metered(self, value: typing.Optional[typing.Optional[bool]]) -> None: ...

@typing.final
class WindowsUpdateAttentionRequiredInfo(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> WindowsUpdateAttentionRequiredInfo: ...
    @_property
    def reason(self) -> WindowsUpdateAttentionRequiredReason: ...
    @_property
    def timestamp(self) -> typing.Optional[typing.Optional[datetime.datetime]]: ...

@typing.final
class WindowsUpdateAttentionRequiredReasonChangedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> WindowsUpdateAttentionRequiredReasonChangedEventArgs: ...
    @_property
    def reason(self) -> WindowsUpdateAttentionRequiredReason: ...
    @_property
    def update(self) -> typing.Optional[WindowsUpdate]: ...

@typing.final
class WindowsUpdateGetAdministratorResult(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> WindowsUpdateGetAdministratorResult: ...
    @_property
    def administrator(self) -> typing.Optional[WindowsUpdateAdministrator]: ...
    @_property
    def status(self) -> WindowsUpdateAdministratorStatus: ...

@typing.final
class WindowsUpdateItem(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> WindowsUpdateItem: ...
    @_property
    def category(self) -> str: ...
    @_property
    def description(self) -> str: ...
    @_property
    def more_info_url(self) -> typing.Optional[windows_foundation.Uri]: ...
    @_property
    def operation(self) -> str: ...
    @_property
    def provider_id(self) -> str: ...
    @_property
    def timestamp(self) -> datetime.datetime: ...
    @_property
    def title(self) -> str: ...
    @_property
    def update_id(self) -> str: ...

@typing.final
class WindowsUpdateManager(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> WindowsUpdateManager: ...
    def __new__(cls: typing.Type[WindowsUpdateManager], client_id: str) -> WindowsUpdateManager: ...
    def get_applicable_updates(self) -> typing.Optional[windows_foundation_collections.IVectorView[WindowsUpdate]]: ...
    def get_most_recent_completed_updates(self, count: winrt.system.Int32, /) -> typing.Optional[windows_foundation_collections.IVectorView[WindowsUpdateItem]]: ...
    def get_most_recent_completed_updates_async(self, count: winrt.system.Int32, /) -> windows_foundation.IAsyncOperation[windows_foundation_collections.IVectorView[WindowsUpdateItem]]: ...
    def start_scan(self, user_initiated: bool, /) -> None: ...
    def add_action_completed(self, handler: windows_foundation.TypedEventHandler[WindowsUpdateManager, WindowsUpdateActionCompletedEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_action_completed(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
    def add_attention_required_reason_changed(self, handler: windows_foundation.TypedEventHandler[WindowsUpdateManager, WindowsUpdateAttentionRequiredReasonChangedEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_attention_required_reason_changed(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
    def add_progress_changed(self, handler: windows_foundation.TypedEventHandler[WindowsUpdateManager, WindowsUpdateProgressChangedEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_progress_changed(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
    def add_scan_completed(self, handler: windows_foundation.TypedEventHandler[WindowsUpdateManager, WindowsUpdateScanCompletedEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_scan_completed(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
    def add_scanning_state_changed(self, handler: windows_foundation.TypedEventHandler[WindowsUpdateManager, winrt.system.Object], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_scanning_state_changed(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
    def add_working_state_changed(self, handler: windows_foundation.TypedEventHandler[WindowsUpdateManager, winrt.system.Object], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_working_state_changed(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def is_scanning(self) -> bool: ...
    @_property
    def is_working(self) -> bool: ...
    @_property
    def last_successful_scan_timestamp(self) -> typing.Optional[typing.Optional[datetime.datetime]]: ...

@typing.final
class WindowsUpdateProgressChangedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> WindowsUpdateProgressChangedEventArgs: ...
    @_property
    def action_progress(self) -> typing.Optional[WindowsUpdateActionProgress]: ...
    @_property
    def update(self) -> typing.Optional[WindowsUpdate]: ...

@typing.final
class WindowsUpdateRestartRequestOptions(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> WindowsUpdateRestartRequestOptions: ...
    @typing.overload
    def __new__(cls: typing.Type[WindowsUpdateRestartRequestOptions], title: str, description: str, more_info_url: typing.Optional[windows_foundation.Uri], compliance_deadline_in_days: winrt.system.Int32, compliance_grace_period_in_days: winrt.system.Int32) -> WindowsUpdateRestartRequestOptions: ...
    @typing.overload
    def __new__(cls: typing.Type[WindowsUpdateRestartRequestOptions]) -> WindowsUpdateRestartRequestOptions: ...
    @_property
    def title(self) -> str: ...
    @title.setter
    def title(self, value: str) -> None: ...
    @_property
    def organization_name(self) -> str: ...
    @organization_name.setter
    def organization_name(self, value: str) -> None: ...
    @_property
    def opt_out_of_auto_reboot(self) -> bool: ...
    @opt_out_of_auto_reboot.setter
    def opt_out_of_auto_reboot(self, value: bool) -> None: ...
    @_property
    def more_info_url(self) -> typing.Optional[windows_foundation.Uri]: ...
    @more_info_url.setter
    def more_info_url(self, value: typing.Optional[windows_foundation.Uri]) -> None: ...
    @_property
    def description(self) -> str: ...
    @description.setter
    def description(self, value: str) -> None: ...
    @_property
    def compliance_grace_period_in_days(self) -> winrt.system.Int32: ...
    @compliance_grace_period_in_days.setter
    def compliance_grace_period_in_days(self, value: winrt.system.Int32) -> None: ...
    @_property
    def compliance_deadline_in_days(self) -> winrt.system.Int32: ...
    @compliance_deadline_in_days.setter
    def compliance_deadline_in_days(self, value: winrt.system.Int32) -> None: ...

@typing.final
class WindowsUpdateScanCompletedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> WindowsUpdateScanCompletedEventArgs: ...
    @_property
    def extended_error(self) -> windows_foundation.HResult: ...
    @_property
    def provider_id(self) -> str: ...
    @_property
    def succeeded(self) -> bool: ...
    @_property
    def updates(self) -> typing.Optional[windows_foundation_collections.IVectorView[WindowsUpdate]]: ...

