import typing, clr, abc
from System.Collections.Specialized import StringDictionary, NameValueCollection, NameObjectCollectionBase
from System.Collections import IEnumerator, ICollection, IDictionary, IEnumerable
from System import Array, Array_1, MulticastDelegate, IAsyncResult, AsyncCallback, Uri, DateTime, FormatException, Exception, Version, ReadOnlySpan_1, Span_1, InvalidOperationException, MarshalByRefObject, IDisposable
from System.Reflection import MethodInfo, MethodBase
from System.Collections.Generic import IReadOnlyCollection_1, ICollection_1
from System.Runtime.Serialization import SerializationInfo, StreamingContext, ISerializable
from System.Net.Sockets import AddressFamily
from System.Threading.Tasks import Task_1
from System.Threading import CancellationToken
from System.Net.Security import AuthenticationLevel, RemoteCertificateValidationCallback
from System.Net.Cache import RequestCachePolicy
from System.Security.Principal import TokenImpersonationLevel
from System.IO import Stream, TextWriter
from System.Security.Cryptography.X509Certificates import X509CertificateCollection, X509Certificate
from System.Security import SecureString
from System.Security.Authentication.ExtendedProtection import ChannelBinding, ChannelBindingKind

class AuthenticationManager:
    @classmethod
    @property
    def CredentialPolicy(cls) -> ICredentialPolicy: ...
    @classmethod
    @CredentialPolicy.setter
    def CredentialPolicy(cls, value: ICredentialPolicy) -> ICredentialPolicy: ...
    @classmethod
    @property
    def CustomTargetNameDictionary(cls) -> StringDictionary: ...
    @classmethod
    @property
    def RegisteredModules(cls) -> IEnumerator: ...
    @staticmethod
    def Authenticate(challenge: str, request: WebRequest, credentials: ICredentials) -> Authorization: ...
    @staticmethod
    def PreAuthenticate(request: WebRequest, credentials: ICredentials) -> Authorization: ...
    @staticmethod
    def Register(authenticationModule: IAuthenticationModule) -> None: ...
    # Skipped Unregister due to it being static, abstract and generic.

    Unregister : Unregister_MethodGroup
    class Unregister_MethodGroup:
        @typing.overload
        def __call__(self, authenticationScheme: str) -> None:...
        @typing.overload
        def __call__(self, authenticationModule: IAuthenticationModule) -> None:...



class AuthenticationSchemes(typing.SupportsInt):
    @typing.overload
    def __init__(self, value : int) -> None: ...
    @typing.overload
    def __init__(self, value : int, force_if_true: bool) -> None: ...
    def __int__(self) -> int: ...
    
    # Values:
    None_ : AuthenticationSchemes # 0
    Digest : AuthenticationSchemes # 1
    Negotiate : AuthenticationSchemes # 2
    Ntlm : AuthenticationSchemes # 4
    IntegratedWindowsAuthentication : AuthenticationSchemes # 6
    Basic : AuthenticationSchemes # 8
    Anonymous : AuthenticationSchemes # 32768


class Authorization:
    @typing.overload
    def __init__(self, token: str) -> None: ...
    @typing.overload
    def __init__(self, token: str, finished: bool) -> None: ...
    @typing.overload
    def __init__(self, token: str, finished: bool, connectionGroupId: str) -> None: ...
    @property
    def Complete(self) -> bool: ...
    @Complete.setter
    def Complete(self, value: bool) -> bool: ...
    @property
    def ConnectionGroupId(self) -> str: ...
    @property
    def Message(self) -> str: ...
    @property
    def MutuallyAuthenticated(self) -> bool: ...
    @MutuallyAuthenticated.setter
    def MutuallyAuthenticated(self, value: bool) -> bool: ...
    @property
    def ProtectionRealm(self) -> Array_1[str]: ...
    @ProtectionRealm.setter
    def ProtectionRealm(self, value: Array_1[str]) -> Array_1[str]: ...


class BindIPEndPoint(MulticastDelegate):
    def __init__(self, object: typing.Any, method: int) -> None: ...
    @property
    def Method(self) -> MethodInfo: ...
    @property
    def Target(self) -> typing.Any: ...
    def BeginInvoke(self, servicePoint: ServicePoint, remoteEndPoint: IPEndPoint, retryCount: int, callback: AsyncCallback, object: typing.Any) -> IAsyncResult: ...
    def EndInvoke(self, result: IAsyncResult) -> IPEndPoint: ...
    def Invoke(self, servicePoint: ServicePoint, remoteEndPoint: IPEndPoint, retryCount: int) -> IPEndPoint: ...


class Cookie:
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def __init__(self, name: str, value: str) -> None: ...
    @typing.overload
    def __init__(self, name: str, value: str, path: str) -> None: ...
    @typing.overload
    def __init__(self, name: str, value: str, path: str, domain: str) -> None: ...
    @property
    def Comment(self) -> str: ...
    @Comment.setter
    def Comment(self, value: str) -> str: ...
    @property
    def CommentUri(self) -> Uri: ...
    @CommentUri.setter
    def CommentUri(self, value: Uri) -> Uri: ...
    @property
    def Discard(self) -> bool: ...
    @Discard.setter
    def Discard(self, value: bool) -> bool: ...
    @property
    def Domain(self) -> str: ...
    @Domain.setter
    def Domain(self, value: str) -> str: ...
    @property
    def Expired(self) -> bool: ...
    @Expired.setter
    def Expired(self, value: bool) -> bool: ...
    @property
    def Expires(self) -> DateTime: ...
    @Expires.setter
    def Expires(self, value: DateTime) -> DateTime: ...
    @property
    def HttpOnly(self) -> bool: ...
    @HttpOnly.setter
    def HttpOnly(self, value: bool) -> bool: ...
    @property
    def Name(self) -> str: ...
    @Name.setter
    def Name(self, value: str) -> str: ...
    @property
    def Path(self) -> str: ...
    @Path.setter
    def Path(self, value: str) -> str: ...
    @property
    def Port(self) -> str: ...
    @Port.setter
    def Port(self, value: str) -> str: ...
    @property
    def Secure(self) -> bool: ...
    @Secure.setter
    def Secure(self, value: bool) -> bool: ...
    @property
    def TimeStamp(self) -> DateTime: ...
    @property
    def Value(self) -> str: ...
    @Value.setter
    def Value(self, value: str) -> str: ...
    @property
    def Version(self) -> int: ...
    @Version.setter
    def Version(self, value: int) -> int: ...
    def Equals(self, comparand: typing.Any) -> bool: ...
    def GetHashCode(self) -> int: ...
    def ToString(self) -> str: ...


class CookieCollection(IReadOnlyCollection_1[Cookie], ICollection_1[Cookie], ICollection):
    def __init__(self) -> None: ...
    @property
    def Count(self) -> int: ...
    @property
    def IsReadOnly(self) -> bool: ...
    @property
    def IsSynchronized(self) -> bool: ...
    @property
    def Item(self) -> Cookie: ...
    @property
    def Item(self) -> Cookie: ...
    @property
    def SyncRoot(self) -> typing.Any: ...
    def Clear(self) -> None: ...
    def Contains(self, cookie: Cookie) -> bool: ...
    def GetEnumerator(self) -> IEnumerator: ...
    def Remove(self, cookie: Cookie) -> bool: ...
    # Skipped Add due to it being static, abstract and generic.

    Add : Add_MethodGroup
    class Add_MethodGroup:
        @typing.overload
        def __call__(self, cookies: CookieCollection) -> None:...
        @typing.overload
        def __call__(self, cookie: Cookie) -> None:...

    # Skipped CopyTo due to it being static, abstract and generic.

    CopyTo : CopyTo_MethodGroup
    class CopyTo_MethodGroup:
        @typing.overload
        def __call__(self, array: Array_1[Cookie], index: int) -> None:...
        @typing.overload
        def __call__(self, array: Array, index: int) -> None:...



class CookieContainer:
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def __init__(self, capacity: int) -> None: ...
    @typing.overload
    def __init__(self, capacity: int, perDomainCapacity: int, maxCookieSize: int) -> None: ...
    DefaultCookieLengthLimit : int
    DefaultCookieLimit : int
    DefaultPerDomainCookieLimit : int
    @property
    def Capacity(self) -> int: ...
    @Capacity.setter
    def Capacity(self, value: int) -> int: ...
    @property
    def Count(self) -> int: ...
    @property
    def MaxCookieSize(self) -> int: ...
    @MaxCookieSize.setter
    def MaxCookieSize(self, value: int) -> int: ...
    @property
    def PerDomainCapacity(self) -> int: ...
    @PerDomainCapacity.setter
    def PerDomainCapacity(self, value: int) -> int: ...
    def GetAllCookies(self) -> CookieCollection: ...
    def GetCookieHeader(self, uri: Uri) -> str: ...
    def GetCookies(self, uri: Uri) -> CookieCollection: ...
    def SetCookies(self, uri: Uri, cookieHeader: str) -> None: ...
    # Skipped Add due to it being static, abstract and generic.

    Add : Add_MethodGroup
    class Add_MethodGroup:
        @typing.overload
        def __call__(self, cookies: CookieCollection) -> None:...
        @typing.overload
        def __call__(self, cookie: Cookie) -> None:...
        @typing.overload
        def __call__(self, uri: Uri, cookies: CookieCollection) -> None:...
        @typing.overload
        def __call__(self, uri: Uri, cookie: Cookie) -> None:...



class CookieException(FormatException):
    def __init__(self) -> None: ...
    @property
    def Data(self) -> IDictionary: ...
    @property
    def HelpLink(self) -> str: ...
    @HelpLink.setter
    def HelpLink(self, value: str) -> str: ...
    @property
    def HResult(self) -> int: ...
    @HResult.setter
    def HResult(self, value: int) -> int: ...
    @property
    def InnerException(self) -> Exception: ...
    @property
    def Message(self) -> str: ...
    @property
    def Source(self) -> str: ...
    @Source.setter
    def Source(self, value: str) -> str: ...
    @property
    def StackTrace(self) -> str: ...
    @property
    def TargetSite(self) -> MethodBase: ...
    def GetObjectData(self, serializationInfo: SerializationInfo, streamingContext: StreamingContext) -> None: ...


class CookieVariant(typing.SupportsInt):
    @typing.overload
    def __init__(self, value : int) -> None: ...
    @typing.overload
    def __init__(self, value : int, force_if_true: bool) -> None: ...
    def __int__(self) -> int: ...
    
    # Values:
    Unknown : CookieVariant # 0
    Plain : CookieVariant # 1
    Rfc2109 : CookieVariant # 2
    Default : CookieVariant # 2
    Rfc2965 : CookieVariant # 3


class CredentialCache(IEnumerable, ICredentialsByHost, ICredentials):
    def __init__(self) -> None: ...
    @classmethod
    @property
    def DefaultCredentials(cls) -> ICredentials: ...
    @classmethod
    @property
    def DefaultNetworkCredentials(cls) -> NetworkCredential: ...
    def GetEnumerator(self) -> IEnumerator: ...
    # Skipped Add due to it being static, abstract and generic.

    Add : Add_MethodGroup
    class Add_MethodGroup:
        @typing.overload
        def __call__(self, uriPrefix: Uri, authType: str, cred: NetworkCredential) -> None:...
        @typing.overload
        def __call__(self, host: str, port: int, authenticationType: str, credential: NetworkCredential) -> None:...

    # Skipped GetCredential due to it being static, abstract and generic.

    GetCredential : GetCredential_MethodGroup
    class GetCredential_MethodGroup:
        @typing.overload
        def __call__(self, uriPrefix: Uri, authType: str) -> NetworkCredential:...
        @typing.overload
        def __call__(self, host: str, port: int, authenticationType: str) -> NetworkCredential:...

    # Skipped Remove due to it being static, abstract and generic.

    Remove : Remove_MethodGroup
    class Remove_MethodGroup:
        @typing.overload
        def __call__(self, uriPrefix: Uri, authType: str) -> None:...
        @typing.overload
        def __call__(self, host: str, port: int, authenticationType: str) -> None:...



class DecompressionMethods(typing.SupportsInt):
    @typing.overload
    def __init__(self, value : int) -> None: ...
    @typing.overload
    def __init__(self, value : int, force_if_true: bool) -> None: ...
    def __int__(self) -> int: ...
    
    # Values:
    None_ : DecompressionMethods # 0
    GZip : DecompressionMethods # 1
    Deflate : DecompressionMethods # 2
    Brotli : DecompressionMethods # 4
    All : DecompressionMethods # -1


class Dns(abc.ABC):
    @staticmethod
    def BeginGetHostAddresses(hostNameOrAddress: str, requestCallback: AsyncCallback, state: typing.Any) -> IAsyncResult: ...
    @staticmethod
    def BeginGetHostByName(hostName: str, requestCallback: AsyncCallback, stateObject: typing.Any) -> IAsyncResult: ...
    @staticmethod
    def BeginResolve(hostName: str, requestCallback: AsyncCallback, stateObject: typing.Any) -> IAsyncResult: ...
    @staticmethod
    def EndGetHostAddresses(asyncResult: IAsyncResult) -> Array_1[IPAddress]: ...
    @staticmethod
    def EndGetHostByName(asyncResult: IAsyncResult) -> IPHostEntry: ...
    @staticmethod
    def EndGetHostEntry(asyncResult: IAsyncResult) -> IPHostEntry: ...
    @staticmethod
    def EndResolve(asyncResult: IAsyncResult) -> IPHostEntry: ...
    @staticmethod
    def GetHostByName(hostName: str) -> IPHostEntry: ...
    @staticmethod
    def GetHostName() -> str: ...
    @staticmethod
    def Resolve(hostName: str) -> IPHostEntry: ...
    # Skipped BeginGetHostEntry due to it being static, abstract and generic.

    BeginGetHostEntry : BeginGetHostEntry_MethodGroup
    class BeginGetHostEntry_MethodGroup:
        @typing.overload
        def __call__(self, hostNameOrAddress: str, requestCallback: AsyncCallback, stateObject: typing.Any) -> IAsyncResult:...
        @typing.overload
        def __call__(self, address: IPAddress, requestCallback: AsyncCallback, stateObject: typing.Any) -> IAsyncResult:...

    # Skipped GetHostAddresses due to it being static, abstract and generic.

    GetHostAddresses : GetHostAddresses_MethodGroup
    class GetHostAddresses_MethodGroup:
        @typing.overload
        def __call__(self, hostNameOrAddress: str) -> Array_1[IPAddress]:...
        @typing.overload
        def __call__(self, hostNameOrAddress: str, family: AddressFamily) -> Array_1[IPAddress]:...

    # Skipped GetHostAddressesAsync due to it being static, abstract and generic.

    GetHostAddressesAsync : GetHostAddressesAsync_MethodGroup
    class GetHostAddressesAsync_MethodGroup:
        @typing.overload
        def __call__(self, hostNameOrAddress: str) -> Task_1[Array_1[IPAddress]]:...
        @typing.overload
        def __call__(self, hostNameOrAddress: str, cancellationToken: CancellationToken) -> Task_1[Array_1[IPAddress]]:...
        @typing.overload
        def __call__(self, hostNameOrAddress: str, family: AddressFamily, cancellationToken: CancellationToken = ...) -> Task_1[Array_1[IPAddress]]:...

    # Skipped GetHostByAddress due to it being static, abstract and generic.

    GetHostByAddress : GetHostByAddress_MethodGroup
    class GetHostByAddress_MethodGroup:
        @typing.overload
        def __call__(self, address: str) -> IPHostEntry:...
        @typing.overload
        def __call__(self, address: IPAddress) -> IPHostEntry:...

    # Skipped GetHostEntry due to it being static, abstract and generic.

    GetHostEntry : GetHostEntry_MethodGroup
    class GetHostEntry_MethodGroup:
        @typing.overload
        def __call__(self, hostNameOrAddress: str) -> IPHostEntry:...
        @typing.overload
        def __call__(self, address: IPAddress) -> IPHostEntry:...
        @typing.overload
        def __call__(self, hostNameOrAddress: str, family: AddressFamily) -> IPHostEntry:...

    # Skipped GetHostEntryAsync due to it being static, abstract and generic.

    GetHostEntryAsync : GetHostEntryAsync_MethodGroup
    class GetHostEntryAsync_MethodGroup:
        @typing.overload
        def __call__(self, hostNameOrAddress: str) -> Task_1[IPHostEntry]:...
        @typing.overload
        def __call__(self, address: IPAddress) -> Task_1[IPHostEntry]:...
        @typing.overload
        def __call__(self, hostNameOrAddress: str, cancellationToken: CancellationToken) -> Task_1[IPHostEntry]:...
        @typing.overload
        def __call__(self, hostNameOrAddress: str, family: AddressFamily, cancellationToken: CancellationToken = ...) -> Task_1[IPHostEntry]:...



class DnsEndPoint(EndPoint):
    @typing.overload
    def __init__(self, host: str, port: int) -> None: ...
    @typing.overload
    def __init__(self, host: str, port: int, addressFamily: AddressFamily) -> None: ...
    @property
    def AddressFamily(self) -> AddressFamily: ...
    @property
    def Host(self) -> str: ...
    @property
    def Port(self) -> int: ...
    def Equals(self, comparand: typing.Any) -> bool: ...
    def GetHashCode(self) -> int: ...
    def ToString(self) -> str: ...


class EndPoint(abc.ABC):
    @property
    def AddressFamily(self) -> AddressFamily: ...
    def Create(self, socketAddress: SocketAddress) -> EndPoint: ...
    def Serialize(self) -> SocketAddress: ...


class FileWebRequest(WebRequest):
    @property
    def AuthenticationLevel(self) -> AuthenticationLevel: ...
    @AuthenticationLevel.setter
    def AuthenticationLevel(self, value: AuthenticationLevel) -> AuthenticationLevel: ...
    @property
    def CachePolicy(self) -> RequestCachePolicy: ...
    @CachePolicy.setter
    def CachePolicy(self, value: RequestCachePolicy) -> RequestCachePolicy: ...
    @property
    def ConnectionGroupName(self) -> str: ...
    @ConnectionGroupName.setter
    def ConnectionGroupName(self, value: str) -> str: ...
    @property
    def ContentLength(self) -> int: ...
    @ContentLength.setter
    def ContentLength(self, value: int) -> int: ...
    @property
    def ContentType(self) -> str: ...
    @ContentType.setter
    def ContentType(self, value: str) -> str: ...
    @property
    def Credentials(self) -> ICredentials: ...
    @Credentials.setter
    def Credentials(self, value: ICredentials) -> ICredentials: ...
    @property
    def Headers(self) -> WebHeaderCollection: ...
    @property
    def ImpersonationLevel(self) -> TokenImpersonationLevel: ...
    @ImpersonationLevel.setter
    def ImpersonationLevel(self, value: TokenImpersonationLevel) -> TokenImpersonationLevel: ...
    @property
    def Method(self) -> str: ...
    @Method.setter
    def Method(self, value: str) -> str: ...
    @property
    def PreAuthenticate(self) -> bool: ...
    @PreAuthenticate.setter
    def PreAuthenticate(self, value: bool) -> bool: ...
    @property
    def Proxy(self) -> IWebProxy: ...
    @Proxy.setter
    def Proxy(self, value: IWebProxy) -> IWebProxy: ...
    @property
    def RequestUri(self) -> Uri: ...
    @property
    def Timeout(self) -> int: ...
    @Timeout.setter
    def Timeout(self, value: int) -> int: ...
    @property
    def UseDefaultCredentials(self) -> bool: ...
    @UseDefaultCredentials.setter
    def UseDefaultCredentials(self, value: bool) -> bool: ...
    def Abort(self) -> None: ...
    def BeginGetRequestStream(self, callback: AsyncCallback, state: typing.Any) -> IAsyncResult: ...
    def BeginGetResponse(self, callback: AsyncCallback, state: typing.Any) -> IAsyncResult: ...
    def EndGetRequestStream(self, asyncResult: IAsyncResult) -> Stream: ...
    def EndGetResponse(self, asyncResult: IAsyncResult) -> WebResponse: ...
    def GetRequestStream(self) -> Stream: ...
    def GetRequestStreamAsync(self) -> Task_1[Stream]: ...
    def GetResponse(self) -> WebResponse: ...
    def GetResponseAsync(self) -> Task_1[WebResponse]: ...


class FileWebResponse(WebResponse):
    @property
    def ContentLength(self) -> int: ...
    @property
    def ContentType(self) -> str: ...
    @property
    def Headers(self) -> WebHeaderCollection: ...
    @property
    def IsFromCache(self) -> bool: ...
    @property
    def IsMutuallyAuthenticated(self) -> bool: ...
    @property
    def ResponseUri(self) -> Uri: ...
    @property
    def SupportsHeaders(self) -> bool: ...
    def Close(self) -> None: ...
    def GetResponseStream(self) -> Stream: ...


class FtpStatusCode(typing.SupportsInt):
    @typing.overload
    def __init__(self, value : int) -> None: ...
    @typing.overload
    def __init__(self, value : int, force_if_true: bool) -> None: ...
    def __int__(self) -> int: ...
    
    # Values:
    Undefined : FtpStatusCode # 0
    RestartMarker : FtpStatusCode # 110
    ServiceTemporarilyNotAvailable : FtpStatusCode # 120
    DataAlreadyOpen : FtpStatusCode # 125
    OpeningData : FtpStatusCode # 150
    CommandOK : FtpStatusCode # 200
    CommandExtraneous : FtpStatusCode # 202
    DirectoryStatus : FtpStatusCode # 212
    FileStatus : FtpStatusCode # 213
    SystemType : FtpStatusCode # 215
    SendUserCommand : FtpStatusCode # 220
    ClosingControl : FtpStatusCode # 221
    ClosingData : FtpStatusCode # 226
    EnteringPassive : FtpStatusCode # 227
    LoggedInProceed : FtpStatusCode # 230
    ServerWantsSecureSession : FtpStatusCode # 234
    FileActionOK : FtpStatusCode # 250
    PathnameCreated : FtpStatusCode # 257
    SendPasswordCommand : FtpStatusCode # 331
    NeedLoginAccount : FtpStatusCode # 332
    FileCommandPending : FtpStatusCode # 350
    ServiceNotAvailable : FtpStatusCode # 421
    CantOpenData : FtpStatusCode # 425
    ConnectionClosed : FtpStatusCode # 426
    ActionNotTakenFileUnavailableOrBusy : FtpStatusCode # 450
    ActionAbortedLocalProcessingError : FtpStatusCode # 451
    ActionNotTakenInsufficientSpace : FtpStatusCode # 452
    CommandSyntaxError : FtpStatusCode # 500
    ArgumentSyntaxError : FtpStatusCode # 501
    CommandNotImplemented : FtpStatusCode # 502
    BadCommandSequence : FtpStatusCode # 503
    NotLoggedIn : FtpStatusCode # 530
    AccountNeeded : FtpStatusCode # 532
    ActionNotTakenFileUnavailable : FtpStatusCode # 550
    ActionAbortedUnknownPageType : FtpStatusCode # 551
    FileActionAborted : FtpStatusCode # 552
    ActionNotTakenFilenameNotAllowed : FtpStatusCode # 553


class FtpWebRequest(WebRequest):
    @property
    def AuthenticationLevel(self) -> AuthenticationLevel: ...
    @AuthenticationLevel.setter
    def AuthenticationLevel(self, value: AuthenticationLevel) -> AuthenticationLevel: ...
    @property
    def CachePolicy(self) -> RequestCachePolicy: ...
    @CachePolicy.setter
    def CachePolicy(self, value: RequestCachePolicy) -> RequestCachePolicy: ...
    @property
    def ClientCertificates(self) -> X509CertificateCollection: ...
    @ClientCertificates.setter
    def ClientCertificates(self, value: X509CertificateCollection) -> X509CertificateCollection: ...
    @property
    def ConnectionGroupName(self) -> str: ...
    @ConnectionGroupName.setter
    def ConnectionGroupName(self, value: str) -> str: ...
    @property
    def ContentLength(self) -> int: ...
    @ContentLength.setter
    def ContentLength(self, value: int) -> int: ...
    @property
    def ContentOffset(self) -> int: ...
    @ContentOffset.setter
    def ContentOffset(self, value: int) -> int: ...
    @property
    def ContentType(self) -> str: ...
    @ContentType.setter
    def ContentType(self, value: str) -> str: ...
    @property
    def Credentials(self) -> ICredentials: ...
    @Credentials.setter
    def Credentials(self, value: ICredentials) -> ICredentials: ...
    @classmethod
    @property
    def DefaultCachePolicy(cls) -> RequestCachePolicy: ...
    @classmethod
    @DefaultCachePolicy.setter
    def DefaultCachePolicy(cls, value: RequestCachePolicy) -> RequestCachePolicy: ...
    @property
    def EnableSsl(self) -> bool: ...
    @EnableSsl.setter
    def EnableSsl(self, value: bool) -> bool: ...
    @property
    def Headers(self) -> WebHeaderCollection: ...
    @Headers.setter
    def Headers(self, value: WebHeaderCollection) -> WebHeaderCollection: ...
    @property
    def ImpersonationLevel(self) -> TokenImpersonationLevel: ...
    @ImpersonationLevel.setter
    def ImpersonationLevel(self, value: TokenImpersonationLevel) -> TokenImpersonationLevel: ...
    @property
    def KeepAlive(self) -> bool: ...
    @KeepAlive.setter
    def KeepAlive(self, value: bool) -> bool: ...
    @property
    def Method(self) -> str: ...
    @Method.setter
    def Method(self, value: str) -> str: ...
    @property
    def PreAuthenticate(self) -> bool: ...
    @PreAuthenticate.setter
    def PreAuthenticate(self, value: bool) -> bool: ...
    @property
    def Proxy(self) -> IWebProxy: ...
    @Proxy.setter
    def Proxy(self, value: IWebProxy) -> IWebProxy: ...
    @property
    def ReadWriteTimeout(self) -> int: ...
    @ReadWriteTimeout.setter
    def ReadWriteTimeout(self, value: int) -> int: ...
    @property
    def RenameTo(self) -> str: ...
    @RenameTo.setter
    def RenameTo(self, value: str) -> str: ...
    @property
    def RequestUri(self) -> Uri: ...
    @property
    def ServicePoint(self) -> ServicePoint: ...
    @property
    def Timeout(self) -> int: ...
    @Timeout.setter
    def Timeout(self, value: int) -> int: ...
    @property
    def UseBinary(self) -> bool: ...
    @UseBinary.setter
    def UseBinary(self, value: bool) -> bool: ...
    @property
    def UseDefaultCredentials(self) -> bool: ...
    @UseDefaultCredentials.setter
    def UseDefaultCredentials(self, value: bool) -> bool: ...
    @property
    def UsePassive(self) -> bool: ...
    @UsePassive.setter
    def UsePassive(self, value: bool) -> bool: ...
    def Abort(self) -> None: ...
    def BeginGetRequestStream(self, callback: AsyncCallback, state: typing.Any) -> IAsyncResult: ...
    def BeginGetResponse(self, callback: AsyncCallback, state: typing.Any) -> IAsyncResult: ...
    def EndGetRequestStream(self, asyncResult: IAsyncResult) -> Stream: ...
    def EndGetResponse(self, asyncResult: IAsyncResult) -> WebResponse: ...
    def GetRequestStream(self) -> Stream: ...
    def GetResponse(self) -> WebResponse: ...


class FtpWebResponse(WebResponse):
    @property
    def BannerMessage(self) -> str: ...
    @property
    def ContentLength(self) -> int: ...
    @property
    def ContentType(self) -> str: ...
    @ContentType.setter
    def ContentType(self, value: str) -> str: ...
    @property
    def ExitMessage(self) -> str: ...
    @property
    def Headers(self) -> WebHeaderCollection: ...
    @property
    def IsFromCache(self) -> bool: ...
    @property
    def IsMutuallyAuthenticated(self) -> bool: ...
    @property
    def LastModified(self) -> DateTime: ...
    @property
    def ResponseUri(self) -> Uri: ...
    @property
    def StatusCode(self) -> FtpStatusCode: ...
    @property
    def StatusDescription(self) -> str: ...
    @property
    def SupportsHeaders(self) -> bool: ...
    @property
    def WelcomeMessage(self) -> str: ...
    def Close(self) -> None: ...
    def GetResponseStream(self) -> Stream: ...


class GlobalProxySelection:
    def __init__(self) -> None: ...
    @classmethod
    @property
    def Select(cls) -> IWebProxy: ...
    @classmethod
    @Select.setter
    def Select(cls, value: IWebProxy) -> IWebProxy: ...
    @staticmethod
    def GetEmptyWebProxy() -> IWebProxy: ...


class HttpContinueDelegate(MulticastDelegate):
    def __init__(self, object: typing.Any, method: int) -> None: ...
    @property
    def Method(self) -> MethodInfo: ...
    @property
    def Target(self) -> typing.Any: ...
    def BeginInvoke(self, StatusCode: int, httpHeaders: WebHeaderCollection, callback: AsyncCallback, object: typing.Any) -> IAsyncResult: ...
    def EndInvoke(self, result: IAsyncResult) -> None: ...
    def Invoke(self, StatusCode: int, httpHeaders: WebHeaderCollection) -> None: ...


class HttpRequestHeader(typing.SupportsInt):
    @typing.overload
    def __init__(self, value : int) -> None: ...
    @typing.overload
    def __init__(self, value : int, force_if_true: bool) -> None: ...
    def __int__(self) -> int: ...
    
    # Values:
    CacheControl : HttpRequestHeader # 0
    Connection : HttpRequestHeader # 1
    Date : HttpRequestHeader # 2
    KeepAlive : HttpRequestHeader # 3
    Pragma : HttpRequestHeader # 4
    Trailer : HttpRequestHeader # 5
    TransferEncoding : HttpRequestHeader # 6
    Upgrade : HttpRequestHeader # 7
    Via : HttpRequestHeader # 8
    Warning : HttpRequestHeader # 9
    Allow : HttpRequestHeader # 10
    ContentLength : HttpRequestHeader # 11
    ContentType : HttpRequestHeader # 12
    ContentEncoding : HttpRequestHeader # 13
    ContentLanguage : HttpRequestHeader # 14
    ContentLocation : HttpRequestHeader # 15
    ContentMd5 : HttpRequestHeader # 16
    ContentRange : HttpRequestHeader # 17
    Expires : HttpRequestHeader # 18
    LastModified : HttpRequestHeader # 19
    Accept : HttpRequestHeader # 20
    AcceptCharset : HttpRequestHeader # 21
    AcceptEncoding : HttpRequestHeader # 22
    AcceptLanguage : HttpRequestHeader # 23
    Authorization : HttpRequestHeader # 24
    Cookie : HttpRequestHeader # 25
    Expect : HttpRequestHeader # 26
    From : HttpRequestHeader # 27
    Host : HttpRequestHeader # 28
    IfMatch : HttpRequestHeader # 29
    IfModifiedSince : HttpRequestHeader # 30
    IfNoneMatch : HttpRequestHeader # 31
    IfRange : HttpRequestHeader # 32
    IfUnmodifiedSince : HttpRequestHeader # 33
    MaxForwards : HttpRequestHeader # 34
    ProxyAuthorization : HttpRequestHeader # 35
    Referer : HttpRequestHeader # 36
    Range : HttpRequestHeader # 37
    Te : HttpRequestHeader # 38
    Translate : HttpRequestHeader # 39
    UserAgent : HttpRequestHeader # 40


class HttpResponseHeader(typing.SupportsInt):
    @typing.overload
    def __init__(self, value : int) -> None: ...
    @typing.overload
    def __init__(self, value : int, force_if_true: bool) -> None: ...
    def __int__(self) -> int: ...
    
    # Values:
    CacheControl : HttpResponseHeader # 0
    Connection : HttpResponseHeader # 1
    Date : HttpResponseHeader # 2
    KeepAlive : HttpResponseHeader # 3
    Pragma : HttpResponseHeader # 4
    Trailer : HttpResponseHeader # 5
    TransferEncoding : HttpResponseHeader # 6
    Upgrade : HttpResponseHeader # 7
    Via : HttpResponseHeader # 8
    Warning : HttpResponseHeader # 9
    Allow : HttpResponseHeader # 10
    ContentLength : HttpResponseHeader # 11
    ContentType : HttpResponseHeader # 12
    ContentEncoding : HttpResponseHeader # 13
    ContentLanguage : HttpResponseHeader # 14
    ContentLocation : HttpResponseHeader # 15
    ContentMd5 : HttpResponseHeader # 16
    ContentRange : HttpResponseHeader # 17
    Expires : HttpResponseHeader # 18
    LastModified : HttpResponseHeader # 19
    AcceptRanges : HttpResponseHeader # 20
    Age : HttpResponseHeader # 21
    ETag : HttpResponseHeader # 22
    Location : HttpResponseHeader # 23
    ProxyAuthenticate : HttpResponseHeader # 24
    RetryAfter : HttpResponseHeader # 25
    Server : HttpResponseHeader # 26
    SetCookie : HttpResponseHeader # 27
    Vary : HttpResponseHeader # 28
    WwwAuthenticate : HttpResponseHeader # 29


class HttpStatusCode(typing.SupportsInt):
    @typing.overload
    def __init__(self, value : int) -> None: ...
    @typing.overload
    def __init__(self, value : int, force_if_true: bool) -> None: ...
    def __int__(self) -> int: ...
    
    # Values:
    Continue : HttpStatusCode # 100
    SwitchingProtocols : HttpStatusCode # 101
    Processing : HttpStatusCode # 102
    EarlyHints : HttpStatusCode # 103
    OK : HttpStatusCode # 200
    Created : HttpStatusCode # 201
    Accepted : HttpStatusCode # 202
    NonAuthoritativeInformation : HttpStatusCode # 203
    NoContent : HttpStatusCode # 204
    ResetContent : HttpStatusCode # 205
    PartialContent : HttpStatusCode # 206
    MultiStatus : HttpStatusCode # 207
    AlreadyReported : HttpStatusCode # 208
    IMUsed : HttpStatusCode # 226
    MultipleChoices : HttpStatusCode # 300
    Ambiguous : HttpStatusCode # 300
    MovedPermanently : HttpStatusCode # 301
    Moved : HttpStatusCode # 301
    Found : HttpStatusCode # 302
    Redirect : HttpStatusCode # 302
    SeeOther : HttpStatusCode # 303
    RedirectMethod : HttpStatusCode # 303
    NotModified : HttpStatusCode # 304
    UseProxy : HttpStatusCode # 305
    Unused : HttpStatusCode # 306
    TemporaryRedirect : HttpStatusCode # 307
    RedirectKeepVerb : HttpStatusCode # 307
    PermanentRedirect : HttpStatusCode # 308
    BadRequest : HttpStatusCode # 400
    Unauthorized : HttpStatusCode # 401
    PaymentRequired : HttpStatusCode # 402
    Forbidden : HttpStatusCode # 403
    NotFound : HttpStatusCode # 404
    MethodNotAllowed : HttpStatusCode # 405
    NotAcceptable : HttpStatusCode # 406
    ProxyAuthenticationRequired : HttpStatusCode # 407
    RequestTimeout : HttpStatusCode # 408
    Conflict : HttpStatusCode # 409
    Gone : HttpStatusCode # 410
    LengthRequired : HttpStatusCode # 411
    PreconditionFailed : HttpStatusCode # 412
    RequestEntityTooLarge : HttpStatusCode # 413
    RequestUriTooLong : HttpStatusCode # 414
    UnsupportedMediaType : HttpStatusCode # 415
    RequestedRangeNotSatisfiable : HttpStatusCode # 416
    ExpectationFailed : HttpStatusCode # 417
    MisdirectedRequest : HttpStatusCode # 421
    UnprocessableEntity : HttpStatusCode # 422
    Locked : HttpStatusCode # 423
    FailedDependency : HttpStatusCode # 424
    UpgradeRequired : HttpStatusCode # 426
    PreconditionRequired : HttpStatusCode # 428
    TooManyRequests : HttpStatusCode # 429
    RequestHeaderFieldsTooLarge : HttpStatusCode # 431
    UnavailableForLegalReasons : HttpStatusCode # 451
    InternalServerError : HttpStatusCode # 500
    NotImplemented : HttpStatusCode # 501
    BadGateway : HttpStatusCode # 502
    ServiceUnavailable : HttpStatusCode # 503
    GatewayTimeout : HttpStatusCode # 504
    HttpVersionNotSupported : HttpStatusCode # 505
    VariantAlsoNegotiates : HttpStatusCode # 506
    InsufficientStorage : HttpStatusCode # 507
    LoopDetected : HttpStatusCode # 508
    NotExtended : HttpStatusCode # 510
    NetworkAuthenticationRequired : HttpStatusCode # 511


class HttpVersion(abc.ABC):
    Unknown : Version
    Version10 : Version
    Version11 : Version
    Version20 : Version
    Version30 : Version


class HttpWebRequest(WebRequest):
    @property
    def Accept(self) -> str: ...
    @Accept.setter
    def Accept(self, value: str) -> str: ...
    @property
    def Address(self) -> Uri: ...
    @property
    def AllowAutoRedirect(self) -> bool: ...
    @AllowAutoRedirect.setter
    def AllowAutoRedirect(self, value: bool) -> bool: ...
    @property
    def AllowReadStreamBuffering(self) -> bool: ...
    @AllowReadStreamBuffering.setter
    def AllowReadStreamBuffering(self, value: bool) -> bool: ...
    @property
    def AllowWriteStreamBuffering(self) -> bool: ...
    @AllowWriteStreamBuffering.setter
    def AllowWriteStreamBuffering(self, value: bool) -> bool: ...
    @property
    def AuthenticationLevel(self) -> AuthenticationLevel: ...
    @AuthenticationLevel.setter
    def AuthenticationLevel(self, value: AuthenticationLevel) -> AuthenticationLevel: ...
    @property
    def AutomaticDecompression(self) -> DecompressionMethods: ...
    @AutomaticDecompression.setter
    def AutomaticDecompression(self, value: DecompressionMethods) -> DecompressionMethods: ...
    @property
    def CachePolicy(self) -> RequestCachePolicy: ...
    @CachePolicy.setter
    def CachePolicy(self, value: RequestCachePolicy) -> RequestCachePolicy: ...
    @property
    def ClientCertificates(self) -> X509CertificateCollection: ...
    @ClientCertificates.setter
    def ClientCertificates(self, value: X509CertificateCollection) -> X509CertificateCollection: ...
    @property
    def Connection(self) -> str: ...
    @Connection.setter
    def Connection(self, value: str) -> str: ...
    @property
    def ConnectionGroupName(self) -> str: ...
    @ConnectionGroupName.setter
    def ConnectionGroupName(self, value: str) -> str: ...
    @property
    def ContentLength(self) -> int: ...
    @ContentLength.setter
    def ContentLength(self, value: int) -> int: ...
    @property
    def ContentType(self) -> str: ...
    @ContentType.setter
    def ContentType(self, value: str) -> str: ...
    @property
    def ContinueDelegate(self) -> HttpContinueDelegate: ...
    @ContinueDelegate.setter
    def ContinueDelegate(self, value: HttpContinueDelegate) -> HttpContinueDelegate: ...
    @property
    def ContinueTimeout(self) -> int: ...
    @ContinueTimeout.setter
    def ContinueTimeout(self, value: int) -> int: ...
    @property
    def CookieContainer(self) -> CookieContainer: ...
    @CookieContainer.setter
    def CookieContainer(self, value: CookieContainer) -> CookieContainer: ...
    @property
    def Credentials(self) -> ICredentials: ...
    @Credentials.setter
    def Credentials(self, value: ICredentials) -> ICredentials: ...
    @property
    def Date(self) -> DateTime: ...
    @Date.setter
    def Date(self, value: DateTime) -> DateTime: ...
    @classmethod
    @property
    def DefaultCachePolicy(cls) -> RequestCachePolicy: ...
    @classmethod
    @DefaultCachePolicy.setter
    def DefaultCachePolicy(cls, value: RequestCachePolicy) -> RequestCachePolicy: ...
    @classmethod
    @property
    def DefaultMaximumErrorResponseLength(cls) -> int: ...
    @classmethod
    @DefaultMaximumErrorResponseLength.setter
    def DefaultMaximumErrorResponseLength(cls, value: int) -> int: ...
    @classmethod
    @property
    def DefaultMaximumResponseHeadersLength(cls) -> int: ...
    @classmethod
    @DefaultMaximumResponseHeadersLength.setter
    def DefaultMaximumResponseHeadersLength(cls, value: int) -> int: ...
    @property
    def Expect(self) -> str: ...
    @Expect.setter
    def Expect(self, value: str) -> str: ...
    @property
    def HaveResponse(self) -> bool: ...
    @property
    def Headers(self) -> WebHeaderCollection: ...
    @Headers.setter
    def Headers(self, value: WebHeaderCollection) -> WebHeaderCollection: ...
    @property
    def Host(self) -> str: ...
    @Host.setter
    def Host(self, value: str) -> str: ...
    @property
    def IfModifiedSince(self) -> DateTime: ...
    @IfModifiedSince.setter
    def IfModifiedSince(self, value: DateTime) -> DateTime: ...
    @property
    def ImpersonationLevel(self) -> TokenImpersonationLevel: ...
    @ImpersonationLevel.setter
    def ImpersonationLevel(self, value: TokenImpersonationLevel) -> TokenImpersonationLevel: ...
    @property
    def KeepAlive(self) -> bool: ...
    @KeepAlive.setter
    def KeepAlive(self, value: bool) -> bool: ...
    @property
    def MaximumAutomaticRedirections(self) -> int: ...
    @MaximumAutomaticRedirections.setter
    def MaximumAutomaticRedirections(self, value: int) -> int: ...
    @property
    def MaximumResponseHeadersLength(self) -> int: ...
    @MaximumResponseHeadersLength.setter
    def MaximumResponseHeadersLength(self, value: int) -> int: ...
    @property
    def MediaType(self) -> str: ...
    @MediaType.setter
    def MediaType(self, value: str) -> str: ...
    @property
    def Method(self) -> str: ...
    @Method.setter
    def Method(self, value: str) -> str: ...
    @property
    def Pipelined(self) -> bool: ...
    @Pipelined.setter
    def Pipelined(self, value: bool) -> bool: ...
    @property
    def PreAuthenticate(self) -> bool: ...
    @PreAuthenticate.setter
    def PreAuthenticate(self, value: bool) -> bool: ...
    @property
    def ProtocolVersion(self) -> Version: ...
    @ProtocolVersion.setter
    def ProtocolVersion(self, value: Version) -> Version: ...
    @property
    def Proxy(self) -> IWebProxy: ...
    @Proxy.setter
    def Proxy(self, value: IWebProxy) -> IWebProxy: ...
    @property
    def ReadWriteTimeout(self) -> int: ...
    @ReadWriteTimeout.setter
    def ReadWriteTimeout(self, value: int) -> int: ...
    @property
    def Referer(self) -> str: ...
    @Referer.setter
    def Referer(self, value: str) -> str: ...
    @property
    def RequestUri(self) -> Uri: ...
    @property
    def SendChunked(self) -> bool: ...
    @SendChunked.setter
    def SendChunked(self, value: bool) -> bool: ...
    @property
    def ServerCertificateValidationCallback(self) -> RemoteCertificateValidationCallback: ...
    @ServerCertificateValidationCallback.setter
    def ServerCertificateValidationCallback(self, value: RemoteCertificateValidationCallback) -> RemoteCertificateValidationCallback: ...
    @property
    def ServicePoint(self) -> ServicePoint: ...
    @property
    def SupportsCookieContainer(self) -> bool: ...
    @property
    def Timeout(self) -> int: ...
    @Timeout.setter
    def Timeout(self, value: int) -> int: ...
    @property
    def TransferEncoding(self) -> str: ...
    @TransferEncoding.setter
    def TransferEncoding(self, value: str) -> str: ...
    @property
    def UnsafeAuthenticatedConnectionSharing(self) -> bool: ...
    @UnsafeAuthenticatedConnectionSharing.setter
    def UnsafeAuthenticatedConnectionSharing(self, value: bool) -> bool: ...
    @property
    def UseDefaultCredentials(self) -> bool: ...
    @UseDefaultCredentials.setter
    def UseDefaultCredentials(self, value: bool) -> bool: ...
    @property
    def UserAgent(self) -> str: ...
    @UserAgent.setter
    def UserAgent(self, value: str) -> str: ...
    def Abort(self) -> None: ...
    def BeginGetRequestStream(self, callback: AsyncCallback, state: typing.Any) -> IAsyncResult: ...
    def BeginGetResponse(self, callback: AsyncCallback, state: typing.Any) -> IAsyncResult: ...
    def EndGetResponse(self, asyncResult: IAsyncResult) -> WebResponse: ...
    def GetResponse(self) -> WebResponse: ...
    # Skipped AddRange due to it being static, abstract and generic.

    AddRange : AddRange_MethodGroup
    class AddRange_MethodGroup:
        @typing.overload
        def __call__(self, range: int) -> None:...
        # Method AddRange(range : Int64) was skipped since it collides with above method
        @typing.overload
        def __call__(self, from_: int, to: int) -> None:...
        # Method AddRange(from : Int64, to : Int64) was skipped since it collides with above method
        @typing.overload
        def __call__(self, rangeSpecifier: str, range: int) -> None:...
        # Method AddRange(rangeSpecifier : String, range : Int64) was skipped since it collides with above method
        @typing.overload
        def __call__(self, rangeSpecifier: str, from_: int, to: int) -> None:...
        # Method AddRange(rangeSpecifier : String, from : Int64, to : Int64) was skipped since it collides with above method

    # Skipped EndGetRequestStream due to it being static, abstract and generic.

    EndGetRequestStream : EndGetRequestStream_MethodGroup
    class EndGetRequestStream_MethodGroup:
        @typing.overload
        def __call__(self, asyncResult: IAsyncResult) -> Stream:...
        @typing.overload
        def __call__(self, asyncResult: IAsyncResult, context: clr.Reference[TransportContext]) -> Stream:...

    # Skipped GetRequestStream due to it being static, abstract and generic.

    GetRequestStream : GetRequestStream_MethodGroup
    class GetRequestStream_MethodGroup:
        @typing.overload
        def __call__(self) -> Stream:...
        @typing.overload
        def __call__(self, context: clr.Reference[TransportContext]) -> Stream:...



class HttpWebResponse(WebResponse):
    def __init__(self) -> None: ...
    @property
    def CharacterSet(self) -> str: ...
    @property
    def ContentEncoding(self) -> str: ...
    @property
    def ContentLength(self) -> int: ...
    @property
    def ContentType(self) -> str: ...
    @property
    def Cookies(self) -> CookieCollection: ...
    @Cookies.setter
    def Cookies(self, value: CookieCollection) -> CookieCollection: ...
    @property
    def Headers(self) -> WebHeaderCollection: ...
    @property
    def IsFromCache(self) -> bool: ...
    @property
    def IsMutuallyAuthenticated(self) -> bool: ...
    @property
    def LastModified(self) -> DateTime: ...
    @property
    def Method(self) -> str: ...
    @property
    def ProtocolVersion(self) -> Version: ...
    @property
    def ResponseUri(self) -> Uri: ...
    @property
    def Server(self) -> str: ...
    @property
    def StatusCode(self) -> HttpStatusCode: ...
    @property
    def StatusDescription(self) -> str: ...
    @property
    def SupportsHeaders(self) -> bool: ...
    def Close(self) -> None: ...
    def GetResponseHeader(self, headerName: str) -> str: ...
    def GetResponseStream(self) -> Stream: ...


class IAuthenticationModule(typing.Protocol):
    @property
    def AuthenticationType(self) -> str: ...
    @property
    def CanPreAuthenticate(self) -> bool: ...
    @abc.abstractmethod
    def Authenticate(self, challenge: str, request: WebRequest, credentials: ICredentials) -> Authorization: ...
    @abc.abstractmethod
    def PreAuthenticate(self, request: WebRequest, credentials: ICredentials) -> Authorization: ...


class ICredentialPolicy(typing.Protocol):
    @abc.abstractmethod
    def ShouldSendCredential(self, challengeUri: Uri, request: WebRequest, credential: NetworkCredential, authenticationModule: IAuthenticationModule) -> bool: ...


class ICredentials(typing.Protocol):
    @abc.abstractmethod
    def GetCredential(self, uri: Uri, authType: str) -> NetworkCredential: ...


class ICredentialsByHost(typing.Protocol):
    @abc.abstractmethod
    def GetCredential(self, host: str, port: int, authenticationType: str) -> NetworkCredential: ...


class IPAddress:
    @typing.overload
    def __init__(self, address: Array_1[int]) -> None: ...
    @typing.overload
    def __init__(self, address: ReadOnlySpan_1[int]) -> None: ...
    @typing.overload
    def __init__(self, address: Array_1[int], scopeid: int) -> None: ...
    @typing.overload
    def __init__(self, address: ReadOnlySpan_1[int], scopeid: int) -> None: ...
    @typing.overload
    def __init__(self, newAddress: int) -> None: ...
    Any : IPAddress
    Broadcast : IPAddress
    IPv6Any : IPAddress
    IPv6Loopback : IPAddress
    IPv6None : IPAddress
    Loopback : IPAddress
    # FIXME: "None" is a reserved keyword
    # None : IPAddress
    @property
    def Address(self) -> int: ...
    @Address.setter
    def Address(self, value: int) -> int: ...
    @property
    def AddressFamily(self) -> AddressFamily: ...
    @property
    def IsIPv4MappedToIPv6(self) -> bool: ...
    @property
    def IsIPv6LinkLocal(self) -> bool: ...
    @property
    def IsIPv6Multicast(self) -> bool: ...
    @property
    def IsIPv6SiteLocal(self) -> bool: ...
    @property
    def IsIPv6Teredo(self) -> bool: ...
    @property
    def IsIPv6UniqueLocal(self) -> bool: ...
    @property
    def ScopeId(self) -> int: ...
    @ScopeId.setter
    def ScopeId(self, value: int) -> int: ...
    def Equals(self, comparand: typing.Any) -> bool: ...
    def GetAddressBytes(self) -> Array_1[int]: ...
    def GetHashCode(self) -> int: ...
    @staticmethod
    def IsLoopback(address: IPAddress) -> bool: ...
    def MapToIPv4(self) -> IPAddress: ...
    def MapToIPv6(self) -> IPAddress: ...
    def ToString(self) -> str: ...
    def TryFormat(self, destination: Span_1[str], charsWritten: clr.Reference[int]) -> bool: ...
    def TryWriteBytes(self, destination: Span_1[int], bytesWritten: clr.Reference[int]) -> bool: ...
    # Skipped HostToNetworkOrder due to it being static, abstract and generic.

    HostToNetworkOrder : HostToNetworkOrder_MethodGroup
    class HostToNetworkOrder_MethodGroup:
        def __call__(self, host: int) -> int:...
        # Method HostToNetworkOrder(host : Int32) was skipped since it collides with above method
        # Method HostToNetworkOrder(host : Int16) was skipped since it collides with above method

    # Skipped NetworkToHostOrder due to it being static, abstract and generic.

    NetworkToHostOrder : NetworkToHostOrder_MethodGroup
    class NetworkToHostOrder_MethodGroup:
        def __call__(self, network: int) -> int:...
        # Method NetworkToHostOrder(network : Int32) was skipped since it collides with above method
        # Method NetworkToHostOrder(network : Int16) was skipped since it collides with above method

    # Skipped Parse due to it being static, abstract and generic.

    Parse : Parse_MethodGroup
    class Parse_MethodGroup:
        @typing.overload
        def __call__(self, ipSpan: ReadOnlySpan_1[str]) -> IPAddress:...
        @typing.overload
        def __call__(self, ipString: str) -> IPAddress:...

    # Skipped TryParse due to it being static, abstract and generic.

    TryParse : TryParse_MethodGroup
    class TryParse_MethodGroup:
        @typing.overload
        def __call__(self, ipSpan: ReadOnlySpan_1[str], address: clr.Reference[IPAddress]) -> bool:...
        @typing.overload
        def __call__(self, ipString: str, address: clr.Reference[IPAddress]) -> bool:...



class IPEndPoint(EndPoint):
    @typing.overload
    def __init__(self, address: int, port: int) -> None: ...
    @typing.overload
    def __init__(self, address: IPAddress, port: int) -> None: ...
    MaxPort : int
    MinPort : int
    @property
    def Address(self) -> IPAddress: ...
    @Address.setter
    def Address(self, value: IPAddress) -> IPAddress: ...
    @property
    def AddressFamily(self) -> AddressFamily: ...
    @property
    def Port(self) -> int: ...
    @Port.setter
    def Port(self, value: int) -> int: ...
    def Create(self, socketAddress: SocketAddress) -> EndPoint: ...
    def Equals(self, comparand: typing.Any) -> bool: ...
    def GetHashCode(self) -> int: ...
    def Serialize(self) -> SocketAddress: ...
    def ToString(self) -> str: ...
    # Skipped Parse due to it being static, abstract and generic.

    Parse : Parse_MethodGroup
    class Parse_MethodGroup:
        @typing.overload
        def __call__(self, s: ReadOnlySpan_1[str]) -> IPEndPoint:...
        @typing.overload
        def __call__(self, s: str) -> IPEndPoint:...

    # Skipped TryParse due to it being static, abstract and generic.

    TryParse : TryParse_MethodGroup
    class TryParse_MethodGroup:
        @typing.overload
        def __call__(self, s: ReadOnlySpan_1[str], result: clr.Reference[IPEndPoint]) -> bool:...
        @typing.overload
        def __call__(self, s: str, result: clr.Reference[IPEndPoint]) -> bool:...



class IPHostEntry:
    def __init__(self) -> None: ...
    @property
    def AddressList(self) -> Array_1[IPAddress]: ...
    @AddressList.setter
    def AddressList(self, value: Array_1[IPAddress]) -> Array_1[IPAddress]: ...
    @property
    def Aliases(self) -> Array_1[str]: ...
    @Aliases.setter
    def Aliases(self, value: Array_1[str]) -> Array_1[str]: ...
    @property
    def HostName(self) -> str: ...
    @HostName.setter
    def HostName(self, value: str) -> str: ...


class IWebProxy(typing.Protocol):
    @property
    def Credentials(self) -> ICredentials: ...
    @Credentials.setter
    def Credentials(self, value: ICredentials) -> ICredentials: ...
    @abc.abstractmethod
    def GetProxy(self, destination: Uri) -> Uri: ...
    @abc.abstractmethod
    def IsBypassed(self, host: Uri) -> bool: ...


class IWebRequestCreate(typing.Protocol):
    @abc.abstractmethod
    def Create(self, uri: Uri) -> WebRequest: ...


class NetworkCredential(ICredentialsByHost, ICredentials):
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def __init__(self, userName: str, password: str) -> None: ...
    @typing.overload
    def __init__(self, userName: str, password: SecureString) -> None: ...
    @typing.overload
    def __init__(self, userName: str, password: str, domain: str) -> None: ...
    @typing.overload
    def __init__(self, userName: str, password: SecureString, domain: str) -> None: ...
    @property
    def Domain(self) -> str: ...
    @Domain.setter
    def Domain(self, value: str) -> str: ...
    @property
    def Password(self) -> str: ...
    @Password.setter
    def Password(self, value: str) -> str: ...
    @property
    def SecurePassword(self) -> SecureString: ...
    @SecurePassword.setter
    def SecurePassword(self, value: SecureString) -> SecureString: ...
    @property
    def UserName(self) -> str: ...
    @UserName.setter
    def UserName(self, value: str) -> str: ...
    # Skipped GetCredential due to it being static, abstract and generic.

    GetCredential : GetCredential_MethodGroup
    class GetCredential_MethodGroup:
        @typing.overload
        def __call__(self, uri: Uri, authenticationType: str) -> NetworkCredential:...
        @typing.overload
        def __call__(self, host: str, port: int, authenticationType: str) -> NetworkCredential:...



class PathList:
    def __init__(self) -> None: ...


class ProtocolViolationException(InvalidOperationException):
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def __init__(self, message: str) -> None: ...
    @property
    def Data(self) -> IDictionary: ...
    @property
    def HelpLink(self) -> str: ...
    @HelpLink.setter
    def HelpLink(self, value: str) -> str: ...
    @property
    def HResult(self) -> int: ...
    @HResult.setter
    def HResult(self, value: int) -> int: ...
    @property
    def InnerException(self) -> Exception: ...
    @property
    def Message(self) -> str: ...
    @property
    def Source(self) -> str: ...
    @Source.setter
    def Source(self, value: str) -> str: ...
    @property
    def StackTrace(self) -> str: ...
    @property
    def TargetSite(self) -> MethodBase: ...
    def GetObjectData(self, serializationInfo: SerializationInfo, streamingContext: StreamingContext) -> None: ...


class ServicePoint:
    @property
    def Address(self) -> Uri: ...
    @property
    def BindIPEndPointDelegate(self) -> BindIPEndPoint: ...
    @BindIPEndPointDelegate.setter
    def BindIPEndPointDelegate(self, value: BindIPEndPoint) -> BindIPEndPoint: ...
    @property
    def Certificate(self) -> X509Certificate: ...
    @property
    def ClientCertificate(self) -> X509Certificate: ...
    @property
    def ConnectionLeaseTimeout(self) -> int: ...
    @ConnectionLeaseTimeout.setter
    def ConnectionLeaseTimeout(self, value: int) -> int: ...
    @property
    def ConnectionLimit(self) -> int: ...
    @ConnectionLimit.setter
    def ConnectionLimit(self, value: int) -> int: ...
    @property
    def ConnectionName(self) -> str: ...
    @property
    def CurrentConnections(self) -> int: ...
    @property
    def Expect100Continue(self) -> bool: ...
    @Expect100Continue.setter
    def Expect100Continue(self, value: bool) -> bool: ...
    @property
    def IdleSince(self) -> DateTime: ...
    @IdleSince.setter
    def IdleSince(self, value: DateTime) -> DateTime: ...
    @property
    def MaxIdleTime(self) -> int: ...
    @MaxIdleTime.setter
    def MaxIdleTime(self, value: int) -> int: ...
    @property
    def ProtocolVersion(self) -> Version: ...
    @property
    def ReceiveBufferSize(self) -> int: ...
    @ReceiveBufferSize.setter
    def ReceiveBufferSize(self, value: int) -> int: ...
    @property
    def SupportsPipelining(self) -> bool: ...
    @property
    def UseNagleAlgorithm(self) -> bool: ...
    @UseNagleAlgorithm.setter
    def UseNagleAlgorithm(self, value: bool) -> bool: ...
    def CloseConnectionGroup(self, connectionGroupName: str) -> bool: ...
    def SetTcpKeepAlive(self, enabled: bool, keepAliveTime: int, keepAliveInterval: int) -> None: ...


class SocketAddress:
    @typing.overload
    def __init__(self, family: AddressFamily) -> None: ...
    @typing.overload
    def __init__(self, family: AddressFamily, size: int) -> None: ...
    @property
    def Family(self) -> AddressFamily: ...
    @property
    def Item(self) -> int: ...
    @Item.setter
    def Item(self, value: int) -> int: ...
    @property
    def Size(self) -> int: ...
    def Equals(self, comparand: typing.Any) -> bool: ...
    def GetHashCode(self) -> int: ...
    def ToString(self) -> str: ...


class TransportContext(abc.ABC):
    @abc.abstractmethod
    def GetChannelBinding(self, kind: ChannelBindingKind) -> ChannelBinding: ...


class WebException(InvalidOperationException):
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def __init__(self, message: str) -> None: ...
    @typing.overload
    def __init__(self, message: str, innerException: Exception) -> None: ...
    @typing.overload
    def __init__(self, message: str, innerException: Exception, status: WebExceptionStatus, response: WebResponse) -> None: ...
    @typing.overload
    def __init__(self, message: str, status: WebExceptionStatus) -> None: ...
    @property
    def Data(self) -> IDictionary: ...
    @property
    def HelpLink(self) -> str: ...
    @HelpLink.setter
    def HelpLink(self, value: str) -> str: ...
    @property
    def HResult(self) -> int: ...
    @HResult.setter
    def HResult(self, value: int) -> int: ...
    @property
    def InnerException(self) -> Exception: ...
    @property
    def Message(self) -> str: ...
    @property
    def Response(self) -> WebResponse: ...
    @property
    def Source(self) -> str: ...
    @Source.setter
    def Source(self, value: str) -> str: ...
    @property
    def StackTrace(self) -> str: ...
    @property
    def Status(self) -> WebExceptionStatus: ...
    @property
    def TargetSite(self) -> MethodBase: ...
    def GetObjectData(self, serializationInfo: SerializationInfo, streamingContext: StreamingContext) -> None: ...


class WebExceptionStatus(typing.SupportsInt):
    @typing.overload
    def __init__(self, value : int) -> None: ...
    @typing.overload
    def __init__(self, value : int, force_if_true: bool) -> None: ...
    def __int__(self) -> int: ...
    
    # Values:
    Success : WebExceptionStatus # 0
    NameResolutionFailure : WebExceptionStatus # 1
    ConnectFailure : WebExceptionStatus # 2
    ReceiveFailure : WebExceptionStatus # 3
    SendFailure : WebExceptionStatus # 4
    PipelineFailure : WebExceptionStatus # 5
    RequestCanceled : WebExceptionStatus # 6
    ProtocolError : WebExceptionStatus # 7
    ConnectionClosed : WebExceptionStatus # 8
    TrustFailure : WebExceptionStatus # 9
    SecureChannelFailure : WebExceptionStatus # 10
    ServerProtocolViolation : WebExceptionStatus # 11
    KeepAliveFailure : WebExceptionStatus # 12
    Pending : WebExceptionStatus # 13
    Timeout : WebExceptionStatus # 14
    ProxyNameResolutionFailure : WebExceptionStatus # 15
    UnknownError : WebExceptionStatus # 16
    MessageLengthLimitExceeded : WebExceptionStatus # 17
    CacheEntryNotFound : WebExceptionStatus # 18
    RequestProhibitedByCachePolicy : WebExceptionStatus # 19
    RequestProhibitedByProxy : WebExceptionStatus # 20


class WebHeaderCollection(NameValueCollection):
    def __init__(self) -> None: ...
    @property
    def AllKeys(self) -> Array_1[str]: ...
    @property
    def Count(self) -> int: ...
    @property
    def Item(self) -> str: ...
    @Item.setter
    def Item(self, value: str) -> str: ...
    @property
    def Item(self) -> str: ...
    @Item.setter
    def Item(self, value: str) -> str: ...
    @property
    def Item(self) -> str: ...
    @Item.setter
    def Item(self, value: str) -> str: ...
    @property
    def Item(self) -> str: ...
    @property
    def Keys(self) -> NameObjectCollectionBase.KeysCollection: ...
    def Clear(self) -> None: ...
    def GetEnumerator(self) -> IEnumerator: ...
    def GetKey(self, index: int) -> str: ...
    def GetObjectData(self, serializationInfo: SerializationInfo, streamingContext: StreamingContext) -> None: ...
    def OnDeserialization(self, sender: typing.Any) -> None: ...
    def ToByteArray(self) -> Array_1[int]: ...
    def ToString(self) -> str: ...
    # Skipped Add due to it being static, abstract and generic.

    Add : Add_MethodGroup
    class Add_MethodGroup:
        @typing.overload
        def __call__(self, c: NameValueCollection) -> None:...
        @typing.overload
        def __call__(self, header: str) -> None:...
        @typing.overload
        def __call__(self, header: HttpRequestHeader, value: str) -> None:...
        @typing.overload
        def __call__(self, header: HttpResponseHeader, value: str) -> None:...
        @typing.overload
        def __call__(self, name: str, value: str) -> None:...

    # Skipped Get due to it being static, abstract and generic.

    Get : Get_MethodGroup
    class Get_MethodGroup:
        @typing.overload
        def __call__(self, index: int) -> str:...
        @typing.overload
        def __call__(self, name: str) -> str:...

    # Skipped GetValues due to it being static, abstract and generic.

    GetValues : GetValues_MethodGroup
    class GetValues_MethodGroup:
        @typing.overload
        def __call__(self, index: int) -> Array_1[str]:...
        @typing.overload
        def __call__(self, header: str) -> Array_1[str]:...

    # Skipped IsRestricted due to it being static, abstract and generic.

    IsRestricted : IsRestricted_MethodGroup
    class IsRestricted_MethodGroup:
        @typing.overload
        def __call__(self, headerName: str) -> bool:...
        @typing.overload
        def __call__(self, headerName: str, response: bool) -> bool:...

    # Skipped Remove due to it being static, abstract and generic.

    Remove : Remove_MethodGroup
    class Remove_MethodGroup:
        @typing.overload
        def __call__(self, header: HttpRequestHeader) -> None:...
        @typing.overload
        def __call__(self, header: HttpResponseHeader) -> None:...
        @typing.overload
        def __call__(self, name: str) -> None:...

    # Skipped Set due to it being static, abstract and generic.

    Set : Set_MethodGroup
    class Set_MethodGroup:
        @typing.overload
        def __call__(self, header: HttpRequestHeader, value: str) -> None:...
        @typing.overload
        def __call__(self, header: HttpResponseHeader, value: str) -> None:...
        @typing.overload
        def __call__(self, name: str, value: str) -> None:...



class WebRequest(MarshalByRefObject, ISerializable):
    @property
    def AuthenticationLevel(self) -> AuthenticationLevel: ...
    @AuthenticationLevel.setter
    def AuthenticationLevel(self, value: AuthenticationLevel) -> AuthenticationLevel: ...
    @property
    def CachePolicy(self) -> RequestCachePolicy: ...
    @CachePolicy.setter
    def CachePolicy(self, value: RequestCachePolicy) -> RequestCachePolicy: ...
    @property
    def ConnectionGroupName(self) -> str: ...
    @ConnectionGroupName.setter
    def ConnectionGroupName(self, value: str) -> str: ...
    @property
    def ContentLength(self) -> int: ...
    @ContentLength.setter
    def ContentLength(self, value: int) -> int: ...
    @property
    def ContentType(self) -> str: ...
    @ContentType.setter
    def ContentType(self, value: str) -> str: ...
    @property
    def Credentials(self) -> ICredentials: ...
    @Credentials.setter
    def Credentials(self, value: ICredentials) -> ICredentials: ...
    @classmethod
    @property
    def DefaultCachePolicy(cls) -> RequestCachePolicy: ...
    @classmethod
    @DefaultCachePolicy.setter
    def DefaultCachePolicy(cls, value: RequestCachePolicy) -> RequestCachePolicy: ...
    @classmethod
    @property
    def DefaultWebProxy(cls) -> IWebProxy: ...
    @classmethod
    @DefaultWebProxy.setter
    def DefaultWebProxy(cls, value: IWebProxy) -> IWebProxy: ...
    @property
    def Headers(self) -> WebHeaderCollection: ...
    @Headers.setter
    def Headers(self, value: WebHeaderCollection) -> WebHeaderCollection: ...
    @property
    def ImpersonationLevel(self) -> TokenImpersonationLevel: ...
    @ImpersonationLevel.setter
    def ImpersonationLevel(self, value: TokenImpersonationLevel) -> TokenImpersonationLevel: ...
    @property
    def Method(self) -> str: ...
    @Method.setter
    def Method(self, value: str) -> str: ...
    @property
    def PreAuthenticate(self) -> bool: ...
    @PreAuthenticate.setter
    def PreAuthenticate(self, value: bool) -> bool: ...
    @property
    def Proxy(self) -> IWebProxy: ...
    @Proxy.setter
    def Proxy(self, value: IWebProxy) -> IWebProxy: ...
    @property
    def RequestUri(self) -> Uri: ...
    @property
    def Timeout(self) -> int: ...
    @Timeout.setter
    def Timeout(self, value: int) -> int: ...
    @property
    def UseDefaultCredentials(self) -> bool: ...
    @UseDefaultCredentials.setter
    def UseDefaultCredentials(self, value: bool) -> bool: ...
    def Abort(self) -> None: ...
    def BeginGetRequestStream(self, callback: AsyncCallback, state: typing.Any) -> IAsyncResult: ...
    def BeginGetResponse(self, callback: AsyncCallback, state: typing.Any) -> IAsyncResult: ...
    @staticmethod
    def CreateDefault(requestUri: Uri) -> WebRequest: ...
    def EndGetRequestStream(self, asyncResult: IAsyncResult) -> Stream: ...
    def EndGetResponse(self, asyncResult: IAsyncResult) -> WebResponse: ...
    def GetRequestStream(self) -> Stream: ...
    def GetRequestStreamAsync(self) -> Task_1[Stream]: ...
    def GetResponse(self) -> WebResponse: ...
    def GetResponseAsync(self) -> Task_1[WebResponse]: ...
    @staticmethod
    def GetSystemWebProxy() -> IWebProxy: ...
    @staticmethod
    def RegisterPrefix(prefix: str, creator: IWebRequestCreate) -> bool: ...
    # Skipped Create due to it being static, abstract and generic.

    Create : Create_MethodGroup
    class Create_MethodGroup:
        @typing.overload
        def __call__(self, requestUriString: str) -> WebRequest:...
        @typing.overload
        def __call__(self, requestUri: Uri) -> WebRequest:...

    # Skipped CreateHttp due to it being static, abstract and generic.

    CreateHttp : CreateHttp_MethodGroup
    class CreateHttp_MethodGroup:
        @typing.overload
        def __call__(self, requestUriString: str) -> HttpWebRequest:...
        @typing.overload
        def __call__(self, requestUri: Uri) -> HttpWebRequest:...



class WebRequestMethods(abc.ABC):

    class File(abc.ABC):
        DownloadFile : str
        UploadFile : str


    class Ftp(abc.ABC):
        AppendFile : str
        DeleteFile : str
        DownloadFile : str
        GetDateTimestamp : str
        GetFileSize : str
        ListDirectory : str
        ListDirectoryDetails : str
        MakeDirectory : str
        PrintWorkingDirectory : str
        RemoveDirectory : str
        Rename : str
        UploadFile : str
        UploadFileWithUniqueName : str


    class Http(abc.ABC):
        Connect : str
        Get : str
        Head : str
        MkCol : str
        Post : str
        Put : str



class WebResponse(MarshalByRefObject, IDisposable, ISerializable):
    @property
    def ContentLength(self) -> int: ...
    @ContentLength.setter
    def ContentLength(self, value: int) -> int: ...
    @property
    def ContentType(self) -> str: ...
    @ContentType.setter
    def ContentType(self, value: str) -> str: ...
    @property
    def Headers(self) -> WebHeaderCollection: ...
    @property
    def IsFromCache(self) -> bool: ...
    @property
    def IsMutuallyAuthenticated(self) -> bool: ...
    @property
    def ResponseUri(self) -> Uri: ...
    @property
    def SupportsHeaders(self) -> bool: ...
    def Close(self) -> None: ...
    def Dispose(self) -> None: ...
    def GetResponseStream(self) -> Stream: ...


class WebUtility(abc.ABC):
    @staticmethod
    def UrlDecode(encodedValue: str) -> str: ...
    @staticmethod
    def UrlDecodeToBytes(encodedValue: Array_1[int], offset: int, count: int) -> Array_1[int]: ...
    @staticmethod
    def UrlEncode(value: str) -> str: ...
    @staticmethod
    def UrlEncodeToBytes(value: Array_1[int], offset: int, count: int) -> Array_1[int]: ...
    # Skipped HtmlDecode due to it being static, abstract and generic.

    HtmlDecode : HtmlDecode_MethodGroup
    class HtmlDecode_MethodGroup:
        @typing.overload
        def __call__(self, value: str) -> str:...
        @typing.overload
        def __call__(self, value: str, output: TextWriter) -> None:...

    # Skipped HtmlEncode due to it being static, abstract and generic.

    HtmlEncode : HtmlEncode_MethodGroup
    class HtmlEncode_MethodGroup:
        @typing.overload
        def __call__(self, value: str) -> str:...
        @typing.overload
        def __call__(self, value: str, output: TextWriter) -> None:...


