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

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

import winrt._winrt
import winrt.system
import winrt.windows.applicationmodel.background as windows_applicationmodel_background
import winrt.windows.foundation as windows_foundation
import winrt.windows.foundation.collections as windows_foundation_collections
import winrt.windows.security.credentials as windows_security_credentials
import winrt.windows.storage as windows_storage
import winrt.windows.storage.streams as windows_storage_streams
import winrt.windows.ui.notifications as windows_ui_notifications
import winrt.windows.web as windows_web

from winrt.windows.networking.backgroundtransfer import BackgroundTransferBehavior, BackgroundTransferCostPolicy, BackgroundTransferPriority, BackgroundTransferStatus

Self = typing.TypeVar('Self')

@typing.final
class BackgroundDownloadProgress:
    @_property
    def bytes_received(self) -> winrt.system.UInt64: ...
    @_property
    def total_bytes_to_receive(self) -> winrt.system.UInt64: ...
    @_property
    def status(self) -> BackgroundTransferStatus: ...
    @_property
    def has_response_changed(self) -> bool: ...
    @_property
    def has_restarted(self) -> bool: ...
    def __new__(cls, bytes_received: winrt.system.UInt64 = 0, total_bytes_to_receive: winrt.system.UInt64 = 0, status: BackgroundTransferStatus = BackgroundTransferStatus(0), has_response_changed: bool = False, has_restarted: bool = False) -> BackgroundDownloadProgress: ...
    def __replace__(self, /, **changes: typing.Any) -> BackgroundDownloadProgress: ...
    def unpack(self) -> typing.Tuple[winrt.system.UInt64, winrt.system.UInt64, BackgroundTransferStatus, bool, bool]: ...

@typing.final
class BackgroundTransferFileRange:
    @_property
    def offset(self) -> winrt.system.UInt64: ...
    @_property
    def length(self) -> winrt.system.UInt64: ...
    def __new__(cls, offset: winrt.system.UInt64 = 0, length: winrt.system.UInt64 = 0) -> BackgroundTransferFileRange: ...
    def __replace__(self, /, **changes: typing.Any) -> BackgroundTransferFileRange: ...
    def unpack(self) -> typing.Tuple[winrt.system.UInt64, winrt.system.UInt64]: ...

@typing.final
class BackgroundUploadProgress:
    @_property
    def bytes_received(self) -> winrt.system.UInt64: ...
    @_property
    def bytes_sent(self) -> winrt.system.UInt64: ...
    @_property
    def total_bytes_to_receive(self) -> winrt.system.UInt64: ...
    @_property
    def total_bytes_to_send(self) -> winrt.system.UInt64: ...
    @_property
    def status(self) -> BackgroundTransferStatus: ...
    @_property
    def has_response_changed(self) -> bool: ...
    @_property
    def has_restarted(self) -> bool: ...
    def __new__(cls, bytes_received: winrt.system.UInt64 = 0, bytes_sent: winrt.system.UInt64 = 0, total_bytes_to_receive: winrt.system.UInt64 = 0, total_bytes_to_send: winrt.system.UInt64 = 0, status: BackgroundTransferStatus = BackgroundTransferStatus(0), has_response_changed: bool = False, has_restarted: bool = False) -> BackgroundUploadProgress: ...
    def __replace__(self, /, **changes: typing.Any) -> BackgroundUploadProgress: ...
    def unpack(self) -> typing.Tuple[winrt.system.UInt64, winrt.system.UInt64, winrt.system.UInt64, winrt.system.UInt64, BackgroundTransferStatus, bool, bool]: ...

@typing.final
class BackgroundDownloader_Static(winrt._winrt.IInspectable_Static):
    # Windows.Foundation.IAsyncOperation`1<Windows.Foundation.Collections.IVectorView`1<Windows.Networking.BackgroundTransfer.DownloadOperation>> Windows.Networking.BackgroundTransfer.BackgroundDownloader::GetCurrentDownloadsAsync()
    def get_current_downloads_async(cls) -> windows_foundation.IAsyncOperation[typing.Sequence[DownloadOperation]]: ...
    # Windows.Foundation.IAsyncOperation`1<Windows.Foundation.Collections.IVectorView`1<Windows.Networking.BackgroundTransfer.DownloadOperation>> Windows.Networking.BackgroundTransfer.BackgroundDownloader::GetCurrentDownloadsAsync(System.String)
    # @deprecated("GetCurrentDownloadsAsync(group) may be altered or unavailable for releases after Windows 8.1. Instead, use GetCurrentDownloadsForTransferGroupAsync.")
    def get_current_downloads_for_group_async(cls, group: str, /) -> windows_foundation.IAsyncOperation[typing.Sequence[DownloadOperation]]: ...
    # Windows.Foundation.IAsyncOperation`1<Windows.Foundation.Collections.IVectorView`1<Windows.Networking.BackgroundTransfer.DownloadOperation>> Windows.Networking.BackgroundTransfer.BackgroundDownloader::GetCurrentDownloadsForTransferGroupAsync(Windows.Networking.BackgroundTransfer.BackgroundTransferGroup)
    def get_current_downloads_for_transfer_group_async(cls, group: BackgroundTransferGroup, /) -> windows_foundation.IAsyncOperation[typing.Sequence[DownloadOperation]]: ...
    # Windows.Foundation.IAsyncOperation`1<Windows.Networking.BackgroundTransfer.UnconstrainedTransferRequestResult> Windows.Networking.BackgroundTransfer.BackgroundDownloader::RequestUnconstrainedDownloadsAsync(Windows.Foundation.Collections.IIterable`1<Windows.Networking.BackgroundTransfer.DownloadOperation>)
    # @deprecated("RequestUnconstrainedDownloadsAsync is deprecated and may not work on all platforms. For more info, see MSDN.")
    def request_unconstrained_downloads_async(cls, operations: typing.Iterable[DownloadOperation], /) -> windows_foundation.IAsyncOperation[UnconstrainedTransferRequestResult]: ...

@typing.final
class BackgroundDownloader(winrt.system.Object, IBackgroundTransferBase, metaclass=BackgroundDownloader_Static):
    @typing.overload
    def __new__(cls: typing.Type[Self], completion_group: BackgroundTransferCompletionGroup) -> Self: ...
    @typing.overload
    def __new__(cls: typing.Type[Self]) -> Self: ...
    # Windows.Networking.BackgroundTransfer.DownloadOperation Windows.Networking.BackgroundTransfer.BackgroundDownloader::CreateDownload(Windows.Foundation.Uri,Windows.Storage.IStorageFile)
    def create_download(self, uri: windows_foundation.Uri, result_file: windows_storage.IStorageFile, /) -> DownloadOperation: ...
    # Windows.Foundation.IAsyncOperation`1<Windows.Networking.BackgroundTransfer.DownloadOperation> Windows.Networking.BackgroundTransfer.BackgroundDownloader::CreateDownloadAsync(Windows.Foundation.Uri,Windows.Storage.IStorageFile,Windows.Storage.Streams.IInputStream)
    def create_download_async(self, uri: windows_foundation.Uri, result_file: windows_storage.IStorageFile, request_body_stream: windows_storage_streams.IInputStream, /) -> windows_foundation.IAsyncOperation[DownloadOperation]: ...
    # Windows.Networking.BackgroundTransfer.DownloadOperation Windows.Networking.BackgroundTransfer.BackgroundDownloader::CreateDownload(Windows.Foundation.Uri,Windows.Storage.IStorageFile,Windows.Storage.IStorageFile)
    def create_download_from_file(self, uri: windows_foundation.Uri, result_file: windows_storage.IStorageFile, request_body_file: windows_storage.IStorageFile, /) -> DownloadOperation: ...
    # System.Void Windows.Networking.BackgroundTransfer.BackgroundDownloader::SetRequestHeader(System.String,System.String)
    def set_request_header(self, header_name: str, header_value: str, /) -> None: ...
    # Windows.UI.Notifications.ToastNotification Windows.Networking.BackgroundTransfer.BackgroundDownloader::get_FailureToastNotification()
    @_property
    def failure_toast_notification(self) -> windows_ui_notifications.ToastNotification: ...
    # System.Void Windows.Networking.BackgroundTransfer.BackgroundDownloader::put_FailureToastNotification(Windows.UI.Notifications.ToastNotification)
    @failure_toast_notification.setter
    def failure_toast_notification(self, value: windows_ui_notifications.ToastNotification) -> None: ...
    # Windows.UI.Notifications.TileNotification Windows.Networking.BackgroundTransfer.BackgroundDownloader::get_SuccessTileNotification()
    @_property
    def success_tile_notification(self) -> windows_ui_notifications.TileNotification: ...
    # System.Void Windows.Networking.BackgroundTransfer.BackgroundDownloader::put_SuccessTileNotification(Windows.UI.Notifications.TileNotification)
    @success_tile_notification.setter
    def success_tile_notification(self, value: windows_ui_notifications.TileNotification) -> None: ...
    # Windows.UI.Notifications.ToastNotification Windows.Networking.BackgroundTransfer.BackgroundDownloader::get_SuccessToastNotification()
    @_property
    def success_toast_notification(self) -> windows_ui_notifications.ToastNotification: ...
    # System.Void Windows.Networking.BackgroundTransfer.BackgroundDownloader::put_SuccessToastNotification(Windows.UI.Notifications.ToastNotification)
    @success_toast_notification.setter
    def success_toast_notification(self, value: windows_ui_notifications.ToastNotification) -> None: ...
    # Windows.Networking.BackgroundTransfer.BackgroundTransferGroup Windows.Networking.BackgroundTransfer.BackgroundDownloader::get_TransferGroup()
    @_property
    def transfer_group(self) -> BackgroundTransferGroup: ...
    # System.Void Windows.Networking.BackgroundTransfer.BackgroundDownloader::put_TransferGroup(Windows.Networking.BackgroundTransfer.BackgroundTransferGroup)
    @transfer_group.setter
    def transfer_group(self, value: BackgroundTransferGroup) -> None: ...
    # Windows.UI.Notifications.TileNotification Windows.Networking.BackgroundTransfer.BackgroundDownloader::get_FailureTileNotification()
    @_property
    def failure_tile_notification(self) -> windows_ui_notifications.TileNotification: ...
    # System.Void Windows.Networking.BackgroundTransfer.BackgroundDownloader::put_FailureTileNotification(Windows.UI.Notifications.TileNotification)
    @failure_tile_notification.setter
    def failure_tile_notification(self, value: windows_ui_notifications.TileNotification) -> None: ...
    # Windows.Networking.BackgroundTransfer.BackgroundTransferCompletionGroup Windows.Networking.BackgroundTransfer.BackgroundDownloader::get_CompletionGroup()
    @_property
    def completion_group(self) -> BackgroundTransferCompletionGroup: ...
    # Windows.Networking.BackgroundTransfer.BackgroundTransferCostPolicy Windows.Networking.BackgroundTransfer.BackgroundDownloader::get_CostPolicy()
    @_property
    def cost_policy(self) -> BackgroundTransferCostPolicy: ...
    # System.Void Windows.Networking.BackgroundTransfer.BackgroundDownloader::put_CostPolicy(Windows.Networking.BackgroundTransfer.BackgroundTransferCostPolicy)
    @cost_policy.setter
    def cost_policy(self, value: BackgroundTransferCostPolicy) -> None: ...
    # System.String Windows.Networking.BackgroundTransfer.BackgroundDownloader::get_Group()
    @_property
    def group(self) -> str: ...
    # System.Void Windows.Networking.BackgroundTransfer.BackgroundDownloader::put_Group(System.String)
    @group.setter
    def group(self, value: str) -> None: ...
    # System.String Windows.Networking.BackgroundTransfer.BackgroundDownloader::get_Method()
    @_property
    def method(self) -> str: ...
    # System.Void Windows.Networking.BackgroundTransfer.BackgroundDownloader::put_Method(System.String)
    @method.setter
    def method(self, value: str) -> None: ...
    # Windows.Security.Credentials.PasswordCredential Windows.Networking.BackgroundTransfer.BackgroundDownloader::get_ProxyCredential()
    @_property
    def proxy_credential(self) -> windows_security_credentials.PasswordCredential: ...
    # System.Void Windows.Networking.BackgroundTransfer.BackgroundDownloader::put_ProxyCredential(Windows.Security.Credentials.PasswordCredential)
    @proxy_credential.setter
    def proxy_credential(self, value: windows_security_credentials.PasswordCredential) -> None: ...
    # Windows.Security.Credentials.PasswordCredential Windows.Networking.BackgroundTransfer.BackgroundDownloader::get_ServerCredential()
    @_property
    def server_credential(self) -> windows_security_credentials.PasswordCredential: ...
    # System.Void Windows.Networking.BackgroundTransfer.BackgroundDownloader::put_ServerCredential(Windows.Security.Credentials.PasswordCredential)
    @server_credential.setter
    def server_credential(self, value: windows_security_credentials.PasswordCredential) -> None: ...

@typing.final
class BackgroundTransferCompletionGroup(winrt.system.Object):
    def __new__(cls: typing.Type[Self]) -> Self: ...
    # System.Void Windows.Networking.BackgroundTransfer.BackgroundTransferCompletionGroup::Enable()
    def enable(self) -> None: ...
    # System.Boolean Windows.Networking.BackgroundTransfer.BackgroundTransferCompletionGroup::get_IsEnabled()
    @_property
    def is_enabled(self) -> bool: ...
    # Windows.ApplicationModel.Background.IBackgroundTrigger Windows.Networking.BackgroundTransfer.BackgroundTransferCompletionGroup::get_Trigger()
    @_property
    def trigger(self) -> windows_applicationmodel_background.IBackgroundTrigger: ...

@typing.final
class BackgroundTransferCompletionGroupTriggerDetails(winrt.system.Object):
    # Windows.Foundation.Collections.IVectorView`1<Windows.Networking.BackgroundTransfer.DownloadOperation> Windows.Networking.BackgroundTransfer.BackgroundTransferCompletionGroupTriggerDetails::get_Downloads()
    @_property
    def downloads(self) -> typing.Sequence[DownloadOperation]: ...
    # Windows.Foundation.Collections.IVectorView`1<Windows.Networking.BackgroundTransfer.UploadOperation> Windows.Networking.BackgroundTransfer.BackgroundTransferCompletionGroupTriggerDetails::get_Uploads()
    @_property
    def uploads(self) -> typing.Sequence[UploadOperation]: ...

@typing.final
class BackgroundTransferContentPart(winrt.system.Object):
    @typing.overload
    def __new__(cls: typing.Type[Self], name: str) -> Self: ...
    @typing.overload
    def __new__(cls: typing.Type[Self], name: str, file_name: str) -> Self: ...
    @typing.overload
    def __new__(cls: typing.Type[Self]) -> Self: ...
    # System.Void Windows.Networking.BackgroundTransfer.BackgroundTransferContentPart::SetFile(Windows.Storage.IStorageFile)
    def set_file(self, value: windows_storage.IStorageFile, /) -> None: ...
    # System.Void Windows.Networking.BackgroundTransfer.BackgroundTransferContentPart::SetHeader(System.String,System.String)
    def set_header(self, header_name: str, header_value: str, /) -> None: ...
    # System.Void Windows.Networking.BackgroundTransfer.BackgroundTransferContentPart::SetText(System.String)
    def set_text(self, value: str, /) -> None: ...

@typing.final
class BackgroundTransferError_Static(winrt._winrt.IInspectable_Static):
    # Windows.Web.WebErrorStatus Windows.Networking.BackgroundTransfer.BackgroundTransferError::GetStatus(System.Int32)
    def get_status(cls, hresult: winrt.system.Int32, /) -> windows_web.WebErrorStatus: ...

@typing.final
class BackgroundTransferError(winrt.system.Object, metaclass=BackgroundTransferError_Static):
    pass

@typing.final
class BackgroundTransferGroup_Static(winrt._winrt.IInspectable_Static):
    # Windows.Networking.BackgroundTransfer.BackgroundTransferGroup Windows.Networking.BackgroundTransfer.BackgroundTransferGroup::CreateGroup(System.String)
    def create_group(cls, name: str, /) -> BackgroundTransferGroup: ...

@typing.final
class BackgroundTransferGroup(winrt.system.Object, metaclass=BackgroundTransferGroup_Static):
    # Windows.Networking.BackgroundTransfer.BackgroundTransferBehavior Windows.Networking.BackgroundTransfer.BackgroundTransferGroup::get_TransferBehavior()
    @_property
    def transfer_behavior(self) -> BackgroundTransferBehavior: ...
    # System.Void Windows.Networking.BackgroundTransfer.BackgroundTransferGroup::put_TransferBehavior(Windows.Networking.BackgroundTransfer.BackgroundTransferBehavior)
    @transfer_behavior.setter
    def transfer_behavior(self, value: BackgroundTransferBehavior) -> None: ...
    # System.String Windows.Networking.BackgroundTransfer.BackgroundTransferGroup::get_Name()
    @_property
    def name(self) -> str: ...

@typing.final
class BackgroundTransferRangesDownloadedEventArgs(winrt.system.Object):
    # Windows.Foundation.Deferral Windows.Networking.BackgroundTransfer.BackgroundTransferRangesDownloadedEventArgs::GetDeferral()
    def get_deferral(self) -> windows_foundation.Deferral: ...
    # Windows.Foundation.Collections.IVector`1<Windows.Networking.BackgroundTransfer.BackgroundTransferFileRange> Windows.Networking.BackgroundTransfer.BackgroundTransferRangesDownloadedEventArgs::get_AddedRanges()
    @_property
    def added_ranges(self) -> typing.MutableSequence[BackgroundTransferFileRange]: ...
    # System.Boolean Windows.Networking.BackgroundTransfer.BackgroundTransferRangesDownloadedEventArgs::get_WasDownloadRestarted()
    @_property
    def was_download_restarted(self) -> bool: ...

@typing.final
class BackgroundUploader_Static(winrt._winrt.IInspectable_Static):
    # Windows.Foundation.IAsyncOperation`1<Windows.Foundation.Collections.IVectorView`1<Windows.Networking.BackgroundTransfer.UploadOperation>> Windows.Networking.BackgroundTransfer.BackgroundUploader::GetCurrentUploadsAsync()
    def get_current_uploads_async(cls) -> windows_foundation.IAsyncOperation[typing.Sequence[UploadOperation]]: ...
    # Windows.Foundation.IAsyncOperation`1<Windows.Foundation.Collections.IVectorView`1<Windows.Networking.BackgroundTransfer.UploadOperation>> Windows.Networking.BackgroundTransfer.BackgroundUploader::GetCurrentUploadsAsync(System.String)
    # @deprecated("GetCurrentUploadsAsync(group) may be altered or unavailable for releases after Windows 8.1. Instead, use GetCurrentUploadsForTransferGroupAsync.")
    def get_current_uploads_for_group_async(cls, group: str, /) -> windows_foundation.IAsyncOperation[typing.Sequence[UploadOperation]]: ...
    # Windows.Foundation.IAsyncOperation`1<Windows.Foundation.Collections.IVectorView`1<Windows.Networking.BackgroundTransfer.UploadOperation>> Windows.Networking.BackgroundTransfer.BackgroundUploader::GetCurrentUploadsForTransferGroupAsync(Windows.Networking.BackgroundTransfer.BackgroundTransferGroup)
    def get_current_uploads_for_transfer_group_async(cls, group: BackgroundTransferGroup, /) -> windows_foundation.IAsyncOperation[typing.Sequence[UploadOperation]]: ...
    # Windows.Foundation.IAsyncOperation`1<Windows.Networking.BackgroundTransfer.UnconstrainedTransferRequestResult> Windows.Networking.BackgroundTransfer.BackgroundUploader::RequestUnconstrainedUploadsAsync(Windows.Foundation.Collections.IIterable`1<Windows.Networking.BackgroundTransfer.UploadOperation>)
    # @deprecated("RequestUnconstrainedUploadsAsync is deprecated and may not work on all platforms. For more info, see MSDN.")
    def request_unconstrained_uploads_async(cls, operations: typing.Iterable[UploadOperation], /) -> windows_foundation.IAsyncOperation[UnconstrainedTransferRequestResult]: ...

@typing.final
class BackgroundUploader(winrt.system.Object, IBackgroundTransferBase, metaclass=BackgroundUploader_Static):
    @typing.overload
    def __new__(cls: typing.Type[Self], completion_group: BackgroundTransferCompletionGroup) -> Self: ...
    @typing.overload
    def __new__(cls: typing.Type[Self]) -> Self: ...
    # Windows.Networking.BackgroundTransfer.UploadOperation Windows.Networking.BackgroundTransfer.BackgroundUploader::CreateUpload(Windows.Foundation.Uri,Windows.Storage.IStorageFile)
    def create_upload(self, uri: windows_foundation.Uri, source_file: windows_storage.IStorageFile, /) -> UploadOperation: ...
    # Windows.Foundation.IAsyncOperation`1<Windows.Networking.BackgroundTransfer.UploadOperation> Windows.Networking.BackgroundTransfer.BackgroundUploader::CreateUploadFromStreamAsync(Windows.Foundation.Uri,Windows.Storage.Streams.IInputStream)
    def create_upload_from_stream_async(self, uri: windows_foundation.Uri, source_stream: windows_storage_streams.IInputStream, /) -> windows_foundation.IAsyncOperation[UploadOperation]: ...
    # Windows.Foundation.IAsyncOperation`1<Windows.Networking.BackgroundTransfer.UploadOperation> Windows.Networking.BackgroundTransfer.BackgroundUploader::CreateUploadAsync(Windows.Foundation.Uri,Windows.Foundation.Collections.IIterable`1<Windows.Networking.BackgroundTransfer.BackgroundTransferContentPart>)
    def create_upload_with_form_data_and_auto_boundary_async(self, uri: windows_foundation.Uri, parts: typing.Iterable[BackgroundTransferContentPart], /) -> windows_foundation.IAsyncOperation[UploadOperation]: ...
    # Windows.Foundation.IAsyncOperation`1<Windows.Networking.BackgroundTransfer.UploadOperation> Windows.Networking.BackgroundTransfer.BackgroundUploader::CreateUploadAsync(Windows.Foundation.Uri,Windows.Foundation.Collections.IIterable`1<Windows.Networking.BackgroundTransfer.BackgroundTransferContentPart>,System.String,System.String)
    def create_upload_with_sub_type_and_boundary_async(self, uri: windows_foundation.Uri, parts: typing.Iterable[BackgroundTransferContentPart], sub_type: str, boundary: str, /) -> windows_foundation.IAsyncOperation[UploadOperation]: ...
    # Windows.Foundation.IAsyncOperation`1<Windows.Networking.BackgroundTransfer.UploadOperation> Windows.Networking.BackgroundTransfer.BackgroundUploader::CreateUploadAsync(Windows.Foundation.Uri,Windows.Foundation.Collections.IIterable`1<Windows.Networking.BackgroundTransfer.BackgroundTransferContentPart>,System.String)
    def create_upload_with_sub_type_async(self, uri: windows_foundation.Uri, parts: typing.Iterable[BackgroundTransferContentPart], sub_type: str, /) -> windows_foundation.IAsyncOperation[UploadOperation]: ...
    # System.Void Windows.Networking.BackgroundTransfer.BackgroundUploader::SetRequestHeader(System.String,System.String)
    def set_request_header(self, header_name: str, header_value: str, /) -> None: ...
    # Windows.Security.Credentials.PasswordCredential Windows.Networking.BackgroundTransfer.BackgroundUploader::get_ServerCredential()
    @_property
    def server_credential(self) -> windows_security_credentials.PasswordCredential: ...
    # System.Void Windows.Networking.BackgroundTransfer.BackgroundUploader::put_ServerCredential(Windows.Security.Credentials.PasswordCredential)
    @server_credential.setter
    def server_credential(self, value: windows_security_credentials.PasswordCredential) -> None: ...
    # Windows.Security.Credentials.PasswordCredential Windows.Networking.BackgroundTransfer.BackgroundUploader::get_ProxyCredential()
    @_property
    def proxy_credential(self) -> windows_security_credentials.PasswordCredential: ...
    # System.Void Windows.Networking.BackgroundTransfer.BackgroundUploader::put_ProxyCredential(Windows.Security.Credentials.PasswordCredential)
    @proxy_credential.setter
    def proxy_credential(self, value: windows_security_credentials.PasswordCredential) -> None: ...
    # System.String Windows.Networking.BackgroundTransfer.BackgroundUploader::get_Method()
    @_property
    def method(self) -> str: ...
    # System.Void Windows.Networking.BackgroundTransfer.BackgroundUploader::put_Method(System.String)
    @method.setter
    def method(self, value: str) -> None: ...
    # System.String Windows.Networking.BackgroundTransfer.BackgroundUploader::get_Group()
    @_property
    def group(self) -> str: ...
    # System.Void Windows.Networking.BackgroundTransfer.BackgroundUploader::put_Group(System.String)
    @group.setter
    def group(self, value: str) -> None: ...
    # Windows.Networking.BackgroundTransfer.BackgroundTransferCostPolicy Windows.Networking.BackgroundTransfer.BackgroundUploader::get_CostPolicy()
    @_property
    def cost_policy(self) -> BackgroundTransferCostPolicy: ...
    # System.Void Windows.Networking.BackgroundTransfer.BackgroundUploader::put_CostPolicy(Windows.Networking.BackgroundTransfer.BackgroundTransferCostPolicy)
    @cost_policy.setter
    def cost_policy(self, value: BackgroundTransferCostPolicy) -> None: ...
    # Windows.UI.Notifications.TileNotification Windows.Networking.BackgroundTransfer.BackgroundUploader::get_FailureTileNotification()
    @_property
    def failure_tile_notification(self) -> windows_ui_notifications.TileNotification: ...
    # System.Void Windows.Networking.BackgroundTransfer.BackgroundUploader::put_FailureTileNotification(Windows.UI.Notifications.TileNotification)
    @failure_tile_notification.setter
    def failure_tile_notification(self, value: windows_ui_notifications.TileNotification) -> None: ...
    # Windows.Networking.BackgroundTransfer.BackgroundTransferGroup Windows.Networking.BackgroundTransfer.BackgroundUploader::get_TransferGroup()
    @_property
    def transfer_group(self) -> BackgroundTransferGroup: ...
    # System.Void Windows.Networking.BackgroundTransfer.BackgroundUploader::put_TransferGroup(Windows.Networking.BackgroundTransfer.BackgroundTransferGroup)
    @transfer_group.setter
    def transfer_group(self, value: BackgroundTransferGroup) -> None: ...
    # Windows.UI.Notifications.ToastNotification Windows.Networking.BackgroundTransfer.BackgroundUploader::get_SuccessToastNotification()
    @_property
    def success_toast_notification(self) -> windows_ui_notifications.ToastNotification: ...
    # System.Void Windows.Networking.BackgroundTransfer.BackgroundUploader::put_SuccessToastNotification(Windows.UI.Notifications.ToastNotification)
    @success_toast_notification.setter
    def success_toast_notification(self, value: windows_ui_notifications.ToastNotification) -> None: ...
    # Windows.UI.Notifications.TileNotification Windows.Networking.BackgroundTransfer.BackgroundUploader::get_SuccessTileNotification()
    @_property
    def success_tile_notification(self) -> windows_ui_notifications.TileNotification: ...
    # System.Void Windows.Networking.BackgroundTransfer.BackgroundUploader::put_SuccessTileNotification(Windows.UI.Notifications.TileNotification)
    @success_tile_notification.setter
    def success_tile_notification(self, value: windows_ui_notifications.TileNotification) -> None: ...
    # Windows.UI.Notifications.ToastNotification Windows.Networking.BackgroundTransfer.BackgroundUploader::get_FailureToastNotification()
    @_property
    def failure_toast_notification(self) -> windows_ui_notifications.ToastNotification: ...
    # System.Void Windows.Networking.BackgroundTransfer.BackgroundUploader::put_FailureToastNotification(Windows.UI.Notifications.ToastNotification)
    @failure_toast_notification.setter
    def failure_toast_notification(self, value: windows_ui_notifications.ToastNotification) -> None: ...
    # Windows.Networking.BackgroundTransfer.BackgroundTransferCompletionGroup Windows.Networking.BackgroundTransfer.BackgroundUploader::get_CompletionGroup()
    @_property
    def completion_group(self) -> BackgroundTransferCompletionGroup: ...

@typing.final
class ContentPrefetcher_Static(winrt._winrt.IInspectable_Static):
    # Windows.Foundation.Uri Windows.Networking.BackgroundTransfer.ContentPrefetcher::get_IndirectContentUri()
    @_property
    def indirect_content_uri(cls) -> windows_foundation.Uri: ...
    # System.Void Windows.Networking.BackgroundTransfer.ContentPrefetcher::put_IndirectContentUri(Windows.Foundation.Uri)
    @indirect_content_uri.setter
    def indirect_content_uri(cls, value: windows_foundation.Uri) -> None: ...
    # Windows.Foundation.Collections.IVector`1<Windows.Foundation.Uri> Windows.Networking.BackgroundTransfer.ContentPrefetcher::get_ContentUris()
    @_property
    def content_uris(cls) -> typing.MutableSequence[windows_foundation.Uri]: ...
    # Windows.Foundation.IReference`1<Windows.Foundation.DateTime> Windows.Networking.BackgroundTransfer.ContentPrefetcher::get_LastSuccessfulPrefetchTime()
    @_property
    def last_successful_prefetch_time(cls) -> typing.Optional[datetime.datetime]: ...

@typing.final
class ContentPrefetcher(winrt.system.Object, metaclass=ContentPrefetcher_Static):
    pass

@typing.final
class DownloadOperation(winrt.system.Object, IBackgroundTransferOperationPriority, IBackgroundTransferOperation):
    # Windows.Foundation.IAsyncOperationWithProgress`2<Windows.Networking.BackgroundTransfer.DownloadOperation,Windows.Networking.BackgroundTransfer.DownloadOperation> Windows.Networking.BackgroundTransfer.DownloadOperation::AttachAsync()
    def attach_async(self) -> windows_foundation.IAsyncOperationWithProgress[DownloadOperation, DownloadOperation]: ...
    # Windows.Foundation.Collections.IVector`1<Windows.Networking.BackgroundTransfer.BackgroundTransferFileRange> Windows.Networking.BackgroundTransfer.DownloadOperation::GetDownloadedRanges()
    def get_downloaded_ranges(self) -> typing.MutableSequence[BackgroundTransferFileRange]: ...
    # Windows.Networking.BackgroundTransfer.ResponseInformation Windows.Networking.BackgroundTransfer.DownloadOperation::GetResponseInformation()
    def get_response_information(self) -> ResponseInformation: ...
    # Windows.Storage.Streams.IRandomAccessStreamReference Windows.Networking.BackgroundTransfer.DownloadOperation::GetResultRandomAccessStreamReference()
    def get_result_random_access_stream_reference(self) -> windows_storage_streams.IRandomAccessStreamReference: ...
    # Windows.Storage.Streams.IInputStream Windows.Networking.BackgroundTransfer.DownloadOperation::GetResultStreamAt(System.UInt64)
    def get_result_stream_at(self, position: winrt.system.UInt64, /) -> windows_storage_streams.IInputStream: ...
    # System.Void Windows.Networking.BackgroundTransfer.DownloadOperation::MakeCurrentInTransferGroup()
    def make_current_in_transfer_group(self) -> None: ...
    # System.Void Windows.Networking.BackgroundTransfer.DownloadOperation::Pause()
    def pause(self) -> None: ...
    # System.Void Windows.Networking.BackgroundTransfer.DownloadOperation::RemoveRequestHeader(System.String)
    def remove_request_header(self, header_name: str, /) -> None: ...
    # System.Void Windows.Networking.BackgroundTransfer.DownloadOperation::Resume()
    def resume(self) -> None: ...
    # System.Void Windows.Networking.BackgroundTransfer.DownloadOperation::SetRequestHeader(System.String,System.String)
    def set_request_header(self, header_name: str, header_value: str, /) -> None: ...
    # Windows.Foundation.IAsyncOperationWithProgress`2<Windows.Networking.BackgroundTransfer.DownloadOperation,Windows.Networking.BackgroundTransfer.DownloadOperation> Windows.Networking.BackgroundTransfer.DownloadOperation::StartAsync()
    def start_async(self) -> windows_foundation.IAsyncOperationWithProgress[DownloadOperation, DownloadOperation]: ...
    # Windows.Foundation.EventRegistrationToken Windows.Networking.BackgroundTransfer.DownloadOperation::add_RangesDownloaded(Windows.Foundation.TypedEventHandler`2<Windows.Networking.BackgroundTransfer.DownloadOperation,Windows.Networking.BackgroundTransfer.BackgroundTransferRangesDownloadedEventArgs>)
    def add_ranges_downloaded(self, event_handler: windows_foundation.TypedEventHandler[DownloadOperation, BackgroundTransferRangesDownloadedEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
    # System.Void Windows.Networking.BackgroundTransfer.DownloadOperation::remove_RangesDownloaded(Windows.Foundation.EventRegistrationToken)
    def remove_ranges_downloaded(self, event_cookie: typing.Union[windows_foundation.EventRegistrationToken, typing.Tuple[winrt.system.Int64]], /) -> None: ...
    # Windows.Networking.BackgroundTransfer.BackgroundTransferCostPolicy Windows.Networking.BackgroundTransfer.DownloadOperation::get_CostPolicy()
    @_property
    def cost_policy(self) -> BackgroundTransferCostPolicy: ...
    # System.Void Windows.Networking.BackgroundTransfer.DownloadOperation::put_CostPolicy(Windows.Networking.BackgroundTransfer.BackgroundTransferCostPolicy)
    @cost_policy.setter
    def cost_policy(self, value: BackgroundTransferCostPolicy) -> None: ...
    # Windows.Foundation.Uri Windows.Networking.BackgroundTransfer.DownloadOperation::get_RequestedUri()
    @_property
    def requested_uri(self) -> windows_foundation.Uri: ...
    # System.Void Windows.Networking.BackgroundTransfer.DownloadOperation::put_RequestedUri(Windows.Foundation.Uri)
    @requested_uri.setter
    def requested_uri(self, value: windows_foundation.Uri) -> None: ...
    # System.String Windows.Networking.BackgroundTransfer.DownloadOperation::get_Method()
    @_property
    def method(self) -> str: ...
    # System.String Windows.Networking.BackgroundTransfer.DownloadOperation::get_Group()
    @_property
    def group(self) -> str: ...
    # System.Guid Windows.Networking.BackgroundTransfer.DownloadOperation::get_Guid()
    @_property
    def guid(self) -> _uuid.UUID: ...
    # Windows.Networking.BackgroundTransfer.BackgroundTransferPriority Windows.Networking.BackgroundTransfer.DownloadOperation::get_Priority()
    @_property
    def priority(self) -> BackgroundTransferPriority: ...
    # System.Void Windows.Networking.BackgroundTransfer.DownloadOperation::put_Priority(Windows.Networking.BackgroundTransfer.BackgroundTransferPriority)
    @priority.setter
    def priority(self, value: BackgroundTransferPriority) -> None: ...
    # Windows.Networking.BackgroundTransfer.BackgroundDownloadProgress Windows.Networking.BackgroundTransfer.DownloadOperation::get_Progress()
    @_property
    def progress(self) -> BackgroundDownloadProgress: ...
    # Windows.Storage.IStorageFile Windows.Networking.BackgroundTransfer.DownloadOperation::get_ResultFile()
    @_property
    def result_file(self) -> windows_storage.IStorageFile: ...
    # Windows.Networking.BackgroundTransfer.BackgroundTransferGroup Windows.Networking.BackgroundTransfer.DownloadOperation::get_TransferGroup()
    @_property
    def transfer_group(self) -> BackgroundTransferGroup: ...
    # System.Boolean Windows.Networking.BackgroundTransfer.DownloadOperation::get_IsRandomAccessRequired()
    @_property
    def is_random_access_required(self) -> bool: ...
    # System.Void Windows.Networking.BackgroundTransfer.DownloadOperation::put_IsRandomAccessRequired(System.Boolean)
    @is_random_access_required.setter
    def is_random_access_required(self, value: bool) -> None: ...
    # Windows.Foundation.IReference`1<Windows.Web.WebErrorStatus> Windows.Networking.BackgroundTransfer.DownloadOperation::get_CurrentWebErrorStatus()
    @_property
    def current_web_error_status(self) -> typing.Optional[windows_web.WebErrorStatus]: ...
    # Windows.Foundation.Collections.IVector`1<Windows.Web.WebErrorStatus> Windows.Networking.BackgroundTransfer.DownloadOperation::get_RecoverableWebErrorStatuses()
    @_property
    def recoverable_web_error_statuses(self) -> typing.MutableSequence[windows_web.WebErrorStatus]: ...

@typing.final
class ResponseInformation(winrt.system.Object):
    # Windows.Foundation.Uri Windows.Networking.BackgroundTransfer.ResponseInformation::get_ActualUri()
    @_property
    def actual_uri(self) -> windows_foundation.Uri: ...
    # Windows.Foundation.Collections.IMapView`2<System.String,System.String> Windows.Networking.BackgroundTransfer.ResponseInformation::get_Headers()
    @_property
    def headers(self) -> typing.Mapping[str, str]: ...
    # System.Boolean Windows.Networking.BackgroundTransfer.ResponseInformation::get_IsResumable()
    @_property
    def is_resumable(self) -> bool: ...
    # System.UInt32 Windows.Networking.BackgroundTransfer.ResponseInformation::get_StatusCode()
    @_property
    def status_code(self) -> winrt.system.UInt32: ...

@typing.final
class UnconstrainedTransferRequestResult(winrt.system.Object):
    # System.Boolean Windows.Networking.BackgroundTransfer.UnconstrainedTransferRequestResult::get_IsUnconstrained()
    @_property
    def is_unconstrained(self) -> bool: ...

@typing.final
class UploadOperation(winrt.system.Object, IBackgroundTransferOperationPriority, IBackgroundTransferOperation):
    # Windows.Foundation.IAsyncOperationWithProgress`2<Windows.Networking.BackgroundTransfer.UploadOperation,Windows.Networking.BackgroundTransfer.UploadOperation> Windows.Networking.BackgroundTransfer.UploadOperation::AttachAsync()
    def attach_async(self) -> windows_foundation.IAsyncOperationWithProgress[UploadOperation, UploadOperation]: ...
    # Windows.Networking.BackgroundTransfer.ResponseInformation Windows.Networking.BackgroundTransfer.UploadOperation::GetResponseInformation()
    def get_response_information(self) -> ResponseInformation: ...
    # Windows.Storage.Streams.IInputStream Windows.Networking.BackgroundTransfer.UploadOperation::GetResultStreamAt(System.UInt64)
    def get_result_stream_at(self, position: winrt.system.UInt64, /) -> windows_storage_streams.IInputStream: ...
    # System.Void Windows.Networking.BackgroundTransfer.UploadOperation::MakeCurrentInTransferGroup()
    def make_current_in_transfer_group(self) -> None: ...
    # System.Void Windows.Networking.BackgroundTransfer.UploadOperation::RemoveRequestHeader(System.String)
    def remove_request_header(self, header_name: str, /) -> None: ...
    # System.Void Windows.Networking.BackgroundTransfer.UploadOperation::SetRequestHeader(System.String,System.String)
    def set_request_header(self, header_name: str, header_value: str, /) -> None: ...
    # Windows.Foundation.IAsyncOperationWithProgress`2<Windows.Networking.BackgroundTransfer.UploadOperation,Windows.Networking.BackgroundTransfer.UploadOperation> Windows.Networking.BackgroundTransfer.UploadOperation::StartAsync()
    def start_async(self) -> windows_foundation.IAsyncOperationWithProgress[UploadOperation, UploadOperation]: ...
    # Windows.Networking.BackgroundTransfer.BackgroundTransferCostPolicy Windows.Networking.BackgroundTransfer.UploadOperation::get_CostPolicy()
    @_property
    def cost_policy(self) -> BackgroundTransferCostPolicy: ...
    # System.Void Windows.Networking.BackgroundTransfer.UploadOperation::put_CostPolicy(Windows.Networking.BackgroundTransfer.BackgroundTransferCostPolicy)
    @cost_policy.setter
    def cost_policy(self, value: BackgroundTransferCostPolicy) -> None: ...
    # System.String Windows.Networking.BackgroundTransfer.UploadOperation::get_Group()
    @_property
    def group(self) -> str: ...
    # System.Guid Windows.Networking.BackgroundTransfer.UploadOperation::get_Guid()
    @_property
    def guid(self) -> _uuid.UUID: ...
    # System.String Windows.Networking.BackgroundTransfer.UploadOperation::get_Method()
    @_property
    def method(self) -> str: ...
    # Windows.Foundation.Uri Windows.Networking.BackgroundTransfer.UploadOperation::get_RequestedUri()
    @_property
    def requested_uri(self) -> windows_foundation.Uri: ...
    # Windows.Networking.BackgroundTransfer.BackgroundTransferPriority Windows.Networking.BackgroundTransfer.UploadOperation::get_Priority()
    @_property
    def priority(self) -> BackgroundTransferPriority: ...
    # System.Void Windows.Networking.BackgroundTransfer.UploadOperation::put_Priority(Windows.Networking.BackgroundTransfer.BackgroundTransferPriority)
    @priority.setter
    def priority(self, value: BackgroundTransferPriority) -> None: ...
    # Windows.Networking.BackgroundTransfer.BackgroundUploadProgress Windows.Networking.BackgroundTransfer.UploadOperation::get_Progress()
    @_property
    def progress(self) -> BackgroundUploadProgress: ...
    # Windows.Storage.IStorageFile Windows.Networking.BackgroundTransfer.UploadOperation::get_SourceFile()
    @_property
    def source_file(self) -> windows_storage.IStorageFile: ...
    # Windows.Networking.BackgroundTransfer.BackgroundTransferGroup Windows.Networking.BackgroundTransfer.UploadOperation::get_TransferGroup()
    @_property
    def transfer_group(self) -> BackgroundTransferGroup: ...

@typing.final
class _IBackgroundTransferBase: ...

class IBackgroundTransferBase(winrt._winrt.IInspectable):
    # System.Void Windows.Networking.BackgroundTransfer.IBackgroundTransferBase::SetRequestHeader(System.String,System.String)
    @abstractmethod
    def set_request_header(self, header_name: str, header_value: str, /) -> None: ...
    # Windows.Networking.BackgroundTransfer.BackgroundTransferCostPolicy Windows.Networking.BackgroundTransfer.IBackgroundTransferBase::get_CostPolicy()
    @_property
    @abstractmethod
    def cost_policy(self) -> BackgroundTransferCostPolicy: ...
    # System.Void Windows.Networking.BackgroundTransfer.IBackgroundTransferBase::put_CostPolicy(Windows.Networking.BackgroundTransfer.BackgroundTransferCostPolicy)
    @cost_policy.setter
    @abstractmethod
    def cost_policy(self, value: BackgroundTransferCostPolicy) -> None: ...
    # System.String Windows.Networking.BackgroundTransfer.IBackgroundTransferBase::get_Group()
    @_property
    @abstractmethod
    def group(self) -> str: ...
    # System.Void Windows.Networking.BackgroundTransfer.IBackgroundTransferBase::put_Group(System.String)
    @group.setter
    @abstractmethod
    def group(self, value: str) -> None: ...
    # System.String Windows.Networking.BackgroundTransfer.IBackgroundTransferBase::get_Method()
    @_property
    @abstractmethod
    def method(self) -> str: ...
    # System.Void Windows.Networking.BackgroundTransfer.IBackgroundTransferBase::put_Method(System.String)
    @method.setter
    @abstractmethod
    def method(self, value: str) -> None: ...
    # Windows.Security.Credentials.PasswordCredential Windows.Networking.BackgroundTransfer.IBackgroundTransferBase::get_ProxyCredential()
    @_property
    @abstractmethod
    def proxy_credential(self) -> windows_security_credentials.PasswordCredential: ...
    # System.Void Windows.Networking.BackgroundTransfer.IBackgroundTransferBase::put_ProxyCredential(Windows.Security.Credentials.PasswordCredential)
    @proxy_credential.setter
    @abstractmethod
    def proxy_credential(self, value: windows_security_credentials.PasswordCredential) -> None: ...
    # Windows.Security.Credentials.PasswordCredential Windows.Networking.BackgroundTransfer.IBackgroundTransferBase::get_ServerCredential()
    @_property
    @abstractmethod
    def server_credential(self) -> windows_security_credentials.PasswordCredential: ...
    # System.Void Windows.Networking.BackgroundTransfer.IBackgroundTransferBase::put_ServerCredential(Windows.Security.Credentials.PasswordCredential)
    @server_credential.setter
    @abstractmethod
    def server_credential(self, value: windows_security_credentials.PasswordCredential) -> None: ...

@typing.final
class _IBackgroundTransferContentPartFactory: ...

class IBackgroundTransferContentPartFactory(winrt._winrt.IInspectable):
    # Windows.Networking.BackgroundTransfer.BackgroundTransferContentPart Windows.Networking.BackgroundTransfer.IBackgroundTransferContentPartFactory::CreateWithName(System.String)
    @abstractmethod
    def create_with_name(self, name: str, /) -> BackgroundTransferContentPart: ...
    # Windows.Networking.BackgroundTransfer.BackgroundTransferContentPart Windows.Networking.BackgroundTransfer.IBackgroundTransferContentPartFactory::CreateWithNameAndFileName(System.String,System.String)
    @abstractmethod
    def create_with_name_and_file_name(self, name: str, file_name: str, /) -> BackgroundTransferContentPart: ...

@typing.final
class _IBackgroundTransferOperation: ...

class IBackgroundTransferOperation(winrt._winrt.IInspectable):
    # Windows.Networking.BackgroundTransfer.ResponseInformation Windows.Networking.BackgroundTransfer.IBackgroundTransferOperation::GetResponseInformation()
    @abstractmethod
    def get_response_information(self) -> ResponseInformation: ...
    # Windows.Storage.Streams.IInputStream Windows.Networking.BackgroundTransfer.IBackgroundTransferOperation::GetResultStreamAt(System.UInt64)
    @abstractmethod
    def get_result_stream_at(self, position: winrt.system.UInt64, /) -> windows_storage_streams.IInputStream: ...
    # Windows.Networking.BackgroundTransfer.BackgroundTransferCostPolicy Windows.Networking.BackgroundTransfer.IBackgroundTransferOperation::get_CostPolicy()
    @_property
    @abstractmethod
    def cost_policy(self) -> BackgroundTransferCostPolicy: ...
    # System.Void Windows.Networking.BackgroundTransfer.IBackgroundTransferOperation::put_CostPolicy(Windows.Networking.BackgroundTransfer.BackgroundTransferCostPolicy)
    @cost_policy.setter
    @abstractmethod
    def cost_policy(self, value: BackgroundTransferCostPolicy) -> None: ...
    # System.String Windows.Networking.BackgroundTransfer.IBackgroundTransferOperation::get_Group()
    @_property
    @abstractmethod
    def group(self) -> str: ...
    # System.Guid Windows.Networking.BackgroundTransfer.IBackgroundTransferOperation::get_Guid()
    @_property
    @abstractmethod
    def guid(self) -> _uuid.UUID: ...
    # System.String Windows.Networking.BackgroundTransfer.IBackgroundTransferOperation::get_Method()
    @_property
    @abstractmethod
    def method(self) -> str: ...
    # Windows.Foundation.Uri Windows.Networking.BackgroundTransfer.IBackgroundTransferOperation::get_RequestedUri()
    @_property
    @abstractmethod
    def requested_uri(self) -> windows_foundation.Uri: ...

@typing.final
class _IBackgroundTransferOperationPriority: ...

class IBackgroundTransferOperationPriority(winrt._winrt.IInspectable):
    # Windows.Networking.BackgroundTransfer.BackgroundTransferPriority Windows.Networking.BackgroundTransfer.IBackgroundTransferOperationPriority::get_Priority()
    @_property
    @abstractmethod
    def priority(self) -> BackgroundTransferPriority: ...
    # System.Void Windows.Networking.BackgroundTransfer.IBackgroundTransferOperationPriority::put_Priority(Windows.Networking.BackgroundTransfer.BackgroundTransferPriority)
    @priority.setter
    @abstractmethod
    def priority(self, value: BackgroundTransferPriority) -> None: ...

