HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib/python3/dist-packages/landscape/message_schemas/__pycache__/message.cpython-38.pyc
U

���c��@s0ddlmZmZmZmZmZGdd�de�ZdS)�)�KeyDict�Float�Bytes�Constant�Anycs.eZdZdZd�fdd�	Z�fdd�Z�ZS)�Messagea

    Like L{KeyDict}, but with three predefined keys: C{type}, C{api},
    and C{timestamp}. Of these, C{api} and C{timestamp} are optional.


    @param type: The type of the message. The C{type} key will need to
        match this as a constant.
    @param schema: A dict of additional schema in a format L{KeyDict}
        will accept.
    @param optional: An optional list of keys that should be optional.
    @param api: The server API version needed to send this message,
        if C{None} any version is fine.
    Ncsn||_||_t�|d<tt�td��|d<t|�|d<|dk	rN|�ddg�nddg}tt|�j	||d�dS)NZ	timestamp�api�type)�optional)
r	rrrrr�extend�superr�__init__)�selfr	�schemar
r��	__class__��C/usr/lib/python3/dist-packages/landscape/message_schemas/message.pyr
s
zMessage.__init__cs6t|���D]}||jkr|�|�qtt|��|�S)N)�list�keysr�poprr�coerce)r�value�krrrrs
zMessage.coerce)NN)�__name__�
__module__�__qualname__�__doc__r
r�
__classcell__rrrrrs
rN)Zlandscape.lib.schemarrrrrrrrrr�<module>s