use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ResourceType {
Document,
Stylesheet,
Image,
Media,
Font,
Script,
TextTrack,
#[serde(rename = "XHR")]
Xhr,
Fetch,
Prefetch,
EventSource,
WebSocket,
Manifest,
SignedExchange,
Ping,
#[serde(rename = "CSPViolationReport")]
CspViolationReport,
Preflight,
#[serde(rename = "FedCM")]
FedCm,
Other,
#[serde(untagged)]
Unrecognized(String),
}
pub type LoaderId = String;
pub type RequestId = String;
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ErrorReason {
Failed,
Aborted,
TimedOut,
AccessDenied,
ConnectionClosed,
ConnectionReset,
ConnectionRefused,
ConnectionAborted,
ConnectionFailed,
NameNotResolved,
InternetDisconnected,
AddressUnreachable,
BlockedByClient,
BlockedByResponse,
#[serde(untagged)]
Unrecognized(String),
}
pub type TimeSinceEpoch = f64;
pub type MonotonicTime = f64;
pub type Headers = serde_json::Value;
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ConnectionType {
#[serde(rename = "none")]
None,
#[serde(rename = "cellular2g")]
Cellular2g,
#[serde(rename = "cellular3g")]
Cellular3g,
#[serde(rename = "cellular4g")]
Cellular4g,
#[serde(rename = "bluetooth")]
Bluetooth,
#[serde(rename = "ethernet")]
Ethernet,
#[serde(rename = "wifi")]
Wifi,
#[serde(rename = "wimax")]
Wimax,
#[serde(rename = "other")]
Other,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum CookieSameSite {
Strict,
Lax,
None,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum CookiePriority {
Low,
Medium,
High,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum CookieSourceScheme {
Unset,
NonSecure,
Secure,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ResourceTiming {
#[serde(rename = "requestTime")]
pub request_time: f64,
#[serde(rename = "proxyStart")]
pub proxy_start: f64,
#[serde(rename = "proxyEnd")]
pub proxy_end: f64,
#[serde(rename = "dnsStart")]
pub dns_start: f64,
#[serde(rename = "dnsEnd")]
pub dns_end: f64,
#[serde(rename = "connectStart")]
pub connect_start: f64,
#[serde(rename = "connectEnd")]
pub connect_end: f64,
#[serde(rename = "sslStart")]
pub ssl_start: f64,
#[serde(rename = "sslEnd")]
pub ssl_end: f64,
#[serde(rename = "workerStart")]
pub worker_start: f64,
#[serde(rename = "workerReady")]
pub worker_ready: f64,
#[serde(rename = "workerFetchStart")]
pub worker_fetch_start: f64,
#[serde(rename = "workerRespondWithSettled")]
pub worker_respond_with_settled: f64,
#[serde(
rename = "workerRouterEvaluationStart",
default,
skip_serializing_if = "Option::is_none"
)]
pub worker_router_evaluation_start: Option<f64>,
#[serde(
rename = "workerCacheLookupStart",
default,
skip_serializing_if = "Option::is_none"
)]
pub worker_cache_lookup_start: Option<f64>,
#[serde(rename = "sendStart")]
pub send_start: f64,
#[serde(rename = "sendEnd")]
pub send_end: f64,
#[serde(rename = "pushStart")]
pub push_start: f64,
#[serde(rename = "pushEnd")]
pub push_end: f64,
#[serde(rename = "receiveHeadersStart")]
pub receive_headers_start: f64,
#[serde(rename = "receiveHeadersEnd")]
pub receive_headers_end: f64,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ResourcePriority {
VeryLow,
Low,
Medium,
High,
VeryHigh,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum RenderBlockingBehavior {
Blocking,
InBodyParserBlocking,
NonBlocking,
NonBlockingDynamic,
PotentiallyBlocking,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct PostDataEntry {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub bytes: Option<String>,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Request {
pub url: String,
#[serde(
rename = "urlFragment",
default,
skip_serializing_if = "Option::is_none"
)]
pub url_fragment: Option<String>,
pub method: String,
pub headers: Headers,
#[serde(rename = "postData", default, skip_serializing_if = "Option::is_none")]
pub post_data: Option<String>,
#[serde(
rename = "hasPostData",
default,
skip_serializing_if = "Option::is_none"
)]
pub has_post_data: Option<bool>,
#[serde(
rename = "postDataEntries",
default,
skip_serializing_if = "Option::is_none"
)]
pub post_data_entries: Option<Vec<PostDataEntry>>,
#[serde(
rename = "mixedContentType",
default,
skip_serializing_if = "Option::is_none"
)]
pub mixed_content_type: Option<crate::protocol::security::MixedContentType>,
#[serde(rename = "initialPriority")]
pub initial_priority: ResourcePriority,
#[serde(rename = "referrerPolicy")]
pub referrer_policy: RequestReferrerPolicy,
#[serde(
rename = "isLinkPreload",
default,
skip_serializing_if = "Option::is_none"
)]
pub is_link_preload: Option<bool>,
#[serde(
rename = "trustTokenParams",
default,
skip_serializing_if = "Option::is_none"
)]
pub trust_token_params: Option<TrustTokenParams>,
#[serde(
rename = "isSameSite",
default,
skip_serializing_if = "Option::is_none"
)]
pub is_same_site: Option<bool>,
#[serde(
rename = "isAdRelated",
default,
skip_serializing_if = "Option::is_none"
)]
pub is_ad_related: Option<bool>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum RequestReferrerPolicy {
#[serde(rename = "unsafe-url")]
UnsafeUrl,
#[serde(rename = "no-referrer-when-downgrade")]
NoReferrerWhenDowngrade,
#[serde(rename = "no-referrer")]
NoReferrer,
#[serde(rename = "origin")]
Origin,
#[serde(rename = "origin-when-cross-origin")]
OriginWhenCrossOrigin,
#[serde(rename = "same-origin")]
SameOrigin,
#[serde(rename = "strict-origin")]
StrictOrigin,
#[serde(rename = "strict-origin-when-cross-origin")]
StrictOriginWhenCrossOrigin,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SignedCertificateTimestamp {
pub status: String,
pub origin: String,
#[serde(rename = "logDescription")]
pub log_description: String,
#[serde(rename = "logId")]
pub log_id: String,
pub timestamp: f64,
#[serde(rename = "hashAlgorithm")]
pub hash_algorithm: String,
#[serde(rename = "signatureAlgorithm")]
pub signature_algorithm: String,
#[serde(rename = "signatureData")]
pub signature_data: String,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SecurityDetails {
pub protocol: String,
#[serde(rename = "keyExchange")]
pub key_exchange: String,
#[serde(
rename = "keyExchangeGroup",
default,
skip_serializing_if = "Option::is_none"
)]
pub key_exchange_group: Option<String>,
pub cipher: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub mac: Option<String>,
#[serde(rename = "certificateId")]
pub certificate_id: crate::protocol::security::CertificateId,
#[serde(rename = "subjectName")]
pub subject_name: String,
#[serde(rename = "sanList")]
pub san_list: Vec<String>,
pub issuer: String,
#[serde(rename = "validFrom")]
pub valid_from: TimeSinceEpoch,
#[serde(rename = "validTo")]
pub valid_to: TimeSinceEpoch,
#[serde(rename = "signedCertificateTimestampList")]
pub signed_certificate_timestamp_list: Vec<SignedCertificateTimestamp>,
#[serde(rename = "certificateTransparencyCompliance")]
pub certificate_transparency_compliance: CertificateTransparencyCompliance,
#[serde(
rename = "serverSignatureAlgorithm",
default,
skip_serializing_if = "Option::is_none"
)]
pub server_signature_algorithm: Option<i64>,
#[serde(rename = "encryptedClientHello")]
pub encrypted_client_hello: bool,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum CertificateTransparencyCompliance {
#[serde(rename = "unknown")]
Unknown,
#[serde(rename = "not-compliant")]
NotCompliant,
#[serde(rename = "compliant")]
Compliant,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum BlockedReason {
#[serde(rename = "other")]
Other,
#[serde(rename = "csp")]
Csp,
#[serde(rename = "mixed-content")]
MixedContent,
#[serde(rename = "origin")]
Origin,
#[serde(rename = "inspector")]
Inspector,
#[serde(rename = "integrity")]
Integrity,
#[serde(rename = "subresource-filter")]
SubresourceFilter,
#[serde(rename = "content-type")]
ContentType,
#[serde(rename = "coep-frame-resource-needs-coep-header")]
CoepFrameResourceNeedsCoepHeader,
#[serde(rename = "coop-sandboxed-iframe-cannot-navigate-to-coop-page")]
CoopSandboxedIframeCannotNavigateToCoopPage,
#[serde(rename = "corp-not-same-origin")]
CorpNotSameOrigin,
#[serde(rename = "corp-not-same-origin-after-defaulted-to-same-origin-by-coep")]
CorpNotSameOriginAfterDefaultedToSameOriginByCoep,
#[serde(rename = "corp-not-same-origin-after-defaulted-to-same-origin-by-dip")]
CorpNotSameOriginAfterDefaultedToSameOriginByDip,
#[serde(rename = "corp-not-same-origin-after-defaulted-to-same-origin-by-coep-and-dip")]
CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip,
#[serde(rename = "corp-not-same-site")]
CorpNotSameSite,
#[serde(rename = "sri-message-signature-mismatch")]
SriMessageSignatureMismatch,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum CorsError {
DisallowedByMode,
InvalidResponse,
WildcardOriginNotAllowed,
MissingAllowOriginHeader,
MultipleAllowOriginValues,
InvalidAllowOriginValue,
AllowOriginMismatch,
InvalidAllowCredentials,
CorsDisabledScheme,
PreflightInvalidStatus,
PreflightDisallowedRedirect,
PreflightWildcardOriginNotAllowed,
PreflightMissingAllowOriginHeader,
PreflightMultipleAllowOriginValues,
PreflightInvalidAllowOriginValue,
PreflightAllowOriginMismatch,
PreflightInvalidAllowCredentials,
PreflightMissingAllowExternal,
PreflightInvalidAllowExternal,
InvalidAllowMethodsPreflightResponse,
InvalidAllowHeadersPreflightResponse,
MethodDisallowedByPreflightResponse,
HeaderDisallowedByPreflightResponse,
RedirectContainsCredentials,
InsecureLocalNetwork,
InvalidLocalNetworkAccess,
NoCorsRedirectModeNotFollow,
LocalNetworkAccessPermissionDenied,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CorsErrorStatus {
#[serde(rename = "corsError")]
pub cors_error: CorsError,
#[serde(rename = "failedParameter")]
pub failed_parameter: String,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ServiceWorkerResponseSource {
#[serde(rename = "cache-storage")]
CacheStorage,
#[serde(rename = "http-cache")]
HttpCache,
#[serde(rename = "fallback-code")]
FallbackCode,
#[serde(rename = "network")]
Network,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct TrustTokenParams {
pub operation: TrustTokenOperationType,
#[serde(rename = "refreshPolicy")]
pub refresh_policy: TrustTokenParamsRefreshPolicy,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub issuers: Option<Vec<String>>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum TrustTokenParamsRefreshPolicy {
UseCached,
Refresh,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum TrustTokenOperationType {
Issuance,
Redemption,
Signing,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum AlternateProtocolUsage {
#[serde(rename = "alternativeJobWonWithoutRace")]
AlternativeJobWonWithoutRace,
#[serde(rename = "alternativeJobWonRace")]
AlternativeJobWonRace,
#[serde(rename = "mainJobWonRace")]
MainJobWonRace,
#[serde(rename = "mappingMissing")]
MappingMissing,
#[serde(rename = "broken")]
Broken,
#[serde(rename = "dnsAlpnH3JobWonWithoutRace")]
DnsAlpnH3JobWonWithoutRace,
#[serde(rename = "dnsAlpnH3JobWonRace")]
DnsAlpnH3JobWonRace,
#[serde(rename = "unspecifiedReason")]
UnspecifiedReason,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ServiceWorkerRouterSource {
#[serde(rename = "network")]
Network,
#[serde(rename = "cache")]
Cache,
#[serde(rename = "fetch-event")]
FetchEvent,
#[serde(rename = "race-network-and-fetch-handler")]
RaceNetworkAndFetchHandler,
#[serde(rename = "race-network-and-cache")]
RaceNetworkAndCache,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ServiceWorkerRouterInfo {
#[serde(
rename = "ruleIdMatched",
default,
skip_serializing_if = "Option::is_none"
)]
pub rule_id_matched: Option<i64>,
#[serde(
rename = "matchedSourceType",
default,
skip_serializing_if = "Option::is_none"
)]
pub matched_source_type: Option<ServiceWorkerRouterSource>,
#[serde(
rename = "actualSourceType",
default,
skip_serializing_if = "Option::is_none"
)]
pub actual_source_type: Option<ServiceWorkerRouterSource>,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Response {
pub url: String,
pub status: i64,
#[serde(rename = "statusText")]
pub status_text: String,
pub headers: Headers,
#[serde(
rename = "headersText",
default,
skip_serializing_if = "Option::is_none"
)]
pub headers_text: Option<String>,
#[serde(rename = "mimeType")]
pub mime_type: String,
pub charset: String,
#[serde(
rename = "requestHeaders",
default,
skip_serializing_if = "Option::is_none"
)]
pub request_headers: Option<Headers>,
#[serde(
rename = "requestHeadersText",
default,
skip_serializing_if = "Option::is_none"
)]
pub request_headers_text: Option<String>,
#[serde(rename = "connectionReused")]
pub connection_reused: bool,
#[serde(rename = "connectionId")]
pub connection_id: f64,
#[serde(
rename = "remoteIPAddress",
default,
skip_serializing_if = "Option::is_none"
)]
pub remote_ip_address: Option<String>,
#[serde(
rename = "remotePort",
default,
skip_serializing_if = "Option::is_none"
)]
pub remote_port: Option<i64>,
#[serde(
rename = "fromDiskCache",
default,
skip_serializing_if = "Option::is_none"
)]
pub from_disk_cache: Option<bool>,
#[serde(
rename = "fromServiceWorker",
default,
skip_serializing_if = "Option::is_none"
)]
pub from_service_worker: Option<bool>,
#[serde(
rename = "fromPrefetchCache",
default,
skip_serializing_if = "Option::is_none"
)]
pub from_prefetch_cache: Option<bool>,
#[serde(
rename = "fromEarlyHints",
default,
skip_serializing_if = "Option::is_none"
)]
pub from_early_hints: Option<bool>,
#[serde(
rename = "serviceWorkerRouterInfo",
default,
skip_serializing_if = "Option::is_none"
)]
pub service_worker_router_info: Option<ServiceWorkerRouterInfo>,
#[serde(rename = "encodedDataLength")]
pub encoded_data_length: f64,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub timing: Option<ResourceTiming>,
#[serde(
rename = "serviceWorkerResponseSource",
default,
skip_serializing_if = "Option::is_none"
)]
pub service_worker_response_source: Option<ServiceWorkerResponseSource>,
#[serde(
rename = "responseTime",
default,
skip_serializing_if = "Option::is_none"
)]
pub response_time: Option<TimeSinceEpoch>,
#[serde(
rename = "cacheStorageCacheName",
default,
skip_serializing_if = "Option::is_none"
)]
pub cache_storage_cache_name: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub protocol: Option<String>,
#[serde(
rename = "alternateProtocolUsage",
default,
skip_serializing_if = "Option::is_none"
)]
pub alternate_protocol_usage: Option<AlternateProtocolUsage>,
#[serde(rename = "securityState")]
pub security_state: crate::protocol::security::SecurityState,
#[serde(
rename = "securityDetails",
default,
skip_serializing_if = "Option::is_none"
)]
pub security_details: Option<SecurityDetails>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct WebSocketRequest {
pub headers: Headers,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct WebSocketResponse {
pub status: i64,
#[serde(rename = "statusText")]
pub status_text: String,
pub headers: Headers,
#[serde(
rename = "headersText",
default,
skip_serializing_if = "Option::is_none"
)]
pub headers_text: Option<String>,
#[serde(
rename = "requestHeaders",
default,
skip_serializing_if = "Option::is_none"
)]
pub request_headers: Option<Headers>,
#[serde(
rename = "requestHeadersText",
default,
skip_serializing_if = "Option::is_none"
)]
pub request_headers_text: Option<String>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct WebSocketFrame {
pub opcode: f64,
pub mask: bool,
#[serde(rename = "payloadData")]
pub payload_data: String,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CachedResource {
pub url: String,
pub r#type: ResourceType,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub response: Option<Response>,
#[serde(rename = "bodySize")]
pub body_size: f64,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Initiator {
pub r#type: InitiatorType,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub stack: Option<crate::protocol::runtime::StackTrace>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
#[serde(
rename = "lineNumber",
default,
skip_serializing_if = "Option::is_none"
)]
pub line_number: Option<f64>,
#[serde(
rename = "columnNumber",
default,
skip_serializing_if = "Option::is_none"
)]
pub column_number: Option<f64>,
#[serde(rename = "requestId", default, skip_serializing_if = "Option::is_none")]
pub request_id: Option<RequestId>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum InitiatorType {
#[serde(rename = "parser")]
Parser,
#[serde(rename = "script")]
Script,
#[serde(rename = "preload")]
Preload,
SignedExchange,
#[serde(rename = "preflight")]
Preflight,
#[serde(rename = "FedCM")]
FedCm,
#[serde(rename = "other")]
Other,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct CookiePartitionKey {
#[serde(rename = "topLevelSite")]
pub top_level_site: String,
#[serde(rename = "hasCrossSiteAncestor")]
pub has_cross_site_ancestor: bool,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Cookie {
pub name: String,
pub value: String,
pub domain: String,
pub path: String,
pub expires: f64,
pub size: i64,
#[serde(rename = "httpOnly")]
pub http_only: bool,
pub secure: bool,
pub session: bool,
#[serde(rename = "sameSite", default, skip_serializing_if = "Option::is_none")]
pub same_site: Option<CookieSameSite>,
pub priority: CookiePriority,
#[serde(rename = "sourceScheme")]
pub source_scheme: CookieSourceScheme,
#[serde(rename = "sourcePort")]
pub source_port: i64,
#[serde(
rename = "partitionKey",
default,
skip_serializing_if = "Option::is_none"
)]
pub partition_key: Option<CookiePartitionKey>,
#[serde(
rename = "partitionKeyOpaque",
default,
skip_serializing_if = "Option::is_none"
)]
pub partition_key_opaque: Option<bool>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum SetCookieBlockedReason {
SecureOnly,
SameSiteStrict,
SameSiteLax,
SameSiteUnspecifiedTreatedAsLax,
SameSiteNoneInsecure,
UserPreferences,
ThirdPartyPhaseout,
SyntaxError,
SchemeNotSupported,
OverwriteSecure,
InvalidDomain,
InvalidPrefix,
UnknownError,
SchemefulSameSiteStrict,
SchemefulSameSiteLax,
SchemefulSameSiteUnspecifiedTreatedAsLax,
NameValuePairExceedsMaxSize,
DisallowedCharacter,
NoCookieContent,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum CookieBlockedReason {
SecureOnly,
NotOnPath,
DomainMismatch,
SameSiteStrict,
SameSiteLax,
SameSiteUnspecifiedTreatedAsLax,
SameSiteNoneInsecure,
UserPreferences,
ThirdPartyPhaseout,
UnknownError,
SchemefulSameSiteStrict,
SchemefulSameSiteLax,
SchemefulSameSiteUnspecifiedTreatedAsLax,
NameValuePairExceedsMaxSize,
PortMismatch,
SchemeMismatch,
AnonymousContext,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum CookieExemptionReason {
None,
UserSetting,
EnterprisePolicy,
StorageAccess,
TopLevelStorageAccess,
Scheme,
SameSiteNoneCookiesInSandbox,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct BlockedSetCookieWithReason {
#[serde(rename = "blockedReasons")]
pub blocked_reasons: Vec<SetCookieBlockedReason>,
#[serde(rename = "cookieLine")]
pub cookie_line: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub cookie: Option<Cookie>,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ExemptedSetCookieWithReason {
#[serde(rename = "exemptionReason")]
pub exemption_reason: CookieExemptionReason,
#[serde(rename = "cookieLine")]
pub cookie_line: String,
pub cookie: Cookie,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AssociatedCookie {
pub cookie: Cookie,
#[serde(rename = "blockedReasons")]
pub blocked_reasons: Vec<CookieBlockedReason>,
#[serde(
rename = "exemptionReason",
default,
skip_serializing_if = "Option::is_none"
)]
pub exemption_reason: Option<CookieExemptionReason>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct CookieParam {
pub name: String,
pub value: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub domain: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub secure: Option<bool>,
#[serde(rename = "httpOnly", default, skip_serializing_if = "Option::is_none")]
pub http_only: Option<bool>,
#[serde(rename = "sameSite", default, skip_serializing_if = "Option::is_none")]
pub same_site: Option<CookieSameSite>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub expires: Option<TimeSinceEpoch>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub priority: Option<CookiePriority>,
#[serde(
rename = "sourceScheme",
default,
skip_serializing_if = "Option::is_none"
)]
pub source_scheme: Option<CookieSourceScheme>,
#[serde(
rename = "sourcePort",
default,
skip_serializing_if = "Option::is_none"
)]
pub source_port: Option<i64>,
#[serde(
rename = "partitionKey",
default,
skip_serializing_if = "Option::is_none"
)]
pub partition_key: Option<CookiePartitionKey>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct AuthChallenge {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub source: Option<AuthChallengeSource>,
pub origin: String,
pub scheme: String,
pub realm: String,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum AuthChallengeSource {
Server,
Proxy,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AuthChallengeResponse {
pub response: AuthChallengeResponseResponse,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub username: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub password: Option<String>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum AuthChallengeResponseResponse {
Default,
CancelAuth,
ProvideCredentials,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SignedExchangeSignature {
pub label: String,
pub signature: String,
pub integrity: String,
#[serde(rename = "certUrl", default, skip_serializing_if = "Option::is_none")]
pub cert_url: Option<String>,
#[serde(
rename = "certSha256",
default,
skip_serializing_if = "Option::is_none"
)]
pub cert_sha256: Option<String>,
#[serde(rename = "validityUrl")]
pub validity_url: String,
pub date: i64,
pub expires: i64,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub certificates: Option<Vec<String>>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SignedExchangeHeader {
#[serde(rename = "requestUrl")]
pub request_url: String,
#[serde(rename = "responseCode")]
pub response_code: i64,
#[serde(rename = "responseHeaders")]
pub response_headers: Headers,
pub signatures: Vec<SignedExchangeSignature>,
#[serde(rename = "headerIntegrity")]
pub header_integrity: String,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum SignedExchangeErrorField {
#[serde(rename = "signatureSig")]
SignatureSig,
#[serde(rename = "signatureIntegrity")]
SignatureIntegrity,
#[serde(rename = "signatureCertUrl")]
SignatureCertUrl,
#[serde(rename = "signatureCertSha256")]
SignatureCertSha256,
#[serde(rename = "signatureValidityUrl")]
SignatureValidityUrl,
#[serde(rename = "signatureTimestamps")]
SignatureTimestamps,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SignedExchangeError {
pub message: String,
#[serde(
rename = "signatureIndex",
default,
skip_serializing_if = "Option::is_none"
)]
pub signature_index: Option<i64>,
#[serde(
rename = "errorField",
default,
skip_serializing_if = "Option::is_none"
)]
pub error_field: Option<SignedExchangeErrorField>,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SignedExchangeInfo {
#[serde(rename = "outerResponse")]
pub outer_response: Response,
#[serde(rename = "hasExtraInfo")]
pub has_extra_info: bool,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub header: Option<SignedExchangeHeader>,
#[serde(
rename = "securityDetails",
default,
skip_serializing_if = "Option::is_none"
)]
pub security_details: Option<SecurityDetails>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub errors: Option<Vec<SignedExchangeError>>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct NetworkConditions {
#[serde(rename = "urlPattern")]
pub url_pattern: String,
pub latency: f64,
#[serde(rename = "downloadThroughput")]
pub download_throughput: f64,
#[serde(rename = "uploadThroughput")]
pub upload_throughput: f64,
#[serde(
rename = "connectionType",
default,
skip_serializing_if = "Option::is_none"
)]
pub connection_type: Option<ConnectionType>,
#[serde(
rename = "packetLoss",
default,
skip_serializing_if = "Option::is_none"
)]
pub packet_loss: Option<f64>,
#[serde(
rename = "packetQueueLength",
default,
skip_serializing_if = "Option::is_none"
)]
pub packet_queue_length: Option<i64>,
#[serde(
rename = "packetReordering",
default,
skip_serializing_if = "Option::is_none"
)]
pub packet_reordering: Option<bool>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub offline: Option<bool>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct BlockPattern {
#[serde(rename = "urlPattern")]
pub url_pattern: String,
pub block: bool,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum DirectSocketDnsQueryType {
#[serde(rename = "ipv4")]
Ipv4,
#[serde(rename = "ipv6")]
Ipv6,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DirectTcpSocketOptions {
#[serde(rename = "noDelay")]
pub no_delay: bool,
#[serde(
rename = "keepAliveDelay",
default,
skip_serializing_if = "Option::is_none"
)]
pub keep_alive_delay: Option<f64>,
#[serde(
rename = "sendBufferSize",
default,
skip_serializing_if = "Option::is_none"
)]
pub send_buffer_size: Option<f64>,
#[serde(
rename = "receiveBufferSize",
default,
skip_serializing_if = "Option::is_none"
)]
pub receive_buffer_size: Option<f64>,
#[serde(
rename = "dnsQueryType",
default,
skip_serializing_if = "Option::is_none"
)]
pub dns_query_type: Option<DirectSocketDnsQueryType>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DirectUdpSocketOptions {
#[serde(
rename = "remoteAddr",
default,
skip_serializing_if = "Option::is_none"
)]
pub remote_addr: Option<String>,
#[serde(
rename = "remotePort",
default,
skip_serializing_if = "Option::is_none"
)]
pub remote_port: Option<i64>,
#[serde(rename = "localAddr", default, skip_serializing_if = "Option::is_none")]
pub local_addr: Option<String>,
#[serde(rename = "localPort", default, skip_serializing_if = "Option::is_none")]
pub local_port: Option<i64>,
#[serde(
rename = "dnsQueryType",
default,
skip_serializing_if = "Option::is_none"
)]
pub dns_query_type: Option<DirectSocketDnsQueryType>,
#[serde(
rename = "sendBufferSize",
default,
skip_serializing_if = "Option::is_none"
)]
pub send_buffer_size: Option<f64>,
#[serde(
rename = "receiveBufferSize",
default,
skip_serializing_if = "Option::is_none"
)]
pub receive_buffer_size: Option<f64>,
#[serde(
rename = "multicastLoopback",
default,
skip_serializing_if = "Option::is_none"
)]
pub multicast_loopback: Option<bool>,
#[serde(
rename = "multicastTimeToLive",
default,
skip_serializing_if = "Option::is_none"
)]
pub multicast_time_to_live: Option<i64>,
#[serde(
rename = "multicastAllowAddressSharing",
default,
skip_serializing_if = "Option::is_none"
)]
pub multicast_allow_address_sharing: Option<bool>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DirectUdpMessage {
pub data: String,
#[serde(
rename = "remoteAddr",
default,
skip_serializing_if = "Option::is_none"
)]
pub remote_addr: Option<String>,
#[serde(
rename = "remotePort",
default,
skip_serializing_if = "Option::is_none"
)]
pub remote_port: Option<i64>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum LocalNetworkAccessRequestPolicy {
Allow,
BlockFromInsecureToMorePrivate,
WarnFromInsecureToMorePrivate,
PermissionBlock,
PermissionWarn,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum IpAddressSpace {
Loopback,
Local,
Public,
Unknown,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ConnectTiming {
#[serde(rename = "requestTime")]
pub request_time: f64,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ClientSecurityState {
#[serde(rename = "initiatorIsSecureContext")]
pub initiator_is_secure_context: bool,
#[serde(rename = "initiatorIPAddressSpace")]
pub initiator_ip_address_space: IpAddressSpace,
#[serde(rename = "localNetworkAccessRequestPolicy")]
pub local_network_access_request_policy: LocalNetworkAccessRequestPolicy,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct AdScriptIdentifier {
#[serde(rename = "scriptId")]
pub script_id: crate::protocol::runtime::ScriptId,
#[serde(rename = "debuggerId")]
pub debugger_id: crate::protocol::runtime::UniqueDebuggerId,
pub name: String,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct AdAncestry {
#[serde(rename = "ancestryChain")]
pub ancestry_chain: Vec<AdScriptIdentifier>,
#[serde(
rename = "rootScriptFilterlistRule",
default,
skip_serializing_if = "Option::is_none"
)]
pub root_script_filterlist_rule: Option<String>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct AdProvenance {
#[serde(
rename = "filterlistRule",
default,
skip_serializing_if = "Option::is_none"
)]
pub filterlist_rule: Option<String>,
#[serde(
rename = "adScriptAncestry",
default,
skip_serializing_if = "Option::is_none"
)]
pub ad_script_ancestry: Option<AdAncestry>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum CrossOriginOpenerPolicyValue {
SameOrigin,
SameOriginAllowPopups,
RestrictProperties,
UnsafeNone,
SameOriginPlusCoep,
RestrictPropertiesPlusCoep,
NoopenerAllowPopups,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CrossOriginOpenerPolicyStatus {
pub value: CrossOriginOpenerPolicyValue,
#[serde(rename = "reportOnlyValue")]
pub report_only_value: CrossOriginOpenerPolicyValue,
#[serde(
rename = "reportingEndpoint",
default,
skip_serializing_if = "Option::is_none"
)]
pub reporting_endpoint: Option<String>,
#[serde(
rename = "reportOnlyReportingEndpoint",
default,
skip_serializing_if = "Option::is_none"
)]
pub report_only_reporting_endpoint: Option<String>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum CrossOriginEmbedderPolicyValue {
None,
Credentialless,
RequireCorp,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CrossOriginEmbedderPolicyStatus {
pub value: CrossOriginEmbedderPolicyValue,
#[serde(rename = "reportOnlyValue")]
pub report_only_value: CrossOriginEmbedderPolicyValue,
#[serde(
rename = "reportingEndpoint",
default,
skip_serializing_if = "Option::is_none"
)]
pub reporting_endpoint: Option<String>,
#[serde(
rename = "reportOnlyReportingEndpoint",
default,
skip_serializing_if = "Option::is_none"
)]
pub report_only_reporting_endpoint: Option<String>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ContentSecurityPolicySource {
#[serde(rename = "HTTP")]
Http,
Meta,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ContentSecurityPolicyStatus {
#[serde(rename = "effectiveDirectives")]
pub effective_directives: String,
#[serde(rename = "isEnforced")]
pub is_enforced: bool,
pub source: ContentSecurityPolicySource,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SecurityIsolationStatus {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub coop: Option<CrossOriginOpenerPolicyStatus>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub coep: Option<CrossOriginEmbedderPolicyStatus>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub csp: Option<Vec<ContentSecurityPolicyStatus>>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ReportStatus {
Queued,
Pending,
MarkedForRemoval,
Success,
#[serde(untagged)]
Unrecognized(String),
}
pub type ReportId = String;
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ReportingApiReport {
pub id: ReportId,
#[serde(rename = "initiatorUrl")]
pub initiator_url: String,
pub destination: String,
pub r#type: String,
pub timestamp: TimeSinceEpoch,
pub depth: i64,
#[serde(rename = "completedAttempts")]
pub completed_attempts: i64,
pub body: serde_json::Value,
pub status: ReportStatus,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ReportingApiEndpoint {
pub url: String,
#[serde(rename = "groupName")]
pub group_name: String,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DeviceBoundSessionKey {
pub site: String,
pub id: String,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DeviceBoundSessionWithUsage {
#[serde(rename = "sessionKey")]
pub session_key: DeviceBoundSessionKey,
pub usage: DeviceBoundSessionWithUsageUsage,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum DeviceBoundSessionWithUsageUsage {
NotInScope,
InScopeRefreshNotYetNeeded,
InScopeRefreshNotAllowed,
ProactiveRefreshNotPossible,
ProactiveRefreshAttempted,
Deferred,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DeviceBoundSessionCookieCraving {
pub name: String,
pub domain: String,
pub path: String,
pub secure: bool,
#[serde(rename = "httpOnly")]
pub http_only: bool,
#[serde(rename = "sameSite", default, skip_serializing_if = "Option::is_none")]
pub same_site: Option<CookieSameSite>,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DeviceBoundSessionUrlRule {
#[serde(rename = "ruleType")]
pub rule_type: DeviceBoundSessionUrlRuleRuleType,
#[serde(rename = "hostPattern")]
pub host_pattern: String,
#[serde(rename = "pathPrefix")]
pub path_prefix: String,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum DeviceBoundSessionUrlRuleRuleType {
Exclude,
Include,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DeviceBoundSessionInclusionRules {
pub origin: String,
#[serde(rename = "includeSite")]
pub include_site: bool,
#[serde(rename = "urlRules")]
pub url_rules: Vec<DeviceBoundSessionUrlRule>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DeviceBoundSession {
pub key: DeviceBoundSessionKey,
#[serde(rename = "refreshUrl")]
pub refresh_url: String,
#[serde(rename = "inclusionRules")]
pub inclusion_rules: DeviceBoundSessionInclusionRules,
#[serde(rename = "cookieCravings")]
pub cookie_cravings: Vec<DeviceBoundSessionCookieCraving>,
#[serde(rename = "expiryDate")]
pub expiry_date: TimeSinceEpoch,
#[serde(
rename = "cachedChallenge",
default,
skip_serializing_if = "Option::is_none"
)]
pub cached_challenge: Option<String>,
#[serde(rename = "allowedRefreshInitiators")]
pub allowed_refresh_initiators: Vec<String>,
}
pub type DeviceBoundSessionEventId = String;
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum DeviceBoundSessionFetchResult {
Success,
SigningKeyGenerationError,
AttestationKeyGenerationError,
SigningError,
TransientSigningError,
ServerRequestedTermination,
InvalidSessionId,
InvalidChallenge,
TooManyChallenges,
InvalidFetcherUrl,
InvalidRefreshUrl,
TransientHttpError,
ScopeOriginSameSiteMismatch,
RefreshUrlSameSiteMismatch,
MismatchedSessionId,
MissingScope,
NoCredentials,
SubdomainRegistrationWellKnownUnavailable,
SubdomainRegistrationUnauthorized,
SubdomainRegistrationWellKnownMalformed,
SessionProviderWellKnownUnavailable,
RelyingPartyWellKnownUnavailable,
FederatedKeyThumbprintMismatch,
InvalidFederatedSessionUrl,
InvalidFederatedKey,
TooManyRelyingOriginLabels,
BoundCookieSetForbidden,
NetError,
ProxyError,
EmptySessionConfig,
InvalidCredentialsConfig,
InvalidCredentialsType,
InvalidCredentialsEmptyName,
InvalidCredentialsCookie,
PersistentHttpError,
RegistrationAttemptedChallenge,
InvalidScopeOrigin,
ScopeOriginContainsPath,
RefreshInitiatorNotString,
RefreshInitiatorInvalidHostPattern,
InvalidScopeSpecification,
MissingScopeSpecificationType,
EmptyScopeSpecificationDomain,
EmptyScopeSpecificationPath,
InvalidScopeSpecificationType,
InvalidScopeIncludeSite,
MissingScopeIncludeSite,
FederatedNotAuthorizedByProvider,
FederatedNotAuthorizedByRelyingParty,
SessionProviderWellKnownMalformed,
SessionProviderWellKnownHasProviderOrigin,
RelyingPartyWellKnownMalformed,
RelyingPartyWellKnownHasRelyingOrigins,
InvalidFederatedSessionProviderSessionMissing,
InvalidFederatedSessionWrongProviderOrigin,
InvalidCredentialsCookieCreationTime,
InvalidCredentialsCookieName,
InvalidCredentialsCookieParsing,
InvalidCredentialsCookieUnpermittedAttribute,
InvalidCredentialsCookieInvalidDomain,
InvalidCredentialsCookiePrefix,
InvalidScopeRulePath,
InvalidScopeRuleHostPattern,
ScopeRuleOriginScopedHostPatternMismatch,
ScopeRuleSiteScopedHostPatternMismatch,
SigningQuotaExceeded,
InvalidConfigJson,
InvalidFederatedSessionProviderFailedToRestoreKey,
FailedToUnwrapKey,
SessionDeletedDuringRefresh,
CrossOriginRegistrationSiteNotIncluded,
InvalidPreProvisionedKeyInitiatorMissing,
PreProvisionedKeyAccessNotGranted,
PreProvisionedKeyNotFound,
AttestationCertificationError,
AttestationSigningError,
FederatedRegistrationRedirected,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DeviceBoundSessionFailedRequest {
#[serde(rename = "requestUrl")]
pub request_url: String,
#[serde(rename = "netError", default, skip_serializing_if = "Option::is_none")]
pub net_error: Option<String>,
#[serde(
rename = "responseError",
default,
skip_serializing_if = "Option::is_none"
)]
pub response_error: Option<i64>,
#[serde(
rename = "responseErrorBody",
default,
skip_serializing_if = "Option::is_none"
)]
pub response_error_body: Option<String>,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CreationEventDetails {
#[serde(rename = "fetchResult")]
pub fetch_result: DeviceBoundSessionFetchResult,
#[serde(
rename = "newSession",
default,
skip_serializing_if = "Option::is_none"
)]
pub new_session: Option<DeviceBoundSession>,
#[serde(
rename = "failedRequest",
default,
skip_serializing_if = "Option::is_none"
)]
pub failed_request: Option<DeviceBoundSessionFailedRequest>,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RefreshEventDetails {
#[serde(rename = "refreshResult")]
pub refresh_result: RefreshEventDetailsRefreshResult,
#[serde(
rename = "fetchResult",
default,
skip_serializing_if = "Option::is_none"
)]
pub fetch_result: Option<DeviceBoundSessionFetchResult>,
#[serde(
rename = "newSession",
default,
skip_serializing_if = "Option::is_none"
)]
pub new_session: Option<DeviceBoundSession>,
#[serde(rename = "wasFullyProactiveRefresh")]
pub was_fully_proactive_refresh: bool,
#[serde(
rename = "failedRequest",
default,
skip_serializing_if = "Option::is_none"
)]
pub failed_request: Option<DeviceBoundSessionFailedRequest>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum RefreshEventDetailsRefreshResult {
Refreshed,
InitializedService,
Unreachable,
ServerError,
FatalError,
SigningQuotaExceeded,
RefreshedAsWaiter,
TransientSigningError,
InScopeRefreshNotYetNeeded,
Canceled,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct TerminationEventDetails {
#[serde(rename = "deletionReason")]
pub deletion_reason: TerminationEventDetailsDeletionReason,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum TerminationEventDetailsDeletionReason {
Expired,
FailedToRestoreKey,
FailedToUnwrapKey,
StoragePartitionCleared,
ClearBrowsingData,
ServerRequested,
InvalidSessionParams,
RefreshFatalError,
DevTools,
Replaced,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ChallengeEventDetails {
#[serde(rename = "challengeResult")]
pub challenge_result: ChallengeEventDetailsChallengeResult,
pub challenge: String,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ChallengeEventDetailsChallengeResult {
Success,
NoSessionId,
NoSessionMatch,
CantSetBoundCookie,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct LoadNetworkResourcePageResult {
pub success: bool,
#[serde(rename = "netError", default, skip_serializing_if = "Option::is_none")]
pub net_error: Option<f64>,
#[serde(
rename = "netErrorName",
default,
skip_serializing_if = "Option::is_none"
)]
pub net_error_name: Option<String>,
#[serde(
rename = "httpStatusCode",
default,
skip_serializing_if = "Option::is_none"
)]
pub http_status_code: Option<f64>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub stream: Option<crate::protocol::io::StreamHandle>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub headers: Option<Headers>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct LoadNetworkResourceOptions {
#[serde(rename = "disableCache")]
pub disable_cache: bool,
#[serde(rename = "includeCredentials")]
pub include_credentials: bool,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct CanClearBrowserCacheParams {}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct CanClearBrowserCacheReturns {
pub result: bool,
}
impl crate::typed::Command for CanClearBrowserCacheParams {
const METHOD: &'static str = "Network.canClearBrowserCache";
type Returns = CanClearBrowserCacheReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct CanClearBrowserCookiesParams {}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct CanClearBrowserCookiesReturns {
pub result: bool,
}
impl crate::typed::Command for CanClearBrowserCookiesParams {
const METHOD: &'static str = "Network.canClearBrowserCookies";
type Returns = CanClearBrowserCookiesReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct CanEmulateNetworkConditionsParams {}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct CanEmulateNetworkConditionsReturns {
pub result: bool,
}
impl crate::typed::Command for CanEmulateNetworkConditionsParams {
const METHOD: &'static str = "Network.canEmulateNetworkConditions";
type Returns = CanEmulateNetworkConditionsReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ClearBrowserCacheParams {}
impl crate::typed::Command for ClearBrowserCacheParams {
const METHOD: &'static str = "Network.clearBrowserCache";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ClearBrowserCookiesParams {}
impl crate::typed::Command for ClearBrowserCookiesParams {
const METHOD: &'static str = "Network.clearBrowserCookies";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DeleteCookiesParams {
pub name: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub domain: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
#[serde(
rename = "partitionKey",
default,
skip_serializing_if = "Option::is_none"
)]
pub partition_key: Option<CookiePartitionKey>,
}
impl crate::typed::Command for DeleteCookiesParams {
const METHOD: &'static str = "Network.deleteCookies";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DisableParams {}
impl crate::typed::Command for DisableParams {
const METHOD: &'static str = "Network.disable";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct EmulateNetworkConditionsParams {
pub offline: bool,
pub latency: f64,
#[serde(rename = "downloadThroughput")]
pub download_throughput: f64,
#[serde(rename = "uploadThroughput")]
pub upload_throughput: f64,
#[serde(
rename = "connectionType",
default,
skip_serializing_if = "Option::is_none"
)]
pub connection_type: Option<ConnectionType>,
#[serde(
rename = "packetLoss",
default,
skip_serializing_if = "Option::is_none"
)]
pub packet_loss: Option<f64>,
#[serde(
rename = "packetQueueLength",
default,
skip_serializing_if = "Option::is_none"
)]
pub packet_queue_length: Option<i64>,
#[serde(
rename = "packetReordering",
default,
skip_serializing_if = "Option::is_none"
)]
pub packet_reordering: Option<bool>,
}
impl crate::typed::Command for EmulateNetworkConditionsParams {
const METHOD: &'static str = "Network.emulateNetworkConditions";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct EmulateNetworkConditionsByRuleParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub offline: Option<bool>,
#[serde(
rename = "emulateOfflineServiceWorker",
default,
skip_serializing_if = "Option::is_none"
)]
pub emulate_offline_service_worker: Option<bool>,
#[serde(rename = "matchedNetworkConditions")]
pub matched_network_conditions: Vec<NetworkConditions>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct EmulateNetworkConditionsByRuleReturns {
#[serde(rename = "ruleIds")]
pub rule_ids: Vec<String>,
}
impl crate::typed::Command for EmulateNetworkConditionsByRuleParams {
const METHOD: &'static str = "Network.emulateNetworkConditionsByRule";
type Returns = EmulateNetworkConditionsByRuleReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct OverrideNetworkStateParams {
pub offline: bool,
pub latency: f64,
#[serde(rename = "downloadThroughput")]
pub download_throughput: f64,
#[serde(rename = "uploadThroughput")]
pub upload_throughput: f64,
#[serde(
rename = "connectionType",
default,
skip_serializing_if = "Option::is_none"
)]
pub connection_type: Option<ConnectionType>,
}
impl crate::typed::Command for OverrideNetworkStateParams {
const METHOD: &'static str = "Network.overrideNetworkState";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct EnableParams {
#[serde(
rename = "maxTotalBufferSize",
default,
skip_serializing_if = "Option::is_none"
)]
pub max_total_buffer_size: Option<i64>,
#[serde(
rename = "maxResourceBufferSize",
default,
skip_serializing_if = "Option::is_none"
)]
pub max_resource_buffer_size: Option<i64>,
#[serde(
rename = "maxPostDataSize",
default,
skip_serializing_if = "Option::is_none"
)]
pub max_post_data_size: Option<i64>,
#[serde(
rename = "reportDirectSocketTraffic",
default,
skip_serializing_if = "Option::is_none"
)]
pub report_direct_socket_traffic: Option<bool>,
#[serde(
rename = "enableDurableMessages",
default,
skip_serializing_if = "Option::is_none"
)]
pub enable_durable_messages: Option<bool>,
}
impl crate::typed::Command for EnableParams {
const METHOD: &'static str = "Network.enable";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ConfigureDurableMessagesParams {
#[serde(
rename = "maxTotalBufferSize",
default,
skip_serializing_if = "Option::is_none"
)]
pub max_total_buffer_size: Option<i64>,
#[serde(
rename = "maxResourceBufferSize",
default,
skip_serializing_if = "Option::is_none"
)]
pub max_resource_buffer_size: Option<i64>,
}
impl crate::typed::Command for ConfigureDurableMessagesParams {
const METHOD: &'static str = "Network.configureDurableMessages";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetAllCookiesParams {}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetAllCookiesReturns {
pub cookies: Vec<Cookie>,
}
impl crate::typed::Command for GetAllCookiesParams {
const METHOD: &'static str = "Network.getAllCookies";
type Returns = GetAllCookiesReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetCertificateParams {
pub origin: String,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetCertificateReturns {
#[serde(rename = "tableNames")]
pub table_names: Vec<String>,
}
impl crate::typed::Command for GetCertificateParams {
const METHOD: &'static str = "Network.getCertificate";
type Returns = GetCertificateReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetCookiesParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub urls: Option<Vec<String>>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetCookiesReturns {
pub cookies: Vec<Cookie>,
}
impl crate::typed::Command for GetCookiesParams {
const METHOD: &'static str = "Network.getCookies";
type Returns = GetCookiesReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetResponseBodyParams {
#[serde(rename = "requestId")]
pub request_id: RequestId,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetResponseBodyReturns {
pub body: String,
#[serde(rename = "base64Encoded")]
pub base64_encoded: bool,
}
impl crate::typed::Command for GetResponseBodyParams {
const METHOD: &'static str = "Network.getResponseBody";
type Returns = GetResponseBodyReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetRequestPostDataParams {
#[serde(rename = "requestId")]
pub request_id: RequestId,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetRequestPostDataReturns {
#[serde(rename = "postData")]
pub post_data: String,
#[serde(rename = "base64Encoded")]
pub base64_encoded: bool,
}
impl crate::typed::Command for GetRequestPostDataParams {
const METHOD: &'static str = "Network.getRequestPostData";
type Returns = GetRequestPostDataReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ReplayXhrParams {
#[serde(rename = "requestId")]
pub request_id: RequestId,
}
impl crate::typed::Command for ReplayXhrParams {
const METHOD: &'static str = "Network.replayXHR";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SearchInResponseBodyParams {
#[serde(rename = "requestId")]
pub request_id: RequestId,
pub query: String,
#[serde(
rename = "caseSensitive",
default,
skip_serializing_if = "Option::is_none"
)]
pub case_sensitive: Option<bool>,
#[serde(rename = "isRegex", default, skip_serializing_if = "Option::is_none")]
pub is_regex: Option<bool>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SearchInResponseBodyReturns {
pub result: Vec<crate::protocol::debugger::SearchMatch>,
}
impl crate::typed::Command for SearchInResponseBodyParams {
const METHOD: &'static str = "Network.searchInResponseBody";
type Returns = SearchInResponseBodyReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SetBlockedUrLsParams {
#[serde(
rename = "urlPatterns",
default,
skip_serializing_if = "Option::is_none"
)]
pub url_patterns: Option<Vec<BlockPattern>>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub urls: Option<Vec<String>>,
}
impl crate::typed::Command for SetBlockedUrLsParams {
const METHOD: &'static str = "Network.setBlockedURLs";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SetBypassServiceWorkerParams {
pub bypass: bool,
}
impl crate::typed::Command for SetBypassServiceWorkerParams {
const METHOD: &'static str = "Network.setBypassServiceWorker";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SetCacheDisabledParams {
#[serde(rename = "cacheDisabled")]
pub cache_disabled: bool,
}
impl crate::typed::Command for SetCacheDisabledParams {
const METHOD: &'static str = "Network.setCacheDisabled";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SetCookieParams {
pub name: String,
pub value: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub domain: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub secure: Option<bool>,
#[serde(rename = "httpOnly", default, skip_serializing_if = "Option::is_none")]
pub http_only: Option<bool>,
#[serde(rename = "sameSite", default, skip_serializing_if = "Option::is_none")]
pub same_site: Option<CookieSameSite>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub expires: Option<TimeSinceEpoch>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub priority: Option<CookiePriority>,
#[serde(
rename = "sourceScheme",
default,
skip_serializing_if = "Option::is_none"
)]
pub source_scheme: Option<CookieSourceScheme>,
#[serde(
rename = "sourcePort",
default,
skip_serializing_if = "Option::is_none"
)]
pub source_port: Option<i64>,
#[serde(
rename = "partitionKey",
default,
skip_serializing_if = "Option::is_none"
)]
pub partition_key: Option<CookiePartitionKey>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SetCookieReturns {
pub success: bool,
}
impl crate::typed::Command for SetCookieParams {
const METHOD: &'static str = "Network.setCookie";
type Returns = SetCookieReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SetCookiesParams {
pub cookies: Vec<CookieParam>,
}
impl crate::typed::Command for SetCookiesParams {
const METHOD: &'static str = "Network.setCookies";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SetExtraHttpHeadersParams {
pub headers: Headers,
}
impl crate::typed::Command for SetExtraHttpHeadersParams {
const METHOD: &'static str = "Network.setExtraHTTPHeaders";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SetAttachDebugStackParams {
pub enabled: bool,
}
impl crate::typed::Command for SetAttachDebugStackParams {
const METHOD: &'static str = "Network.setAttachDebugStack";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SetUserAgentOverrideParams {
#[serde(rename = "userAgent")]
pub user_agent: String,
#[serde(
rename = "acceptLanguage",
default,
skip_serializing_if = "Option::is_none"
)]
pub accept_language: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub platform: Option<String>,
#[serde(
rename = "userAgentMetadata",
default,
skip_serializing_if = "Option::is_none"
)]
pub user_agent_metadata: Option<crate::protocol::emulation::UserAgentMetadata>,
}
impl crate::typed::Command for SetUserAgentOverrideParams {
const METHOD: &'static str = "Network.setUserAgentOverride";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct StreamResourceContentParams {
#[serde(rename = "requestId")]
pub request_id: RequestId,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct StreamResourceContentReturns {
#[serde(rename = "bufferedData")]
pub buffered_data: String,
}
impl crate::typed::Command for StreamResourceContentParams {
const METHOD: &'static str = "Network.streamResourceContent";
type Returns = StreamResourceContentReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetSecurityIsolationStatusParams {
#[serde(rename = "frameId", default, skip_serializing_if = "Option::is_none")]
pub frame_id: Option<crate::protocol::page::FrameId>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetSecurityIsolationStatusReturns {
pub status: SecurityIsolationStatus,
}
impl crate::typed::Command for GetSecurityIsolationStatusParams {
const METHOD: &'static str = "Network.getSecurityIsolationStatus";
type Returns = GetSecurityIsolationStatusReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct EnableReportingApiParams {
pub enable: bool,
}
impl crate::typed::Command for EnableReportingApiParams {
const METHOD: &'static str = "Network.enableReportingApi";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct EnableDeviceBoundSessionsParams {
pub enable: bool,
}
impl crate::typed::Command for EnableDeviceBoundSessionsParams {
const METHOD: &'static str = "Network.enableDeviceBoundSessions";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DeleteDeviceBoundSessionParams {
pub key: DeviceBoundSessionKey,
}
impl crate::typed::Command for DeleteDeviceBoundSessionParams {
const METHOD: &'static str = "Network.deleteDeviceBoundSession";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct FetchSchemefulSiteParams {
pub origin: String,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct FetchSchemefulSiteReturns {
#[serde(rename = "schemefulSite")]
pub schemeful_site: String,
}
impl crate::typed::Command for FetchSchemefulSiteParams {
const METHOD: &'static str = "Network.fetchSchemefulSite";
type Returns = FetchSchemefulSiteReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct LoadNetworkResourceParams {
#[serde(rename = "frameId", default, skip_serializing_if = "Option::is_none")]
pub frame_id: Option<crate::protocol::page::FrameId>,
pub url: String,
pub options: LoadNetworkResourceOptions,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct LoadNetworkResourceReturns {
pub resource: LoadNetworkResourcePageResult,
}
impl crate::typed::Command for LoadNetworkResourceParams {
const METHOD: &'static str = "Network.loadNetworkResource";
type Returns = LoadNetworkResourceReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SetCookieControlsParams {
#[serde(rename = "enableThirdPartyCookieRestriction")]
pub enable_third_party_cookie_restriction: bool,
}
impl crate::typed::Command for SetCookieControlsParams {
const METHOD: &'static str = "Network.setCookieControls";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DataReceivedEvent {
#[serde(rename = "requestId")]
pub request_id: RequestId,
pub timestamp: MonotonicTime,
#[serde(rename = "dataLength")]
pub data_length: i64,
#[serde(rename = "encodedDataLength")]
pub encoded_data_length: i64,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub data: Option<String>,
}
impl crate::typed::Event for DataReceivedEvent {
const METHOD: &'static str = "Network.dataReceived";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct EventSourceMessageReceivedEvent {
#[serde(rename = "requestId")]
pub request_id: RequestId,
pub timestamp: MonotonicTime,
#[serde(rename = "eventName")]
pub event_name: String,
#[serde(rename = "eventId")]
pub event_id: String,
pub data: String,
}
impl crate::typed::Event for EventSourceMessageReceivedEvent {
const METHOD: &'static str = "Network.eventSourceMessageReceived";
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct LoadingFailedEvent {
#[serde(rename = "requestId")]
pub request_id: RequestId,
pub timestamp: MonotonicTime,
pub r#type: ResourceType,
#[serde(rename = "errorText")]
pub error_text: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub canceled: Option<bool>,
#[serde(
rename = "blockedReason",
default,
skip_serializing_if = "Option::is_none"
)]
pub blocked_reason: Option<BlockedReason>,
#[serde(
rename = "corsErrorStatus",
default,
skip_serializing_if = "Option::is_none"
)]
pub cors_error_status: Option<CorsErrorStatus>,
}
impl crate::typed::Event for LoadingFailedEvent {
const METHOD: &'static str = "Network.loadingFailed";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct LoadingFinishedEvent {
#[serde(rename = "requestId")]
pub request_id: RequestId,
pub timestamp: MonotonicTime,
#[serde(rename = "encodedDataLength")]
pub encoded_data_length: f64,
#[serde(
rename = "encodedBodyLength",
default,
skip_serializing_if = "Option::is_none"
)]
pub encoded_body_length: Option<f64>,
}
impl crate::typed::Event for LoadingFinishedEvent {
const METHOD: &'static str = "Network.loadingFinished";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct RequestServedFromCacheEvent {
#[serde(rename = "requestId")]
pub request_id: RequestId,
}
impl crate::typed::Event for RequestServedFromCacheEvent {
const METHOD: &'static str = "Network.requestServedFromCache";
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RequestWillBeSentEvent {
#[serde(rename = "requestId")]
pub request_id: RequestId,
#[serde(rename = "loaderId")]
pub loader_id: LoaderId,
#[serde(rename = "documentURL")]
pub document_url: String,
pub request: Request,
pub timestamp: MonotonicTime,
#[serde(rename = "wallTime")]
pub wall_time: TimeSinceEpoch,
pub initiator: Initiator,
#[serde(rename = "redirectHasExtraInfo")]
pub redirect_has_extra_info: bool,
#[serde(
rename = "redirectResponse",
default,
skip_serializing_if = "Option::is_none"
)]
pub redirect_response: Option<Response>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub r#type: Option<ResourceType>,
#[serde(rename = "frameId", default, skip_serializing_if = "Option::is_none")]
pub frame_id: Option<crate::protocol::page::FrameId>,
#[serde(
rename = "hasUserGesture",
default,
skip_serializing_if = "Option::is_none"
)]
pub has_user_gesture: Option<bool>,
#[serde(
rename = "renderBlockingBehavior",
default,
skip_serializing_if = "Option::is_none"
)]
pub render_blocking_behavior: Option<RenderBlockingBehavior>,
}
impl crate::typed::Event for RequestWillBeSentEvent {
const METHOD: &'static str = "Network.requestWillBeSent";
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ResourceChangedPriorityEvent {
#[serde(rename = "requestId")]
pub request_id: RequestId,
#[serde(rename = "newPriority")]
pub new_priority: ResourcePriority,
pub timestamp: MonotonicTime,
}
impl crate::typed::Event for ResourceChangedPriorityEvent {
const METHOD: &'static str = "Network.resourceChangedPriority";
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SignedExchangeReceivedEvent {
#[serde(rename = "requestId")]
pub request_id: RequestId,
pub info: SignedExchangeInfo,
}
impl crate::typed::Event for SignedExchangeReceivedEvent {
const METHOD: &'static str = "Network.signedExchangeReceived";
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ResponseReceivedEvent {
#[serde(rename = "requestId")]
pub request_id: RequestId,
#[serde(rename = "loaderId")]
pub loader_id: LoaderId,
pub timestamp: MonotonicTime,
pub r#type: ResourceType,
pub response: Response,
#[serde(rename = "hasExtraInfo")]
pub has_extra_info: bool,
#[serde(rename = "frameId", default, skip_serializing_if = "Option::is_none")]
pub frame_id: Option<crate::protocol::page::FrameId>,
}
impl crate::typed::Event for ResponseReceivedEvent {
const METHOD: &'static str = "Network.responseReceived";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct WebSocketClosedEvent {
#[serde(rename = "requestId")]
pub request_id: RequestId,
pub timestamp: MonotonicTime,
}
impl crate::typed::Event for WebSocketClosedEvent {
const METHOD: &'static str = "Network.webSocketClosed";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct WebSocketCreatedEvent {
#[serde(rename = "requestId")]
pub request_id: RequestId,
pub url: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub initiator: Option<Initiator>,
}
impl crate::typed::Event for WebSocketCreatedEvent {
const METHOD: &'static str = "Network.webSocketCreated";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct WebSocketFrameErrorEvent {
#[serde(rename = "requestId")]
pub request_id: RequestId,
pub timestamp: MonotonicTime,
#[serde(rename = "errorMessage")]
pub error_message: String,
}
impl crate::typed::Event for WebSocketFrameErrorEvent {
const METHOD: &'static str = "Network.webSocketFrameError";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct WebSocketFrameReceivedEvent {
#[serde(rename = "requestId")]
pub request_id: RequestId,
pub timestamp: MonotonicTime,
pub response: WebSocketFrame,
}
impl crate::typed::Event for WebSocketFrameReceivedEvent {
const METHOD: &'static str = "Network.webSocketFrameReceived";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct WebSocketFrameSentEvent {
#[serde(rename = "requestId")]
pub request_id: RequestId,
pub timestamp: MonotonicTime,
pub response: WebSocketFrame,
}
impl crate::typed::Event for WebSocketFrameSentEvent {
const METHOD: &'static str = "Network.webSocketFrameSent";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct WebSocketHandshakeResponseReceivedEvent {
#[serde(rename = "requestId")]
pub request_id: RequestId,
pub timestamp: MonotonicTime,
pub response: WebSocketResponse,
}
impl crate::typed::Event for WebSocketHandshakeResponseReceivedEvent {
const METHOD: &'static str = "Network.webSocketHandshakeResponseReceived";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct WebSocketWillSendHandshakeRequestEvent {
#[serde(rename = "requestId")]
pub request_id: RequestId,
pub timestamp: MonotonicTime,
#[serde(rename = "wallTime")]
pub wall_time: TimeSinceEpoch,
pub request: WebSocketRequest,
}
impl crate::typed::Event for WebSocketWillSendHandshakeRequestEvent {
const METHOD: &'static str = "Network.webSocketWillSendHandshakeRequest";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct WebTransportCreatedEvent {
#[serde(rename = "transportId")]
pub transport_id: RequestId,
pub url: String,
pub timestamp: MonotonicTime,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub initiator: Option<Initiator>,
}
impl crate::typed::Event for WebTransportCreatedEvent {
const METHOD: &'static str = "Network.webTransportCreated";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct WebTransportConnectionEstablishedEvent {
#[serde(rename = "transportId")]
pub transport_id: RequestId,
pub timestamp: MonotonicTime,
}
impl crate::typed::Event for WebTransportConnectionEstablishedEvent {
const METHOD: &'static str = "Network.webTransportConnectionEstablished";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct WebTransportClosedEvent {
#[serde(rename = "transportId")]
pub transport_id: RequestId,
pub timestamp: MonotonicTime,
}
impl crate::typed::Event for WebTransportClosedEvent {
const METHOD: &'static str = "Network.webTransportClosed";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DirectTcpSocketCreatedEvent {
pub identifier: RequestId,
#[serde(rename = "remoteAddr")]
pub remote_addr: String,
#[serde(rename = "remotePort")]
pub remote_port: i64,
pub options: DirectTcpSocketOptions,
pub timestamp: MonotonicTime,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub initiator: Option<Initiator>,
}
impl crate::typed::Event for DirectTcpSocketCreatedEvent {
const METHOD: &'static str = "Network.directTCPSocketCreated";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DirectTcpSocketOpenedEvent {
pub identifier: RequestId,
#[serde(rename = "remoteAddr")]
pub remote_addr: String,
#[serde(rename = "remotePort")]
pub remote_port: i64,
pub timestamp: MonotonicTime,
#[serde(rename = "localAddr", default, skip_serializing_if = "Option::is_none")]
pub local_addr: Option<String>,
#[serde(rename = "localPort", default, skip_serializing_if = "Option::is_none")]
pub local_port: Option<i64>,
}
impl crate::typed::Event for DirectTcpSocketOpenedEvent {
const METHOD: &'static str = "Network.directTCPSocketOpened";
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DirectTcpSocketAbortedEvent {
pub identifier: RequestId,
#[serde(rename = "errorMessage")]
pub error_message: ErrorReason,
pub timestamp: MonotonicTime,
}
impl crate::typed::Event for DirectTcpSocketAbortedEvent {
const METHOD: &'static str = "Network.directTCPSocketAborted";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DirectTcpSocketClosedEvent {
pub identifier: RequestId,
pub timestamp: MonotonicTime,
}
impl crate::typed::Event for DirectTcpSocketClosedEvent {
const METHOD: &'static str = "Network.directTCPSocketClosed";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DirectTcpSocketChunkSentEvent {
pub identifier: RequestId,
pub data: String,
pub timestamp: MonotonicTime,
}
impl crate::typed::Event for DirectTcpSocketChunkSentEvent {
const METHOD: &'static str = "Network.directTCPSocketChunkSent";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DirectTcpSocketChunkReceivedEvent {
pub identifier: RequestId,
pub data: String,
pub timestamp: MonotonicTime,
}
impl crate::typed::Event for DirectTcpSocketChunkReceivedEvent {
const METHOD: &'static str = "Network.directTCPSocketChunkReceived";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DirectUdpSocketJoinedMulticastGroupEvent {
pub identifier: RequestId,
#[serde(rename = "IPAddress")]
pub ip_address: String,
#[serde(
rename = "sourceAddress",
default,
skip_serializing_if = "Option::is_none"
)]
pub source_address: Option<String>,
}
impl crate::typed::Event for DirectUdpSocketJoinedMulticastGroupEvent {
const METHOD: &'static str = "Network.directUDPSocketJoinedMulticastGroup";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DirectUdpSocketLeftMulticastGroupEvent {
pub identifier: RequestId,
#[serde(rename = "IPAddress")]
pub ip_address: String,
#[serde(
rename = "sourceAddress",
default,
skip_serializing_if = "Option::is_none"
)]
pub source_address: Option<String>,
}
impl crate::typed::Event for DirectUdpSocketLeftMulticastGroupEvent {
const METHOD: &'static str = "Network.directUDPSocketLeftMulticastGroup";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DirectUdpSocketCreatedEvent {
pub identifier: RequestId,
pub options: DirectUdpSocketOptions,
pub timestamp: MonotonicTime,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub initiator: Option<Initiator>,
}
impl crate::typed::Event for DirectUdpSocketCreatedEvent {
const METHOD: &'static str = "Network.directUDPSocketCreated";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DirectUdpSocketOpenedEvent {
pub identifier: RequestId,
#[serde(rename = "localAddr")]
pub local_addr: String,
#[serde(rename = "localPort")]
pub local_port: i64,
pub timestamp: MonotonicTime,
#[serde(
rename = "remoteAddr",
default,
skip_serializing_if = "Option::is_none"
)]
pub remote_addr: Option<String>,
#[serde(
rename = "remotePort",
default,
skip_serializing_if = "Option::is_none"
)]
pub remote_port: Option<i64>,
}
impl crate::typed::Event for DirectUdpSocketOpenedEvent {
const METHOD: &'static str = "Network.directUDPSocketOpened";
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DirectUdpSocketAbortedEvent {
pub identifier: RequestId,
#[serde(rename = "errorMessage")]
pub error_message: ErrorReason,
pub timestamp: MonotonicTime,
}
impl crate::typed::Event for DirectUdpSocketAbortedEvent {
const METHOD: &'static str = "Network.directUDPSocketAborted";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DirectUdpSocketClosedEvent {
pub identifier: RequestId,
pub timestamp: MonotonicTime,
}
impl crate::typed::Event for DirectUdpSocketClosedEvent {
const METHOD: &'static str = "Network.directUDPSocketClosed";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DirectUdpSocketChunkSentEvent {
pub identifier: RequestId,
pub message: DirectUdpMessage,
pub timestamp: MonotonicTime,
}
impl crate::typed::Event for DirectUdpSocketChunkSentEvent {
const METHOD: &'static str = "Network.directUDPSocketChunkSent";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DirectUdpSocketChunkReceivedEvent {
pub identifier: RequestId,
pub message: DirectUdpMessage,
pub timestamp: MonotonicTime,
}
impl crate::typed::Event for DirectUdpSocketChunkReceivedEvent {
const METHOD: &'static str = "Network.directUDPSocketChunkReceived";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct RequestWillBeSentExtraInfoEvent {
#[serde(rename = "requestId")]
pub request_id: RequestId,
#[serde(rename = "associatedCookies")]
pub associated_cookies: Vec<AssociatedCookie>,
pub headers: Headers,
#[serde(rename = "connectTiming")]
pub connect_timing: ConnectTiming,
#[serde(
rename = "deviceBoundSessionUsages",
default,
skip_serializing_if = "Option::is_none"
)]
pub device_bound_session_usages: Option<Vec<DeviceBoundSessionWithUsage>>,
#[serde(
rename = "clientSecurityState",
default,
skip_serializing_if = "Option::is_none"
)]
pub client_security_state: Option<ClientSecurityState>,
#[serde(
rename = "siteHasCookieInOtherPartition",
default,
skip_serializing_if = "Option::is_none"
)]
pub site_has_cookie_in_other_partition: Option<bool>,
#[serde(
rename = "appliedNetworkConditionsId",
default,
skip_serializing_if = "Option::is_none"
)]
pub applied_network_conditions_id: Option<String>,
}
impl crate::typed::Event for RequestWillBeSentExtraInfoEvent {
const METHOD: &'static str = "Network.requestWillBeSentExtraInfo";
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ResponseReceivedExtraInfoEvent {
#[serde(rename = "requestId")]
pub request_id: RequestId,
#[serde(rename = "blockedCookies")]
pub blocked_cookies: Vec<BlockedSetCookieWithReason>,
pub headers: Headers,
#[serde(rename = "resourceIPAddressSpace")]
pub resource_ip_address_space: IpAddressSpace,
#[serde(rename = "statusCode")]
pub status_code: i64,
#[serde(
rename = "headersText",
default,
skip_serializing_if = "Option::is_none"
)]
pub headers_text: Option<String>,
#[serde(
rename = "cookiePartitionKey",
default,
skip_serializing_if = "Option::is_none"
)]
pub cookie_partition_key: Option<CookiePartitionKey>,
#[serde(
rename = "cookiePartitionKeyOpaque",
default,
skip_serializing_if = "Option::is_none"
)]
pub cookie_partition_key_opaque: Option<bool>,
#[serde(
rename = "exemptedCookies",
default,
skip_serializing_if = "Option::is_none"
)]
pub exempted_cookies: Option<Vec<ExemptedSetCookieWithReason>>,
}
impl crate::typed::Event for ResponseReceivedExtraInfoEvent {
const METHOD: &'static str = "Network.responseReceivedExtraInfo";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ResponseReceivedEarlyHintsEvent {
#[serde(rename = "requestId")]
pub request_id: RequestId,
pub headers: Headers,
}
impl crate::typed::Event for ResponseReceivedEarlyHintsEvent {
const METHOD: &'static str = "Network.responseReceivedEarlyHints";
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct TrustTokenOperationDoneEvent {
pub status: TrustTokenOperationDoneStatus,
pub r#type: TrustTokenOperationType,
#[serde(rename = "requestId")]
pub request_id: RequestId,
#[serde(
rename = "topLevelOrigin",
default,
skip_serializing_if = "Option::is_none"
)]
pub top_level_origin: Option<String>,
#[serde(
rename = "issuerOrigin",
default,
skip_serializing_if = "Option::is_none"
)]
pub issuer_origin: Option<String>,
#[serde(
rename = "issuedTokenCount",
default,
skip_serializing_if = "Option::is_none"
)]
pub issued_token_count: Option<i64>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum TrustTokenOperationDoneStatus {
Ok,
InvalidArgument,
MissingIssuerKeys,
FailedPrecondition,
ResourceExhausted,
AlreadyExists,
ResourceLimited,
Unauthorized,
BadResponse,
InternalError,
UnknownError,
FulfilledLocally,
SiteIssuerLimit,
#[serde(untagged)]
Unrecognized(String),
}
impl crate::typed::Event for TrustTokenOperationDoneEvent {
const METHOD: &'static str = "Network.trustTokenOperationDone";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct PolicyUpdatedEvent {}
impl crate::typed::Event for PolicyUpdatedEvent {
const METHOD: &'static str = "Network.policyUpdated";
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ReportingApiReportAddedEvent {
pub report: ReportingApiReport,
}
impl crate::typed::Event for ReportingApiReportAddedEvent {
const METHOD: &'static str = "Network.reportingApiReportAdded";
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ReportingApiReportUpdatedEvent {
pub report: ReportingApiReport,
}
impl crate::typed::Event for ReportingApiReportUpdatedEvent {
const METHOD: &'static str = "Network.reportingApiReportUpdated";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ReportingApiEndpointsChangedForOriginEvent {
pub origin: String,
pub endpoints: Vec<ReportingApiEndpoint>,
}
impl crate::typed::Event for ReportingApiEndpointsChangedForOriginEvent {
const METHOD: &'static str = "Network.reportingApiEndpointsChangedForOrigin";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DeviceBoundSessionsAddedEvent {
pub sessions: Vec<DeviceBoundSession>,
}
impl crate::typed::Event for DeviceBoundSessionsAddedEvent {
const METHOD: &'static str = "Network.deviceBoundSessionsAdded";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DeviceBoundSessionEventOccurredEvent {
#[serde(rename = "eventId")]
pub event_id: DeviceBoundSessionEventId,
pub site: String,
pub succeeded: bool,
#[serde(rename = "sessionId", default, skip_serializing_if = "Option::is_none")]
pub session_id: Option<String>,
#[serde(
rename = "creationEventDetails",
default,
skip_serializing_if = "Option::is_none"
)]
pub creation_event_details: Option<CreationEventDetails>,
#[serde(
rename = "refreshEventDetails",
default,
skip_serializing_if = "Option::is_none"
)]
pub refresh_event_details: Option<RefreshEventDetails>,
#[serde(
rename = "terminationEventDetails",
default,
skip_serializing_if = "Option::is_none"
)]
pub termination_event_details: Option<TerminationEventDetails>,
#[serde(
rename = "challengeEventDetails",
default,
skip_serializing_if = "Option::is_none"
)]
pub challenge_event_details: Option<ChallengeEventDetails>,
}
impl crate::typed::Event for DeviceBoundSessionEventOccurredEvent {
const METHOD: &'static str = "Network.deviceBoundSessionEventOccurred";
}