
    >iz                       d dl mZ d dlmZmZ d dlmZ d dlmZm	Z	m
Z
mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z) erZd dl*m+Z+ d dlm,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAmBZBmCZCmDZDmEZEmFZFmGZGmHZHmIZImJZJmKZKmLZLmMZMmNZNmOZOmPZP d dlQmRZR  G d d	      ZSy
)    )annotations)TYPE_CHECKINGOptional)Command)"ClearCookiesParamsClearDataForOriginParamsClearDataForStorageKeyParamsClearSharedStorageEntriesParamsClearTrustTokensParamsDeleteSharedStorageEntryParamsDeleteStorageBucketParams0GetAffectedUrlsForThirdPartyCookieMetadataParamsGetCookiesParamsGetInterestGroupDetailsParamsGetSharedStorageEntriesParamsGetSharedStorageMetadataParamsGetStorageKeyForFrameParamsGetUsageAndQuotaParamsOverrideQuotaForOriginParamsResetSharedStorageBudgetParams-SetAttributionReportingLocalTestingModeParams%SetAttributionReportingTrackingParamsSetCookiesParams%SetInterestGroupAuctionTrackingParamsSetInterestGroupTrackingParams$SetProtectedAudienceKAnonymityParamsSetSharedStorageEntryParamsSetSharedStorageTrackingParamsSetStorageBucketTrackingParamsStorageMethod TrackCacheStorageForOriginParams$TrackCacheStorageForStorageKeyParamsTrackIndexedDBForOriginParams!TrackIndexedDBForStorageKeyParams"UntrackCacheStorageForOriginParams&UntrackCacheStorageForStorageKeyParamsUntrackIndexedDBForOriginParams#UntrackIndexedDBForStorageKeyParams)CookieParam)%ClearCookiesCommandClearDataForOriginCommandClearDataForStorageKeyCommand ClearSharedStorageEntriesCommandClearTrustTokensCommandDeleteSharedStorageEntryCommandDeleteStorageBucketCommand1GetAffectedUrlsForThirdPartyCookieMetadataCommandGetCookiesCommandGetInterestGroupDetailsCommandGetRelatedWebsiteSetsCommandGetSharedStorageEntriesCommandGetSharedStorageMetadataCommandGetStorageKeyForFrameCommandGetTrustTokensCommandGetUsageAndQuotaCommandOverrideQuotaForOriginCommandResetSharedStorageBudgetCommand#RunBounceTrackingMitigationsCommand$SendPendingAttributionReportsCommand.SetAttributionReportingLocalTestingModeCommand&SetAttributionReportingTrackingCommandSetCookiesCommand&SetInterestGroupAuctionTrackingCommandSetInterestGroupTrackingCommand%SetProtectedAudienceKAnonymityCommandSetSharedStorageEntryCommandSetSharedStorageTrackingCommandSetStorageBucketTrackingCommand!TrackCacheStorageForOriginCommand%TrackCacheStorageForStorageKeyCommandTrackIndexedDBForOriginCommand"TrackIndexedDBForStorageKeyCommand#UntrackCacheStorageForOriginCommand'UntrackCacheStorageForStorageKeyCommand UntrackIndexedDBForOriginCommand$UntrackIndexedDBForStorageKeyCommand)StorageBucketc                  4   e Zd ZdZed(d)d       Zed*d       Ze	 	 	 	 	 	 d+d       Zed(d,d       Zed-d       Z	ed.d       Z
e	 d(	 	 	 	 	 d/d	       Ze	 	 	 	 	 	 	 	 d0d
       Zed1d       Ze	 	 	 	 d2d       Zed3d       Zed4d       Zed5d       Ze	 	 	 	 d6d       Zed7d       Ze	 	 	 	 d8d       Zed9d       Zed:d       Zed;d       Zed<d       Ze	 	 	 	 	 	 d=d       Zed>d       Zed?d       Zed@d       ZedAd       ZedBd       Ze	 d(	 	 	 	 	 dCd       ZedDd       Z edEd       Z!edFd        Z"e	 	 	 	 dGd!       Z#edHd"       Z$edId#       Z%edJd$       Z&e	 d(	 	 	 	 	 	 	 	 	 dKd%       Z'edLd&       Z(e	 	 	 	 	 	 dMd'       Z)y)NStorageCommandsa  
    A class for interacting with browser storage using Chrome DevTools Protocol (CDP).

    The Storage domain of CDP allows managing various types of browser storage, including:
    - Cookies
    - Cache Storage
    - IndexedDB
    - Web Storage (localStorage/sessionStorage)
    - Shared Storage
    - Storage Buckets
    - Trust Tokens
    - Interest Groups
    - Attribution Reporting

    This class provides static methods that generate CDP commands to manage these types
    of storage without the need for traditional webdrivers.
    Nc                Z    t               }| | |d<   t        t        j                  |      S )aV  
        Generates a command to clear all browser cookies.

        Args:
            browser_context_id: Browser context ID (optional). Useful when working
                               with multiple contexts (e.g., multiple windows or tabs).

        Returns:
            ClearCookiesCommand: The CDP command to clear all cookies.
        browserContextIdmethodparams)r   r   r    CLEAR_COOKIESbrowser_context_idrV   s     f/var/www/python/tenders/Scrapper/venv/lib/python3.12/site-packages/pydoll/commands/storage_commands.pyclear_cookieszStorageCommands.clear_cookiesj   s0     $%));F%&m99&II    c                R    t        | |      }t        t        j                  |      S )a  
        Generates a command to clear storage data for a specific origin.

        Args:
            origin: The security origin (e.g., "https://example.com").
            storage_types: Comma-separated list of storage types to clear.
                          Possible values include: "cookies", "local_storage", "indexeddb",
                          "cache_storage", etc. Use "all" to clear all types.

        Returns:
            ClearDataForOriginCommand: The CDP command to clear data for the specified origin.
        )originstorageTypesrT   )r   r   r    CLEAR_DATA_FOR_ORIGIN)r^   storage_typesrV   s      rZ   clear_data_for_originz%StorageCommands.clear_data_for_origin{   s#     *mTmAA&QQr\   c                R    t        | |      }t        t        j                  |      S )a  
        Generates a command to clear data for a specific storage key.

        Args:
            storage_key: The storage key for which to clear data.
                        Unlike origin, a storage key is a more specific identifier
                        that may include partition isolation.
            storage_types: Comma-separated list of storage types to clear.
                          Possible values include: "cookies", "local_storage", "indexeddb",
                          "cache_storage", etc. Use "all" to clear all types.

        Returns:
            ClearDataForStorageKeyCommand: The CDP command to clear data for the specified storage
                key.
        )
storageKeyr_   rT   )r	   r   r    CLEAR_DATA_FOR_STORAGE_KEY)storage_keyra   rV   s      rZ   clear_data_for_storage_keyz*StorageCommands.clear_data_for_storage_key   s$    & .S`amFFvVVr\   c                Z    t               }| | |d<   t        t        j                  |      S )a  
        Generates a command to get all browser cookies.

        Args:
            browser_context_id: Browser context ID (optional). Useful when working
                               with multiple contexts (e.g., multiple windows or tabs).

        Returns:
            GetCookiesCommand: The CDP command to get all cookies, which will return an array
                of Cookie objects.
        rS   rT   )r   r   r    GET_COOKIESrX   s     rZ   get_cookieszStorageCommands.get_cookies   s0     "#));F%&m77GGr\   c                P    t        |       }t        t        j                  |      S )a  
        Generates a command to get the storage key for a specific frame.

        Storage keys are used to isolate data between different origins or
        partitions in the browser.

        Args:
            frame_id: The ID of the frame for which to get the storage key.

        Returns:
            GetStorageKeyForFrameCommand: The CDP command to get the storage key for the specified
                frame.
        )frameIdrT   )r   r   r    GET_STORAGE_KEY_FOR_FRAME)frame_idrV   s     rZ   get_storage_key_for_framez)StorageCommands.get_storage_key_for_frame   s!     -X>mEEfUUr\   c                P    t        |       }t        t        j                  |      S )ag  
        Generates a command to get storage usage and quota information for an origin.

        Useful for monitoring or debugging storage consumption of a site.

        Args:
            origin: The security origin (e.g., "https://example.com") for which to get information.

        Returns:
            GetUsageAndQuotaCommand: The CDP command that will return:
                - usage: Storage usage in bytes
                - quota: Storage quota in bytes
                - usageBreakdown: Breakdown of usage by storage type
                - overrideActive: Whether there is an active quota override
        r^   rT   )r   r   r    GET_USAGE_AND_QUOTAr^   rV   s     rZ   get_usage_and_quotaz#StorageCommands.get_usage_and_quota   s!    " (v6m??OOr\   c                ^    t        |       }|||d<   t        t        j                  |      S )a  
        Generates a command to set browser cookies.

        Args:
            cookies: list of Cookie objects to set.
            browser_context_id: Browser context ID (optional). Useful when working
                               with multiple contexts (e.g., multiple windows or tabs).

        Returns:
            SetCookiesCommand: The CDP command to set the specified cookies.
        )cookiesrS   rT   )r   r   r    SET_COOKIES)rv   rY   rV   s      rZ   set_cookieszStorageCommands.set_cookies   s2     "'2));F%&m77GGr\   c                T    t        | ||      }t        t        j                  |      S )a$  
        Generates a command to set K-anonymity for protected audience.

        This command is used to configure anonymity in privacy-preserving advertising
        systems (part of Google's Privacy Sandbox).

        Args:
            owner: Owner of the K-anonymity configuration.
            name: Name of the K-anonymity configuration.
            hashes: list of hashes for the configuration.

        Returns:
            SetProtectedAudienceKAnonymityCommand: The CDP command to set protected audience
                K-anonymity.
        )ownernamehashesrT   )r   r   r    "SET_PROTECTED_AUDIENCE_K_ANONYMITY)rz   r{   r|   rV   s       rZ   "set_protected_audience_k_anonymityz2StorageCommands.set_protected_audience_k_anonymity   s'    & 6EU[\mNNW]^^r\   c                P    t        |       }t        t        j                  |      S )a  
        Generates a command to register an origin to receive notifications about changes
        to its Cache Storage.

        Cache Storage is primarily used by Service Workers to store resources for offline use.

        Args:
            origin: The security origin (e.g., "https://example.com") to monitor.

        Returns:
            TrackCacheStorageForOriginCommand: The CDP command to register monitoring of the
                origin's Cache Storage.
        rq   rT   )r!   r   r    TRACK_CACHE_STORAGE_FOR_ORIGINrs   s     rZ   track_cache_storage_for_originz.StorageCommands.track_cache_storage_for_origin  s"     2@mJJSYZZr\   c                P    t        |       }t        t        j                  |      S )a  
        Generates a command to register a storage key to receive notifications
        about changes to its Cache Storage.

        Similar to track_cache_storage_for_origin, but uses the storage key
        for more precise isolation.

        Args:
            storage_key: The storage key to monitor.

        Returns:
            TrackCacheStorageForStorageKeyCommand: The CDP command to register monitoring of
                the key's Cache Storage.
        rd   rT   )r"   r   r    #TRACK_CACHE_STORAGE_FOR_STORAGE_KEYrf   rV   s     rZ   #track_cache_storage_for_storage_keyz3StorageCommands.track_cache_storage_for_storage_key  s"    $ 6MmOOX^__r\   c                P    t        |       }t        t        j                  |      S )a  
        Generates a command to register an origin to receive notifications about changes
        to its IndexedDB.

        IndexedDB is a NoSQL database system in the browser for storing
        large amounts of structured data.

        Args:
            origin: The security origin (e.g., "https://example.com") to monitor.

        Returns:
            TrackIndexedDBForOriginCommand: The CDP command to register monitoring of
                the origin's IndexedDB.
        rq   rT   )r#   r   r    TRACK_INDEXED_DB_FOR_ORIGINrs   s     rZ   track_indexed_db_for_originz+StorageCommands.track_indexed_db_for_origin+  s"      /f=mGGPVWWr\   c                P    t        |       }t        t        j                  |      S )a  
        Generates a command to register a storage key to receive notifications
        about changes to its IndexedDB.

        Similar to track_indexed_db_for_origin, but uses the storage key
        for more precise isolation.

        Args:
            storage_key: The storage key to monitor.

        Returns:
            TrackIndexedDBForStorageKeyCommand: The CDP command to register monitoring of
                the key's IndexedDB.
        r   rT   )r$   r   r     TRACK_INDEXED_DB_FOR_STORAGE_KEYr   s     rZ    track_indexed_db_for_storage_keyz0StorageCommands.track_indexed_db_for_storage_key>  s"      3kJmLLU[\\r\   c                P    t        |       }t        t        j                  |      S )a  
        Generates a command to unregister an origin from receiving notifications
        about changes to its Cache Storage.

        Use this method to stop monitoring Cache Storage after using track_cache_storage_for_origin.

        Args:
            origin: The security origin (e.g., "https://example.com") to stop monitoring.

        Returns:
            UntrackCacheStorageForOriginCommand: The CDP command to cancel monitoring of the
                origin's Cache Storage.
        rq   rT   )r%   r   r     UNTRACK_CACHE_STORAGE_FOR_ORIGINrs   s     rZ    untrack_cache_storage_for_originz0StorageCommands.untrack_cache_storage_for_originQ  s"     46BmLLU[\\r\   c                P    t        |       }t        t        j                  |      S )a  
        Generates a command to unregister a storage key from receiving notifications
        about changes to its Cache Storage.

        Use this method to stop monitoring Cache Storage after using
        track_cache_storage_for_storage_key.

        Args:
            storage_key: The storage key to stop monitoring.

        Returns:
            UntrackCacheStorageForStorageKeyCommand: The CDP command to cancel monitoring of
                the key's Cache Storage.
        r   rT   )r&   r   r    %UNTRACK_CACHE_STORAGE_FOR_STORAGE_KEYr   s     rZ   %untrack_cache_storage_for_storage_keyz5StorageCommands.untrack_cache_storage_for_storage_keyc  s"    $ 8;OmQQZ`aar\   c                P    t        |       }t        t        j                  |      S )a  
        Generates a command to unregister an origin from receiving notifications
        about changes to its IndexedDB.

        Use this method to stop monitoring IndexedDB after using track_indexed_db_for_origin.

        Args:
            origin: The security origin (e.g., "https://example.com") to stop monitoring.

        Returns:
            UntrackIndexedDBForOriginCommand: The CDP command to cancel monitoring of
                the origin's IndexedDB.
        rq   rT   )r'   r   r    UNTRACK_INDEXED_DB_FOR_ORIGINrs   s     rZ   untrack_indexed_db_for_originz-StorageCommands.untrack_indexed_db_for_originx  s"     1?mIIRXYYr\   c                P    t        |       }t        t        j                  |      S )a  
        Generates a command to unregister a storage key from receiving notifications
        about changes to its IndexedDB.

        Use this method to stop monitoring IndexedDB after using track_indexed_db_for_storage_key.

        Args:
            storage_key: The storage key to stop monitoring.

        Returns:
            UntrackIndexedDBForStorageKeyCommand: The CDP command to cancel monitoring
                of the key's IndexedDB.
        r   rT   )r(   r   r    "UNTRACK_INDEXED_DB_FOR_STORAGE_KEYr   s     rZ   "untrack_indexed_db_for_storage_keyz2StorageCommands.untrack_indexed_db_for_storage_key  s"    " 5LmNNW]^^r\   c                P    t        |       }t        t        j                  |      S )a  
        Generates a command to clear all Shared Storage entries for a specific origin.

        Shared Storage is an experimental API that allows cross-origin shared storage
        with privacy protections.

        Args:
            owner_origin: The owner origin of the Shared Storage to clear.

        Returns:
            ClearSharedStorageEntriesCommand: The CDP command to clear the Shared Storage entries.
        ownerOriginrT   )r
   r   r    CLEAR_SHARED_STORAGE_ENTRIESowner_originrV   s     rZ   clear_shared_storage_entriesz,StorageCommands.clear_shared_storage_entries  s"     1\JmHHQWXXr\   c                P    t        |       }t        t        j                  |      S )aE  
        Generates a command to remove all Trust Tokens issued by the specified origin.

        Trust Tokens are an experimental API for combating fraud while preserving user
        privacy. This command keeps other stored data, including the issuer's redemption
        records, intact.

        Args:
            issuer_origin: The issuer origin of the tokens to remove.

        Returns:
            ClearTrustTokensCommand: The CDP command to clear Trust Tokens, which will return:
                - didDeleteTokens: True if any tokens were deleted, False otherwise.
        )issuerOriginrT   )r   r   r    CLEAR_TRUST_TOKENS)issuer_originrV   s     rZ   clear_trust_tokensz"StorageCommands.clear_trust_tokens  s!      (]Cm>>vNNr\   c                R    t        | |      }t        t        j                  |      S )aE  
        Generates a command to delete a specific Shared Storage entry.

        Args:
            owner_origin: The owner origin of the Shared Storage.
            key: The key of the entry to delete.

        Returns:
            DeleteSharedStorageEntryCommand: The CDP command to delete the Shared Storage entry.
        )r   keyrT   )r   r   r    DELETE_SHARED_STORAGE_ENTRY)r   r   rV   s      rZ   delete_shared_storage_entryz+StorageCommands.delete_shared_storage_entry  s$     0LcRmGGPVWWr\   c                P    t        |       }t        t        j                  |      S )a  
        Generates a command to delete a Storage Bucket with the specified key and name.

        Storage Buckets are an experimental API for managing storage data with
        greater granularity and expiration control.

        Args:
            bucket: A StorageBucket object containing the storageKey and name of the bucket
                to delete.

        Returns:
            DeleteStorageBucketCommand: The CDP command to delete the Storage Bucket.
        )bucketrT   )r   r   r    DELETE_STORAGE_BUCKET)r   rV   s     rZ   delete_storage_bucketz%StorageCommands.delete_storage_bucket  s!     +&9mAA&QQr\   c                R    t        | |      }t        t        j                  |      S )a  
        Generates a command to get the list of URLs from a page and its embedded resources
        that match existing grace period URL pattern rules.

        This command is useful for monitoring which URLs would be affected by the
        Privacy Sandbox's third-party cookie policies.

        Args:
            first_party_url: The URL of the page being visited (first-party).
            third_party_urls: Optional list of embedded third-party resource URLs.

        Returns:
            GetAffectedUrlsForThirdPartyCookieMetadataCommand: The CDP command to get URLs
                affected by third-party cookie metadata.
        )firstPartyUrlthirdPartyUrlsrT   )r   r   r    1GET_AFFECTED_URLS_FOR_THIRD_PARTY_COOKIE_METADATA)first_party_urlthird_party_urlsrV   s      rZ   1get_affected_urls_for_third_party_cookie_metadatazAStorageCommands.get_affected_urls_for_third_party_cookie_metadata  s0    & B):J
  RR[a
 	
r\   c                R    t        | |      }t        t        j                  |      S )a  
        Generates a command to get details of a specific interest group.

        Interest Groups are part of the FLEDGE/Protected Audience API for privacy-preserving
        advertising, enabling in-browser ad auctions.

        Args:
            owner_origin: The owner origin of the interest group.
            name: The name of the interest group.

        Returns:
            GetInterestGroupDetailsCommand: The CDP command to get interest group details.
        )r   r{   rT   )r   r   r    GET_INTEREST_GROUP_DETAILS)r   r{   rV   s      rZ   get_interest_group_detailsz*StorageCommands.get_interest_group_details  s#     /<dSmFFvVVr\   c                 6    t        t        j                        S )aA  
        Generates a command to get related website sets.

        Related Website Sets are an API that allows sites under the same entity
        to share some data, despite third-party cookie restrictions.

        Returns:
            GetRelatedWebsiteSetsCommand: The CDP command to get related website sets.
        )rU   )r   r    GET_RELATED_WEBSITE_SETS r\   rZ   get_related_website_setsz(StorageCommands.get_related_website_sets  s     mDDEEr\   c                P    t        |       }t        t        j                  |      S )a  
        Generates a command to get all Shared Storage entries for an origin.

        Args:
            owner_origin: The owner origin of the Shared Storage.

        Returns:
            GetSharedStorageEntriesCommand: The CDP command to get the Shared Storage entries.
        r   rT   )r   r   r    GET_SHARED_STORAGE_ENTRIESr   s     rZ   get_shared_storage_entriesz*StorageCommands.get_shared_storage_entries  s!     /<HmFFvVVr\   c                P    t        |       }t        t        j                  |      S )ad  
        Generates a command to get Shared Storage metadata for an origin.

        Metadata includes information such as usage, budget, and creation time.

        Args:
            owner_origin: The owner origin of the Shared Storage.

        Returns:
            GetSharedStorageMetadataCommand: The CDP command to get Shared Storage metadata.
        r   rT   )r   r   r    GET_SHARED_STORAGE_METADATAr   s     rZ   get_shared_storage_metadataz+StorageCommands.get_shared_storage_metadata*  s"     0LImGGPVWWr\   c                 8    t        t        j                  i       S )z
        Generates a command to get all available Trust Tokens.

        Returns:
            GetTrustTokensCommand: The CDP command to get Trust Tokens, which will return pairs
                    of issuer origin and count of available tokens.
        rT   )r   r    GET_TRUST_TOKENSr   r\   rZ   get_trust_tokensz StorageCommands.get_trust_tokens:  s     m<<RHHr\   c                ^    t        |       }|||d<   t        t        j                  |      S )a   
        Generates a command to override the storage quota for a specific origin.

        This command is useful for storage exhaustion testing or simulating
        different storage conditions.

        Args:
            origin: The origin for which to override the quota.
            quota_size: The size of the new quota in bytes (optional).
                       If not specified, any existing override will be removed.

        Returns:
            OverrideQuotaForOriginCommand: The CDP command to override the origin's quota.
        rq   	quotaSizerT   )r   r   r    OVERRIDE_QUOTA_FOR_ORIGIN)r^   
quota_sizerV   s      rZ   override_quota_for_originz)StorageCommands.override_quota_for_originE  s1    $ .V<!",F;mEEfUUr\   c                P    t        |       }t        t        j                  |      S )a  
        Generates a command to reset the Shared Storage budget for an origin.

        Shared Storage uses a budget system to limit the amount of operations
        or specific operations to preserve user privacy.

        Args:
            owner_origin: The owner origin of the Shared Storage.

        Returns:
            ResetSharedStorageBudgetCommand: The CDP command to reset the Shared Storage budget.
        r   rT   )r   r   r    RESET_SHARED_STORAGE_BUDGETr   s     rZ   reset_shared_storage_budgetz+StorageCommands.reset_shared_storage_budget\  s"     0LImGGPVWWr\   c                 8    t        t        j                  i       S )a  
        Generates a command to run bounce tracking mitigations.

        Bounce tracking is a tracking technique that involves redirecting users
        through intermediate URLs to establish tracking cookies.
        This command activates protections against this technique.

        Returns:
            RunBounceTrackingMitigationsCommand: The CDP command to run bounce tracking mitigations.
        rT   )r   r    RUN_BOUNCE_TRACKING_MITIGATIONSr   r\   rZ   run_bounce_tracking_mitigationsz/StorageCommands.run_bounce_tracking_mitigationsm  s     mKKTVWWr\   c                 8    t        t        j                  i       S )a  
        Generates a command to send pending attribution reports.

        Attribution Reporting is an API that allows measuring conversions while
        preserving user privacy. This command forces sending reports that
        are waiting to be sent.

        Returns:
            SendPendingAttributionReportsCommand: The CDP command to send pending attribution
                reports.
        rT   )r   r     SEND_PENDING_ATTRIBUTION_REPORTSr   r\   rZ    send_pending_attribution_reportsz0StorageCommands.send_pending_attribution_reports{  s     mLLUWXXr\   c                P    t        |       }t        t        j                  |      S )a  
        Generates a command to enable or disable local testing mode for Attribution Reporting.

        Testing mode makes it easier to develop and test the Attribution Reporting API
        by removing restrictions like delays and rate limits that would normally apply.

        Args:
            enabled: True to enable local testing mode, False to disable it.

        Returns:
            SetAttributionReportingLocalTestingModeCommand: The CDP command to set Attribution
                Reporting local testing mode.
        )enabledrT   )r   r   r    ,SET_ATTRIBUTION_REPORTING_LOCAL_TESTING_MODE)r   rV   s     rZ   ,set_attribution_reporting_local_testing_modez<StorageCommands.set_attribution_reporting_local_testing_mode  s'    " ?wO MMV\
 	
r\   c                P    t        |       }t        t        j                  |      S )a8  
        Generates a command to enable or disable Attribution Reporting tracking.

        Args:
            enable: True to enable tracking, False to disable it.

        Returns:
            SetAttributionReportingTrackingCommand: The CDP command to set Attribution
                Reporting tracking.
        enablerT   )r   r   r    "SET_ATTRIBUTION_REPORTING_TRACKINGr   rV   s     rZ   "set_attribution_reporting_trackingz2StorageCommands.set_attribution_reporting_tracking  s"     7fEmNNW]^^r\   c                P    t        |       }t        t        j                  |      S )a  
        Generates a command to enable or disable interest group auction tracking.

        Interest group auctions are part of the FLEDGE/Protected Audience API and
        allow for in-browser ad auctions in a privacy-preserving way.

        Args:
            enable: True to enable tracking, False to disable it.

        Returns:
            SetInterestGroupAuctionTrackingCommand: The CDP command to set interest group
                auction tracking.
        r   rT   )r   r   r    #SET_INTEREST_GROUP_AUCTION_TRACKINGr   s     rZ   #set_interest_group_auction_trackingz3StorageCommands.set_interest_group_auction_tracking  s"     7fEmOOX^__r\   c                P    t        |       }t        t        j                  |      S )a  
        Generates a command to enable or disable interest group tracking.

        Args:
            enable: True to enable tracking, False to disable it.

        Returns:
            SetInterestGroupTrackingCommand: The CDP command to set interest group tracking.
        r   rT   )r   r   r    SET_INTEREST_GROUP_TRACKINGr   s     rZ   set_interest_group_trackingz+StorageCommands.set_interest_group_tracking  s"     0v>mGGPVWWr\   c                b    t        | ||      }|||d<   t        t        j                  |      S )a  
        Generates a command to set an entry in Shared Storage.

        Args:
            owner_origin: The owner origin of the Shared Storage.
            key: The key of the entry to set.
            value: The value of the entry to set.
            ignore_if_present: If True, won't replace an existing entry with the same key.

        Returns:
            SetSharedStorageEntryCommand: The CDP command to set a Shared Storage entry.
        )r   r   valueignoreIfPresentrT   )r   r   r    SET_SHARED_STORAGE_ENTRY)r   r   r   ignore_if_presentrV   s        rZ   set_shared_storage_entryz(StorageCommands.set_shared_storage_entry  s7      -3V[\((9F$%mDDVTTr\   c                P    t        |       }t        t        j                  |      S )ab  
        Generates a command to enable or disable Shared Storage tracking.

        When enabled, events related to Shared Storage usage will be emitted.

        Args:
            enable: True to enable tracking, False to disable it.

        Returns:
            SetSharedStorageTrackingCommand: The CDP command to set Shared Storage tracking.
        r   rT   )r   r   r    SET_SHARED_STORAGE_TRACKINGr   s     rZ   set_shared_storage_trackingz+StorageCommands.set_shared_storage_tracking  s"     0v>mGGPVWWr\   c                R    t        | |      }t        t        j                  |      S )a  
        Generates a command to enable or disable Storage Bucket tracking.

        When enabled, events related to changes in storage buckets will be emitted.

        Args:
            storage_key: The storage key for which to set tracking.
            enable: True to enable tracking, False to disable it.

        Returns:
            SetStorageBucketTrackingCommand: The CDP command to set Storage Bucket tracking.
        )rd   r   rT   )r   r   r    SET_STORAGE_BUCKET_TRACKING)rf   r   rV   s      rZ   set_storage_bucket_trackingz+StorageCommands.set_storage_bucket_tracking  s$      0;vVmGGPVWWr\   )N)rY   Optional[str]returnr*   )r^   strra   r   r   r+   )rf   r   ra   r   r   r,   )rY   r   r   r2   )rn   r   r   r7   )r^   r   r   r9   )rv   zlist[CookieParam]rY   r   r   r@   )rz   r   r{   r   r|   	list[str]r   rC   )r^   r   r   rG   )rf   r   r   rH   )r^   r   r   rI   )rf   r   r   rJ   )r^   r   r   rK   )rf   r   r   rL   )r^   r   r   rM   )rf   r   r   rN   )r   r   r   r-   )r   r   r   r.   )r   r   r   r   r   r/   )r   rO   r   r0   )r   r   r   r   r   r1   )r   r   r{   r   r   r3   )r   r4   )r   r   r   r5   )r   r   r   r6   )r   r8   )r^   r   r   zOptional[float]r   r:   )r   r   r   r;   )r   r<   )r   r=   )r   boolr   r>   )r   r   r   r?   )r   r   r   rA   )r   r   r   rB   )
r   r   r   r   r   r   r   zOptional[bool]r   rD   )r   r   r   rE   )rf   r   r   r   r   rF   )*__name__
__module____qualname____doc__staticmethodr[   rb   rg   rj   ro   rt   rx   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\   rZ   rQ   rQ   W   sU   $ J J  R R  WW),W	&W W* H H" V V" P P& HLH"H8EH	H H& ___'0_	._ _* [ [" ``	.` `( X X$ ] ]$ ] ]" bb	0b b( Z Z" __	-_ _& Y Y  O O$ X X R R" 

09
	:
 
2 W W" 
F 
F W W X X I I 37VV!0V	&V V, X X  X X Y Y 

	7
 
* _ _ ` `" X X UYUU #U,/UDRU	%U U( X X XX"&X	(X Xr\   rQ   N)T
__future__r   typingr   r   pydoll.protocol.baser   pydoll.protocol.storage.methodsr   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'   r(   pydoll.protocol.network.typesr)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   pydoll.protocol.storage.typesrO   rQ   r   r\   rZ   <module>r      s    " * (# # # # # # # # #J 9& & & & & & & & & &N <n
X n
Xr\   