HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
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