use serde::{Deserialize, Serialize};
pub type FrameId = String;
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum AdFrameType {
#[serde(rename = "none")]
None,
#[serde(rename = "child")]
Child,
#[serde(rename = "root")]
Root,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum AdFrameExplanation {
ParentIsAd,
CreatedByAdScript,
MatchedBlockingRule,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AdFrameStatus {
#[serde(rename = "adFrameType")]
pub ad_frame_type: AdFrameType,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub explanations: Option<Vec<AdFrameExplanation>>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum SecureContextType {
Secure,
SecureLocalhost,
InsecureScheme,
InsecureAncestor,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum CrossOriginIsolatedContextType {
Isolated,
NotIsolated,
NotIsolatedFeatureDisabled,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum GatedApiFeatures {
SharedArrayBuffers,
SharedArrayBuffersTransferAllowed,
PerformanceMeasureMemory,
PerformanceProfile,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum PermissionsPolicyFeature {
#[serde(rename = "accelerometer")]
Accelerometer,
#[serde(rename = "all-screens-capture")]
AllScreensCapture,
#[serde(rename = "ambient-light-sensor")]
AmbientLightSensor,
#[serde(rename = "aria-notify")]
AriaNotify,
#[serde(rename = "autofill")]
Autofill,
#[serde(rename = "autoplay")]
Autoplay,
#[serde(rename = "bluetooth")]
Bluetooth,
#[serde(rename = "camera")]
Camera,
#[serde(rename = "captured-surface-control")]
CapturedSurfaceControl,
#[serde(rename = "ch-dpr")]
ChDpr,
#[serde(rename = "ch-device-memory")]
ChDeviceMemory,
#[serde(rename = "ch-downlink")]
ChDownlink,
#[serde(rename = "ch-ect")]
ChEct,
#[serde(rename = "ch-prefers-color-scheme")]
ChPrefersColorScheme,
#[serde(rename = "ch-prefers-reduced-motion")]
ChPrefersReducedMotion,
#[serde(rename = "ch-prefers-reduced-transparency")]
ChPrefersReducedTransparency,
#[serde(rename = "ch-rtt")]
ChRtt,
#[serde(rename = "ch-save-data")]
ChSaveData,
#[serde(rename = "ch-ua")]
ChUa,
#[serde(rename = "ch-ua-arch")]
ChUaArch,
#[serde(rename = "ch-ua-bitness")]
ChUaBitness,
#[serde(rename = "ch-ua-high-entropy-values")]
ChUaHighEntropyValues,
#[serde(rename = "ch-ua-platform")]
ChUaPlatform,
#[serde(rename = "ch-ua-model")]
ChUaModel,
#[serde(rename = "ch-ua-mobile")]
ChUaMobile,
#[serde(rename = "ch-ua-form-factors")]
ChUaFormFactors,
#[serde(rename = "ch-ua-full-version")]
ChUaFullVersion,
#[serde(rename = "ch-ua-full-version-list")]
ChUaFullVersionList,
#[serde(rename = "ch-ua-platform-version")]
ChUaPlatformVersion,
#[serde(rename = "ch-ua-wow64")]
ChUaWow64,
#[serde(rename = "ch-viewport-height")]
ChViewportHeight,
#[serde(rename = "ch-viewport-width")]
ChViewportWidth,
#[serde(rename = "ch-width")]
ChWidth,
#[serde(rename = "clipboard-read")]
ClipboardRead,
#[serde(rename = "clipboard-write")]
ClipboardWrite,
#[serde(rename = "compute-pressure")]
ComputePressure,
#[serde(rename = "controlled-frame")]
ControlledFrame,
#[serde(rename = "cross-origin-isolated")]
CrossOriginIsolated,
#[serde(rename = "deferred-fetch")]
DeferredFetch,
#[serde(rename = "deferred-fetch-minimal")]
DeferredFetchMinimal,
#[serde(rename = "device-attributes")]
DeviceAttributes,
#[serde(rename = "digital-credentials-create")]
DigitalCredentialsCreate,
#[serde(rename = "digital-credentials-get")]
DigitalCredentialsGet,
#[serde(rename = "direct-sockets")]
DirectSockets,
#[serde(rename = "direct-sockets-multicast")]
DirectSocketsMulticast,
#[serde(rename = "display-capture")]
DisplayCapture,
#[serde(rename = "document-domain")]
DocumentDomain,
#[serde(rename = "encrypted-media")]
EncryptedMedia,
#[serde(rename = "execution-while-out-of-viewport")]
ExecutionWhileOutOfViewport,
#[serde(rename = "execution-while-not-rendered")]
ExecutionWhileNotRendered,
#[serde(rename = "focus-without-user-activation")]
FocusWithoutUserActivation,
#[serde(rename = "fullscreen")]
Fullscreen,
#[serde(rename = "frobulate")]
Frobulate,
#[serde(rename = "gamepad")]
Gamepad,
#[serde(rename = "geolocation")]
Geolocation,
#[serde(rename = "gyroscope")]
Gyroscope,
#[serde(rename = "haptics")]
Haptics,
#[serde(rename = "hid")]
Hid,
#[serde(rename = "identity-credentials-get")]
IdentityCredentialsGet,
#[serde(rename = "idle-detection")]
IdleDetection,
#[serde(rename = "keyboard-map")]
KeyboardMap,
#[serde(rename = "language-detector")]
LanguageDetector,
#[serde(rename = "language-model")]
LanguageModel,
#[serde(rename = "local-fonts")]
LocalFonts,
#[serde(rename = "local-network")]
LocalNetwork,
#[serde(rename = "local-network-access")]
LocalNetworkAccess,
#[serde(rename = "loopback-network")]
LoopbackNetwork,
#[serde(rename = "magnetometer")]
Magnetometer,
#[serde(rename = "manual-text")]
ManualText,
#[serde(rename = "media-playback-while-not-visible")]
MediaPlaybackWhileNotVisible,
#[serde(rename = "microphone")]
Microphone,
#[serde(rename = "midi")]
Midi,
#[serde(rename = "on-device-speech-recognition")]
OnDeviceSpeechRecognition,
#[serde(rename = "otp-credentials")]
OtpCredentials,
#[serde(rename = "payment")]
Payment,
#[serde(rename = "picture-in-picture")]
PictureInPicture,
#[serde(rename = "private-state-token-issuance")]
PrivateStateTokenIssuance,
#[serde(rename = "private-state-token-redemption")]
PrivateStateTokenRedemption,
#[serde(rename = "publickey-credentials-create")]
PublickeyCredentialsCreate,
#[serde(rename = "publickey-credentials-get")]
PublickeyCredentialsGet,
#[serde(rename = "publickey-credentials-remote-client-data-json")]
PublickeyCredentialsRemoteClientDataJson,
#[serde(rename = "rewriter")]
Rewriter,
#[serde(rename = "screen-wake-lock")]
ScreenWakeLock,
#[serde(rename = "semantic-embedder")]
SemanticEmbedder,
#[serde(rename = "serial")]
Serial,
#[serde(rename = "smart-card")]
SmartCard,
#[serde(rename = "speaker-selection")]
SpeakerSelection,
#[serde(rename = "storage-access")]
StorageAccess,
#[serde(rename = "sub-apps")]
SubApps,
#[serde(rename = "summarizer")]
Summarizer,
#[serde(rename = "sync-xhr")]
SyncXhr,
#[serde(rename = "tools")]
Tools,
#[serde(rename = "translator")]
Translator,
#[serde(rename = "unbounded-element")]
UnboundedElement,
#[serde(rename = "unload")]
Unload,
#[serde(rename = "usb")]
Usb,
#[serde(rename = "usb-unrestricted")]
UsbUnrestricted,
#[serde(rename = "vertical-scroll")]
VerticalScroll,
#[serde(rename = "web-app-installation")]
WebAppInstallation,
#[serde(rename = "webnn")]
Webnn,
#[serde(rename = "web-printing")]
WebPrinting,
#[serde(rename = "web-share")]
WebShare,
#[serde(rename = "window-management")]
WindowManagement,
#[serde(rename = "writer")]
Writer,
#[serde(rename = "xr-spatial-tracking")]
XrSpatialTracking,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum PermissionsPolicyBlockReason {
Header,
IframeAttribute,
InFencedFrameTree,
InIsolatedApp,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct PermissionsPolicyBlockLocator {
#[serde(rename = "frameId")]
pub frame_id: FrameId,
#[serde(rename = "blockReason")]
pub block_reason: PermissionsPolicyBlockReason,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct PermissionsPolicyFeatureState {
pub feature: PermissionsPolicyFeature,
pub allowed: bool,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub locator: Option<PermissionsPolicyBlockLocator>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum OriginTrialTokenStatus {
Success,
NotSupported,
Insecure,
Expired,
WrongOrigin,
InvalidSignature,
Malformed,
WrongVersion,
FeatureDisabled,
TokenDisabled,
FeatureDisabledForUser,
UnknownTrial,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum OriginTrialStatus {
Enabled,
ValidTokenNotProvided,
#[serde(rename = "OSNotSupported")]
OsNotSupported,
TrialNotAllowed,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum OriginTrialUsageRestriction {
None,
Subset,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct OriginTrialToken {
pub origin: String,
#[serde(rename = "matchSubDomains")]
pub match_sub_domains: bool,
#[serde(rename = "trialName")]
pub trial_name: String,
#[serde(rename = "expiryTime")]
pub expiry_time: crate::protocol::network::TimeSinceEpoch,
#[serde(rename = "isThirdParty")]
pub is_third_party: bool,
#[serde(rename = "usageRestriction")]
pub usage_restriction: OriginTrialUsageRestriction,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct OriginTrialTokenWithStatus {
#[serde(rename = "rawTokenText")]
pub raw_token_text: String,
#[serde(
rename = "parsedToken",
default,
skip_serializing_if = "Option::is_none"
)]
pub parsed_token: Option<OriginTrialToken>,
pub status: OriginTrialTokenStatus,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct OriginTrial {
#[serde(rename = "trialName")]
pub trial_name: String,
pub status: OriginTrialStatus,
#[serde(rename = "tokensWithStatus")]
pub tokens_with_status: Vec<OriginTrialTokenWithStatus>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SecurityOriginDetails {
#[serde(rename = "isLocalhost")]
pub is_localhost: bool,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Frame {
pub id: FrameId,
#[serde(rename = "parentId", default, skip_serializing_if = "Option::is_none")]
pub parent_id: Option<FrameId>,
#[serde(rename = "loaderId")]
pub loader_id: crate::protocol::network::LoaderId,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
pub url: String,
#[serde(
rename = "urlFragment",
default,
skip_serializing_if = "Option::is_none"
)]
pub url_fragment: Option<String>,
#[serde(rename = "domainAndRegistry")]
pub domain_and_registry: String,
#[serde(rename = "securityOrigin")]
pub security_origin: String,
#[serde(
rename = "securityOriginDetails",
default,
skip_serializing_if = "Option::is_none"
)]
pub security_origin_details: Option<SecurityOriginDetails>,
#[serde(rename = "mimeType")]
pub mime_type: String,
#[serde(
rename = "unreachableUrl",
default,
skip_serializing_if = "Option::is_none"
)]
pub unreachable_url: Option<String>,
#[serde(
rename = "adFrameStatus",
default,
skip_serializing_if = "Option::is_none"
)]
pub ad_frame_status: Option<AdFrameStatus>,
#[serde(rename = "secureContextType")]
pub secure_context_type: SecureContextType,
#[serde(rename = "crossOriginIsolatedContextType")]
pub cross_origin_isolated_context_type: CrossOriginIsolatedContextType,
#[serde(rename = "gatedAPIFeatures")]
pub gated_api_features: Vec<GatedApiFeatures>,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FrameResource {
pub url: String,
pub r#type: crate::protocol::network::ResourceType,
#[serde(rename = "mimeType")]
pub mime_type: String,
#[serde(
rename = "lastModified",
default,
skip_serializing_if = "Option::is_none"
)]
pub last_modified: Option<crate::protocol::network::TimeSinceEpoch>,
#[serde(
rename = "contentSize",
default,
skip_serializing_if = "Option::is_none"
)]
pub content_size: Option<f64>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub failed: Option<bool>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub canceled: Option<bool>,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FrameResourceTree {
pub frame: Frame,
#[serde(
rename = "childFrames",
default,
skip_serializing_if = "Option::is_none"
)]
pub child_frames: Option<Vec<FrameResourceTree>>,
pub resources: Vec<FrameResource>,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FrameTree {
pub frame: Frame,
#[serde(
rename = "childFrames",
default,
skip_serializing_if = "Option::is_none"
)]
pub child_frames: Option<Vec<FrameTree>>,
}
pub type ScriptIdentifier = String;
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum TransitionType {
#[serde(rename = "link")]
Link,
#[serde(rename = "typed")]
Typed,
#[serde(rename = "address_bar")]
AddressBar,
#[serde(rename = "auto_bookmark")]
AutoBookmark,
#[serde(rename = "auto_subframe")]
AutoSubframe,
#[serde(rename = "manual_subframe")]
ManualSubframe,
#[serde(rename = "generated")]
Generated,
#[serde(rename = "auto_toplevel")]
AutoToplevel,
#[serde(rename = "form_submit")]
FormSubmit,
#[serde(rename = "reload")]
Reload,
#[serde(rename = "keyword")]
Keyword,
#[serde(rename = "keyword_generated")]
KeywordGenerated,
#[serde(rename = "other")]
Other,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct NavigationEntry {
pub id: i64,
pub url: String,
#[serde(rename = "userTypedURL")]
pub user_typed_url: String,
pub title: String,
#[serde(rename = "transitionType")]
pub transition_type: TransitionType,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ScreencastFrameMetadata {
#[serde(rename = "offsetTop")]
pub offset_top: f64,
#[serde(rename = "pageScaleFactor")]
pub page_scale_factor: f64,
#[serde(rename = "deviceWidth")]
pub device_width: f64,
#[serde(rename = "deviceHeight")]
pub device_height: f64,
#[serde(rename = "scrollOffsetX")]
pub scroll_offset_x: f64,
#[serde(rename = "scrollOffsetY")]
pub scroll_offset_y: f64,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub timestamp: Option<crate::protocol::network::TimeSinceEpoch>,
#[serde(
rename = "monotonicTimestamp",
default,
skip_serializing_if = "Option::is_none"
)]
pub monotonic_timestamp: Option<crate::protocol::network::MonotonicTime>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum DialogType {
#[serde(rename = "alert")]
Alert,
#[serde(rename = "confirm")]
Confirm,
#[serde(rename = "prompt")]
Prompt,
#[serde(rename = "beforeunload")]
Beforeunload,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct AppManifestError {
pub message: String,
pub critical: i64,
pub line: i64,
pub column: i64,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct AppManifestParsedProperties {
pub scope: String,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct LayoutViewport {
#[serde(rename = "pageX")]
pub page_x: i64,
#[serde(rename = "pageY")]
pub page_y: i64,
#[serde(rename = "clientWidth")]
pub client_width: i64,
#[serde(rename = "clientHeight")]
pub client_height: i64,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct VisualViewport {
#[serde(rename = "offsetX")]
pub offset_x: f64,
#[serde(rename = "offsetY")]
pub offset_y: f64,
#[serde(rename = "pageX")]
pub page_x: f64,
#[serde(rename = "pageY")]
pub page_y: f64,
#[serde(rename = "clientWidth")]
pub client_width: f64,
#[serde(rename = "clientHeight")]
pub client_height: f64,
pub scale: f64,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub zoom: Option<f64>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct Viewport {
pub x: f64,
pub y: f64,
pub width: f64,
pub height: f64,
pub scale: f64,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct FontFamilies {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub standard: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub fixed: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub serif: Option<String>,
#[serde(rename = "sansSerif", default, skip_serializing_if = "Option::is_none")]
pub sans_serif: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub cursive: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub fantasy: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub math: Option<String>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ScriptFontFamilies {
pub script: String,
#[serde(rename = "fontFamilies")]
pub font_families: FontFamilies,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct FontSizes {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub standard: Option<i64>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub fixed: Option<i64>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ClientNavigationReason {
#[serde(rename = "anchorClick")]
AnchorClick,
#[serde(rename = "formSubmissionGet")]
FormSubmissionGet,
#[serde(rename = "formSubmissionPost")]
FormSubmissionPost,
#[serde(rename = "httpHeaderRefresh")]
HttpHeaderRefresh,
#[serde(rename = "initialFrameNavigation")]
InitialFrameNavigation,
#[serde(rename = "metaTagRefresh")]
MetaTagRefresh,
#[serde(rename = "other")]
Other,
#[serde(rename = "pageBlockInterstitial")]
PageBlockInterstitial,
#[serde(rename = "reload")]
Reload,
#[serde(rename = "scriptInitiated")]
ScriptInitiated,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ClientNavigationDisposition {
#[serde(rename = "currentTab")]
CurrentTab,
#[serde(rename = "newTab")]
NewTab,
#[serde(rename = "newWindow")]
NewWindow,
#[serde(rename = "download")]
Download,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct InstallabilityErrorArgument {
pub name: String,
pub value: String,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct InstallabilityError {
#[serde(rename = "errorId")]
pub error_id: String,
#[serde(rename = "errorArguments")]
pub error_arguments: Vec<InstallabilityErrorArgument>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ReferrerPolicy {
#[serde(rename = "noReferrer")]
NoReferrer,
#[serde(rename = "noReferrerWhenDowngrade")]
NoReferrerWhenDowngrade,
#[serde(rename = "origin")]
Origin,
#[serde(rename = "originWhenCrossOrigin")]
OriginWhenCrossOrigin,
#[serde(rename = "sameOrigin")]
SameOrigin,
#[serde(rename = "strictOrigin")]
StrictOrigin,
#[serde(rename = "strictOriginWhenCrossOrigin")]
StrictOriginWhenCrossOrigin,
#[serde(rename = "unsafeUrl")]
UnsafeUrl,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct CompilationCacheParams {
pub url: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub eager: Option<bool>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct FileFilter {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub accepts: Option<Vec<String>>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct FileHandler {
pub action: String,
pub name: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub accepts: Option<Vec<FileFilter>>,
#[serde(rename = "launchType")]
pub launch_type: String,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ImageResource {
pub url: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub sizes: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub r#type: Option<String>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct LaunchHandler {
#[serde(rename = "clientMode")]
pub client_mode: String,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ProtocolHandler {
pub protocol: String,
pub url: String,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct RelatedApplication {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
pub url: String,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ScopeExtension {
pub origin: String,
#[serde(rename = "hasOriginWildcard")]
pub has_origin_wildcard: bool,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct Screenshot {
pub image: ImageResource,
#[serde(rename = "formFactor")]
pub form_factor: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub label: Option<String>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ShareTarget {
pub action: String,
pub method: String,
pub enctype: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub text: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub files: Option<Vec<FileFilter>>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct Shortcut {
pub name: String,
pub url: String,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct WebAppManifest {
#[serde(
rename = "backgroundColor",
default,
skip_serializing_if = "Option::is_none"
)]
pub background_color: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub dir: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub display: Option<String>,
#[serde(
rename = "displayOverrides",
default,
skip_serializing_if = "Option::is_none"
)]
pub display_overrides: Option<Vec<String>>,
#[serde(
rename = "fileHandlers",
default,
skip_serializing_if = "Option::is_none"
)]
pub file_handlers: Option<Vec<FileHandler>>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub icons: Option<Vec<ImageResource>>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub lang: Option<String>,
#[serde(
rename = "launchHandler",
default,
skip_serializing_if = "Option::is_none"
)]
pub launch_handler: Option<LaunchHandler>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub orientation: Option<String>,
#[serde(
rename = "preferRelatedApplications",
default,
skip_serializing_if = "Option::is_none"
)]
pub prefer_related_applications: Option<bool>,
#[serde(
rename = "protocolHandlers",
default,
skip_serializing_if = "Option::is_none"
)]
pub protocol_handlers: Option<Vec<ProtocolHandler>>,
#[serde(
rename = "relatedApplications",
default,
skip_serializing_if = "Option::is_none"
)]
pub related_applications: Option<Vec<RelatedApplication>>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub scope: Option<String>,
#[serde(
rename = "scopeExtensions",
default,
skip_serializing_if = "Option::is_none"
)]
pub scope_extensions: Option<Vec<ScopeExtension>>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub screenshots: Option<Vec<Screenshot>>,
#[serde(
rename = "shareTarget",
default,
skip_serializing_if = "Option::is_none"
)]
pub share_target: Option<ShareTarget>,
#[serde(rename = "shortName", default, skip_serializing_if = "Option::is_none")]
pub short_name: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub shortcuts: Option<Vec<Shortcut>>,
#[serde(rename = "startUrl", default, skip_serializing_if = "Option::is_none")]
pub start_url: Option<String>,
#[serde(
rename = "themeColor",
default,
skip_serializing_if = "Option::is_none"
)]
pub theme_color: Option<String>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SubApp {
pub name: String,
pub scope: String,
#[serde(rename = "manifestId")]
pub manifest_id: String,
#[serde(rename = "startUrl")]
pub start_url: String,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum NavigationType {
Navigation,
BackForwardCacheRestore,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum BackForwardCacheNotRestoredReason {
NotPrimaryMainFrame,
BackForwardCacheDisabled,
RelatedActiveContentsExist,
#[serde(rename = "HTTPStatusNotOK")]
HttpStatusNotOk,
#[serde(rename = "SchemeNotHTTPOrHTTPS")]
SchemeNotHttpOrHttps,
Loading,
WasGrantedMediaAccess,
DisableForRenderFrameHostCalled,
DomainNotAllowed,
#[serde(rename = "HTTPMethodNotGET")]
HttpMethodNotGet,
SubframeIsNavigating,
Timeout,
CacheLimit,
JavaScriptExecution,
RendererProcessKilled,
RendererProcessCrashed,
SchedulerTrackedFeatureUsed,
ConflictingBrowsingInstance,
CacheFlushed,
ServiceWorkerVersionActivation,
SessionRestored,
ServiceWorkerPostMessage,
EnteredBackForwardCacheBeforeServiceWorkerHostAdded,
#[serde(rename = "RenderFrameHostReused_SameSite")]
RenderFrameHostReusedSameSite,
#[serde(rename = "RenderFrameHostReused_CrossSite")]
RenderFrameHostReusedCrossSite,
ServiceWorkerClaim,
IgnoreEventAndEvict,
HaveInnerContents,
TimeoutPuttingInCache,
BackForwardCacheDisabledByLowMemory,
BackForwardCacheDisabledByCommandLine,
NetworkRequestDatapipeDrainedAsBytesConsumer,
NetworkRequestRedirected,
NetworkRequestTimeout,
NetworkExceedsBufferLimit,
NavigationCancelledWhileRestoring,
NotMostRecentNavigationEntry,
BackForwardCacheDisabledForPrerender,
UserAgentOverrideDiffers,
ForegroundCacheLimit,
ForwardCacheDisabled,
BrowsingInstanceNotSwapped,
BackForwardCacheDisabledForDelegate,
UnloadHandlerExistsInMainFrame,
UnloadHandlerExistsInSubFrame,
ServiceWorkerUnregistration,
CacheControlNoStore,
CacheControlNoStoreCookieModified,
#[serde(rename = "CacheControlNoStoreHTTPOnlyCookieModified")]
CacheControlNoStoreHttpOnlyCookieModified,
NoResponseHead,
Unknown,
ActivationNavigationsDisallowedForBug1234857,
ErrorDocument,
FencedFramesEmbedder,
CookieDisabled,
#[serde(rename = "HTTPAuthRequired")]
HttpAuthRequired,
CookieFlushed,
BroadcastChannelOnMessage,
WebViewSettingsChanged,
WebViewJavaScriptObjectChanged,
WebViewMessageListenerInjected,
WebViewSafeBrowsingAllowlistChanged,
WebViewDocumentStartJavascriptChanged,
WebSocket,
WebTransport,
#[serde(rename = "WebRTC")]
WebRtc,
MainResourceHasCacheControlNoStore,
MainResourceHasCacheControlNoCache,
SubresourceHasCacheControlNoStore,
SubresourceHasCacheControlNoCache,
ContainsPlugins,
DocumentLoaded,
OutstandingNetworkRequestOthers,
#[serde(rename = "RequestedMIDIPermission")]
RequestedMidiPermission,
RequestedAudioCapturePermission,
RequestedVideoCapturePermission,
RequestedBackForwardCacheBlockedSensors,
RequestedBackgroundWorkPermission,
BroadcastChannel,
#[serde(rename = "WebXR")]
WebXr,
SharedWorker,
SharedWorkerMessage,
SharedWorkerWithNoActiveClient,
WebLocks,
WebLocksContention,
#[serde(rename = "WebHID")]
WebHid,
WebBluetooth,
WebShare,
RequestedStorageAccessGrant,
WebNfc,
OutstandingNetworkRequestFetch,
#[serde(rename = "OutstandingNetworkRequestXHR")]
OutstandingNetworkRequestXhr,
AppBanner,
Printing,
WebDatabase,
PictureInPicture,
SpeechRecognizer,
IdleManager,
PaymentManager,
SpeechSynthesis,
KeyboardLock,
#[serde(rename = "WebOTPService")]
WebOtpService,
OutstandingNetworkRequestDirectSocket,
InjectedJavascript,
InjectedStyleSheet,
KeepaliveRequest,
#[serde(rename = "IndexedDBEvent")]
IndexedDbEvent,
Dummy,
JsNetworkRequestReceivedCacheControlNoStoreResource,
#[serde(rename = "WebRTCUsedWithCCNS")]
WebRtcUsedWithCcns,
#[serde(rename = "WebTransportUsedWithCCNS")]
WebTransportUsedWithCcns,
#[serde(rename = "WebSocketUsedWithCCNS")]
WebSocketUsedWithCcns,
SmartCard,
LiveMediaStreamTrack,
UnloadHandler,
ParserAborted,
ContentSecurityHandler,
#[serde(rename = "ContentWebAuthenticationAPI")]
ContentWebAuthenticationApi,
ContentFileChooser,
ContentSerial,
ContentFileSystemAccess,
ContentMediaDevicesDispatcherHost,
ContentWebBluetooth,
#[serde(rename = "ContentWebUSB")]
ContentWebUsb,
ContentMediaSessionService,
ContentScreenReader,
ContentDiscarded,
EmbedderPopupBlockerTabHelper,
EmbedderSafeBrowsingTriggeredPopupBlocker,
EmbedderSafeBrowsingThreatDetails,
EmbedderAppBannerManager,
EmbedderDomDistillerViewerSource,
EmbedderDomDistillerSelfDeletingRequestDelegate,
EmbedderOomInterventionTabHelper,
EmbedderOfflinePage,
EmbedderChromePasswordManagerClientBindCredentialManager,
EmbedderPermissionRequestManager,
EmbedderModalDialog,
EmbedderExtensions,
EmbedderExtensionMessaging,
EmbedderExtensionMessagingForOpenPort,
EmbedderExtensionSentMessageToCachedFrame,
EmbedderExtensionFrame,
EmbedderPrivilegedWebContents,
RequestedByWebViewClient,
PostMessageByWebViewClient,
CacheControlNoStoreDeviceBoundSessionTerminated,
CacheLimitPrunedOnModerateMemoryPressure,
CacheLimitPrunedOnCriticalMemoryPressure,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum BackForwardCacheNotRestoredReasonType {
SupportPending,
PageSupportNeeded,
Circumstantial,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct BackForwardCacheBlockingDetails {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub function: Option<String>,
#[serde(rename = "lineNumber")]
pub line_number: i64,
#[serde(rename = "columnNumber")]
pub column_number: i64,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct BackForwardCacheNotRestoredExplanation {
pub r#type: BackForwardCacheNotRestoredReasonType,
pub reason: BackForwardCacheNotRestoredReason,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub context: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub details: Option<Vec<BackForwardCacheBlockingDetails>>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct BackForwardCacheNotRestoredExplanationTree {
pub url: String,
pub explanations: Vec<BackForwardCacheNotRestoredExplanation>,
pub children: Vec<BackForwardCacheNotRestoredExplanationTree>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct AddScriptToEvaluateOnLoadParams {
#[serde(rename = "scriptSource")]
pub script_source: String,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct AddScriptToEvaluateOnLoadReturns {
pub identifier: ScriptIdentifier,
}
impl crate::typed::Command for AddScriptToEvaluateOnLoadParams {
const METHOD: &'static str = "Page.addScriptToEvaluateOnLoad";
type Returns = AddScriptToEvaluateOnLoadReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct AddScriptToEvaluateOnNewDocumentParams {
pub source: String,
#[serde(rename = "worldName", default, skip_serializing_if = "Option::is_none")]
pub world_name: Option<String>,
#[serde(
rename = "includeCommandLineAPI",
default,
skip_serializing_if = "Option::is_none"
)]
pub include_command_line_api: Option<bool>,
#[serde(
rename = "runImmediately",
default,
skip_serializing_if = "Option::is_none"
)]
pub run_immediately: Option<bool>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct AddScriptToEvaluateOnNewDocumentReturns {
pub identifier: ScriptIdentifier,
}
impl crate::typed::Command for AddScriptToEvaluateOnNewDocumentParams {
const METHOD: &'static str = "Page.addScriptToEvaluateOnNewDocument";
type Returns = AddScriptToEvaluateOnNewDocumentReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct BringToFrontParams {}
impl crate::typed::Command for BringToFrontParams {
const METHOD: &'static str = "Page.bringToFront";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct CaptureScreenshotParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub format: Option<CaptureScreenshotFormat>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub quality: Option<i64>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub clip: Option<Viewport>,
#[serde(
rename = "fromSurface",
default,
skip_serializing_if = "Option::is_none"
)]
pub from_surface: Option<bool>,
#[serde(
rename = "captureBeyondViewport",
default,
skip_serializing_if = "Option::is_none"
)]
pub capture_beyond_viewport: Option<bool>,
#[serde(
rename = "optimizeForSpeed",
default,
skip_serializing_if = "Option::is_none"
)]
pub optimize_for_speed: Option<bool>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum CaptureScreenshotFormat {
#[serde(rename = "jpeg")]
Jpeg,
#[serde(rename = "png")]
Png,
#[serde(rename = "webp")]
Webp,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct CaptureScreenshotReturns {
pub data: String,
}
impl crate::typed::Command for CaptureScreenshotParams {
const METHOD: &'static str = "Page.captureScreenshot";
type Returns = CaptureScreenshotReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct CaptureSnapshotParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub format: Option<CaptureSnapshotFormat>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum CaptureSnapshotFormat {
#[serde(rename = "mhtml")]
Mhtml,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct CaptureSnapshotReturns {
pub data: String,
}
impl crate::typed::Command for CaptureSnapshotParams {
const METHOD: &'static str = "Page.captureSnapshot";
type Returns = CaptureSnapshotReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ClearDeviceMetricsOverrideParams {}
impl crate::typed::Command for ClearDeviceMetricsOverrideParams {
const METHOD: &'static str = "Page.clearDeviceMetricsOverride";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ClearDeviceOrientationOverrideParams {}
impl crate::typed::Command for ClearDeviceOrientationOverrideParams {
const METHOD: &'static str = "Page.clearDeviceOrientationOverride";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ClearGeolocationOverrideParams {}
impl crate::typed::Command for ClearGeolocationOverrideParams {
const METHOD: &'static str = "Page.clearGeolocationOverride";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct CreateIsolatedWorldParams {
#[serde(rename = "frameId")]
pub frame_id: FrameId,
#[serde(rename = "worldName", default, skip_serializing_if = "Option::is_none")]
pub world_name: Option<String>,
#[serde(
rename = "grantUniveralAccess",
default,
skip_serializing_if = "Option::is_none"
)]
pub grant_univeral_access: Option<bool>,
#[serde(
rename = "contentSecurityPolicy",
default,
skip_serializing_if = "Option::is_none"
)]
pub content_security_policy: Option<String>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct CreateIsolatedWorldReturns {
#[serde(rename = "executionContextId")]
pub execution_context_id: crate::protocol::runtime::ExecutionContextId,
}
impl crate::typed::Command for CreateIsolatedWorldParams {
const METHOD: &'static str = "Page.createIsolatedWorld";
type Returns = CreateIsolatedWorldReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DeleteCookieParams {
#[serde(rename = "cookieName")]
pub cookie_name: String,
pub url: String,
}
impl crate::typed::Command for DeleteCookieParams {
const METHOD: &'static str = "Page.deleteCookie";
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 = "Page.disable";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct EnableParams {
#[serde(
rename = "enableFileChooserOpenedEvent",
default,
skip_serializing_if = "Option::is_none"
)]
pub enable_file_chooser_opened_event: Option<bool>,
}
impl crate::typed::Command for EnableParams {
const METHOD: &'static str = "Page.enable";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetAppManifestParams {
#[serde(
rename = "manifestId",
default,
skip_serializing_if = "Option::is_none"
)]
pub manifest_id: Option<String>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetAppManifestReturns {
pub url: String,
pub errors: Vec<AppManifestError>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub data: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub parsed: Option<AppManifestParsedProperties>,
pub manifest: WebAppManifest,
}
impl crate::typed::Command for GetAppManifestParams {
const METHOD: &'static str = "Page.getAppManifest";
type Returns = GetAppManifestReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetInstallabilityErrorsParams {}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetInstallabilityErrorsReturns {
#[serde(rename = "installabilityErrors")]
pub installability_errors: Vec<InstallabilityError>,
}
impl crate::typed::Command for GetInstallabilityErrorsParams {
const METHOD: &'static str = "Page.getInstallabilityErrors";
type Returns = GetInstallabilityErrorsReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetManifestIconsParams {}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetManifestIconsReturns {
#[serde(
rename = "primaryIcon",
default,
skip_serializing_if = "Option::is_none"
)]
pub primary_icon: Option<String>,
}
impl crate::typed::Command for GetManifestIconsParams {
const METHOD: &'static str = "Page.getManifestIcons";
type Returns = GetManifestIconsReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetAppIdParams {}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetAppIdReturns {
#[serde(rename = "appId", default, skip_serializing_if = "Option::is_none")]
pub app_id: Option<String>,
#[serde(
rename = "recommendedId",
default,
skip_serializing_if = "Option::is_none"
)]
pub recommended_id: Option<String>,
#[serde(rename = "bundleId", default, skip_serializing_if = "Option::is_none")]
pub bundle_id: Option<String>,
#[serde(
rename = "parentAppName",
default,
skip_serializing_if = "Option::is_none"
)]
pub parent_app_name: Option<String>,
}
impl crate::typed::Command for GetAppIdParams {
const METHOD: &'static str = "Page.getAppId";
type Returns = GetAppIdReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetSubAppsParams {}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetSubAppsReturns {
#[serde(rename = "subApps")]
pub sub_apps: Vec<SubApp>,
}
impl crate::typed::Command for GetSubAppsParams {
const METHOD: &'static str = "Page.getSubApps";
type Returns = GetSubAppsReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetSiblingSubAppsParams {}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetSiblingSubAppsReturns {
#[serde(rename = "subApps")]
pub sub_apps: Vec<SubApp>,
}
impl crate::typed::Command for GetSiblingSubAppsParams {
const METHOD: &'static str = "Page.getSiblingSubApps";
type Returns = GetSiblingSubAppsReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetAdScriptAncestryParams {
#[serde(rename = "frameId")]
pub frame_id: FrameId,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetAdScriptAncestryReturns {
#[serde(
rename = "adScriptAncestry",
default,
skip_serializing_if = "Option::is_none"
)]
pub ad_script_ancestry: Option<crate::protocol::network::AdAncestry>,
}
impl crate::typed::Command for GetAdScriptAncestryParams {
const METHOD: &'static str = "Page.getAdScriptAncestry";
type Returns = GetAdScriptAncestryReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetSpellCheckCustomDictionaryParams {
#[serde(rename = "frameId")]
pub frame_id: FrameId,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetSpellCheckCustomDictionaryReturns {
pub words: Vec<String>,
}
impl crate::typed::Command for GetSpellCheckCustomDictionaryParams {
const METHOD: &'static str = "Page.getSpellCheckCustomDictionary";
type Returns = GetSpellCheckCustomDictionaryReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetFrameTreeParams {}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct GetFrameTreeReturns {
#[serde(rename = "frameTree")]
pub frame_tree: FrameTree,
}
impl crate::typed::Command for GetFrameTreeParams {
const METHOD: &'static str = "Page.getFrameTree";
type Returns = GetFrameTreeReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetLayoutMetricsParams {}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetLayoutMetricsReturns {
#[serde(rename = "layoutViewport")]
pub layout_viewport: LayoutViewport,
#[serde(rename = "visualViewport")]
pub visual_viewport: VisualViewport,
#[serde(rename = "contentSize")]
pub content_size: crate::protocol::dom::Rect,
#[serde(rename = "cssLayoutViewport")]
pub css_layout_viewport: LayoutViewport,
#[serde(rename = "cssVisualViewport")]
pub css_visual_viewport: VisualViewport,
#[serde(rename = "cssContentSize")]
pub css_content_size: crate::protocol::dom::Rect,
}
impl crate::typed::Command for GetLayoutMetricsParams {
const METHOD: &'static str = "Page.getLayoutMetrics";
type Returns = GetLayoutMetricsReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetNavigationHistoryParams {}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetNavigationHistoryReturns {
#[serde(rename = "currentIndex")]
pub current_index: i64,
pub entries: Vec<NavigationEntry>,
}
impl crate::typed::Command for GetNavigationHistoryParams {
const METHOD: &'static str = "Page.getNavigationHistory";
type Returns = GetNavigationHistoryReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ResetNavigationHistoryParams {}
impl crate::typed::Command for ResetNavigationHistoryParams {
const METHOD: &'static str = "Page.resetNavigationHistory";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetResourceContentParams {
#[serde(rename = "frameId")]
pub frame_id: FrameId,
pub url: String,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetResourceContentReturns {
pub content: String,
#[serde(rename = "base64Encoded")]
pub base64_encoded: bool,
}
impl crate::typed::Command for GetResourceContentParams {
const METHOD: &'static str = "Page.getResourceContent";
type Returns = GetResourceContentReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetResourceTreeParams {}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct GetResourceTreeReturns {
#[serde(rename = "frameTree")]
pub frame_tree: FrameResourceTree,
}
impl crate::typed::Command for GetResourceTreeParams {
const METHOD: &'static str = "Page.getResourceTree";
type Returns = GetResourceTreeReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct HandleJavaScriptDialogParams {
pub accept: bool,
#[serde(
rename = "promptText",
default,
skip_serializing_if = "Option::is_none"
)]
pub prompt_text: Option<String>,
}
impl crate::typed::Command for HandleJavaScriptDialogParams {
const METHOD: &'static str = "Page.handleJavaScriptDialog";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct NavigateParams {
pub url: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub referrer: Option<String>,
#[serde(
rename = "transitionType",
default,
skip_serializing_if = "Option::is_none"
)]
pub transition_type: Option<TransitionType>,
#[serde(rename = "frameId", default, skip_serializing_if = "Option::is_none")]
pub frame_id: Option<FrameId>,
#[serde(
rename = "referrerPolicy",
default,
skip_serializing_if = "Option::is_none"
)]
pub referrer_policy: Option<ReferrerPolicy>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct NavigateReturns {
#[serde(rename = "frameId")]
pub frame_id: FrameId,
#[serde(rename = "loaderId", default, skip_serializing_if = "Option::is_none")]
pub loader_id: Option<crate::protocol::network::LoaderId>,
#[serde(rename = "errorText", default, skip_serializing_if = "Option::is_none")]
pub error_text: Option<String>,
#[serde(
rename = "isDownload",
default,
skip_serializing_if = "Option::is_none"
)]
pub is_download: Option<bool>,
}
impl crate::typed::Command for NavigateParams {
const METHOD: &'static str = "Page.navigate";
type Returns = NavigateReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct NavigateToHistoryEntryParams {
#[serde(rename = "entryId")]
pub entry_id: i64,
}
impl crate::typed::Command for NavigateToHistoryEntryParams {
const METHOD: &'static str = "Page.navigateToHistoryEntry";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct PrintToPdfParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub landscape: Option<bool>,
#[serde(
rename = "displayHeaderFooter",
default,
skip_serializing_if = "Option::is_none"
)]
pub display_header_footer: Option<bool>,
#[serde(
rename = "printBackground",
default,
skip_serializing_if = "Option::is_none"
)]
pub print_background: Option<bool>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub scale: Option<f64>,
#[serde(
rename = "paperWidth",
default,
skip_serializing_if = "Option::is_none"
)]
pub paper_width: Option<f64>,
#[serde(
rename = "paperHeight",
default,
skip_serializing_if = "Option::is_none"
)]
pub paper_height: Option<f64>,
#[serde(rename = "marginTop", default, skip_serializing_if = "Option::is_none")]
pub margin_top: Option<f64>,
#[serde(
rename = "marginBottom",
default,
skip_serializing_if = "Option::is_none"
)]
pub margin_bottom: Option<f64>,
#[serde(
rename = "marginLeft",
default,
skip_serializing_if = "Option::is_none"
)]
pub margin_left: Option<f64>,
#[serde(
rename = "marginRight",
default,
skip_serializing_if = "Option::is_none"
)]
pub margin_right: Option<f64>,
#[serde(
rename = "pageRanges",
default,
skip_serializing_if = "Option::is_none"
)]
pub page_ranges: Option<String>,
#[serde(
rename = "headerTemplate",
default,
skip_serializing_if = "Option::is_none"
)]
pub header_template: Option<String>,
#[serde(
rename = "footerTemplate",
default,
skip_serializing_if = "Option::is_none"
)]
pub footer_template: Option<String>,
#[serde(
rename = "preferCSSPageSize",
default,
skip_serializing_if = "Option::is_none"
)]
pub prefer_css_page_size: Option<bool>,
#[serde(
rename = "transferMode",
default,
skip_serializing_if = "Option::is_none"
)]
pub transfer_mode: Option<PrintToPdfTransferMode>,
#[serde(
rename = "generateTaggedPDF",
default,
skip_serializing_if = "Option::is_none"
)]
pub generate_tagged_pdf: Option<bool>,
#[serde(
rename = "generateDocumentOutline",
default,
skip_serializing_if = "Option::is_none"
)]
pub generate_document_outline: Option<bool>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum PrintToPdfTransferMode {
ReturnAsBase64,
ReturnAsStream,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct PrintToPdfReturns {
pub data: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub stream: Option<crate::protocol::io::StreamHandle>,
}
impl crate::typed::Command for PrintToPdfParams {
const METHOD: &'static str = "Page.printToPDF";
type Returns = PrintToPdfReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ReloadParams {
#[serde(
rename = "ignoreCache",
default,
skip_serializing_if = "Option::is_none"
)]
pub ignore_cache: Option<bool>,
#[serde(
rename = "scriptToEvaluateOnLoad",
default,
skip_serializing_if = "Option::is_none"
)]
pub script_to_evaluate_on_load: Option<String>,
#[serde(rename = "loaderId", default, skip_serializing_if = "Option::is_none")]
pub loader_id: Option<crate::protocol::network::LoaderId>,
}
impl crate::typed::Command for ReloadParams {
const METHOD: &'static str = "Page.reload";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct RemoveScriptToEvaluateOnLoadParams {
pub identifier: ScriptIdentifier,
}
impl crate::typed::Command for RemoveScriptToEvaluateOnLoadParams {
const METHOD: &'static str = "Page.removeScriptToEvaluateOnLoad";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct RemoveScriptToEvaluateOnNewDocumentParams {
pub identifier: ScriptIdentifier,
}
impl crate::typed::Command for RemoveScriptToEvaluateOnNewDocumentParams {
const METHOD: &'static str = "Page.removeScriptToEvaluateOnNewDocument";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ScreencastFrameAckParams {
#[serde(rename = "sessionId")]
pub session_id: i64,
}
impl crate::typed::Command for ScreencastFrameAckParams {
const METHOD: &'static str = "Page.screencastFrameAck";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SearchInResourceParams {
#[serde(rename = "frameId")]
pub frame_id: FrameId,
pub url: String,
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 SearchInResourceReturns {
pub result: Vec<crate::protocol::debugger::SearchMatch>,
}
impl crate::typed::Command for SearchInResourceParams {
const METHOD: &'static str = "Page.searchInResource";
type Returns = SearchInResourceReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SetAdBlockingEnabledParams {
pub enabled: bool,
}
impl crate::typed::Command for SetAdBlockingEnabledParams {
const METHOD: &'static str = "Page.setAdBlockingEnabled";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SetBypassCspParams {
pub enabled: bool,
}
impl crate::typed::Command for SetBypassCspParams {
const METHOD: &'static str = "Page.setBypassCSP";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetPermissionsPolicyStateParams {
#[serde(rename = "frameId")]
pub frame_id: FrameId,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetPermissionsPolicyStateReturns {
pub states: Vec<PermissionsPolicyFeatureState>,
}
impl crate::typed::Command for GetPermissionsPolicyStateParams {
const METHOD: &'static str = "Page.getPermissionsPolicyState";
type Returns = GetPermissionsPolicyStateReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetOriginTrialsParams {
#[serde(rename = "frameId")]
pub frame_id: FrameId,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetOriginTrialsReturns {
#[serde(rename = "originTrials")]
pub origin_trials: Vec<OriginTrial>,
}
impl crate::typed::Command for GetOriginTrialsParams {
const METHOD: &'static str = "Page.getOriginTrials";
type Returns = GetOriginTrialsReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SetDeviceMetricsOverrideParams {
pub width: i64,
pub height: i64,
#[serde(rename = "deviceScaleFactor")]
pub device_scale_factor: f64,
pub mobile: bool,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub scale: Option<f64>,
#[serde(
rename = "screenWidth",
default,
skip_serializing_if = "Option::is_none"
)]
pub screen_width: Option<i64>,
#[serde(
rename = "screenHeight",
default,
skip_serializing_if = "Option::is_none"
)]
pub screen_height: Option<i64>,
#[serde(rename = "positionX", default, skip_serializing_if = "Option::is_none")]
pub position_x: Option<i64>,
#[serde(rename = "positionY", default, skip_serializing_if = "Option::is_none")]
pub position_y: Option<i64>,
#[serde(
rename = "dontSetVisibleSize",
default,
skip_serializing_if = "Option::is_none"
)]
pub dont_set_visible_size: Option<bool>,
#[serde(
rename = "screenOrientation",
default,
skip_serializing_if = "Option::is_none"
)]
pub screen_orientation: Option<crate::protocol::emulation::ScreenOrientation>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub viewport: Option<Viewport>,
}
impl crate::typed::Command for SetDeviceMetricsOverrideParams {
const METHOD: &'static str = "Page.setDeviceMetricsOverride";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SetDeviceOrientationOverrideParams {
pub alpha: f64,
pub beta: f64,
pub gamma: f64,
}
impl crate::typed::Command for SetDeviceOrientationOverrideParams {
const METHOD: &'static str = "Page.setDeviceOrientationOverride";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SetFontFamiliesParams {
#[serde(rename = "fontFamilies")]
pub font_families: FontFamilies,
#[serde(
rename = "forScripts",
default,
skip_serializing_if = "Option::is_none"
)]
pub for_scripts: Option<Vec<ScriptFontFamilies>>,
}
impl crate::typed::Command for SetFontFamiliesParams {
const METHOD: &'static str = "Page.setFontFamilies";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SetFontSizesParams {
#[serde(rename = "fontSizes")]
pub font_sizes: FontSizes,
}
impl crate::typed::Command for SetFontSizesParams {
const METHOD: &'static str = "Page.setFontSizes";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SetDocumentContentParams {
#[serde(rename = "frameId")]
pub frame_id: FrameId,
pub html: String,
}
impl crate::typed::Command for SetDocumentContentParams {
const METHOD: &'static str = "Page.setDocumentContent";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SetDownloadBehaviorParams {
pub behavior: SetDownloadBehaviorBehavior,
#[serde(
rename = "downloadPath",
default,
skip_serializing_if = "Option::is_none"
)]
pub download_path: Option<String>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum SetDownloadBehaviorBehavior {
#[serde(rename = "deny")]
Deny,
#[serde(rename = "allow")]
Allow,
#[serde(rename = "default")]
Default,
#[serde(untagged)]
Unrecognized(String),
}
impl crate::typed::Command for SetDownloadBehaviorParams {
const METHOD: &'static str = "Page.setDownloadBehavior";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SetGeolocationOverrideParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub latitude: Option<f64>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub longitude: Option<f64>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub accuracy: Option<f64>,
}
impl crate::typed::Command for SetGeolocationOverrideParams {
const METHOD: &'static str = "Page.setGeolocationOverride";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SetLifecycleEventsEnabledParams {
pub enabled: bool,
}
impl crate::typed::Command for SetLifecycleEventsEnabledParams {
const METHOD: &'static str = "Page.setLifecycleEventsEnabled";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SetTouchEmulationEnabledParams {
pub enabled: bool,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub configuration: Option<SetTouchEmulationEnabledConfiguration>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum SetTouchEmulationEnabledConfiguration {
#[serde(rename = "mobile")]
Mobile,
#[serde(rename = "desktop")]
Desktop,
#[serde(untagged)]
Unrecognized(String),
}
impl crate::typed::Command for SetTouchEmulationEnabledParams {
const METHOD: &'static str = "Page.setTouchEmulationEnabled";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct StartScreencastParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub format: Option<StartScreencastFormat>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub quality: Option<i64>,
#[serde(rename = "maxWidth", default, skip_serializing_if = "Option::is_none")]
pub max_width: Option<i64>,
#[serde(rename = "maxHeight", default, skip_serializing_if = "Option::is_none")]
pub max_height: Option<i64>,
#[serde(
rename = "everyNthFrame",
default,
skip_serializing_if = "Option::is_none"
)]
pub every_nth_frame: Option<i64>,
#[serde(
rename = "maxFramesInFlight",
default,
skip_serializing_if = "Option::is_none"
)]
pub max_frames_in_flight: Option<i64>,
#[serde(
rename = "sendLastFrame",
default,
skip_serializing_if = "Option::is_none"
)]
pub send_last_frame: Option<bool>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum StartScreencastFormat {
#[serde(rename = "jpeg")]
Jpeg,
#[serde(rename = "png")]
Png,
#[serde(untagged)]
Unrecognized(String),
}
impl crate::typed::Command for StartScreencastParams {
const METHOD: &'static str = "Page.startScreencast";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct StartScreenRecordingParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub audio: Option<bool>,
#[serde(rename = "maxWidth", default, skip_serializing_if = "Option::is_none")]
pub max_width: Option<i64>,
#[serde(rename = "maxHeight", default, skip_serializing_if = "Option::is_none")]
pub max_height: Option<i64>,
#[serde(rename = "frameRate", default, skip_serializing_if = "Option::is_none")]
pub frame_rate: Option<i64>,
#[serde(
rename = "captureArea",
default,
skip_serializing_if = "Option::is_none"
)]
pub capture_area: Option<StartScreenRecordingCaptureArea>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum StartScreenRecordingCaptureArea {
#[serde(rename = "target")]
Target,
#[serde(rename = "browserWindow")]
BrowserWindow,
#[serde(untagged)]
Unrecognized(String),
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct StartScreenRecordingReturns {
pub stream: crate::protocol::io::StreamHandle,
}
impl crate::typed::Command for StartScreenRecordingParams {
const METHOD: &'static str = "Page.startScreenRecording";
type Returns = StartScreenRecordingReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct StopScreenRecordingParams {}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct StopScreenRecordingReturns {
pub stream: crate::protocol::io::StreamHandle,
}
impl crate::typed::Command for StopScreenRecordingParams {
const METHOD: &'static str = "Page.stopScreenRecording";
type Returns = StopScreenRecordingReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct StopLoadingParams {}
impl crate::typed::Command for StopLoadingParams {
const METHOD: &'static str = "Page.stopLoading";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct CrashParams {}
impl crate::typed::Command for CrashParams {
const METHOD: &'static str = "Page.crash";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct CloseParams {}
impl crate::typed::Command for CloseParams {
const METHOD: &'static str = "Page.close";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SetWebLifecycleStateParams {
pub state: SetWebLifecycleStateState,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum SetWebLifecycleStateState {
#[serde(rename = "frozen")]
Frozen,
#[serde(rename = "active")]
Active,
#[serde(untagged)]
Unrecognized(String),
}
impl crate::typed::Command for SetWebLifecycleStateParams {
const METHOD: &'static str = "Page.setWebLifecycleState";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct StopScreencastParams {}
impl crate::typed::Command for StopScreencastParams {
const METHOD: &'static str = "Page.stopScreencast";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ProduceCompilationCacheParams {
pub scripts: Vec<CompilationCacheParams>,
}
impl crate::typed::Command for ProduceCompilationCacheParams {
const METHOD: &'static str = "Page.produceCompilationCache";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct AddCompilationCacheParams {
pub url: String,
pub data: String,
}
impl crate::typed::Command for AddCompilationCacheParams {
const METHOD: &'static str = "Page.addCompilationCache";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ClearCompilationCacheParams {}
impl crate::typed::Command for ClearCompilationCacheParams {
const METHOD: &'static str = "Page.clearCompilationCache";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SetSpcTransactionModeParams {
pub mode: SetSpcTransactionModeMode,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum SetSpcTransactionModeMode {
#[serde(rename = "none")]
None,
#[serde(rename = "autoAccept")]
AutoAccept,
#[serde(rename = "autoChooseToAuthAnotherWay")]
AutoChooseToAuthAnotherWay,
#[serde(rename = "autoReject")]
AutoReject,
#[serde(rename = "autoOptOut")]
AutoOptOut,
#[serde(untagged)]
Unrecognized(String),
}
impl crate::typed::Command for SetSpcTransactionModeParams {
const METHOD: &'static str = "Page.setSPCTransactionMode";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SetRphRegistrationModeParams {
pub mode: SetRphRegistrationModeMode,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum SetRphRegistrationModeMode {
#[serde(rename = "none")]
None,
#[serde(rename = "autoAccept")]
AutoAccept,
#[serde(rename = "autoReject")]
AutoReject,
#[serde(untagged)]
Unrecognized(String),
}
impl crate::typed::Command for SetRphRegistrationModeParams {
const METHOD: &'static str = "Page.setRPHRegistrationMode";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GenerateTestReportParams {
pub message: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub group: Option<String>,
}
impl crate::typed::Command for GenerateTestReportParams {
const METHOD: &'static str = "Page.generateTestReport";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct WaitForDebuggerParams {}
impl crate::typed::Command for WaitForDebuggerParams {
const METHOD: &'static str = "Page.waitForDebugger";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SetInterceptFileChooserDialogParams {
pub enabled: bool,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub cancel: Option<bool>,
}
impl crate::typed::Command for SetInterceptFileChooserDialogParams {
const METHOD: &'static str = "Page.setInterceptFileChooserDialog";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SetPrerenderingAllowedParams {
#[serde(rename = "isAllowed")]
pub is_allowed: bool,
}
impl crate::typed::Command for SetPrerenderingAllowedParams {
const METHOD: &'static str = "Page.setPrerenderingAllowed";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetAnnotatedPageContentParams {
#[serde(
rename = "includeActionableInformation",
default,
skip_serializing_if = "Option::is_none"
)]
pub include_actionable_information: Option<bool>,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetAnnotatedPageContentReturns {
pub content: String,
}
impl crate::typed::Command for GetAnnotatedPageContentParams {
const METHOD: &'static str = "Page.getAnnotatedPageContent";
type Returns = GetAnnotatedPageContentReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SetInputVisualizationParams {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub clicks: Option<bool>,
}
impl crate::typed::Command for SetInputVisualizationParams {
const METHOD: &'static str = "Page.setInputVisualization";
type Returns = crate::typed::NoReturns;
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DomContentEventFiredEvent {
pub timestamp: crate::protocol::network::MonotonicTime,
}
impl crate::typed::Event for DomContentEventFiredEvent {
const METHOD: &'static str = "Page.domContentEventFired";
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FileChooserOpenedEvent {
#[serde(rename = "frameId")]
pub frame_id: FrameId,
pub mode: FileChooserOpenedMode,
#[serde(
rename = "backendNodeId",
default,
skip_serializing_if = "Option::is_none"
)]
pub backend_node_id: Option<crate::protocol::dom::BackendNodeId>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum FileChooserOpenedMode {
#[serde(rename = "selectSingle")]
SelectSingle,
#[serde(rename = "selectMultiple")]
SelectMultiple,
#[serde(untagged)]
Unrecognized(String),
}
impl crate::typed::Event for FileChooserOpenedEvent {
const METHOD: &'static str = "Page.fileChooserOpened";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct FrameAttachedEvent {
#[serde(rename = "frameId")]
pub frame_id: FrameId,
#[serde(rename = "parentFrameId")]
pub parent_frame_id: FrameId,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub stack: Option<crate::protocol::runtime::StackTrace>,
}
impl crate::typed::Event for FrameAttachedEvent {
const METHOD: &'static str = "Page.frameAttached";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct FrameClearedScheduledNavigationEvent {
#[serde(rename = "frameId")]
pub frame_id: FrameId,
}
impl crate::typed::Event for FrameClearedScheduledNavigationEvent {
const METHOD: &'static str = "Page.frameClearedScheduledNavigation";
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FrameDetachedEvent {
#[serde(rename = "frameId")]
pub frame_id: FrameId,
pub reason: FrameDetachedReason,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum FrameDetachedReason {
#[serde(rename = "remove")]
Remove,
#[serde(rename = "swap")]
Swap,
#[serde(untagged)]
Unrecognized(String),
}
impl crate::typed::Event for FrameDetachedEvent {
const METHOD: &'static str = "Page.frameDetached";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct FrameSubtreeWillBeDetachedEvent {
#[serde(rename = "frameId")]
pub frame_id: FrameId,
}
impl crate::typed::Event for FrameSubtreeWillBeDetachedEvent {
const METHOD: &'static str = "Page.frameSubtreeWillBeDetached";
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FrameNavigatedEvent {
pub frame: Frame,
pub r#type: NavigationType,
}
impl crate::typed::Event for FrameNavigatedEvent {
const METHOD: &'static str = "Page.frameNavigated";
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DocumentOpenedEvent {
pub frame: Frame,
}
impl crate::typed::Event for DocumentOpenedEvent {
const METHOD: &'static str = "Page.documentOpened";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct FrameResizedEvent {}
impl crate::typed::Event for FrameResizedEvent {
const METHOD: &'static str = "Page.frameResized";
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FrameStartedNavigatingEvent {
#[serde(rename = "frameId")]
pub frame_id: FrameId,
pub url: String,
#[serde(rename = "loaderId")]
pub loader_id: crate::protocol::network::LoaderId,
#[serde(rename = "navigationType")]
pub navigation_type: FrameStartedNavigatingNavigationType,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum FrameStartedNavigatingNavigationType {
#[serde(rename = "reload")]
Reload,
#[serde(rename = "reloadBypassingCache")]
ReloadBypassingCache,
#[serde(rename = "restore")]
Restore,
#[serde(rename = "restoreWithPost")]
RestoreWithPost,
#[serde(rename = "historySameDocument")]
HistorySameDocument,
#[serde(rename = "historyDifferentDocument")]
HistoryDifferentDocument,
#[serde(rename = "sameDocument")]
SameDocument,
#[serde(rename = "differentDocument")]
DifferentDocument,
#[serde(untagged)]
Unrecognized(String),
}
impl crate::typed::Event for FrameStartedNavigatingEvent {
const METHOD: &'static str = "Page.frameStartedNavigating";
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FrameRequestedNavigationEvent {
#[serde(rename = "frameId")]
pub frame_id: FrameId,
pub reason: ClientNavigationReason,
pub url: String,
pub disposition: ClientNavigationDisposition,
}
impl crate::typed::Event for FrameRequestedNavigationEvent {
const METHOD: &'static str = "Page.frameRequestedNavigation";
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FrameScheduledNavigationEvent {
#[serde(rename = "frameId")]
pub frame_id: FrameId,
pub delay: f64,
pub reason: ClientNavigationReason,
pub url: String,
}
impl crate::typed::Event for FrameScheduledNavigationEvent {
const METHOD: &'static str = "Page.frameScheduledNavigation";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct FrameStartedLoadingEvent {
#[serde(rename = "frameId")]
pub frame_id: FrameId,
}
impl crate::typed::Event for FrameStartedLoadingEvent {
const METHOD: &'static str = "Page.frameStartedLoading";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct FrameStoppedLoadingEvent {
#[serde(rename = "frameId")]
pub frame_id: FrameId,
}
impl crate::typed::Event for FrameStoppedLoadingEvent {
const METHOD: &'static str = "Page.frameStoppedLoading";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DownloadWillBeginEvent {
#[serde(rename = "frameId")]
pub frame_id: FrameId,
pub guid: String,
pub url: String,
#[serde(rename = "suggestedFilename")]
pub suggested_filename: String,
}
impl crate::typed::Event for DownloadWillBeginEvent {
const METHOD: &'static str = "Page.downloadWillBegin";
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DownloadProgressEvent {
pub guid: String,
#[serde(rename = "totalBytes")]
pub total_bytes: f64,
#[serde(rename = "receivedBytes")]
pub received_bytes: f64,
pub state: DownloadProgressState,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum DownloadProgressState {
#[serde(rename = "inProgress")]
InProgress,
#[serde(rename = "completed")]
Completed,
#[serde(rename = "canceled")]
Canceled,
#[serde(untagged)]
Unrecognized(String),
}
impl crate::typed::Event for DownloadProgressEvent {
const METHOD: &'static str = "Page.downloadProgress";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct InterstitialHiddenEvent {}
impl crate::typed::Event for InterstitialHiddenEvent {
const METHOD: &'static str = "Page.interstitialHidden";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct InterstitialShownEvent {}
impl crate::typed::Event for InterstitialShownEvent {
const METHOD: &'static str = "Page.interstitialShown";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct JavascriptDialogClosedEvent {
#[serde(rename = "frameId")]
pub frame_id: FrameId,
pub result: bool,
#[serde(rename = "userInput")]
pub user_input: String,
}
impl crate::typed::Event for JavascriptDialogClosedEvent {
const METHOD: &'static str = "Page.javascriptDialogClosed";
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct JavascriptDialogOpeningEvent {
pub url: String,
#[serde(rename = "frameId")]
pub frame_id: FrameId,
pub message: String,
pub r#type: DialogType,
#[serde(rename = "hasBrowserHandler")]
pub has_browser_handler: bool,
#[serde(
rename = "defaultPrompt",
default,
skip_serializing_if = "Option::is_none"
)]
pub default_prompt: Option<String>,
}
impl crate::typed::Event for JavascriptDialogOpeningEvent {
const METHOD: &'static str = "Page.javascriptDialogOpening";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct LifecycleEventEvent {
#[serde(rename = "frameId")]
pub frame_id: FrameId,
#[serde(rename = "loaderId")]
pub loader_id: crate::protocol::network::LoaderId,
pub name: String,
pub timestamp: crate::protocol::network::MonotonicTime,
}
impl crate::typed::Event for LifecycleEventEvent {
const METHOD: &'static str = "Page.lifecycleEvent";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct BackForwardCacheNotUsedEvent {
#[serde(rename = "loaderId")]
pub loader_id: crate::protocol::network::LoaderId,
#[serde(rename = "frameId")]
pub frame_id: FrameId,
#[serde(rename = "notRestoredExplanations")]
pub not_restored_explanations: Vec<BackForwardCacheNotRestoredExplanation>,
#[serde(
rename = "notRestoredExplanationsTree",
default,
skip_serializing_if = "Option::is_none"
)]
pub not_restored_explanations_tree: Option<BackForwardCacheNotRestoredExplanationTree>,
}
impl crate::typed::Event for BackForwardCacheNotUsedEvent {
const METHOD: &'static str = "Page.backForwardCacheNotUsed";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct LoadEventFiredEvent {
pub timestamp: crate::protocol::network::MonotonicTime,
}
impl crate::typed::Event for LoadEventFiredEvent {
const METHOD: &'static str = "Page.loadEventFired";
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct NavigatedWithinDocumentEvent {
#[serde(rename = "frameId")]
pub frame_id: FrameId,
pub url: String,
#[serde(rename = "navigationType")]
pub navigation_type: NavigatedWithinDocumentNavigationType,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum NavigatedWithinDocumentNavigationType {
#[serde(rename = "fragment")]
Fragment,
#[serde(rename = "historyApi")]
HistoryApi,
#[serde(rename = "other")]
Other,
#[serde(untagged)]
Unrecognized(String),
}
impl crate::typed::Event for NavigatedWithinDocumentEvent {
const METHOD: &'static str = "Page.navigatedWithinDocument";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ScreencastFrameEvent {
pub data: String,
pub metadata: ScreencastFrameMetadata,
#[serde(rename = "sessionId")]
pub session_id: i64,
}
impl crate::typed::Event for ScreencastFrameEvent {
const METHOD: &'static str = "Page.screencastFrame";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ScreencastVisibilityChangedEvent {
pub visible: bool,
}
impl crate::typed::Event for ScreencastVisibilityChangedEvent {
const METHOD: &'static str = "Page.screencastVisibilityChanged";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct WindowOpenEvent {
pub url: String,
#[serde(rename = "windowName")]
pub window_name: String,
#[serde(rename = "windowFeatures")]
pub window_features: Vec<String>,
#[serde(rename = "userGesture")]
pub user_gesture: bool,
}
impl crate::typed::Event for WindowOpenEvent {
const METHOD: &'static str = "Page.windowOpen";
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct CompilationCacheProducedEvent {
pub url: String,
pub data: String,
}
impl crate::typed::Event for CompilationCacheProducedEvent {
const METHOD: &'static str = "Page.compilationCacheProduced";
}