Ë
    Ìi’  ã                   ó^   — d dl mZ d dlmZmZmZ d dlmZ d dlm	Z	 d dl
mZ  G d„ de«      Zy)	é    )ÚEvent)ÚOptionalÚListÚUnion)ÚSubject)ÚSelfDescribingJson)Únon_empty_stringc                   ó  ‡ — e Zd ZdZ	 	 	 	 	 	 ddededee   dee   deeeef      dee	   d	ee
e      d
ee   ddfˆ fd„Zedee   fd„«       Zej                  defd„«       Zedee   fd„«       Zej                  defd„«       Zedee   fd„«       Zej                  dee   fd„«       Zedee   fd„«       Zej                  dee   fd„«       Zedeeeef      fd„«       Zej                  deeeef      fd„«       Zˆ xZS )ÚStructuredEventaÔ  
    Constructs a Structured event object.

    This event type is provided to be roughly equivalent to Google Analytics-style events.
    Note that it is not automatically clear what data should be placed in what field.
    To aid data quality and modeling, agree on business-wide definitions when designing
    your tracking strategy.

    We recommend using SelfDescribing - fully custom - events instead.

    When tracked, generates a "struct" or "se" event.
    NÚcategoryÚactionÚlabelÚ	property_ÚvalueÚevent_subjectÚcontextÚtrue_timestampÚreturnc	                 ó°   •— t         t        | �  |||¬«       | j                  j	                  dd«       || _        || _        || _        || _        || _	        y)a  
        :param  category:       Category of the event
        :type   category:       non_empty_string
        :param  action:         The event itself
        :type   action:         non_empty_string
        :param  label:          Refer to the object the action is
                                performed on
        :type   label:          string_or_none
        :param  property_:      Property associated with either the action
                                or the object
        :type   property_:      string_or_none
        :param  value:          A value associated with the user action
        :type   value:          int | float | None
        :param  event_subject:   Optional per event subject
        :type   event_subject:   subject | None
        :param  context:         Custom context for the event
        :type   context:         context_array | None
        :param  true_timestamp:          Optional event timestamp in milliseconds
        :type   true_timestamp:          int | float | None
        )r   r   r   ÚeÚseN)
Úsuperr   Ú__init__ÚpayloadÚaddr   r   r   r   r   )
Úselfr   r   r   r   r   r   r   r   Ú	__class__s
            €úi/var/www/html/strategist-ai/venv/lib/python3.12/site-packages/snowplow_tracker/events/structured_event.pyr   zStructuredEvent.__init__&   sY   ø€ ô> 	Œo˜tÑ-Ø'°Èð 	.ô 	
ð 	�‰×Ñ˜˜dÔ#Ø ˆŒØˆŒØˆŒ
Ø"ˆŒØˆ�
ó    c                 óL   — | j                   j                  j                  d«      S )z'
        Category of the event
        Úse_ca©r   Únv_pairsÚget©r   s    r   r   zStructuredEvent.categoryO   ó   € ð
 �|‰|×$Ñ$×(Ñ(¨Ó1Ð1r   c                 óR   — t        |«       | j                  j                  d|«       y )Nr!   ©r	   r   r   ©r   r   s     r   r   zStructuredEvent.categoryV   ó   € ä˜ÔØ�‰×Ñ˜ %Õ(r   c                 óL   — | j                   j                  j                  d«      S )z"
        The event itself
        Úse_acr"   r%   s    r   r   zStructuredEvent.action[   r&   r   c                 óR   — t        |«       | j                  j                  d|«       y )Nr,   r(   r)   s     r   r   zStructuredEvent.actionb   r*   r   c                 óL   — | j                   j                  j                  d«      S )z@
        Refer to the object the action is performed on
        Úse_lar"   r%   s    r   r   zStructuredEvent.labelg   r&   r   c                 ó<   — | j                   j                  d|«       y )Nr/   ©r   r   r)   s     r   r   zStructuredEvent.labeln   ó   € à�‰×Ñ˜ %Õ(r   c                 óL   — | j                   j                  j                  d«      S )zJ
        Property associated with either the action or the object
        Úse_prr"   r%   s    r   r   zStructuredEvent.property_r   r&   r   c                 ó<   — | j                   j                  d|«       y )Nr4   r1   r)   s     r   r   zStructuredEvent.property_y   r2   r   c                 óL   — | j                   j                  j                  d«      S )z9
        A value associated with the user action
        Úse_var"   r%   s    r   r   zStructuredEvent.value}   r&   r   c                 ó<   — | j                   j                  d|«       y )Nr7   r1   r)   s     r   r   zStructuredEvent.value„   r2   r   )NNNNNN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ústrr   r   ÚintÚfloatr   r   r   r   Úpropertyr   Úsetterr   r   r   r   Ú__classcell__)r   s   @r   r   r      sü  ø„ ñð"  $Ø#'Ø-1Ø+/Ø6:Ø*.ñ'àð'ð ð'ð ˜‰}ð	'ð
 ˜C‘=ð'ð ˜˜c 5˜jÑ)Ñ*ð'ð   Ñ(ð'ð ˜$Ð1Ñ2Ñ3ð'ð ! ™ð'ð 
õ'ðR ð2˜( 3™-ò 2ó ð2ð ‡_�_ð)˜cò )ó ð)ð ð2˜ ™ò 2ó ð2ð ‡]�]ð)˜Cò )ó ð)ð ð2�x ‘}ò 2ó ð2ð ‡\�\ð)˜8 C™=ò )ó ð)ð ð2˜8 C™=ò 2ó ð2ð ×Ñð)˜x¨™}ò )ó ð)ð ð2�x  c¨5 jÑ 1Ñ2ò 2ó ð2ð ‡\�\ð)˜8 E¨#¨u¨*Ñ$5Ñ6ò )ó ô)r   r   N)Úsnowplow_tracker.events.eventr   Útypingr   r   r   Úsnowplow_tracker.subjectr   Ú%snowplow_tracker.self_describing_jsonr   Úsnowplow_tracker.contractsr	   r   © r   r   ú<module>rI      s'   ðõ" 0ß (Ñ (Ý ,Ý DÝ 7ôn)�eõ n)r   