
    g                    f
   d dl mZ ddlmZmZ d dlmZ d dlZd dlZddl	m
Z
 ddl	mZ ddl	mZ  G d	 d
e      Z G d dej                        Ze G d d             Ze G d d             Z G d de      Z G d dej                        Z G d dej                        Z G d dej                        Z G d dej                        Ze G d d             Ze G d d             Ze G d d              Ze G d! d"             Ze G d# d$             Z G d% d&ej                        Ze G d' d(             Ze G d) d*             Z G d+ d,ej                        Z  G d- d.e      Z! G d/ d0e      Z" G d1 d2e      Z#e G d3 d4             Z$e G d5 d6             Z%e G d7 d8             Z&e G d9 d:             Z'e G d; d<             Z(e G d= d>             Z) G d? d@ej                        Z*e G dA dB             Z+e G dC dD             Z,e G dE dF             Z- G dG dHej                        Z. G dI dJej                        Z/e G dK dL             Z0e G dM dN             Z1e G dO dP             Z2e G dQ dR             Z3e G dS dT             Z4e G dU dV             Z5 G dW dXej                        Z6 G dY dZej                        Z7e G d[ d\             Z8	 	 	 	 dd]Z9	 	 	 	 	 	 dd^Z:	 	 	 	 	 	 dd_Z;	 d	 	 	 dd`Z<	 d	 	 	 	 	 ddaZ=	 d	 	 	 ddbZ>	 	 	 	 ddcZ?	 d	 	 	 	 	 dddZ@	 	 	 	 ddeZA	 	 	 	 ddfZB	 	 	 	 ddgZC	 	 	 	 ddhZD	 	 	 	 ddiZE	 	 	 	 ddjZF	 	 	 	 ddkZG	 	 	 	 ddlZHddmZI	 	 	 	 ddnZJ	 	 	 	 	 	 ddoZK	 	 	 	 ddpZL	 	 	 	 ddqZM	 	 	 	 ddrZN	 	 	 	 ddsZO	 d	 	 	 	 	 	 	 	 	 ddtZP	 	 	 	 	 	 dduZQ	 	 	 	 ddvZR	 	 	 	 ddwZS	 	 	 	 ddxZT	 	 	 	 	 	 ddyZU	 	 	 	 ddzZVdd{ZW	 	 	 	 dd|ZX	 	 	 	 dd}ZYdd~ZZddZ[ ed      e G d d                    Z\ ed      e G d d                    Z] ed      e G d d                    Z^ ed      e G d d                    Z_ ed      e G d d                    Z` ed      e G d d                    Za ed      e G d d                    Zb ed      e G d d                    Zc ed      e G d d                    Zd ed      e G d d                    Ze ed      e G d d                    Zf ed      e G d d                    Zgy)    )annotations   )event_classT_JSON_DICT)	dataclassN)browser)network)pagec                  8     e Zd ZddZedd       Z fdZ xZS )SerializedStorageKeyc                    | S N selfs    b/var/www/html/venv/lib/python3.12/site-packages/selenium/webdriver/common/devtools/v129/storage.pyto_jsonzSerializedStorageKey.to_json           c                     | |      S r   r   clsjsons     r   	from_jsonzSerializedStorageKey.from_json       4yr   c                >    dj                  t        | 	               S )NzSerializedStorageKey({})formatsuper__repr__r   	__class__s    r   r    zSerializedStorageKey.__repr__   s    )001A1CDDr   returnstr)r   r%   r$   r   __name__
__module____qualname__r   classmethodr   r    __classcell__r"   s   @r   r   r      s(      E Er   r   c                  ^    e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZdZdZdZdZd Zed        Zy)StorageTypez)
    Enum of possible storage types.
    appcachecookiesfile_systems	indexeddblocal_storageshader_cachewebsqlservice_workerscache_storageinterest_groupsshared_storagestorage_bucketsallotherc                    | j                   S r   valuer   s    r   r   zStorageType.to_json0       zzr   c                     | |      S r   r   r   s     r   r   zStorageType.from_json3   r   r   N)r'   r(   r)   __doc__APPCACHECOOKIESFILE_SYSTEMS	INDEXEDDBLOCAL_STORAGESHADER_CACHEWEBSQLSERVICE_WORKERSCACHE_STORAGEINTEREST_GROUPSSHARED_STORAGESTORAGE_BUCKETSALL_OTHERr   r*   r   r   r   r   r.   r.      sh     HG!LI#M!LF'O#M'O%N'ODE  r   r.   c                  <    e Zd ZU dZded<   ded<   d Zed        Zy)	UsageForTypez#
    Usage for a storage type.
    r.   storage_typefloatusagec                r    t               }| j                  j                         |d<   | j                  |d<   |S )NstorageTyperU   )dictrS   r   rU   r   r   s     r   r   zUsageForType.to_jsonC   s4    v"//779]

Wr   c                Z     | t         j                  |d         t        |d               S )NrW   rU   )rS   rU   )r.   r   rT   r   s     r   r   zUsageForType.from_jsonI   s.    $..tM/BCW&
 	
r   Nr'   r(   r)   rB   __annotations__r   r*   r   r   r   r   rR   rR   8   s/      L 
 
r   rR   c                  <    e Zd ZU dZded<   ded<   d Zed        Zy)	TrustTokenszq
    Pair of issuer origin and number of available (signed, but not used) Trust
    Tokens from that issuer.
    r%   issuer_originrT   countc                V    t               }| j                  |d<   | j                  |d<   |S )NissuerOriginr`   )rX   r_   r`   rY   s     r   r   zTrustTokens.to_json[   s+    v#11^

Wr   c                F     | t        |d         t        |d               S )Nrb   r`   )r_   r`   )r%   rT   r   s     r   r   zTrustTokens.from_jsona   s(    d>23W&
 	
r   Nr[   r   r   r   r^   r^   Q   s-     L 
 
r   r^   c                  <     e Zd ZdZddZedd       Z fdZ xZS )InterestGroupAuctionIdz?
    Protected audience interest group auction identifier.
    c                    | S r   r   r   s    r   r   zInterestGroupAuctionId.to_jsonm   r   r   c                     | |      S r   r   r   s     r   r   z InterestGroupAuctionId.from_jsonp   r   r   c                >    dj                  t        | 	               S )NzInterestGroupAuctionId({})r   r!   s    r   r    zInterestGroupAuctionId.__repr__t       +22573C3EFFr   r#   )r   r%   r$   re   )	r'   r(   r)   rB   r   r*   r   r    r+   r,   s   @r   re   re   i   s-      G Gr   re   c                  R    e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZdZd Zed        Zy)InterestGroupAccessTypez.
    Enum of interest group access types.
    joinleaveupdateloadedbidwinadditionalBidadditionalBidWintopLevelBidtopLevelAdditionalBidclearc                    | j                   S r   r>   r   s    r   r   zInterestGroupAccessType.to_json   r@   r   c                     | |      S r   r   r   s     r   r   z!InterestGroupAccessType.from_json   r   r   N)r'   r(   r)   rB   JOINLEAVEUPDATELOADEDBIDWINADDITIONAL_BIDADDITIONAL_BID_WINTOP_LEVEL_BIDTOP_LEVEL_ADDITIONAL_BIDCLEARr   r*   r   r   r   r   rk   rk   x   s[     DEFF
C
C$N+!M6E  r   rk   c                  .    e Zd ZdZdZdZd Zed        Zy)InterestGroupAuctionEventTypez!
    Enum of auction events.
    startedconfigResolvedc                    | j                   S r   r>   r   s    r   r   z%InterestGroupAuctionEventType.to_json   r@   r   c                     | |      S r   r   r   s     r   r   z'InterestGroupAuctionEventType.from_json   r   r   N)	r'   r(   r)   rB   STARTEDCONFIG_RESOLVEDr   r*   r   r   r   r   r   r      s,     G&O  r   r   c                  :    e Zd ZdZdZdZdZdZdZd Z	e
d        Zy	)
InterestGroupAuctionFetchTypez2
    Enum of network fetches auctions can do.
    bidderJs
bidderWasmsellerJsbidderTrustedSignalssellerTrustedSignalsc                    | j                   S r   r>   r   s    r   r   z%InterestGroupAuctionFetchType.to_json   r@   r   c                     | |      S r   r   r   s     r   r   z'InterestGroupAuctionFetchType.from_json   r   r   N)r'   r(   r)   rB   	BIDDER_JSBIDDER_WASM	SELLER_JSBIDDER_TRUSTED_SIGNALSSELLER_TRUSTED_SIGNALSr   r*   r   r   r   r   r   r      s=     IKI33  r   r   c                  z    e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZdZdZdZdZdZdZdZdZdZdZdZd Zed        Zy)SharedStorageAccessTypez.
    Enum of shared storage access types.
    documentAddModuledocumentSelectURLdocumentRundocumentSetdocumentAppenddocumentDeletedocumentCleardocumentGet
workletSetworkletAppendworkletDeleteworkletClear
workletGetworkletKeysworkletEntriesworkletLengthworkletRemainingBudget	headerSetheaderAppendheaderDeleteheaderClearc                    | j                   S r   r>   r   s    r   r   zSharedStorageAccessType.to_json   r@   r   c                     | |      S r   r   r   s     r   r   z!SharedStorageAccessType.from_json   r   r   N)r'   r(   r)   rB   DOCUMENT_ADD_MODULEDOCUMENT_SELECT_URLDOCUMENT_RUNDOCUMENT_SETDOCUMENT_APPENDDOCUMENT_DELETEDOCUMENT_CLEARDOCUMENT_GETWORKLET_SETWORKLET_APPENDWORKLET_DELETEWORKLET_CLEARWORKLET_GETWORKLET_KEYSWORKLET_ENTRIESWORKLET_LENGTHWORKLET_REMAINING_BUDGET
HEADER_SETHEADER_APPENDHEADER_DELETEHEADER_CLEARr   r*   r   r   r   r   r   r      s     .- L L&O&O$N LK$N$N"MK L&O$N7J"M"M L  r   r   c                  <    e Zd ZU dZded<   ded<   d Zed        Zy)SharedStorageEntryzK
    Struct for a single key-value pair in an origin's shared storage.
    r%   keyr?   c                V    t               }| j                  |d<   | j                  |d<   |S Nr   r?   )rX   r   r?   rY   s     r   r   zSharedStorageEntry.to_json   s(    vhhU

Wr   c                F     | t        |d         t        |d               S Nr   r?   )r   r?   r%   r   s     r   r   zSharedStorageEntry.from_json   s'    DK d7m$
 	
r   Nr[   r   r   r   r   r      s,     
HJ 
 
r   r   c                  P    e Zd ZU dZded<   ded<   ded<   ded<   d	 Zed
        Zy)SharedStorageMetadataz1
    Details for an origin's shared storage.
    network.TimeSinceEpochcreation_timeintlengthrT   remaining_budget
bytes_usedc                    t               }| j                  j                         |d<   | j                  |d<   | j                  |d<   | j
                  |d<   |S )NcreationTimer   remainingBudget	bytesUsed)rX   r   r   r   r   r   rY   s     r   r   zSharedStorageMetadata.to_json   sS    v#1199;^X"&"7"7 OO[r   c           	          | t         j                  j                  |d         t        |d         t	        |d         t        |d               S )Nr   r   r   r   )r   r   r   r   )r	   TimeSinceEpochr   r   rT   r   s     r   r   zSharedStorageMetadata.from_json  sO    !00::4;OPtH~&"4(9#:;4,-	
 	
r   Nr[   r   r   r   r   r      s>     *) K  O 
 
r   r   c                  <    e Zd ZU dZded<   ded<   d Zed        Zy)SharedStorageReportingMetadatazU
    Pair of reporting metadata details for a candidate URL for ``selectURL()``.
    r%   
event_typereporting_urlc                V    t               }| j                  |d<   | j                  |d<   |S )N	eventTypereportingUrl)rX   r   r   rY   s     r   r   z&SharedStorageReportingMetadata.to_json  s,    v OO[#11^r   c                F     | t        |d         t        |d               S )Nr   r   )r   r   r   r   s     r   r   z(SharedStorageReportingMetadata.from_json  s)    4,-d>23
 	
r   Nr[   r   r   r   r   r     s-     O 
 
r   r   c                  <    e Zd ZU dZded<   ded<   d Zed        Zy)	SharedStorageUrlWithMetadataz>
    Bundles a candidate URL with its reporting metadata.
    r%   urlz+typing.List[SharedStorageReportingMetadata]reporting_metadatac                    t               }| j                  |d<   | j                  D cg c]  }|j                          c}|d<   |S c c}w )Nr   reportingMetadata)rX   r   r   r   r   r   is      r   r   z$SharedStorageUrlWithMetadata.to_json0  sC    vhhU:>:Q:Q$RQQYY[$R ! %Ss   Ac           	          | t        |d         |d   D cg c]  }t        j                  |       c}      S c c}w )Nr   r   )r   r   )r%   r   r   r   r   r   s      r   r   z&SharedStorageUrlWithMetadata.from_json6  s?    DK UYZmUnoPQ > H H Ko
 	
os   ;
Nr[   r   r   r   r   r   %  s0     
H DC 
 
r   r   c                      e Zd ZU dZdZded<   dZded<   dZded<   dZded<   dZ	ded	<   dZ
ded
<   dZded<   d Zed        Zy)SharedStorageAccessParamsz
    Bundles the parameters for shared storage access events whose
    presence/absence can vary according to SharedStorageAccessType.
    Ntyping.Optional[str]script_source_urloperation_nameserialized_dataz:typing.Optional[typing.List[SharedStorageUrlWithMetadata]]urls_with_metadatar   r?   typing.Optional[bool]ignore_if_presentc                   t               }| j                  | j                  |d<   | j                  | j                  |d<   | j                  | j                  |d<   | j                  +| j                  D cg c]  }|j                          c}|d<   | j                  | j                  |d<   | j                  | j                  |d<   | j                  | j                  |d<   |S c c}w )NscriptSourceUrloperationNameserializedDataurlsWithMetadatar   r?   ignoreIfPresent)	rX   r   r   r   r   r   r   r?   r   r   s      r   r   z!SharedStorageAccessParams.to_jsonr  s    v!!-&*&<&<D"#*$($7$7D!+%)%9%9D!""".=A=T=T'U		'UD#$88((DK::! JJDM!!-&*&<&<D"# (Vs   6C&c                `    | d|v rt        |d         nd d|v rt        |d         nd d|v rt        |d         nd d|v r&|d   D cg c]  }t        j                  |       c}nd d|v rt        |d         nd d|v rt        |d         nd d|v rt        |d               S d       S c c}w )	Nr   r   r   r   r   r?   r   )r   r   r   r   r   r?   r   )r%   r   r   boolr   s      r   r   z#SharedStorageAccessParams.from_json  s    >OSW>Wc$'8"9:]a9HD9P3tO45VZ;Kt;SC%5 67Y] qC  GK  qKSWXjSkla < F Fq Il  QU$)TMDK t(/4#d7m$T?PTX?Xd4(9#:;
 	
 _c
 	
  ms   B+)r'   r(   r)   rB   r   r\   r   r   r   r   r?   r   r   r*   r   r   r   r   r   r   >  s     /3+2
 ,0N(/
 -1O)0 VZRY !%C	$ #'E& 04,3$ 	
 	
r   r   c                  *    e Zd ZdZdZd Zed        Zy)StorageBucketsDurabilityrelaxedstrictc                    | j                   S r   r>   r   s    r   r   z StorageBucketsDurability.to_json  r@   r   c                     | |      S r   r   r   s     r   r   z"StorageBucketsDurability.from_json  r   r   N)r'   r(   r)   RELAXEDSTRICTr   r*   r   r   r   r   r  r    s%    GF  r   r  c                  <    e Zd ZU ded<   dZded<   d Zed        Zy)StorageBucketr   storage_keyNr   namec                    t               }| j                  j                         |d<   | j                  | j                  |d<   |S )N
storageKeyr  )rX   r  r   r  rY   s     r   r   zStorageBucket.to_json  s>    v!--557\99 99DLr   c                p     | t         j                  |d         d|v rt        |d               S d       S )Nr  r  )r  r  )r   r   r%   r   s     r   r   zStorageBucket.from_json  sA    ,66tL7IJ&,nT&\"
 	
:>
 	
r   )r'   r(   r)   r\   r  r   r*   r   r   r   r   r
  r
    s.    %% "&D
% 
 
r   r
  c                  `    e Zd ZU ded<   ded<   ded<   ded<   d	ed
<   ded<   d Zed        Zy)StorageBucketInfor
  bucketr%   id_r   
expirationrT   quotar   
persistentr  
durabilityc                "   t               }| j                  j                         |d<   | j                  |d<   | j                  j                         |d<   | j
                  |d<   | j                  |d<   | j                  j                         |d<   |S )Nr  idr  r  r  r  )rX   r  r   r  r  r  r  r  rY   s     r   r   zStorageBucketInfo.to_json  sz    v,,.XXXT
!__446\

W!__\!__446\r   c                     | t         j                  |d         t        |d         t        j                  j                  |d         t        |d         t        |d         t        j                  |d               S )Nr  r  r  r  r  r  )r  r  r  r  r  r  )r
  r   r%   r	   r   rT   r   r  r   s     r   r   zStorageBucketInfo.from_json  sq     **4>:DJ--77\8JKW&D.//99$|:LM
 	
r   Nr'   r(   r)   r\   r   r*   r   r   r   r   r  r    s?    	H&& L(( 
 
r   r  c                  *    e Zd ZdZdZd Zed        Zy)AttributionReportingSourceType
navigationeventc                    | j                   S r   r>   r   s    r   r   z&AttributionReportingSourceType.to_json  r@   r   c                     | |      S r   r   r   s     r   r   z(AttributionReportingSourceType.from_json  r   r   N)r'   r(   r)   
NAVIGATIONEVENTr   r*   r   r   r   r   r  r    s%    JE  r   r  c                  8     e Zd ZddZedd       Z fdZ xZS )UnsignedInt64AsBase10c                    | S r   r   r   s    r   r   zUnsignedInt64AsBase10.to_json  r   r   c                     | |      S r   r   r   s     r   r   zUnsignedInt64AsBase10.from_json  r   r   c                >    dj                  t        | 	               S )NzUnsignedInt64AsBase10({})r   r!   s    r   r    zUnsignedInt64AsBase10.__repr__  s    *11%'2B2DEEr   r#   )r   r%   r$   r%  r&   r,   s   @r   r%  r%    s(      F Fr   r%  c                  8     e Zd ZddZedd       Z fdZ xZS )UnsignedInt128AsBase16c                    | S r   r   r   s    r   r   zUnsignedInt128AsBase16.to_json  r   r   c                     | |      S r   r   r   s     r   r   z UnsignedInt128AsBase16.from_json  r   r   c                >    dj                  t        | 	               S )NzUnsignedInt128AsBase16({})r   r!   s    r   r    zUnsignedInt128AsBase16.__repr__  ri   r   r#   )r   r%   r$   r*  r&   r,   s   @r   r*  r*    s(      G Gr   r*  c                  8     e Zd ZddZedd       Z fdZ xZS )SignedInt64AsBase10c                    | S r   r   r   s    r   r   zSignedInt64AsBase10.to_json  r   r   c                     | |      S r   r   r   s     r   r   zSignedInt64AsBase10.from_json   r   r   c                >    dj                  t        | 	               S )NzSignedInt64AsBase10({})r   r!   s    r   r    zSignedInt64AsBase10.__repr__  s    (//0@0BCCr   r#   )r   r%   r$   r/  r&   r,   s   @r   r/  r/    s(      D Dr   r/  c                  8    e Zd ZU ded<   ded<   d Zed        Zy)#AttributionReportingFilterDataEntryr%   r   typing.List[str]valuesc                |    t               }| j                  |d<   | j                  D cg c]  }| c}|d<   |S c c}w )Nr   r6  )rX   r   r6  r   s      r   r   z+AttributionReportingFilterDataEntry.to_json  s8    vhhU%)[[1!1X 2   	9c           	     l     | t        |d         |d   D cg c]  }t        |       c}      S c c}w )Nr   r6  )r   r6  r   r   s      r   r   z-AttributionReportingFilterDataEntry.from_json  s4    DK $(N3qCF3
 	
3   1
Nr  r   r   r   r4  r4    s&    	H 
 
r   r4  c                  <    e Zd ZU ded<   dZded<   d Zed        Zy) AttributionReportingFilterConfig0typing.List[AttributionReportingFilterDataEntry]filter_valuesNztyping.Optional[int]lookback_windowc                    t               }| j                  D cg c]  }|j                          c}|d<   | j                  | j                  |d<   |S c c}w )NfilterValueslookbackWindow)rX   r>  r   r?  r   s      r   r   z(AttributionReportingFilterConfig.to_json#  sR    v595G5GH		H^+%)%9%9D!"  Is   Ac                     | |d   D cg c]  }t         j                  |       c}d|v rt        |d               S d       S c c}w )NrA  rB  )r>  r?  )r4  r   r   r   s      r   r   z*AttributionReportingFilterConfig.from_json*  sU    UYZhUijPQ>HHKj;Kt;SC%5 67
 	
Y]
 	
js   A)r'   r(   r)   r\   r?  r   r*   r   r   r   r   r<  r<    s.    CC -1O)0 
 
r   r<  c                  8    e Zd ZU ded<   ded<   d Zed        Zy)AttributionReportingFilterPairz-typing.List[AttributionReportingFilterConfig]filtersnot_filtersc                    t               }| j                  D cg c]  }|j                          c}|d<   | j                  D cg c]  }|j                          c}|d<   |S c c}w c c}w )NrF  
notFilters)rX   rF  r   rG  r   s      r   r   z&AttributionReportingFilterPair.to_json8  sU    v04=1199;=Y373C3CDaaiikD\ >Ds   A#A(c           	          | |d   D cg c]  }t         j                  |       c}|d   D cg c]  }t         j                  |       c}      S c c}w c c}w )NrF  rI  )rF  rG  )r<  r   r   s      r   r   z(AttributionReportingFilterPair.from_json>  sT    LPQZO\q5??B\PTUaPbc19CCAFc
 	
\cs
   AA
Nr  r   r   r   rE  rE  2  s'    ::>> 
 
r   rE  c                  8    e Zd ZU ded<   ded<   d Zed        Zy)(AttributionReportingAggregationKeysEntryr%   r   r*  r?   c                r    t               }| j                  |d<   | j                  j                         |d<   |S r   )rX   r   r?   r   rY   s     r   r   z0AttributionReportingAggregationKeysEntry.to_jsonL  s1    vhhU

**,Wr   c                Z     | t        |d         t        j                  |d               S r   )r%   r*  r   r   s     r   r   z2AttributionReportingAggregationKeysEntry.from_jsonR  s-    DK (224=A
 	
r   Nr  r   r   r   rL  rL  F  s&    	H!! 
 
r   rL  c                  8    e Zd ZU ded<   ded<   d Zed        Zy)&AttributionReportingEventReportWindowsr   startztyping.List[int]endsc                |    t               }| j                  |d<   | j                  D cg c]  }| c}|d<   |S c c}w )NrQ  rR  )rX   rQ  rR  r   s      r   r   z.AttributionReportingEventReportWindows.to_jsonb  s8    v

W#'99-a-V .r8  c           	     l     | t        |d         |d   D cg c]  }t        |       c}      S c c}w )NrQ  rR  )rQ  rR  r   r   s      r   r   z0AttributionReportingEventReportWindows.from_jsonh  s4    d7m$"&v,/Q#a&/
 	
/r:  Nr  r   r   r   rP  rP  Z  s*     J  
 
r   rP  c                  8    e Zd ZU ded<   ded<   d Zed        Zy)AttributionReportingTriggerSpecztyping.List[float]trigger_datarP  event_report_windowsc                    t               }| j                  D cg c]  }| c}|d<   | j                  j                         |d<   |S c c}w )NtriggerDataeventReportWindows)rX   rX  rY  r   r   s      r   r   z'AttributionReportingTriggerSpec.to_jsonx  sH    v*.*;*;<Qq<]%)%>%>%F%F%H!" =s   	Ac                     | |d   D cg c]  }t        |       c}t        j                  |d               S c c}w )Nr[  r\  )rX  rY  )rT   rP  r   r   s      r   r   z)AttributionReportingTriggerSpec.from_json~  s>    ,0,?@q%(@!G!Q!QRVWkRl!m
 	
@s   ;Nr  r   r   r   rW  rW  p  s)     %$@@ 
 
r   rW  c                  *    e Zd ZdZdZd Zed        Zy)'AttributionReportingTriggerDataMatchingexactmodulusc                    | j                   S r   r>   r   s    r   r   z/AttributionReportingTriggerDataMatching.to_json  r@   r   c                     | |      S r   r   r   s     r   r   z1AttributionReportingTriggerDataMatching.from_json  r   r   N)r'   r(   r)   EXACTMODULUSr   r*   r   r   r   r   r_  r_    s%    EG  r   r_  c                  B    e Zd ZU ded<   ded<   ded<   d Zed        Zy	)
2AttributionReportingAggregatableDebugReportingDatar*  	key_piecerT   r?   r5  typesc                    t               }| j                  j                         |d<   | j                  |d<   | j                  D cg c]  }| c}|d<   |S c c}w )NkeyPiecer?   ri  )rX   rh  r   r?   ri  r   s      r   r   z:AttributionReportingAggregatableDebugReportingData.to_json  sO    v>>113Z

W$(JJ/q/W 0s   	Ac           
          | t         j                  |d         t        |d         |d   D cg c]  }t        |       c}      S c c}w )Nrk  r?   ri  )rh  r?   ri  )r*  r   rT   r%   r   s      r   r   z<AttributionReportingAggregatableDebugReportingData.from_json  sI    ,66tJ7GHW&#'=1a3q61
 	
 2s   ANr  r   r   r   rg  rg    s.    %% L 
 
r   rg  c                  T    e Zd ZU ded<   ded<   dZded<   dZded	<   d
 Zed        Zy)4AttributionReportingAggregatableDebugReportingConfigr*  rh  z?typing.List[AttributionReportingAggregatableDebugReportingData]
debug_dataNtyping.Optional[float]budgetr   aggregation_coordinator_originc                    t               }| j                  j                         |d<   | j                  D cg c]  }|j                          c}|d<   | j                  | j                  |d<   | j
                  | j
                  |d<   |S c c}w )Nrk  	debugDatarq  aggregationCoordinatorOrigin)rX   rh  r   ro  rq  rr  r   s      r   r   z<AttributionReportingAggregatableDebugReportingConfig.to_json  s~    v>>113Z26//BQQYY[B[;;"![[DN..:373V3VD/0 Cs   Bc           	          | t         j                  |d         |d   D cg c]  }t        j                  |       c}d|v rt        |d         nd d|v rt	        |d               S d       S c c}w )Nrk  rt  rq  ru  )rh  ro  rq  rr  )r*  r   rg  rT   r%   r   s      r   r   z>AttributionReportingAggregatableDebugReportingConfig.from_json  s    ,66tJ7GHaefqars\]JTTUVWs,4,<5h($Xvz~X~3t4R/S+T	
 	
 EI	
 	
ss   A0
)	r'   r(   r)   r\   rq  rr  r   r*   r   r   r   r   rn  rn    s@    %%OO &*F");?"$8? 
 
r   rn  c                      e Zd ZU ded<   ded<   ded<   ded<   ded	<   d
ed<   d
ed<   ded<   ded<   ded<   ded<   ded<   ded<   ded<   ded<   dZded<   d Zed         Zy)!&AttributionReportingSourceRegistrationr   timer   expiryz,typing.List[AttributionReportingTriggerSpec]trigger_specsaggregatable_report_windowr  type_r%   source_originreporting_originr5  destination_sitesr%  event_idr/  priorityr=  filter_dataz5typing.List[AttributionReportingAggregationKeysEntry]aggregation_keysr_  trigger_data_matchingdestination_limit_priorityrn  #aggregatable_debug_reporting_configN&typing.Optional[UnsignedInt64AsBase10]	debug_keyc                   t               }| j                  j                         |d<   | j                  |d<   | j                  D cg c]  }|j                          c}|d<   | j
                  |d<   | j                  j                         |d<   | j                  |d<   | j                  |d<   | j                  D cg c]  }| c}|d<   | j                  j                         |d	<   | j                  j                         |d
<   | j                  D cg c]  }|j                          c}|d<   | j                  D cg c]  }|j                          c}|d<   | j                  j                         |d<   | j                  j                         |d<   | j                   j                         |d<   | j"                  | j"                  j                         |d<   |S c c}w c c}w c c}w c c}w )Nry  rz  triggerSpecsaggregatableReportWindowtypesourceOriginreportingOrigindestinationSiteseventIdr  
filterDataaggregationKeystriggerDataMatchingdestinationLimitPriority aggregatableDebugReportingConfigdebugKey)rX   ry  r   rz  r{  r|  r}  r~  r  r  r  r  r  r  r  r  r  r  r   s      r   r   z.AttributionReportingSourceRegistration.to_json  s   vyy((*VX595G5GH		H^+/+J+J'(zz))+V#11^"&"7"7/3/E/E#F!A#F --//1Y==002Z373C3CDaaiikD\8<8M8M"N1199;"N&*&@&@&H&H&J"#+/+J+J+R+R+T'(373[3[3c3c3e/0>>%#~~557D  I
 $G E"Ns   G:	G G%<G*c                    | di dt         j                  j                  |d         dt        |d         d|d   D cg c]  }t        j                  |       c}dt        |d         dt
        j                  |d         d	t        |d
         dt        |d         d|d   D cg c]  }t        |       c}dt        j                  |d         dt        j                  |d         d|d   D cg c]  }t        j                  |       c}d|d   D cg c]  }t        j                  |       c}dt        j                  |d         dt        j                  |d         dt        j                  |d         dd|v rt        j                  |d         S d S c c}w c c}w c c}w c c}w )Nry  rz  r{  r  r|  r  r}  r  r~  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   )r	   r   r   r   rW  r  r%   r%  r/  r4  rL  r_  rn  r   s      r   r   z0AttributionReportingSourceRegistration.from_json  s    
''11$v,?
tH~&
 RVVdQefA:DDQGf
 (+40J+K'L	

 1::4<H
 d>23
 !&7!89
 044F/GH!s1vH
 +44T)_E
 )224
3CD
 TXXdSefa<FFqIf
 ^bbs]tuXYFPPQRSu
 #J"S"STXYnTo"p
 (;'D'DTJdEe'f
 1e0n0nos  uW  pX  1Y
  LVY]K]+55d:6FG!
 	
  dh!
 	
 g
 I gus   F/,F4;F9"F>)r'   r(   r)   r\   r  r   r*   r   r   r   r   rx  rx    s    
   K?? !$#))''##!!AAKKBB 33)]]8<I5<* 
 
r   rx  c                  Z    e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZdZdZdZd Zed        Zy),AttributionReportingSourceRegistrationResultsuccessinternalErrorinsufficientSourceCapacity%insufficientUniqueDestinationCapacityexcessiveReportingOriginsprohibitedByBrowserPolicysuccessNoised destinationReportingLimitReacheddestinationGlobalLimitReacheddestinationBothLimitsReached#reportingOriginsPerSiteLimitReachedexceedsMaxChannelCapacity!exceedsMaxTriggerStateCardinality&destinationPerDayReportingLimitReachedc                    | j                   S r   r>   r   s    r   r   z4AttributionReportingSourceRegistrationResult.to_json+  r@   r   c                     | |      S r   r   r   s     r   r   z6AttributionReportingSourceRegistrationResult.from_json.  r   r   N)r'   r(   r)   SUCCESSINTERNAL_ERRORINSUFFICIENT_SOURCE_CAPACITY(INSUFFICIENT_UNIQUE_DESTINATION_CAPACITYEXCESSIVE_REPORTING_ORIGINSPROHIBITED_BY_BROWSER_POLICYSUCCESS_NOISED#DESTINATION_REPORTING_LIMIT_REACHED DESTINATION_GLOBAL_LIMIT_REACHEDDESTINATION_BOTH_LIMITS_REACHED(REPORTING_ORIGINS_PER_SITE_LIMIT_REACHEDEXCEEDS_MAX_CHANNEL_CAPACITY%EXCEEDS_MAX_TRIGGER_STATE_CARDINALITY+DESTINATION_PER_DAY_REPORTING_LIMIT_REACHEDr   r*   r   r   r   r   r  r    sl    G$N#? /V,"=#> $N*L''F$&D#/T,#> ,O)2Z/  r   r  c                  *    e Zd ZdZdZd Zed        Zy)0AttributionReportingSourceRegistrationTimeConfigincludeexcludec                    | j                   S r   r>   r   s    r   r   z8AttributionReportingSourceRegistrationTimeConfig.to_json7  r@   r   c                     | |      S r   r   r   s     r   r   z:AttributionReportingSourceRegistrationTimeConfig.from_json:  r   r   N)r'   r(   r)   INCLUDEEXCLUDEr   r*   r   r   r   r   r  r  3  s%    GG  r   r  c                  B    e Zd ZU ded<   ded<   ded<   d Zed        Zy	)
.AttributionReportingAggregatableValueDictEntryr%   r   rT   r?   r%  filtering_idc                    t               }| j                  |d<   | j                  |d<   | j                  j	                         |d<   |S )Nr   r?   filteringId)rX   r   r?   r  r   rY   s     r   r   z6AttributionReportingAggregatableValueDictEntry.to_jsonI  sA    vhhU

W"//779]r   c                t     | t        |d         t        |d         t        j                  |d               S )Nr   r?   r  )r   r?   r  )r%   rT   r%  r   r   s     r   r   z8AttributionReportingAggregatableValueDictEntry.from_jsonP  s:    DK W&.88m9LM
 	
r   Nr  r   r   r   r  r  ?  s-    	H L'' 
 
r   r  c                  8    e Zd ZU ded<   ded<   d Zed        Zy)*AttributionReportingAggregatableValueEntryz;typing.List[AttributionReportingAggregatableValueDictEntry]r6  rE  rF  c                    t               }| j                  D cg c]  }|j                          c}|d<   | j                  j                         |d<   |S c c}w )Nr6  rF  )rX   r6  r   rF  r   s      r   r   z2AttributionReportingAggregatableValueEntry.to_json_  sG    v/3{{;!!))+;X,,..0Y <s   Ac                     | |d   D cg c]  }t         j                  |       c}t        j                  |d               S c c}w )Nr6  rF  )r6  rF  )r  r   rE  r   s      r   r   z4AttributionReportingAggregatableValueEntry.from_jsone  sE    Y]^fYghTUBLLQOh2<<T)_M
 	
hs   ANr  r   r   r   r  r  Y  s'    GG++ 
 
r   r  c                  P    e Zd ZU ded<   ded<   ded<   dZded	<   d
 Zed        Zy)$AttributionReportingEventTriggerDatar%  datar/  r  rE  rF  Nr  	dedup_keyc                   t               }| j                  j                         |d<   | j                  j                         |d<   | j                  j                         |d<   | j
                  | j
                  j                         |d<   |S )Nr  r  rF  dedupKey)rX   r  r   r  rF  r  rY   s     r   r   z,AttributionReportingEventTriggerData.to_jsonw  sr    vyy((*V==002Z,,..0Y>>%#~~557Dr   c           	          | t         j                  |d         t        j                  |d         t        j                  |d         d|v rt         j                  |d               S d       S )Nr  r  rF  r  )r  r  rF  r  )r%  r   r/  rE  r   s     r   r   z.AttributionReportingEventTriggerData.from_json  ss    &00f>(224
3CD2<<T)_MKUY]K]+55d:6FG	
 	
 dh	
 	
r   r'   r(   r)   r\   r  r   r*   r   r   r   r   r  r  m  s8    
!!++8<I5< 
 
r   r  c                  B    e Zd ZU ded<   ded<   ded<   d Zed        Zy	)
+AttributionReportingAggregatableTriggerDatar*  rh  r5  source_keysrE  rF  c                    t               }| j                  j                         |d<   | j                  D cg c]  }| c}|d<   | j                  j                         |d<   |S c c}w )Nrk  
sourceKeysrF  )rX   rh  r   r  rF  r   s      r   r   z3AttributionReportingAggregatableTriggerData.to_json  s[    v>>113Z)-)9)9:Aa:\,,..0Y ;s   	A$c           	          | t         j                  |d         |d   D cg c]  }t        |       c}t        j                  |d               S c c}w )Nrk  r  rF  )rh  r  rF  )r*  r   r%   rE  r   s      r   r   z5AttributionReportingAggregatableTriggerData.from_json  sN    ,66tJ7GH)-l);<AQ<2<<T)_M
 	
<s   A
Nr  r   r   r   r  r    s-    %%!!++ 
 
r   r  c                  <    e Zd ZU ded<   dZded<   d Zed        Zy)(AttributionReportingAggregatableDedupKeyrE  rF  Nr  r  c                    t               }| j                  j                         |d<   | j                  | j                  j                         |d<   |S )NrF  r  )rX   rF  r   r  rY   s     r   r   z0AttributionReportingAggregatableDedupKey.to_json  sE    v,,..0Y>>%#~~557Dr   c                     | t         j                  |d         d|v rt        j                  |d               S d       S )NrF  r  )rF  r  )rE  r   r%  r   s     r   r   z2AttributionReportingAggregatableDedupKey.from_json  sJ    2<<T)_MKUY]K]+55d:6FG
 	
cg
 	
r   r  r   r   r   r  r    s,    ++8<I5< 
 
r   r  c                      e Zd ZU ded<   ded<   ded<   ded<   d	ed
<   ded<   ded<   ded<   ded<   dZded<   dZded<   dZded<   d Zed        Z	y)'AttributionReportingTriggerRegistrationrE  rF  z5typing.List[AttributionReportingAggregatableDedupKey]aggregatable_dedup_keysz1typing.List[AttributionReportingEventTriggerData]event_trigger_dataz8typing.List[AttributionReportingAggregatableTriggerData]aggregatable_trigger_dataz7typing.List[AttributionReportingAggregatableValueEntry]aggregatable_valuesr   #aggregatable_filtering_id_max_bytesr   debug_reportingr  source_registration_time_configrn  r  Nr  r  r   rr  trigger_context_idc                B   t               }| j                  j                         |d<   | j                  D cg c]  }|j                          c}|d<   | j                  D cg c]  }|j                          c}|d<   | j
                  D cg c]  }|j                          c}|d<   | j                  D cg c]  }|j                          c}|d<   | j                  |d<   | j                  |d<   | j                  j                         |d<   | j                  j                         |d	<   | j                  | j                  j                         |d
<   | j                  | j                  |d<   | j                  | j                  |d<   |S c c}w c c}w c c}w c c}w )NrF  aggregatableDedupKeyseventTriggerDataaggregatableTriggerDataaggregatableValuesaggregatableFilteringIdMaxBytesdebugReportingsourceRegistrationTimeConfigr  r  ru  triggerContextId)rX   rF  r   r  r  r  r  r  r  r  r  r  rr  r  r   s      r   r   z/AttributionReportingTriggerRegistration.to_json  sl   v,,..0Y>B>Z>Z([([$%9=9P9P#QAAIIK#Q @D@^@^*_1199;*_&';?;S;S%Taaiik%T!"262Z2Z./!%!5!5/3/S/S/[/[/]+,373[3[3c3c3e/0>>%#~~557D..:373V3VD/0"".'+'>'>D#$ )\#Q*_%Ts   F!FF7Fc                    | t         j                  |d         |d   D cg c]  }t        j                  |       c}|d   D cg c]  }t        j                  |       c}|d   D cg c]  }t        j                  |       c}|d   D cg c]  }t
        j                  |       c}t        |d         t        |d         t        j                  |d         t        j                  |d	         d
|v rt        j                  |d
         nd d|v rt        |d         nd d|v rt        |d               S d       S c c}w c c}w c c}w c c}w )NrF  r  r  r  r  r  r  r  r  r  ru  r  )rF  r  r  r  r  r  r  r  r  r  rr  r  )rE  r   r  r  r  r  r   r   r  rn  r%  r%   r   s      r   r   z1AttributionReportingTriggerRegistration.from_json  s   2<<T)_Mdh  jA  eB  %C_`%M%W%WXY%Z  %C[_`r[stVW D N Nq Qtim  oH  jI  'Jde'R'\'\]^'_  'Jbfg{b| }]^!K!U!UVW!X }03D9Z4[0\ &6!78,\,f,fgk  mK  hL  -M0d0n0nos  uW  pX  1YKUY]K]+55d:6FGcgXvz~X~3t4R/S+T  EI@RVZ@Zs4(:#;<
 	
 ae
 	
 %Ct 'J }s   E
E	+EE)
r'   r(   r)   r\   r  rr  r  r   r*   r   r   r   r   r  r    st    ++RRIIWWPP),,%UU)]]8<I5<;?"$8?/3,3& 
 
r   r  c                  n    e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZdZdZdZdZdZdZdZdZd Zed        Zy)$AttributionReportingEventLevelResultr  successDroppedLowerPriorityr  #noCapacityForAttributionDestinationnoMatchingSourcesdeduplicatedexcessiveAttributionspriorityTooLowneverAttributedSourcer  noMatchingSourceFilterDatar  noMatchingConfigurationsexcessiveReportsfalselyAttributedSourcereportWindowPassednotRegisteredreportWindowNotStartednoMatchingTriggerDatac                    | j                   S r   r>   r   s    r   r   z,AttributionReportingEventLevelResult.to_json  r@   r   c                     | |      S r   r   r   s     r   r   z.AttributionReportingEventLevelResult.from_json  r   r   N)r'   r(   r)   r  SUCCESS_DROPPED_LOWER_PRIORITYr  'NO_CAPACITY_FOR_ATTRIBUTION_DESTINATIONNO_MATCHING_SOURCESDEDUPLICATEDEXCESSIVE_ATTRIBUTIONSPRIORITY_TOO_LOWNEVER_ATTRIBUTED_SOURCEr  NO_MATCHING_SOURCE_FILTER_DATAr  NO_MATCHING_CONFIGURATIONSEXCESSIVE_REPORTSFALSELY_ATTRIBUTED_SOURCEREPORT_WINDOW_PASSEDNOT_REGISTEREDREPORT_WINDOW_NOT_STARTEDNO_MATCHING_TRIGGER_DATAr   r*   r   r   r   r   r  r    s    G%B"$N.S+-!L4'5"=%A"#> !;* 9/$N 86  r   r  c                  Z    e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZdZdZdZd Zed        Zy)&AttributionReportingAggregatableResultr  r  r  r  r  r  noHistogramsinsufficientBudgetr  r  r  r  r  r  c                    | j                   S r   r>   r   s    r   r   z.AttributionReportingAggregatableResult.to_json#  r@   r   c                     | |      S r   r   r   s     r   r   z0AttributionReportingAggregatableResult.from_json&  r   r   N)r'   r(   r)   r  r  r  r  r  r  NO_HISTOGRAMSINSUFFICIENT_BUDGETr  r  r  r  r  r  r   r*   r   r   r   r   r  r    sj    G$N.S+-4"="M.%A"$N#> !L/*  r   r  c                  F    e Zd ZU dZded<   ded<   ded<   d Zed        Zy)	RelatedWebsiteSetz.
    A single Related Website Set object.
    r5  primary_sitesassociated_sitesservice_sitesc                    t               }| j                  D cg c]  }| c}|d<   | j                  D cg c]  }| c}|d<   | j                  D cg c]  }| c}|d<   |S c c}w c c}w c c}w )NprimarySitesassociatedSitesserviceSites)rX   r  r  r  r   s      r   r   zRelatedWebsiteSet.to_json9  sk    v+/+=+=>a>^.2.C.C"D1"D+/+=+=>a>^  ?"D>s   	A$	A)	A.c           
          | |d   D cg c]  }t        |       c}|d   D cg c]  }t        |       c}|d   D cg c]  }t        |       c}      S c c}w c c}w c c}w )Nr!  r"  r#  )r  r  r  r   r   s      r   r   zRelatedWebsiteSet.from_json@  s^    +/+?@a3q6@.23D.EFc!fF+/+?@a3q6@
 	
@F@s   AA
 A$Nr[   r   r   r   r  r  +  s8     $# '& $# 
 
r   r  c              #     K   t               }| j                         |d<   d|d}|}t        j                  |d         S w)zV
    Returns a storage key given a frame id.

    :param frame_id:
    :returns: 
    frameIdzStorage.getStorageKeyForFramemethodparamsr  )rX   r   r   r   )frame_idr)  cmd_dictr   s       r   get_storage_key_for_framer,  I  sN      &F ((*F91H >D))$|*<==s   ?Ac              #  F   K   t               }| |d<   ||d<   d|d}|}yw)z
    Clears storage for origin.

    :param origin: Security origin.
    :param storage_types: Comma separated list of StorageType to clear.
    originstorageTypeszStorage.clearDataForOriginr'  NrX   )r.  storage_typesr)  r+  r   s        r   clear_data_for_originr2  \  s9      &FF8*F>.H >D   !c              #  F   K   t               }| |d<   ||d<   d|d}|}yw)z
    Clears storage for storage key.

    :param storage_key: Storage key.
    :param storage_types: Comma separated list of StorageType to clear.
    r  r/  zStorage.clearDataForStorageKeyr'  Nr0  )r  r1  r)  r+  r   s        r   clear_data_for_storage_keyr5  p  s9      &F&F<*F>2H >Dr3  c              #     K   t               }| | j                         |d<   d|d}|}|d   D cg c]!  }t        j                  j	                  |      # c}S c c}w w)z
    Returns all browser cookies.

    :param browser_context_id: *(Optional)* Browser context to use when called on the browser endpoint.
    :returns: Array of cookie objects.
    browserContextIdzStorage.getCookiesr'  r0   )rX   r   r	   Cookier   )browser_context_idr)  r+  r   r   s        r   get_cookiesr:    sf      &F%%7%?%?%A!"&H >D15iAAGNN$$Q'AAAs   0A &AA c              #     K   t               }| D cg c]  }|j                          c}|d<   ||j                         |d<   d|d}|}yc c}w w)z
    Sets given cookies.

    :param cookies: Cookies to be set.
    :param browser_context_id: *(Optional)* Browser context to use when called on the browser endpoint.
    r0   Nr7  zStorage.setCookiesr'  rX   r   )r0   r9  r)  r   r+  r   s         r   set_cookiesr=    s_      &F.566F9%%7%?%?%A!"&H >D 7s   AA*Ac              #  \   K   t               }| | j                         |d<   d|d}|}yw)z
    Clears cookies.

    :param browser_context_id: *(Optional)* Browser context to use when called on the browser endpoint.
    Nr7  zStorage.clearCookiesr'  r<  )r9  r)  r+  r   s       r   clear_cookiesr?    s?      &F%%7%?%?%A!"(H >Ds   *,c           	   #     K   t               }| |d<   d|d}|}t        |d         t        |d         t        |d         |d   D cg c]  }t        j	                  |       c}fS c c}w w)a|  
    Returns usage and quota in bytes.

    :param origin: Security origin.
    :returns: A tuple with the following items:

        0. **usage** - Storage usage (bytes).
        1. **quota** - Storage quota (bytes).
        2. **overrideActive** - Whether or not the origin has an active storage quota override
        3. **usageBreakdown** - Storage usage per type (bytes).
    r.  zStorage.getUsageAndQuotar'  rU   r  overrideActiveusageBreakdown)rX   rT   r   rR   r   )r.  r)  r+  r   r   s        r   get_usage_and_quotarC    s      &FF8,H >Dd7md7mT"#$,01A,BCq			"C	  	Ds   AA.	A)
%	A.c              #  J   K   t               }| |d<   |||d<   d|d}|}yw)aV  
    Override quota for the specified origin

    **EXPERIMENTAL**

    :param origin: Security origin.
    :param quota_size: *(Optional)* The quota size (in bytes) to override the original quota with. If this is called multiple times, the overridden quota will be equal to the quotaSize provided in the final call. If this is called without specifying a quotaSize, the quota will be reset to the default value for the specified origin. If this is called multiple times with different origins, the override will be maintained for each origin until it is disabled (called without a quotaSize).
    r.  N	quotaSizezStorage.overrideQuotaForOriginr'  r0  )r.  
quota_sizer)  r+  r   s        r   override_quota_for_originrG    s?      &FF8({2H >Ds   !#c              #  <   K   t               }| |d<   d|d}|}yw)z
    Registers origin to be notified when an update occurs to its cache storage list.

    :param origin: Security origin.
    r.  z"Storage.trackCacheStorageForOriginr'  Nr0  r.  r)  r+  r   s       r   track_cache_storage_for_originrJ    s/      &FF86H >D   c              #  <   K   t               }| |d<   d|d}|}yw)z
    Registers storage key to be notified when an update occurs to its cache storage list.

    :param storage_key: Storage key.
    r  z&Storage.trackCacheStorageForStorageKeyr'  Nr0  r  r)  r+  r   s       r   #track_cache_storage_for_storage_keyrN    s/      &F&F<:H >DrK  c              #  <   K   t               }| |d<   d|d}|}yw)zv
    Registers origin to be notified when an update occurs to its IndexedDB.

    :param origin: Security origin.
    r.  zStorage.trackIndexedDBForOriginr'  Nr0  rI  s       r   track_indexed_db_for_originrP    s/      &FF83H >DrK  c              #  <   K   t               }| |d<   d|d}|}yw)z|
    Registers storage key to be notified when an update occurs to its IndexedDB.

    :param storage_key: Storage key.
    r  z#Storage.trackIndexedDBForStorageKeyr'  Nr0  rM  s       r    track_indexed_db_for_storage_keyrR  &  s/      &F&F<7H >DrK  c              #  <   K   t               }| |d<   d|d}|}yw)zq
    Unregisters origin from receiving notifications for cache storage.

    :param origin: Security origin.
    r.  z$Storage.untrackCacheStorageForOriginr'  Nr0  rI  s       r    untrack_cache_storage_for_originrT  7  s/      &FF88H >DrK  c              #  <   K   t               }| |d<   d|d}|}yw)zw
    Unregisters storage key from receiving notifications for cache storage.

    :param storage_key: Storage key.
    r  z(Storage.untrackCacheStorageForStorageKeyr'  Nr0  rM  s       r   %untrack_cache_storage_for_storage_keyrV  H  s/      &F&F<<H >DrK  c              #  <   K   t               }| |d<   d|d}|}yw)zm
    Unregisters origin from receiving notifications for IndexedDB.

    :param origin: Security origin.
    r.  z!Storage.untrackIndexedDBForOriginr'  Nr0  rI  s       r   untrack_indexed_db_for_originrX  Y  s/      &FF85H >DrK  c              #  <   K   t               }| |d<   d|d}|}yw)zs
    Unregisters storage key from receiving notifications for IndexedDB.

    :param storage_key: Storage key.
    r  z%Storage.untrackIndexedDBForStorageKeyr'  Nr0  rM  s       r   "untrack_indexed_db_for_storage_keyrZ  j  s/      &F&F<9H >DrK  c               #  p   K   ddi} | }|d   D cg c]  }t         j                  |       c}S c c}w w)z
    Returns the number of stored Trust Tokens per issuer for the
    current browsing context.

    **EXPERIMENTAL**

    :returns: 
    r(  zStorage.getTrustTokenstokens)r^   r   r+  r   r   s      r   get_trust_tokensr^  {  sA      	*H >D.28n=K!!!$===   616c              #  V   K   t               }| |d<   d|d}|}t        |d         S w)a	  
    Removes all Trust Tokens issued by the provided issuerOrigin.
    Leaves other stored data, including the issuer's Redemption Records, intact.

    **EXPERIMENTAL**

    :param issuer_origin:
    :returns: True if any tokens were deleted, false otherwise.
    rb   zStorage.clearTrustTokensr'  didDeleteTokens)rX   r   )r_   r)  r+  r   s       r   clear_trust_tokensrb    s@      &F*F>,H >D&'((s   ')c              #  `   K   t               }| |d<   ||d<   d|d}|}t        |d         S w)a>  
    Gets details for a named interest group.

    **EXPERIMENTAL**

    :param owner_origin:
    :param name:
    :returns: This largely corresponds to: https://wicg.github.io/turtledove/#dictdef-generatebidinterestgroup but has absolute expirationTime instead of relative lifetimeMs and also adds joiningOrigin.
    ownerOriginr  zStorage.getInterestGroupDetailsr'  detailsr0  )owner_originr  r)  r+  r   s        r   get_interest_group_detailsrg    sG      &F(F=F6N3H >DY  s   ,.c              #  <   K   t               }| |d<   d|d}|}yw)zm
    Enables/Disables issuing of interestGroupAccessed events.

    **EXPERIMENTAL**

    :param enable:
    enablez Storage.setInterestGroupTrackingr'  Nr0  ri  r)  r+  r   s       r   set_interest_group_trackingrk    /      &FF84H >DrK  c              #  <   K   t               }| |d<   d|d}|}yw)z
    Enables/Disables issuing of interestGroupAuctionEventOccurred and
    interestGroupAuctionNetworkRequestCreated.

    **EXPERIMENTAL**

    :param enable:
    ri  z'Storage.setInterestGroupAuctionTrackingr'  Nr0  rj  s       r   #set_interest_group_auction_trackingrn    s/      &FF8;H >DrK  c              #  j   K   t               }| |d<   d|d}|}t        j                  |d         S w)zv
    Gets metadata for an origin's shared storage.

    **EXPERIMENTAL**

    :param owner_origin:
    :returns: 
    rd  z Storage.getSharedStorageMetadatar'  metadata)rX   r   r   rf  r)  r+  r   s       r   get_shared_storage_metadatarr    sE      &F(F=4H >D **4
+;<<s   13c              #     K   t               }| |d<   d|d}|}|d   D cg c]  }t        j                  |       c}S c c}w w)z~
    Gets the entries in an given origin's shared storage.

    **EXPERIMENTAL**

    :param owner_origin:
    :returns: 
    rd  zStorage.getSharedStorageEntriesr'  entries)rX   r   r   )rf  r)  r+  r   r   s        r   get_shared_storage_entriesru    sS      &F(F=3H >D59)_E((+EEEs    AAAc              #  ^   K   t               }| |d<   ||d<   ||d<   |||d<   d|d}|}yw)a?  
    Sets entry with ``key`` and ``value`` for a given origin's shared storage.

    **EXPERIMENTAL**

    :param owner_origin:
    :param key:
    :param value:
    :param ignore_if_present: *(Optional)* If ```ignoreIfPresent```` is included and true, then only sets the entry if ````key``` doesn't already exist.
    rd  r   r?   Nr   zStorage.setSharedStorageEntryr'  r0  )rf  r   r?   r   r)  r+  r   s          r   set_shared_storage_entryrw  
  sR       &F(F=F5MF7O$$5 !1H >Ds   +-c              #  F   K   t               }| |d<   ||d<   d|d}|}yw)z
    Deletes entry for ``key`` (if it exists) for a given origin's shared storage.

    **EXPERIMENTAL**

    :param owner_origin:
    :param key:
    rd  r   z Storage.deleteSharedStorageEntryr'  Nr0  )rf  r   r)  r+  r   s        r   delete_shared_storage_entryry  '  s8      &F(F=F5M4H >Dr3  c              #  <   K   t               }| |d<   d|d}|}yw)zq
    Clears all entries for a given origin's shared storage.

    **EXPERIMENTAL**

    :param owner_origin:
    rd  z!Storage.clearSharedStorageEntriesr'  Nr0  rq  s       r   clear_shared_storage_entriesr{  =  s/      &F(F=5H >DrK  c              #  <   K   t               }| |d<   d|d}|}yw)z
    Resets the budget for ``ownerOrigin`` by clearing all budget withdrawals.

    **EXPERIMENTAL**

    :param owner_origin:
    rd  z Storage.resetSharedStorageBudgetr'  Nr0  rq  s       r   reset_shared_storage_budgetr}  P  s/      &F(F=4H >DrK  c              #  <   K   t               }| |d<   d|d}|}yw)zm
    Enables/disables issuing of sharedStorageAccessed events.

    **EXPERIMENTAL**

    :param enable:
    ri  z Storage.setSharedStorageTrackingr'  Nr0  rj  s       r   set_shared_storage_trackingr  c  rl  rK  c              #  F   K   t               }| |d<   ||d<   d|d}|}yw)zu
    Set tracking for a storage key's buckets.

    **EXPERIMENTAL**

    :param storage_key:
    :param enable:
    r  ri  z Storage.setStorageBucketTrackingr'  Nr0  )r  ri  r)  r+  r   s        r   set_storage_bucket_trackingr  v  s9      &F&F<F84H >Dr3  c              #  X   K   t               }| j                         |d<   d|d}|}yw)zz
    Deletes the Storage Bucket with the given storage key and bucket name.

    **EXPERIMENTAL**

    :param bucket:
    r  zStorage.deleteStorageBucketr'  Nr<  )r  r)  r+  r   s       r   delete_storage_bucketr    s6      &F~~'F8/H >Ds   (*c               #  \   K   ddi} | }|d   D cg c]  }t        |       c}S c c}w w)z}
    Deletes state for sites identified as potential bounce trackers, immediately.

    **EXPERIMENTAL**

    :returns: 
    r(  z$Storage.runBounceTrackingMitigationsdeletedSitesr   r]  s      r   run_bounce_tracking_mitigationsr    s;      	8H >D 01qCF111s   ,',c              #  <   K   t               }| |d<   d|d}|}yw)z
    https://wicg.github.io/attribution-reporting-api/

    **EXPERIMENTAL**

    :param enabled: If enabled, noise is suppressed and reports are sent immediately.
    enabledz/Storage.setAttributionReportingLocalTestingModer'  Nr0  )r  r)  r+  r   s       r   ,set_attribution_reporting_local_testing_moder    s/      &FF9CH >DrK  c              #  <   K   t               }| |d<   d|d}|}yw)zm
    Enables/disables issuing of Attribution Reporting events.

    **EXPERIMENTAL**

    :param enable:
    ri  z'Storage.setAttributionReportingTrackingr'  Nr0  rj  s       r   "set_attribution_reporting_trackingr    s/      &FF8;H >DrK  c               #  6   K   ddi} | }t        |d         S w)z
    Sends all pending Attribution Reports immediately, regardless of their
    scheduled report time.

    **EXPERIMENTAL**

    :returns: The number of reports that were sent.
    r(  z%Storage.sendPendingAttributionReportsnumSentrU  )r+  r   s     r    send_pending_attribution_reportsr    s-      	9H >DtIs   c               #  p   K   ddi} | }|d   D cg c]  }t         j                  |       c}S c c}w w)z
    Returns the effective Related Website Sets in use by this profile for the browser
    session. The effective Related Website Sets will not change during a browser session.

    **EXPERIMENTAL**

    :returns: 
    r(  zStorage.getRelatedWebsiteSetssets)r  r   r]  s      r   get_related_website_setsr    sB      	1H >D48LAq''*AAAr_  z"Storage.cacheStorageContentUpdatedc                  L    e Zd ZU dZded<   ded<   ded<   ded<   ed	d       Zy)
CacheStorageContentUpdatedz0
    A cache's contents have been modified.
    r%   r.  r  	bucket_id
cache_namec           	     z     | t        |d         t        |d         t        |d         t        |d               S )Nr.  r  bucketId	cacheName)r.  r  r  r  r   r   s     r   r   z$CacheStorageContentUpdated.from_json  sB    tH~&D./$z*+4,-	
 	
r   N)r   r   r$   r  r'   r(   r)   rB   r\   r*   r   r   r   r   r  r    s0     KNO
 
r   r  zStorage.cacheStorageListUpdatedc                  B    e Zd ZU dZded<   ded<   ded<   edd       Zy)	CacheStorageListUpdatedz)
    A cache has been added/deleted.
    r%   r.  r  r  c                `     | t        |d         t        |d         t        |d               S Nr.  r  r  )r.  r  r  r   r   s     r   r   z!CacheStorageListUpdated.from_json  5    tH~&D./$z*+
 	
r   N)r   r   r$   r  r  r   r   r   r  r    +     KN
 
r   r  zStorage.indexedDBContentUpdatedc                  V    e Zd ZU dZded<   ded<   ded<   ded<   ded<   ed
d       Zy	)IndexedDBContentUpdatedz@
    The origin's IndexedDB object store has been modified.
    r%   r.  r  r  database_nameobject_store_namec           
          | t        |d         t        |d         t        |d         t        |d         t        |d               S )Nr.  r  r  databaseNameobjectStoreName)r.  r  r  r  r  r   r   s     r   r   z!IndexedDBContentUpdated.from_json4  sP    tH~&D./$z*+d>23!$'8"9:
 	
r   N)r   r   r$   r  r  r   r   r   r  r  #  s7     KN
 
r   r  zStorage.indexedDBListUpdatedc                  B    e Zd ZU dZded<   ded<   ded<   edd       Zy)	IndexedDBListUpdatedzA
    The origin's IndexedDB database list has been modified.
    r%   r.  r  r  c                `     | t        |d         t        |d         t        |d               S r  r   r   s     r   r   zIndexedDBListUpdated.from_jsonL  r  r   N)r   r   r$   r  r  r   r   r   r  r  ?  r  r   r  zStorage.interestGroupAccessedc                  t    e Zd ZU dZded<   ded<   ded<   ded<   d	ed
<   ded<   d	ed<   ded<   edd       Zy)InterestGroupAccessedz
    One of the interest groups was accessed. Note that these events are global
    to all targets sharing an interest group store.
    r   access_timerk   r}  r%   rf  r  r   component_seller_originrp  rp   bid_currency'typing.Optional[InterestGroupAuctionId]unique_auction_idc                l    | t         j                  j                  |d         t        j                  |d         t	        |d         t	        |d         d|v rt	        |d         nd d|v rt        |d         nd d|v rt	        |d         nd d|v rt        j                  |d         	      S d 	      S )
N
accessTimer  rd  r  componentSellerOriginrp   bidCurrencyuniqueAuctionId)r  r}  rf  r  r  rp   r  r  )r	   r   r   rk   r%   rT   re   r   s     r   r   zInterestGroupAccessed.from_jsoni  s    ..88l9KL)33DLAT-01T&\"JaeiJiC-D(E$Fos&+tmd5k"5Bd5JT-01PT[lpt[t4>>tDU?VW	
 		
 {	
 		
r   N)r   r   r$   r  r  r   r   r   r  r  U  sL     ('""
I 21	&&>>

 

r   r  z)Storage.interestGroupAuctionEventOccurredc                  V    e Zd ZU dZded<   ded<   ded<   ded	<   d
ed<   edd       Zy)!InterestGroupAuctionEventOccurredze
    An auction involving interest groups is taking place. These events are
    target-specific.
    r   
event_timer   r}  re   r  r  parent_auction_idztyping.Optional[dict]auction_configc           
         | t         j                  j                  |d         t        j                  |d         t        j                  |d         d|v rt        j                  |d         nd d|v rt        |d               S d       S )N	eventTimer  r  parentAuctionIdauctionConfig)r  r}  r  r  r  )r	   r   r   r   re   rX   r   s     r   r   z+InterestGroupAuctionEventOccurred.from_json  s    --77[8IJ/99$v,G4>>tDU?VW[lpt[t4>>tDU?VWz~:IT:Q4_ 56
 	

 X\
 	
r   N)r   r   r$   r  r  r   r   r   r  r  w  s9     '&((-->>))
 
r   r  z1Storage.interestGroupAuctionNetworkRequestCreatedc                  B    e Zd ZU dZded<   ded<   ded<   ed
d       Zy	))InterestGroupAuctionNetworkRequestCreatedz
    Specifies which auctions a particular network fetch may be related to, and
    in what role. Note that it is not ordered with respect to
    Network.requestWillBeSent (but will happen before loadingFinished
    loadingFailed).
    r   r}  znetwork.RequestId
request_idz#typing.List[InterestGroupAuctionId]auctionsc           
          | t         j                  |d         t        j                  j                  |d         |d   D cg c]  }t        j                  |       c}      S c c}w )Nr  	requestIdr  )r}  r  r  )r   r   r	   	RequestIdre   r   s      r   r   z3InterestGroupAuctionNetworkRequestCreated.from_json  s_    /99$v,G((2243DECG
CSTa,66q9T
 	
 Us   A&N)r   r   r$   r  r  r   r   r   r  r    s/     )(!! 21
 
r   r  zStorage.sharedStorageAccessedc                  V    e Zd ZU dZded<   ded<   ded<   ded	<   d
ed<   edd       Zy)SharedStorageAccessedzv
    Shared storage was accessed by the associated page.
    The following parameters are included in all events.
    r   r  r   r}  page.FrameIdmain_frame_idr%   rf  r   r)  c           
         | t         j                  j                  |d         t        j                  |d         t        j
                  j                  |d         t        |d         t        j                  |d               S )Nr  r  mainFrameIdrd  r)  )r  r}  r  rf  r)  )r	   r   r   r   r
   FrameIdr%   r   r   s     r   r   zSharedStorageAccessed.from_json  sp    ..88l9KL)33DLA,,00m1DET-01,66tH~F
 	
r   N)r   r   r$   r  r  r   r   r   r  r    s;    
 ('"" &%
 
r   r  z%Storage.storageBucketCreatedOrUpdatedc                  *    e Zd ZU ded<   edd       Zy)StorageBucketCreatedOrUpdatedr  bucket_infoc                @     | t         j                  |d               S )N
bucketInfo)r  )r  r   r   s     r   r   z'StorageBucketCreatedOrUpdated.from_json  s"    )33D4FG
 	
r   N)r   r   r$   r  r'   r(   r)   r\   r*   r   r   r   r   r  r    s     #"
 
r   r  zStorage.storageBucketDeletedc                  *    e Zd ZU ded<   edd       Zy)StorageBucketDeletedr%   r  c                ,     | t        |d               S )Nr  )r  r   r   s     r   r   zStorageBucketDeleted.from_json  s    $z*+
 	
r   N)r   r   r$   r  r  r   r   r   r  r    s     N
 
r   r  z,Storage.attributionReportingSourceRegisteredc                  8    e Zd ZU dZded<   ded<   edd       Zy)	$AttributionReportingSourceRegistered
    **EXPERIMENTAL**


    rx  registrationr  resultc                n     | t         j                  |d         t        j                  |d               S )Nr  r  )r  r  )rx  r   r  r   s     r   r   z.AttributionReportingSourceRegistered.from_json  s4    ?II$~J^_?II$x.Y
 	
r   N)r   r   r$   r  r  r   r   r   r  r    s'    
 9888
 
r   r  z-Storage.attributionReportingTriggerRegisteredc                  B    e Zd ZU dZded<   ded<   ded<   ed
d       Zy	)%AttributionReportingTriggerRegisteredr  r  r  r  event_levelr  aggregatablec                     | t         j                  |d         t        j                  |d         t        j                  |d               S )Nr  
eventLevelr  )r  r  r  )r  r   r  r  r   s     r   r   z/AttributionReportingTriggerRegistered.from_json  sI    @JJ4P^K_`<FFtLGYZ?II$~J^_
 	
r   N)r   r   r$   r  r  r   r   r   r  r    s-    
 :95588
 
r   r  )r*  r  r$   z@typing.Generator[T_JSON_DICT, T_JSON_DICT, SerializedStorageKey])r.  r%   r1  r%   r$   0typing.Generator[T_JSON_DICT, T_JSON_DICT, None])r  r%   r1  r%   r$   r  r   )r9  )typing.Optional[browser.BrowserContextID]r$   zGtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.List[network.Cookie]])r0   z typing.List[network.CookieParam]r9  r  r$   r  )r9  r  r$   r  )r.  r%   r$   zgtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.Tuple[float, float, bool, typing.List[UsageForType]]])r.  r%   rF  rp  r$   r  )r.  r%   r$   r  )r  r%   r$   r  )r$   zDtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.List[TrustTokens]])r_   r%   r$   z0typing.Generator[T_JSON_DICT, T_JSON_DICT, bool])rf  r%   r  r%   r$   z0typing.Generator[T_JSON_DICT, T_JSON_DICT, dict])ri  r   r$   r  )rf  r%   r$   zAtyping.Generator[T_JSON_DICT, T_JSON_DICT, SharedStorageMetadata])rf  r%   r$   zKtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.List[SharedStorageEntry]])
rf  r%   r   r%   r?   r%   r   r   r$   r  )rf  r%   r   r%   r$   r  )rf  r%   r$   r  )r  r%   ri  r   r$   r  )r  r
  r$   r  )r$   z<typing.Generator[T_JSON_DICT, T_JSON_DICT, typing.List[str]])r  r   r$   r  )r$   z/typing.Generator[T_JSON_DICT, T_JSON_DICT, int])r$   zJtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.List[RelatedWebsiteSet]])h
__future__r   utilr   r   dataclassesr   enumtyping r   r	   r
   r%   r   Enumr.   rR   r^   re   rk   r   r   r   r   r   r   r   r   r  r
  r  r  r%  r*  r/  r4  r<  rE  rL  rP  rW  r_  rg  rn  rx  r  r  r  r  r  r  r  r  r  r  r  r,  r2  r5  r:  r=  r?  rC  rG  rJ  rN  rP  rR  rT  rV  rX  rZ  r^  rb  rg  rk  rn  rr  ru  rw  ry  r{  r}  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r   r   <module>r     s   # * !     	E3 	E$)) 6 
 
 
0 
 
 
.GS Gdii 0DII DII $dii D 
 
 
,  
  
  
F 
 
 
, 
 
 
0 O
 O
 O
d	tyy 	 
 
 
* !
 !
 !
H	TYY 		FC 	F	GS 	G	D# 	D 
 
 
& 
 
 
* 
 
 
& 
 
 
& 
 
 
* 
 
 
*	dii 	 
 
 
2 
 
 
> K
 K
 K
\499 0	tyy 	 
 
 
2 
 
 
& 
 
 
8 
 
 
. 
 
 
( ;
 ;
 ;
|499 :TYY 0 
 
 
:>>	G>& 
8( 
8* IMBEB	NB, IM1E 
8, IME	7$	n> .2* 
8.	7"	7"	7"	7"	7"	7"	7"	7"> ))	7),!!! 
8!0	7&	7(==	H=*FF	RF2 48	  1	
 
8: 
8,	7&	7&	7& 
8,	7&2	7&	7&  B  12

 
  3
. ./

 
  0
( ./

 
  0
4 +,

 
  -
( ,-

 
  .
@ 89

 
  :
0 @A

 
  B
. ,-

 
  .
8 45

 
  6
 +,

 
  -
 ;<

 
  =
" <=

 
  >
r   