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

import enum
import datetime
import sys
import types
import typing

import winsdk.system
import winsdk.windows.foundation
import winsdk.windows.foundation.collections
import winsdk.windows.system.diagnostics
import winsdk.windows.web.http

class HttpDiagnosticRequestInitiator(enum.IntEnum):
    PARSED_ELEMENT = 0
    SCRIPT = 1
    IMAGE = 2
    LINK = 3
    STYLE = 4
    XML_HTTP_REQUEST = 5
    MEDIA = 6
    HTML_DOWNLOAD = 7
    PREFETCH = 8
    OTHER = 9
    CROSS_ORIGIN_PRE_FLIGHT = 10
    FETCH = 11
    BEACON = 12

Self = typing.TypeVar('Self')

class HttpDiagnosticProvider(winsdk.system.Object):
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> HttpDiagnosticProvider: ...
    @staticmethod
    def create_from_process_diagnostic_info(process_diagnostic_info: typing.Optional[winsdk.windows.system.diagnostics.ProcessDiagnosticInfo], /) -> typing.Optional[HttpDiagnosticProvider]: ...
    def start(self) -> None: ...
    def stop(self) -> None: ...
    def add_request_response_completed(self, handler: winsdk.windows.foundation.TypedEventHandler[HttpDiagnosticProvider, HttpDiagnosticProviderRequestResponseCompletedEventArgs], /) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_request_response_completed(self, token: winsdk.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_request_sent(self, handler: winsdk.windows.foundation.TypedEventHandler[HttpDiagnosticProvider, HttpDiagnosticProviderRequestSentEventArgs], /) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_request_sent(self, token: winsdk.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_response_received(self, handler: winsdk.windows.foundation.TypedEventHandler[HttpDiagnosticProvider, HttpDiagnosticProviderResponseReceivedEventArgs], /) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_response_received(self, token: winsdk.windows.foundation.EventRegistrationToken, /) -> None: ...

class HttpDiagnosticProviderRequestResponseCompletedEventArgs(winsdk.system.Object):
    activity_id: winsdk.system.Guid
    initiator: HttpDiagnosticRequestInitiator
    process_id: winsdk.system.UInt32
    requested_uri: typing.Optional[winsdk.windows.foundation.Uri]
    source_locations: typing.Optional[winsdk.windows.foundation.collections.IVectorView[HttpDiagnosticSourceLocation]]
    thread_id: winsdk.system.UInt32
    timestamps: typing.Optional[HttpDiagnosticProviderRequestResponseTimestamps]
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> HttpDiagnosticProviderRequestResponseCompletedEventArgs: ...

class HttpDiagnosticProviderRequestResponseTimestamps(winsdk.system.Object):
    cache_checked_timestamp: typing.Optional[typing.Optional[datetime.datetime]]
    connection_completed_timestamp: typing.Optional[typing.Optional[datetime.datetime]]
    connection_initiated_timestamp: typing.Optional[typing.Optional[datetime.datetime]]
    name_resolved_timestamp: typing.Optional[typing.Optional[datetime.datetime]]
    request_completed_timestamp: typing.Optional[typing.Optional[datetime.datetime]]
    request_sent_timestamp: typing.Optional[typing.Optional[datetime.datetime]]
    response_completed_timestamp: typing.Optional[typing.Optional[datetime.datetime]]
    response_received_timestamp: typing.Optional[typing.Optional[datetime.datetime]]
    ssl_negotiated_timestamp: typing.Optional[typing.Optional[datetime.datetime]]
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> HttpDiagnosticProviderRequestResponseTimestamps: ...

class HttpDiagnosticProviderRequestSentEventArgs(winsdk.system.Object):
    activity_id: winsdk.system.Guid
    initiator: HttpDiagnosticRequestInitiator
    message: typing.Optional[winsdk.windows.web.http.HttpRequestMessage]
    process_id: winsdk.system.UInt32
    source_locations: typing.Optional[winsdk.windows.foundation.collections.IVectorView[HttpDiagnosticSourceLocation]]
    thread_id: winsdk.system.UInt32
    timestamp: datetime.datetime
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> HttpDiagnosticProviderRequestSentEventArgs: ...

class HttpDiagnosticProviderResponseReceivedEventArgs(winsdk.system.Object):
    activity_id: winsdk.system.Guid
    message: typing.Optional[winsdk.windows.web.http.HttpResponseMessage]
    timestamp: datetime.datetime
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> HttpDiagnosticProviderResponseReceivedEventArgs: ...

class HttpDiagnosticSourceLocation(winsdk.system.Object):
    column_number: winsdk.system.UInt64
    line_number: winsdk.system.UInt64
    source_uri: typing.Optional[winsdk.windows.foundation.Uri]
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> HttpDiagnosticSourceLocation: ...

