import typing, abc
from System import Uri, Array_1
from System.Security import SecureString
from System.IO import TextWriter

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 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 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:...


