
    +g                    n   S SK Jr  SSKJrJr  S SKJr  S SKrS SKrSSK	J
r
  SSK	Jr   " S S	\R                  5      r\ " S
 S5      5       r\ " S S5      5       r    SS jr    SS jr      SS jr    SS jr\" S5      \ " S S5      5       5       r\" S5      \ " S S5      5       5       rg)    )annotations   )event_classT_JSON_DICT)	dataclassN)network)service_workerc                  F    \ rS rSrSrSrSrSrSrSr	Sr
S	 r\S
 5       rSrg)ServiceName   z
The Background Service that will be associated with the commands/events.
Every Background Service operates independently, but they share the same
API.
backgroundFetchbackgroundSyncpushMessagingnotificationspaymentHandlerperiodicBackgroundSyncc                    U R                   $ N)value)selfs    ځ/Users/Alptekin/Desktop/izin_takip/venv/lib/python3.13/site-packages/selenium/webdriver/common/devtools/v85/background_service.pyto_jsonServiceName.to_json   s    zz    c                    U " U5      $ r    clsjsons     r   	from_jsonServiceName.from_json    s    4yr   r   N)__name__
__module____qualname____firstlineno____doc__BACKGROUND_FETCHBACKGROUND_SYNCPUSH_MESSAGINGNOTIFICATIONSPAYMENT_HANDLERPERIODIC_BACKGROUND_SYNCr   classmethodr    __static_attributes__r   r   r   r   r      sB    
 )&O$N#M&O7  r   r   c                  D    \ rS rSr% SrS\S'   S\S'   S r\S 5       rSr	g	)
EventMetadata%   zB
A key-value pair for additional event information to pass along.
strkeyr   c                V    [        5       nU R                  US'   U R                  US'   U$ )Nr3   r   )dictr3   r   )r   r   s     r   r   EventMetadata.to_json.   s(    vhhU

Wr   c                @    U " [        US   5      [        US   5      S9$ )Nr3   r   )r3   r   )r2   r   s     r   r    EventMetadata.from_json4   s'    DK d7m$
 	
r   r   N)
r"   r#   r$   r%   r&   __annotations__r   r-   r    r.   r   r   r   r0   r0   %   s,     
HJ 
 
r   r0   c                  r    \ rS rSr% S\S'   S\S'   S\S'   S\S	'   S\S
'   S\S'   S\S'   S r\S 5       rSrg)BackgroundServiceEvent<   znetwork.TimeSinceEpoch	timestampr2   originzservice_worker.RegistrationIDservice_worker_registration_idr   service
event_nameinstance_idztyping.List[EventMetadata]event_metadatac                   [        5       nU R                  R                  5       US'   U R                  US'   U R                  R                  5       US'   U R
                  R                  5       US'   U R                  US'   U R                  US'   U R                   Vs/ s H  o"R                  5       PM     snUS'   U$ s  snf )Nr=   r>   serviceWorkerRegistrationIdr@   	eventName
instanceIdeventMetadata)	r5   r=   r   r>   r?   r@   rA   rB   rC   )r   r   is      r   r   BackgroundServiceEvent.to_jsonS   s    v NN224[X.2.Q.Q.Y.Y.[*+,,..0Y OO[!--\6:6I6I J6I6I J_ !Ks   B>c                f   U " [         R                  R                  US   5      [        US   5      [        R
                  R                  US   5      [        R                  US   5      [        US   5      [        US   5      US    Vs/ s H  n[        R                  U5      PM     snS9$ s  snf )	Nr=   r>   rE   r@   rF   rG   rH   )r=   r>   r?   r@   rA   rB   rC   )r   TimeSinceEpochr    r2   r	   RegistrationIDr   r0   )r   r   rI   s      r   r     BackgroundServiceEvent.from_json^   s    ,,66tK7HItH~&+9+H+H+R+RSWXuSv+w))$y/:4,-D./@D_@UV@U1M33A6@UV
 	
 Ws   
B.r   N)	r"   r#   r$   r%   r9   r   r-   r    r.   r   r   r   r;   r;   <   sR     &% K %BA  O  /.	 	
 	
r   r;   c              #  X   #    [        5       nU R                  5       US'   SUS.nUv ng7f)z9
Enables event updates for the service.

:param service:
r@   z BackgroundService.startObservingmethodparamsNr5   r   r@   rR   cmd_dictr   s       r   start_observingrV   k   s5      &F)F94H >D   (*c              #  X   #    [        5       nU R                  5       US'   SUS.nUv ng7f)z:
Disables event updates for the service.

:param service:
r@   zBackgroundService.stopObservingrP   NrS   rT   s       r   stop_observingrY   |   s5      &F)F93H >DrW   c              #  `   #    [        5       nXS'   UR                  5       US'   SUS.nUv ng7f)zQ
Set the recording state for the service.

:param should_record:
:param service:
shouldRecordr@   zBackgroundService.setRecordingrP   NrS   )should_recordr@   rR   rU   r   s        r   set_recordingr]      s=      &F*>)F92H >Ds   ,.c              #  X   #    [        5       nU R                  5       US'   SUS.nUv ng7f)z:
Clears all stored data for the service.

:param service:
r@   zBackgroundService.clearEventsrP   NrS   rT   s       r   clear_eventsr_      s5      &F)F91H >DrW   z'BackgroundService.recordingStateChangedc                  B    \ rS rSr% SrS\S'   S\S'   \S
S j5       rSrg	)RecordingStateChanged   zC
Called when the recording state for the service has been updated.
boolis_recordingr   r@   c                T    U " [        US   5      [        R                  US   5      S9$ )NisRecordingr@   )rd   r@   )rc   r   r    r   s     r   r    RecordingStateChanged.from_json   s.    d=12))$y/:
 	
r   r   N)r   r   returnra   	r"   r#   r$   r%   r&   r9   r-   r    r.   r   r   r   ra   ra      s'     
 
r   ra   z0BackgroundService.backgroundServiceEventReceivedc                  8    \ rS rSr% SrS\S'   \SS j5       rSrg)	BackgroundServiceEventReceived   zx
Called with all existing backgroundServiceEvents when enabled, and all new
events afterwards if enabled and recording.
r;   background_service_eventc                :    U " [         R                  US   5      S9$ )NbackgroundServiceEvent)rm   )r;   r    r   s     r   r    (BackgroundServiceEventReceived.from_json   s#    %;%E%EdKcFd%e
 	
r   r   N)r   r   rh   rk   ri   r   r   r   rk   rk      s!     54
 
r   rk   )r@   r   rh   0typing.Generator[T_JSON_DICT, T_JSON_DICT, None])r\   rc   r@   r   rh   rq   )
__future__r   utilr   r   dataclassesr   enumtyping r   r	   Enumr   r0   r;   rV   rY   r]   r_   ra   rk   r   r   r   <module>ry      s   # * !    $)) * 
 
 
, +
 +
 +
\	7"	7" 
8(	7" 67

 
  8
 ?@

 
  A
r   