# WARNING: Please don't edit this file. It was generated by Python/WinRT v3.2.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.applicationmodel.appservice as windows_applicationmodel_appservice
import winrt.windows.foundation as windows_foundation
import winrt.windows.foundation.collections as windows_foundation_collections
import winrt.windows.networking.sockets as windows_networking_sockets
import winrt.windows.web.http as windows_web_http

from winrt.windows.system.diagnostics.deviceportal import DevicePortalConnectionClosedReason

Self = typing.TypeVar('Self')

@typing.final
class DevicePortalConnection_Static(winrt._winrt.IInspectable_Static):
    # Windows.System.Diagnostics.DevicePortal.DevicePortalConnection Windows.System.Diagnostics.DevicePortal.DevicePortalConnection::GetForAppServiceConnection(Windows.ApplicationModel.AppService.AppServiceConnection)
    def get_for_app_service_connection(cls, app_service_connection: windows_applicationmodel_appservice.AppServiceConnection, /) -> DevicePortalConnection: ...

@typing.final
class DevicePortalConnection(winrt.system.Object, metaclass=DevicePortalConnection_Static):
    # Windows.Networking.Sockets.ServerMessageWebSocket Windows.System.Diagnostics.DevicePortal.DevicePortalConnection::GetServerMessageWebSocketForRequest(Windows.Web.Http.HttpRequestMessage)
    def get_server_message_web_socket_for_request(self, request: windows_web_http.HttpRequestMessage, /) -> windows_networking_sockets.ServerMessageWebSocket: ...
    # Windows.Networking.Sockets.ServerMessageWebSocket Windows.System.Diagnostics.DevicePortal.DevicePortalConnection::GetServerMessageWebSocketForRequest(Windows.Web.Http.HttpRequestMessage,Windows.Networking.Sockets.SocketMessageType,System.String)
    def get_server_message_web_socket_for_request2(self, request: windows_web_http.HttpRequestMessage, message_type: windows_networking_sockets.SocketMessageType, protocol: str, /) -> windows_networking_sockets.ServerMessageWebSocket: ...
    # Windows.Networking.Sockets.ServerMessageWebSocket Windows.System.Diagnostics.DevicePortal.DevicePortalConnection::GetServerMessageWebSocketForRequest(Windows.Web.Http.HttpRequestMessage,Windows.Networking.Sockets.SocketMessageType,System.String,System.UInt32,System.UInt32,Windows.Networking.Sockets.MessageWebSocketReceiveMode)
    def get_server_message_web_socket_for_request3(self, request: windows_web_http.HttpRequestMessage, message_type: windows_networking_sockets.SocketMessageType, protocol: str, outbound_buffer_size_in_bytes: winrt.system.UInt32, max_message_size: winrt.system.UInt32, receive_mode: windows_networking_sockets.MessageWebSocketReceiveMode, /) -> windows_networking_sockets.ServerMessageWebSocket: ...
    # Windows.Networking.Sockets.ServerStreamWebSocket Windows.System.Diagnostics.DevicePortal.DevicePortalConnection::GetServerStreamWebSocketForRequest(Windows.Web.Http.HttpRequestMessage)
    def get_server_stream_web_socket_for_request(self, request: windows_web_http.HttpRequestMessage, /) -> windows_networking_sockets.ServerStreamWebSocket: ...
    # Windows.Networking.Sockets.ServerStreamWebSocket Windows.System.Diagnostics.DevicePortal.DevicePortalConnection::GetServerStreamWebSocketForRequest(Windows.Web.Http.HttpRequestMessage,System.String,System.UInt32,System.Boolean)
    def get_server_stream_web_socket_for_request2(self, request: windows_web_http.HttpRequestMessage, protocol: str, outbound_buffer_size_in_bytes: winrt.system.UInt32, no_delay: bool, /) -> windows_networking_sockets.ServerStreamWebSocket: ...
    # Windows.Foundation.EventRegistrationToken Windows.System.Diagnostics.DevicePortal.DevicePortalConnection::add_Closed(Windows.Foundation.TypedEventHandler`2<Windows.System.Diagnostics.DevicePortal.DevicePortalConnection,Windows.System.Diagnostics.DevicePortal.DevicePortalConnectionClosedEventArgs>)
    def add_closed(self, handler: windows_foundation.TypedEventHandler[DevicePortalConnection, DevicePortalConnectionClosedEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
    # System.Void Windows.System.Diagnostics.DevicePortal.DevicePortalConnection::remove_Closed(Windows.Foundation.EventRegistrationToken)
    def remove_closed(self, token: typing.Union[windows_foundation.EventRegistrationToken, typing.Tuple[winrt.system.Int64]], /) -> None: ...
    # Windows.Foundation.EventRegistrationToken Windows.System.Diagnostics.DevicePortal.DevicePortalConnection::add_RequestReceived(Windows.Foundation.TypedEventHandler`2<Windows.System.Diagnostics.DevicePortal.DevicePortalConnection,Windows.System.Diagnostics.DevicePortal.DevicePortalConnectionRequestReceivedEventArgs>)
    def add_request_received(self, handler: windows_foundation.TypedEventHandler[DevicePortalConnection, DevicePortalConnectionRequestReceivedEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
    # System.Void Windows.System.Diagnostics.DevicePortal.DevicePortalConnection::remove_RequestReceived(Windows.Foundation.EventRegistrationToken)
    def remove_request_received(self, token: typing.Union[windows_foundation.EventRegistrationToken, typing.Tuple[winrt.system.Int64]], /) -> None: ...

@typing.final
class DevicePortalConnectionClosedEventArgs(winrt.system.Object):
    # Windows.System.Diagnostics.DevicePortal.DevicePortalConnectionClosedReason Windows.System.Diagnostics.DevicePortal.DevicePortalConnectionClosedEventArgs::get_Reason()
    @_property
    def reason(self) -> DevicePortalConnectionClosedReason: ...

@typing.final
class DevicePortalConnectionRequestReceivedEventArgs(winrt.system.Object):
    # Windows.Foundation.Deferral Windows.System.Diagnostics.DevicePortal.DevicePortalConnectionRequestReceivedEventArgs::GetDeferral()
    def get_deferral(self) -> windows_foundation.Deferral: ...
    # Windows.Web.Http.HttpRequestMessage Windows.System.Diagnostics.DevicePortal.DevicePortalConnectionRequestReceivedEventArgs::get_RequestMessage()
    @_property
    def request_message(self) -> windows_web_http.HttpRequestMessage: ...
    # Windows.Web.Http.HttpResponseMessage Windows.System.Diagnostics.DevicePortal.DevicePortalConnectionRequestReceivedEventArgs::get_ResponseMessage()
    @_property
    def response_message(self) -> windows_web_http.HttpResponseMessage: ...
    # System.Boolean Windows.System.Diagnostics.DevicePortal.DevicePortalConnectionRequestReceivedEventArgs::get_IsWebSocketUpgradeRequest()
    @_property
    def is_web_socket_upgrade_request(self) -> bool: ...
    # Windows.Foundation.Collections.IVectorView`1<System.String> Windows.System.Diagnostics.DevicePortal.DevicePortalConnectionRequestReceivedEventArgs::get_WebSocketProtocolsRequested()
    @_property
    def web_socket_protocols_requested(self) -> typing.Sequence[str]: ...

