
    i
                     D    S SK JrJr  S SKrS SKJrJrJr   " S S5      rg)    )ListUnionN)rawtypesenumsc                   6    \ rS rSrSSSSS\\S      4S jrS	rg
)
SetPrivacy   selfzpyrogram.Clientkeyzenums.PrivacyKeyrules)ztypes.InputPrivacyRuleAllowAllztypes.InputPrivacyRuleAllowBotsz types.InputPrivacyRuleAllowChatsz'types.InputPrivacyRuleAllowCloseFriendsz#types.InputPrivacyRuleAllowContactsz"types.InputPrivacyRuleAllowPremiumz types.InputPrivacyRuleAllowUsersz!types.InputPrivacyRuleDisallowAllz"types.InputPrivacyRuleDisallowBotsz#types.InputPrivacyRuleDisallowChatsz&types.InputPrivacyRuleDisallowContactsz#types.InputPrivacyRuleDisallowUsersc                   ^ ^^#    T R                  [        R                  R                  R	                  UR                  5       U Vs/ s H  o3R                  T 5      I Sh  vN PM     snS95      I Sh  vN nUR                   Vs0 s H  oUR                  U_M     snmUR                   Vs0 s H  oUR                  U_M     snm[        R                  " UU U4S jUR                   5       5      $  Ns  snf  Ns  snf s  snf 7f)aS  Set account privacy rules.

.. include:: /_includes/usable-by/users.rst

Parameters:
    key (:obj:`~pyrogram.enums.PrivacyKey`):
        Privacy key.

    rules (Iterable of :obj:`~pyrogram.types.InputPrivacyRule`):
        List of privacy rules.

Returns:
    List of :obj:`~pyrogram.types.PrivacyRule`: On success, the list of privacy rules is returned.

Example:
    .. code-block:: python

        from pyrogram import enums, types

        # Prevent everyone from seeing your phone number
        await app.set_privacy(enums.PrivacyKey.PHONE_NUMBER, [types.InputPrivacyRuleDisallowAll()])
N)r   r   c              3   h   >#    U  H'  n[         R                  R                  TUTT5      v   M)     g 7f)N)r   PrivacyRule_parse).0rulechatsr   userss     Q/app/mltbenv/lib/python3.13/site-packages/pyrogram/methods/account/set_privacy.py	<genexpr>)SetPrivacy.set_privacy.<locals>.<genexpr>L   s.     aY`QU%++224ueLLY`s   /2)invoker   	functionsaccountr	   valuewriter   idr   r   r   r   )r   r   r   r   rir   r   s   `     @@r   set_privacySetPrivacy.set_privacy   s     P ++MM!!,,IIK:?@%$ZZ---%@ - 
 
 #$''*'Qq'*"#''*'Qq'*zzaYZY`Y`aaa .@
 +*sT   ADC6 C4!C6)D5C;6DC=D/D/D4C66D=
D N)__name__
__module____qualname____firstlineno__r   r   r!   __static_attributes__r#       r   r	   r	      s6    2b2b2b E2
 2br)   r	   )typingr   r   pyrogramr   r   r   r	   r#   r)   r   <module>r,      s   &   & &3b 3br)   