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

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

class CredentialPromptType(enum.IntEnum):
    PROMPT_IF_NEEDED = 0
    RETYPE_CREDENTIALS = 1
    DO_NOT_PROMPT = 2

class OnlineIdSystemTicketStatus(enum.IntEnum):
    SUCCESS = 0
    ERROR = 1
    SERVICE_CONNECTION_ERROR = 2

Self = typing.TypeVar('Self')

class OnlineIdAuthenticator(winsdk.system.Object):
    application_id: winsdk.system.Guid
    authenticated_safe_customer_id: str
    can_sign_out: winsdk.system.Boolean
    @staticmethod
    def _from(obj: winsdk.system.Object) -> OnlineIdAuthenticator: ...
    def __new__(cls: typing.Type[OnlineIdAuthenticator]) -> OnlineIdAuthenticator:...
    @typing.overload
    def authenticate_user_async(self, request: typing.Optional[OnlineIdServiceTicketRequest]) -> UserAuthenticationOperation: ...
    @typing.overload
    def authenticate_user_async(self, requests: typing.Iterable[OnlineIdServiceTicketRequest], credential_prompt_type: CredentialPromptType) -> UserAuthenticationOperation: ...
    def sign_out_user_async(self) -> SignOutUserOperation: ...

class OnlineIdServiceTicket(winsdk.system.Object):
    error_code: winsdk.system.Int32
    request: typing.Optional[OnlineIdServiceTicketRequest]
    value: str
    @staticmethod
    def _from(obj: winsdk.system.Object) -> OnlineIdServiceTicket: ...

class OnlineIdServiceTicketRequest(winsdk.system.Object):
    policy: str
    service: str
    @staticmethod
    def _from(obj: winsdk.system.Object) -> OnlineIdServiceTicketRequest: ...
    @typing.overload
    def __new__(cls: typing.Type[OnlineIdServiceTicketRequest], service: str, policy: str) -> OnlineIdServiceTicketRequest:...
    @typing.overload
    def __new__(cls: typing.Type[OnlineIdServiceTicketRequest], service: str) -> OnlineIdServiceTicketRequest:...

class OnlineIdSystemAuthenticator(winsdk.system.Object):
    default: typing.ClassVar[typing.Optional[OnlineIdSystemAuthenticatorForUser]]
    @staticmethod
    def _from(obj: winsdk.system.Object) -> OnlineIdSystemAuthenticator: ...
    @staticmethod
    def get_for_user(user: typing.Optional[winsdk.windows.system.User]) -> typing.Optional[OnlineIdSystemAuthenticatorForUser]: ...

class OnlineIdSystemAuthenticatorForUser(winsdk.system.Object):
    application_id: winsdk.system.Guid
    user: typing.Optional[winsdk.windows.system.User]
    @staticmethod
    def _from(obj: winsdk.system.Object) -> OnlineIdSystemAuthenticatorForUser: ...
    def get_ticket_async(self, request: typing.Optional[OnlineIdServiceTicketRequest]) -> winsdk.windows.foundation.IAsyncOperation[OnlineIdSystemTicketResult]: ...

class OnlineIdSystemIdentity(winsdk.system.Object):
    id: str
    ticket: typing.Optional[OnlineIdServiceTicket]
    @staticmethod
    def _from(obj: winsdk.system.Object) -> OnlineIdSystemIdentity: ...

class OnlineIdSystemTicketResult(winsdk.system.Object):
    extended_error: winsdk.windows.foundation.HResult
    identity: typing.Optional[OnlineIdSystemIdentity]
    status: OnlineIdSystemTicketStatus
    @staticmethod
    def _from(obj: winsdk.system.Object) -> OnlineIdSystemTicketResult: ...

class SignOutUserOperation(winsdk.system.Object):
    error_code: winsdk.windows.foundation.HResult
    id: winsdk.system.UInt32
    status: winsdk.windows.foundation.AsyncStatus
    completed: typing.Optional[winsdk.windows.foundation.AsyncActionCompletedHandler]
    def __await__(self) -> typing.Generator[typing.Any, None, None]: ...
    @staticmethod
    def _from(obj: winsdk.system.Object) -> SignOutUserOperation: ...
    def cancel(self) -> None: ...
    def close(self) -> None: ...
    def get_results(self) -> None: ...

class UserAuthenticationOperation(winsdk.system.Object):
    error_code: winsdk.windows.foundation.HResult
    id: winsdk.system.UInt32
    status: winsdk.windows.foundation.AsyncStatus
    completed: typing.Optional[winsdk.windows.foundation.AsyncOperationCompletedHandler[UserIdentity]]
    def __await__(self) -> typing.Generator[typing.Any, None, typing.Optional[UserIdentity]]: ...
    @staticmethod
    def _from(obj: winsdk.system.Object) -> UserAuthenticationOperation: ...
    def cancel(self) -> None: ...
    def close(self) -> None: ...
    def get_results(self) -> typing.Optional[UserIdentity]: ...

class UserIdentity(winsdk.system.Object):
    first_name: str
    id: str
    is_beta_account: winsdk.system.Boolean
    is_confirmed_p_c: winsdk.system.Boolean
    last_name: str
    safe_customer_id: str
    sign_in_name: str
    tickets: typing.Optional[winsdk.windows.foundation.collections.IVectorView[OnlineIdServiceTicket]]
    @staticmethod
    def _from(obj: winsdk.system.Object) -> UserIdentity: ...

