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

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
import winrt.windows.foundation.collections
import winrt.windows.storage.streams
import winrt.windows.web.http

from winrt.windows.media.streaming.adaptive import AdaptiveMediaSourceCreationStatus, AdaptiveMediaSourceDiagnosticType, AdaptiveMediaSourceDownloadBitrateChangedReason, AdaptiveMediaSourceResourceType

Self = typing.TypeVar('Self')

@typing.final
class AdaptiveMediaSource_Static(type):
    @typing.overload
    def create_from_stream_async(cls, stream: typing.Optional[winrt.windows.storage.streams.IInputStream], uri: typing.Optional[winrt.windows.foundation.Uri], content_type: str, /) -> winrt.windows.foundation.IAsyncOperation[AdaptiveMediaSourceCreationResult]: ...
    @typing.overload
    def create_from_stream_async(cls, stream: typing.Optional[winrt.windows.storage.streams.IInputStream], uri: typing.Optional[winrt.windows.foundation.Uri], content_type: str, http_client: typing.Optional[winrt.windows.web.http.HttpClient], /) -> winrt.windows.foundation.IAsyncOperation[AdaptiveMediaSourceCreationResult]: ...
    @typing.overload
    def create_from_uri_async(cls, uri: typing.Optional[winrt.windows.foundation.Uri], /) -> winrt.windows.foundation.IAsyncOperation[AdaptiveMediaSourceCreationResult]: ...
    @typing.overload
    def create_from_uri_async(cls, uri: typing.Optional[winrt.windows.foundation.Uri], http_client: typing.Optional[winrt.windows.web.http.HttpClient], /) -> winrt.windows.foundation.IAsyncOperation[AdaptiveMediaSourceCreationResult]: ...
    def is_content_type_supported(cls, content_type: str, /) -> bool: ...

@typing.final
class AdaptiveMediaSource(winrt.system.Object, metaclass=AdaptiveMediaSource_Static):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> AdaptiveMediaSource: ...
    def close(self) -> None: ...
    def get_correlated_times(self) -> typing.Optional[AdaptiveMediaSourceCorrelatedTimes]: ...
    def add_download_bitrate_changed(self, handler: winrt.windows.foundation.TypedEventHandler[AdaptiveMediaSource, AdaptiveMediaSourceDownloadBitrateChangedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_download_bitrate_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_download_completed(self, handler: winrt.windows.foundation.TypedEventHandler[AdaptiveMediaSource, AdaptiveMediaSourceDownloadCompletedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_download_completed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_download_failed(self, handler: winrt.windows.foundation.TypedEventHandler[AdaptiveMediaSource, AdaptiveMediaSourceDownloadFailedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_download_failed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_download_requested(self, handler: winrt.windows.foundation.TypedEventHandler[AdaptiveMediaSource, AdaptiveMediaSourceDownloadRequestedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_download_requested(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_playback_bitrate_changed(self, handler: winrt.windows.foundation.TypedEventHandler[AdaptiveMediaSource, AdaptiveMediaSourcePlaybackBitrateChangedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_playback_bitrate_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def initial_bitrate(self) -> winrt.system.UInt32: ...
    @initial_bitrate.setter
    def initial_bitrate(self, value: winrt.system.UInt32) -> None: ...
    @_property
    def inbound_bits_per_second_window(self) -> datetime.timedelta: ...
    @inbound_bits_per_second_window.setter
    def inbound_bits_per_second_window(self, value: datetime.timedelta) -> None: ...
    @_property
    def desired_max_bitrate(self) -> typing.Optional[typing.Optional[winrt.system.UInt32]]: ...
    @desired_max_bitrate.setter
    def desired_max_bitrate(self, value: typing.Optional[typing.Optional[winrt.system.UInt32]]) -> None: ...
    @_property
    def desired_live_offset(self) -> datetime.timedelta: ...
    @desired_live_offset.setter
    def desired_live_offset(self, value: datetime.timedelta) -> None: ...
    @_property
    def desired_min_bitrate(self) -> typing.Optional[typing.Optional[winrt.system.UInt32]]: ...
    @desired_min_bitrate.setter
    def desired_min_bitrate(self, value: typing.Optional[typing.Optional[winrt.system.UInt32]]) -> None: ...
    @_property
    def current_playback_bitrate(self) -> winrt.system.UInt32: ...
    @_property
    def audio_only_playback(self) -> bool: ...
    @_property
    def inbound_bits_per_second(self) -> winrt.system.UInt64: ...
    @_property
    def available_bitrates(self) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[winrt.system.UInt32]]: ...
    @_property
    def current_download_bitrate(self) -> winrt.system.UInt32: ...
    @_property
    def is_live(self) -> bool: ...
    @_property
    def advanced_settings(self) -> typing.Optional[AdaptiveMediaSourceAdvancedSettings]: ...
    @_property
    def desired_seekable_window_size(self) -> typing.Optional[typing.Optional[datetime.timedelta]]: ...
    @desired_seekable_window_size.setter
    def desired_seekable_window_size(self, value: typing.Optional[typing.Optional[datetime.timedelta]]) -> None: ...
    @_property
    def diagnostics(self) -> typing.Optional[AdaptiveMediaSourceDiagnostics]: ...
    @_property
    def max_seekable_window_size(self) -> typing.Optional[typing.Optional[datetime.timedelta]]: ...
    @_property
    def min_live_offset(self) -> typing.Optional[typing.Optional[datetime.timedelta]]: ...

@typing.final
class AdaptiveMediaSourceAdvancedSettings(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> AdaptiveMediaSourceAdvancedSettings: ...
    @_property
    def desired_bitrate_headroom_ratio(self) -> typing.Optional[typing.Optional[winrt.system.Double]]: ...
    @desired_bitrate_headroom_ratio.setter
    def desired_bitrate_headroom_ratio(self, value: typing.Optional[typing.Optional[winrt.system.Double]]) -> None: ...
    @_property
    def bitrate_downgrade_trigger_ratio(self) -> typing.Optional[typing.Optional[winrt.system.Double]]: ...
    @bitrate_downgrade_trigger_ratio.setter
    def bitrate_downgrade_trigger_ratio(self, value: typing.Optional[typing.Optional[winrt.system.Double]]) -> None: ...
    @_property
    def all_segments_independent(self) -> bool: ...
    @all_segments_independent.setter
    def all_segments_independent(self, value: bool) -> None: ...

@typing.final
class AdaptiveMediaSourceCorrelatedTimes(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> AdaptiveMediaSourceCorrelatedTimes: ...
    @_property
    def position(self) -> typing.Optional[typing.Optional[datetime.timedelta]]: ...
    @_property
    def presentation_time_stamp(self) -> typing.Optional[typing.Optional[datetime.timedelta]]: ...
    @_property
    def program_date_time(self) -> typing.Optional[typing.Optional[datetime.datetime]]: ...

@typing.final
class AdaptiveMediaSourceCreationResult(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> AdaptiveMediaSourceCreationResult: ...
    @_property
    def http_response_message(self) -> typing.Optional[winrt.windows.web.http.HttpResponseMessage]: ...
    @_property
    def media_source(self) -> typing.Optional[AdaptiveMediaSource]: ...
    @_property
    def status(self) -> AdaptiveMediaSourceCreationStatus: ...
    @_property
    def extended_error(self) -> winrt.windows.foundation.HResult: ...

@typing.final
class AdaptiveMediaSourceDiagnosticAvailableEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> AdaptiveMediaSourceDiagnosticAvailableEventArgs: ...
    @_property
    def bitrate(self) -> typing.Optional[typing.Optional[winrt.system.UInt32]]: ...
    @_property
    def diagnostic_type(self) -> AdaptiveMediaSourceDiagnosticType: ...
    @_property
    def position(self) -> typing.Optional[typing.Optional[datetime.timedelta]]: ...
    @_property
    def request_id(self) -> typing.Optional[typing.Optional[winrt.system.Int32]]: ...
    @_property
    def resource_byte_range_length(self) -> typing.Optional[typing.Optional[winrt.system.UInt64]]: ...
    @_property
    def resource_byte_range_offset(self) -> typing.Optional[typing.Optional[winrt.system.UInt64]]: ...
    @_property
    def resource_type(self) -> typing.Optional[typing.Optional[AdaptiveMediaSourceResourceType]]: ...
    @_property
    def resource_uri(self) -> typing.Optional[winrt.windows.foundation.Uri]: ...
    @_property
    def segment_id(self) -> typing.Optional[typing.Optional[winrt.system.UInt64]]: ...
    @_property
    def extended_error(self) -> winrt.windows.foundation.HResult: ...
    @_property
    def resource_content_type(self) -> str: ...
    @_property
    def resource_duration(self) -> typing.Optional[typing.Optional[datetime.timedelta]]: ...

@typing.final
class AdaptiveMediaSourceDiagnostics(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> AdaptiveMediaSourceDiagnostics: ...
    def add_diagnostic_available(self, handler: winrt.windows.foundation.TypedEventHandler[AdaptiveMediaSourceDiagnostics, AdaptiveMediaSourceDiagnosticAvailableEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_diagnostic_available(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...

@typing.final
class AdaptiveMediaSourceDownloadBitrateChangedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> AdaptiveMediaSourceDownloadBitrateChangedEventArgs: ...
    @_property
    def new_value(self) -> winrt.system.UInt32: ...
    @_property
    def old_value(self) -> winrt.system.UInt32: ...
    @_property
    def reason(self) -> AdaptiveMediaSourceDownloadBitrateChangedReason: ...

@typing.final
class AdaptiveMediaSourceDownloadCompletedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> AdaptiveMediaSourceDownloadCompletedEventArgs: ...
    @_property
    def http_response_message(self) -> typing.Optional[winrt.windows.web.http.HttpResponseMessage]: ...
    @_property
    def resource_byte_range_length(self) -> typing.Optional[typing.Optional[winrt.system.UInt64]]: ...
    @_property
    def resource_byte_range_offset(self) -> typing.Optional[typing.Optional[winrt.system.UInt64]]: ...
    @_property
    def resource_type(self) -> AdaptiveMediaSourceResourceType: ...
    @_property
    def resource_uri(self) -> typing.Optional[winrt.windows.foundation.Uri]: ...
    @_property
    def position(self) -> typing.Optional[typing.Optional[datetime.timedelta]]: ...
    @_property
    def request_id(self) -> winrt.system.Int32: ...
    @_property
    def statistics(self) -> typing.Optional[AdaptiveMediaSourceDownloadStatistics]: ...
    @_property
    def resource_content_type(self) -> str: ...
    @_property
    def resource_duration(self) -> typing.Optional[typing.Optional[datetime.timedelta]]: ...

@typing.final
class AdaptiveMediaSourceDownloadFailedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> AdaptiveMediaSourceDownloadFailedEventArgs: ...
    @_property
    def http_response_message(self) -> typing.Optional[winrt.windows.web.http.HttpResponseMessage]: ...
    @_property
    def resource_byte_range_length(self) -> typing.Optional[typing.Optional[winrt.system.UInt64]]: ...
    @_property
    def resource_byte_range_offset(self) -> typing.Optional[typing.Optional[winrt.system.UInt64]]: ...
    @_property
    def resource_type(self) -> AdaptiveMediaSourceResourceType: ...
    @_property
    def resource_uri(self) -> typing.Optional[winrt.windows.foundation.Uri]: ...
    @_property
    def extended_error(self) -> winrt.windows.foundation.HResult: ...
    @_property
    def position(self) -> typing.Optional[typing.Optional[datetime.timedelta]]: ...
    @_property
    def request_id(self) -> winrt.system.Int32: ...
    @_property
    def statistics(self) -> typing.Optional[AdaptiveMediaSourceDownloadStatistics]: ...
    @_property
    def resource_content_type(self) -> str: ...
    @_property
    def resource_duration(self) -> typing.Optional[typing.Optional[datetime.timedelta]]: ...

@typing.final
class AdaptiveMediaSourceDownloadRequestedDeferral(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> AdaptiveMediaSourceDownloadRequestedDeferral: ...
    def complete(self) -> None: ...

@typing.final
class AdaptiveMediaSourceDownloadRequestedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> AdaptiveMediaSourceDownloadRequestedEventArgs: ...
    def get_deferral(self) -> typing.Optional[AdaptiveMediaSourceDownloadRequestedDeferral]: ...
    @_property
    def resource_byte_range_length(self) -> typing.Optional[typing.Optional[winrt.system.UInt64]]: ...
    @_property
    def resource_byte_range_offset(self) -> typing.Optional[typing.Optional[winrt.system.UInt64]]: ...
    @_property
    def resource_type(self) -> AdaptiveMediaSourceResourceType: ...
    @_property
    def resource_uri(self) -> typing.Optional[winrt.windows.foundation.Uri]: ...
    @_property
    def result(self) -> typing.Optional[AdaptiveMediaSourceDownloadResult]: ...
    @_property
    def position(self) -> typing.Optional[typing.Optional[datetime.timedelta]]: ...
    @_property
    def request_id(self) -> winrt.system.Int32: ...
    @_property
    def resource_content_type(self) -> str: ...
    @_property
    def resource_duration(self) -> typing.Optional[typing.Optional[datetime.timedelta]]: ...

@typing.final
class AdaptiveMediaSourceDownloadResult(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> AdaptiveMediaSourceDownloadResult: ...
    @_property
    def resource_uri(self) -> typing.Optional[winrt.windows.foundation.Uri]: ...
    @resource_uri.setter
    def resource_uri(self, value: typing.Optional[winrt.windows.foundation.Uri]) -> None: ...
    @_property
    def input_stream(self) -> typing.Optional[winrt.windows.storage.streams.IInputStream]: ...
    @input_stream.setter
    def input_stream(self, value: typing.Optional[winrt.windows.storage.streams.IInputStream]) -> None: ...
    @_property
    def extended_status(self) -> winrt.system.UInt32: ...
    @extended_status.setter
    def extended_status(self, value: winrt.system.UInt32) -> None: ...
    @_property
    def content_type(self) -> str: ...
    @content_type.setter
    def content_type(self, value: str) -> None: ...
    @_property
    def buffer(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...
    @buffer.setter
    def buffer(self, value: typing.Optional[winrt.windows.storage.streams.IBuffer]) -> None: ...
    @_property
    def resource_byte_range_offset(self) -> typing.Optional[typing.Optional[winrt.system.UInt64]]: ...
    @resource_byte_range_offset.setter
    def resource_byte_range_offset(self, value: typing.Optional[typing.Optional[winrt.system.UInt64]]) -> None: ...
    @_property
    def resource_byte_range_length(self) -> typing.Optional[typing.Optional[winrt.system.UInt64]]: ...
    @resource_byte_range_length.setter
    def resource_byte_range_length(self, value: typing.Optional[typing.Optional[winrt.system.UInt64]]) -> None: ...

@typing.final
class AdaptiveMediaSourceDownloadStatistics(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> AdaptiveMediaSourceDownloadStatistics: ...
    @_property
    def content_bytes_received_count(self) -> winrt.system.UInt64: ...
    @_property
    def time_to_first_byte_received(self) -> typing.Optional[typing.Optional[datetime.timedelta]]: ...
    @_property
    def time_to_headers_received(self) -> typing.Optional[typing.Optional[datetime.timedelta]]: ...
    @_property
    def time_to_last_byte_received(self) -> typing.Optional[typing.Optional[datetime.timedelta]]: ...

@typing.final
class AdaptiveMediaSourcePlaybackBitrateChangedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> AdaptiveMediaSourcePlaybackBitrateChangedEventArgs: ...
    @_property
    def audio_only(self) -> bool: ...
    @_property
    def new_value(self) -> winrt.system.UInt32: ...
    @_property
    def old_value(self) -> winrt.system.UInt32: ...

