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

import enum
import sys
import types
import typing
import uuid

import winsdk._winrt as _winrt

try:
    import winsdk.windows.foundation
except Exception:
    pass

try:
    import winsdk.windows.foundation.collections
except Exception:
    pass

try:
    import winsdk.windows.networking.sockets
except Exception:
    pass

try:
    import winsdk.windows.security.credentials
except Exception:
    pass

try:
    import winsdk.windows.security.cryptography.certificates
except Exception:
    pass

try:
    import winsdk.windows.system
except Exception:
    pass

try:
    import winsdk.windows.web.http
except Exception:
    pass

class HttpCacheReadBehavior(enum.IntEnum):
    DEFAULT = 0
    MOST_RECENT = 1
    ONLY_FROM_CACHE = 2
    NO_CACHE = 3

class HttpCacheWriteBehavior(enum.IntEnum):
    DEFAULT = 0
    NO_CACHE = 1

class HttpCookieUsageBehavior(enum.IntEnum):
    DEFAULT = 0
    NO_COOKIES = 1

class HttpBaseProtocolFilter(IHttpFilter, winsdk.windows.foundation.IClosable, _winrt.Object):
    use_proxy: _winrt.Boolean
    server_credential: winsdk.windows.security.credentials.PasswordCredential
    proxy_credential: winsdk.windows.security.credentials.PasswordCredential
    max_connections_per_server: _winrt.UInt32
    client_certificate: winsdk.windows.security.cryptography.certificates.Certificate
    automatic_decompression: _winrt.Boolean
    allow_u_i: _winrt.Boolean
    allow_auto_redirect: _winrt.Boolean
    cache_control: HttpCacheControl
    cookie_manager: winsdk.windows.web.http.HttpCookieManager
    ignorable_server_certificate_errors: winsdk.windows.foundation.collections.IVector[winsdk.windows.security.cryptography.certificates.ChainValidationResult]
    max_version: winsdk.windows.web.http.HttpVersion
    cookie_usage_behavior: HttpCookieUsageBehavior
    user: winsdk.windows.system.User
    @staticmethod
    def _from(obj: _winrt.Object) -> HttpBaseProtocolFilter: ...
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def clear_authentication_cache(self) -> None: ...
    @typing.overload
    def close(self) -> None: ...
    @typing.overload
    @staticmethod
    def create_for_user(user: winsdk.windows.system.User) -> HttpBaseProtocolFilter: ...
    @typing.overload
    def send_request_async(self, request: winsdk.windows.web.http.HttpRequestMessage) -> winsdk.windows.foundation.IAsyncOperationWithProgress[winsdk.windows.web.http.HttpResponseMessage, winsdk.windows.web.http.HttpProgress]: ...
    @typing.overload
    def add_server_custom_validation_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[HttpBaseProtocolFilter, HttpServerCustomValidationRequestedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_server_custom_validation_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...

class HttpCacheControl(_winrt.Object):
    write_behavior: HttpCacheWriteBehavior
    read_behavior: HttpCacheReadBehavior
    @staticmethod
    def _from(obj: _winrt.Object) -> HttpCacheControl: ...

class HttpServerCustomValidationRequestedEventArgs(_winrt.Object):
    request_message: winsdk.windows.web.http.HttpRequestMessage
    server_certificate: winsdk.windows.security.cryptography.certificates.Certificate
    server_certificate_error_severity: winsdk.windows.networking.sockets.SocketSslErrorSeverity
    server_certificate_errors: winsdk.windows.foundation.collections.IVectorView[winsdk.windows.security.cryptography.certificates.ChainValidationResult]
    server_intermediate_certificates: winsdk.windows.foundation.collections.IVectorView[winsdk.windows.security.cryptography.certificates.Certificate]
    @staticmethod
    def _from(obj: _winrt.Object) -> HttpServerCustomValidationRequestedEventArgs: ...
    @typing.overload
    def get_deferral(self) -> winsdk.windows.foundation.Deferral: ...
    @typing.overload
    def reject(self) -> None: ...

class IHttpFilter(winsdk.windows.foundation.IClosable, _winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> IHttpFilter: ...
    @typing.overload
    def send_request_async(self, request: winsdk.windows.web.http.HttpRequestMessage) -> winsdk.windows.foundation.IAsyncOperationWithProgress[winsdk.windows.web.http.HttpResponseMessage, winsdk.windows.web.http.HttpProgress]: ...
    @typing.overload
    def close(self) -> None: ...

