HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux ip-10-0-8-47 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:31:58 UTC 2024 aarch64
User: ubuntu (1000)
PHP: 8.1.2-1ubuntu2.22
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/landscape/message_schemas/__pycache__/message.cpython-310.pyc
o

y)�]��@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<|dur'|�ddg�nddg}tt|�j	||d�dS)N�	timestamp�api�type)�optional)
r
r	rrrr�extend�superr�__init__)�selfr
�schemarr	��	__class__��C/usr/lib/python3/dist-packages/landscape/message_schemas/message.pyrs
zMessage.__init__cs6t|���D]}||jvr|�|�qtt|��|�S)N)�list�keysr�popr
r�coerce)r�value�krrrrs


�zMessage.coerce)NN)�__name__�
__module__�__qualname__�__doc__rr�
__classcell__rrrrrs
rN)�landscape.lib.schemarrrrrrrrrr�<module>s