Ë
    èlÖiæ  ã                   ó’   — d dl mZmZmZ d dlmZ d dlmZ d dlm	Z	 d dl
mZ d dl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)é    )ÚDictÚOptionalÚList)ÚJsonEncoderFunction)ÚEvent)ÚSelfDescribing)ÚSelfDescribingJson)ÚMOBILE_SCHEMA_PATHÚ
SCHEMA_TAG)Úpayload)ÚSubject)Únon_empty_stringc                   ó¼  ‡ — e Zd ZdZ	 	 	 	 	 	 	 	 d#dededee   dee   dee   dee   d	ee   d
ee   deee      dee	   ddfˆ fd„Z
edefd„«       Zej                  defd„«       Zed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   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   fd„«       Zej                  dee   fd„«       Z	 d$dedee   d ee   dd!fd"„Zˆ xZS )%Ú
ScreenViewzÄ
    Constructs a ScreenView event object.

    When tracked, generates a SelfDescribing event (event type "ue").

    Schema: `iglu:com.snowplowanalytics.mobile/screen_view/jsonschema/1-0-0`
    NÚid_ÚnameÚtypeÚprevious_nameÚprevious_idÚprevious_typeÚtransition_typeÚevent_subjectÚcontextÚtrue_timestampÚreturnc                 ó¢   •— t         t        | �  ||	|
¬«       i | _        || _        || _        || _        || _        || _        || _	        || _
        y)a¶  
        :param  id_:            Screen view ID. This must be of type UUID.
        :type   id_:            string
        :param  name:           The name of the screen view event
        :type   name:           string
        :param  type:           The type of screen that was viewed e.g feed / carousel.
        :type   type:           string | None
        :param  previous_name:  The name of the previous screen.
        :type   previous_name:  string | None
        :param  previous_id:    The screenview ID of the previous screenview.
        :type   previous_id:    string | None
        :param  previous_type   The screen type of the previous screenview
        :type   previous_type   string | None
        :param  transition_type The type of transition that led to the screen being viewed.
        :type   transition_type string | 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   N)Úsuperr   Ú__init__Úscreen_view_propertiesr   r   r   r   r   r   r   )Úselfr   r   r   r   r   r   r   r   r   r   Ú	__class__s              €úh/var/www/html/strategist-ai/venv_dbt/lib/python3.12/site-packages/snowplow_tracker/events/screen_view.pyr   zScreenView.__init__)   s`   ø€ ôF 	Œj˜$Ñ(Ø'°Èð 	)ô 	
ð 79ˆÔ#ØˆŒØˆŒ	ØˆŒ	Ø*ˆÔØ&ˆÔØ*ˆÔØ.ˆÕó    c                 ó    — | j                   d   S )z<
        Screen view ID. This must be of type UUID.
        Úid©r   ©r    s    r"   r   zScreenView.id_X   s   € ð
 ×*Ñ*¨4Ñ0Ð0r#   Úvaluec                 ó8   — t        |«       || j                  d<   y )Nr%   ©r   r   ©r    r(   s     r"   r   zScreenView.id__   s   € ä˜ÔØ,1ˆ×#Ñ# DÒ)r#   c                 ó    — | j                   d   S )z3
        The name of the screen view event
        r   r&   r'   s    r"   r   zScreenView.named   ó   € ð
 ×*Ñ*¨6Ñ2Ð2r#   c                 ó8   — t        |«       || j                  d<   y )Nr   r*   r+   s     r"   r   zScreenView.namek   s   € ä˜ÔØ.3ˆ×#Ñ# FÒ+r#   c                 ó    — | j                   d   S )zH
        The type of screen that was viewed e.g feed / carousel
        r   r&   r'   s    r"   r   zScreenView.typep   r-   r#   c                 ó(   — |�|| j                   d<   y y )Nr   r&   r+   s     r"   r   zScreenView.typew   s   € àÐØ27ˆD×'Ñ'¨Ò/ð r#   c                 ó    — | j                   d   S )z2
        The name of the previous screen.
        ÚpreviousNamer&   r'   s    r"   r   zScreenView.previous_name|   ó   € ð
 ×*Ñ*¨>Ñ:Ð:r#   c                 ó(   — |�|| j                   d<   y y )Nr2   r&   r+   s     r"   r   zScreenView.previous_nameƒ   ó   € àÐØ:?ˆD×'Ñ'¨Ò7ð r#   c                 ó    — | j                   d   S )z?
        The screenview ID of the previous screenview.
        Ú
previousIdr&   r'   s    r"   r   zScreenView.previous_idˆ   s   € ð
 ×*Ñ*¨<Ñ8Ð8r#   c                 ó(   — |�|| j                   d<   y y )Nr7   r&   r+   s     r"   r   zScreenView.previous_id�   s   € àÐØ8=ˆD×'Ñ'¨Ò5ð r#   c                 ó    — | j                   d   S )z<
        The screen type of the previous screenview
        ÚpreviousTyper&   r'   s    r"   r   zScreenView.previous_type”   r3   r#   c                 ó(   — |�|| j                   d<   y y )Nr:   r&   r+   s     r"   r   zScreenView.previous_type›   r5   r#   c                 ó    — | j                   d   S )zL
        The type of transition that led to the screen being viewed
        ÚtransitionTyper&   r'   s    r"   r   zScreenView.transition_type    s   € ð
 ×*Ñ*Ð+;Ñ<Ð<r#   c                 ó(   — |�|| j                   d<   y y )Nr=   r&   r+   s     r"   r   zScreenView.transition_type§   s   € àÐØ<AˆD×'Ñ'Ð(8Ò9ð r#   Úencode_base64Újson_encoderÚsubjectzpayload.Payloadc                 óÌ   — t        t        ›dt        ›d�| j                  «      }t	        || j
                  | j                  | j                  ¬«      }|j                  |||¬«      S )a¹  
        :param encode_base64:    Whether JSONs in the payload should be base-64 encoded
        :type  encode_base64:    bool
        :param json_encoder:     Custom JSON serializer that gets called on non-serializable object
        :type  json_encoder:     function | None
        :param  subject:         Optional per event subject
        :type   subject:         subject | None
        :rtype:                  payload.Payload
        z/screen_view/z/1-0-0)Ú
event_jsonr   r   r   )rA   )	r	   r
   r   r   r   r   r   r   Úbuild_payload)r    r?   r@   rA   rC   Úself_describings         r"   rD   zScreenView.build_payload¬   sh   € ô (Þ);¾ZÐHØ×'Ñ'ó
ˆ
ô )Ø!Ø×,Ñ,Ø—L‘LØ×.Ñ.ô	
ˆð ×,Ñ,Ø˜<°ð -ó 
ð 	
r#   )NNNNNNNN)N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ústrr   r   r   r	   Úfloatr   Úpropertyr   Úsetterr   r   r   r   r   r   Úboolr   rD   Ú__classcell__)r!   s   @r"   r   r       sÆ  ø„ ñð #Ø'+Ø%)Ø'+Ø)-Ø+/Ø6:Ø*.ñ-/àð-/ð ð-/ð �s‰mð	-/ð
   ‘}ð-/ð ˜c‘]ð-/ð   ‘}ð-/ð " #™ð-/ð   Ñ(ð-/ð ˜$Ð1Ñ2Ñ3ð-/ð ! ™ð-/ð 
õ-/ð^ ð1�Sò 1ó ð1ð 	‡Z�Zð2˜ò 2ó ð2ð ð3�cò 3ó ð3ð 
‡[�[ð4˜#ò 4ó ð4ð ð3�h˜s‘mò 3ó ð3ð 
‡[�[ð8˜( 3™-ò 8ó ð8ð ð;˜x¨™}ò ;ó ð;ð ×Ñð@ 8¨C¡=ò @ó ð@ð ð9˜X c™]ò 9ó ð9ð ×Ñð> ¨#¡ò >ó ð>ð ð;˜x¨™}ò ;ó ð;ð ×Ñð@ 8¨C¡=ò @ó ð@ð ð= ¨#¡ò =ó ð=ð ×ÑðB X¨c¡]ò Bó ðBð &*ñ	
àð
ð Ð2Ñ3ð
ð ˜'Ñ"ð	
ð
 
÷
r#   r   N)Útypingr   r   r   Úsnowplow_tracker.typingr   Úsnowplow_tracker.events.eventr   Ú'snowplow_tracker.events.self_describingr   Úsnowplow_trackerr	   Úsnowplow_tracker.constantsr
   r   r   Úsnowplow_tracker.subjectr   Úsnowplow_tracker.contractsr   r   © r#   r"   ú<module>rY      s7   ð÷$ (Ñ 'Ý 7Ý /Ý BÝ /÷õ %Ý ,Ý 7ôg
�õ g
r#   