#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct CanClearBrowserCacheParams {}
impl<'de> serde::Deserialize<'de> for CanClearBrowserCacheParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = CanClearBrowserCacheParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(CanClearBrowserCacheParams {})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct CanClearBrowserCache;
#[derive(Debug, Clone, serde::Serialize)]
pub struct CanClearBrowserCacheResponse {
#[serde(rename = "result")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub result: bool,
}
impl<'de> serde::Deserialize<'de> for CanClearBrowserCacheResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = CanClearBrowserCacheResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "result")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub result: bool,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(CanClearBrowserCacheResponse {
result: fields.result,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for CanClearBrowserCache {
type Params = CanClearBrowserCacheParams;
type Response = CanClearBrowserCacheResponse;
const METHOD: &'static str = "Network.canClearBrowserCache";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct CanClearBrowserCookiesParams {}
impl<'de> serde::Deserialize<'de> for CanClearBrowserCookiesParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = CanClearBrowserCookiesParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(CanClearBrowserCookiesParams {})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct CanClearBrowserCookies;
#[derive(Debug, Clone, serde::Serialize)]
pub struct CanClearBrowserCookiesResponse {
#[serde(rename = "result")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub result: bool,
}
impl<'de> serde::Deserialize<'de> for CanClearBrowserCookiesResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = CanClearBrowserCookiesResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "result")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub result: bool,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(CanClearBrowserCookiesResponse {
result: fields.result,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for CanClearBrowserCookies {
type Params = CanClearBrowserCookiesParams;
type Response = CanClearBrowserCookiesResponse;
const METHOD: &'static str = "Network.canClearBrowserCookies";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct CanEmulateNetworkConditionsParams {}
impl<'de> serde::Deserialize<'de> for CanEmulateNetworkConditionsParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = CanEmulateNetworkConditionsParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(CanEmulateNetworkConditionsParams {})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct CanEmulateNetworkConditions;
#[derive(Debug, Clone, serde::Serialize)]
pub struct CanEmulateNetworkConditionsResponse {
#[serde(rename = "result")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub result: bool,
}
impl<'de> serde::Deserialize<'de> for CanEmulateNetworkConditionsResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = CanEmulateNetworkConditionsResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "result")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub result: bool,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(CanEmulateNetworkConditionsResponse {
result: fields.result,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for CanEmulateNetworkConditions {
type Params = CanEmulateNetworkConditionsParams;
type Response = CanEmulateNetworkConditionsResponse;
const METHOD: &'static str = "Network.canEmulateNetworkConditions";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct ClearBrowserCacheParams {}
impl<'de> serde::Deserialize<'de> for ClearBrowserCacheParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ClearBrowserCacheParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(ClearBrowserCacheParams {})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct ClearBrowserCache;
#[derive(Debug, Clone, serde::Serialize)]
pub struct ClearBrowserCacheResponse {}
impl<'de> serde::Deserialize<'de> for ClearBrowserCacheResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ClearBrowserCacheResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(ClearBrowserCacheResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for ClearBrowserCache {
type Params = ClearBrowserCacheParams;
type Response = ClearBrowserCacheResponse;
const METHOD: &'static str = "Network.clearBrowserCache";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct ClearBrowserCookiesParams {}
impl<'de> serde::Deserialize<'de> for ClearBrowserCookiesParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ClearBrowserCookiesParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(ClearBrowserCookiesParams {})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct ClearBrowserCookies;
#[derive(Debug, Clone, serde::Serialize)]
pub struct ClearBrowserCookiesResponse {}
impl<'de> serde::Deserialize<'de> for ClearBrowserCookiesResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ClearBrowserCookiesResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(ClearBrowserCookiesResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for ClearBrowserCookies {
type Params = ClearBrowserCookiesParams;
type Response = ClearBrowserCookiesResponse;
const METHOD: &'static str = "Network.clearBrowserCookies";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct ConfigureDurableMessagesParams {
#[serde(rename = "maxTotalBufferSize")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub max_total_buffer_size: Option<i64>,
#[serde(rename = "maxResourceBufferSize")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub max_resource_buffer_size: Option<i64>,
}
impl<'de> serde::Deserialize<'de> for ConfigureDurableMessagesParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ConfigureDurableMessagesParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "maxTotalBufferSize")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub max_total_buffer_size: Option<i64>,
#[serde(rename = "maxResourceBufferSize")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub max_resource_buffer_size: Option<i64>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(ConfigureDurableMessagesParams {
max_total_buffer_size: fields.max_total_buffer_size,
max_resource_buffer_size: fields.max_resource_buffer_size,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct ConfigureDurableMessages;
#[derive(Debug, Clone, serde::Serialize)]
pub struct ConfigureDurableMessagesResponse {}
impl<'de> serde::Deserialize<'de> for ConfigureDurableMessagesResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ConfigureDurableMessagesResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(ConfigureDurableMessagesResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for ConfigureDurableMessages {
type Params = ConfigureDurableMessagesParams;
type Response = ConfigureDurableMessagesResponse;
const METHOD: &'static str = "Network.configureDurableMessages";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct DeleteCookiesParams {
#[serde(rename = "name")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub name: String,
#[serde(rename = "url")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub url: Option<String>,
#[serde(rename = "domain")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub domain: Option<String>,
#[serde(rename = "path")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub path: Option<String>,
#[serde(rename = "partitionKey")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub partition_key: Option<crate::network::types::CookiePartitionKey>,
}
impl<'de> serde::Deserialize<'de> for DeleteCookiesParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = DeleteCookiesParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "name")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub name: String,
#[serde(rename = "url")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub url: Option<String>,
#[serde(rename = "domain")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub domain: Option<String>,
#[serde(rename = "path")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub path: Option<String>,
#[serde(rename = "partitionKey")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub partition_key: Option<crate::network::types::CookiePartitionKey>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(DeleteCookiesParams {
name: fields.name,
url: fields.url,
domain: fields.domain,
path: fields.path,
partition_key: fields.partition_key,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct DeleteCookies;
#[derive(Debug, Clone, serde::Serialize)]
pub struct DeleteCookiesResponse {}
impl<'de> serde::Deserialize<'de> for DeleteCookiesResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = DeleteCookiesResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(DeleteCookiesResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for DeleteCookies {
type Params = DeleteCookiesParams;
type Response = DeleteCookiesResponse;
const METHOD: &'static str = "Network.deleteCookies";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct DeleteDeviceBoundSessionParams {
#[serde(rename = "key")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub key: crate::network::types::DeviceBoundSessionKey,
}
impl<'de> serde::Deserialize<'de> for DeleteDeviceBoundSessionParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = DeleteDeviceBoundSessionParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "key")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub key: crate::network::types::DeviceBoundSessionKey,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(DeleteDeviceBoundSessionParams { key: fields.key })
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct DeleteDeviceBoundSession;
#[derive(Debug, Clone, serde::Serialize)]
pub struct DeleteDeviceBoundSessionResponse {}
impl<'de> serde::Deserialize<'de> for DeleteDeviceBoundSessionResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = DeleteDeviceBoundSessionResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(DeleteDeviceBoundSessionResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for DeleteDeviceBoundSession {
type Params = DeleteDeviceBoundSessionParams;
type Response = DeleteDeviceBoundSessionResponse;
const METHOD: &'static str = "Network.deleteDeviceBoundSession";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct DisableParams {}
impl<'de> serde::Deserialize<'de> for DisableParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = DisableParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(DisableParams {})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct Disable;
#[derive(Debug, Clone, serde::Serialize)]
pub struct DisableResponse {}
impl<'de> serde::Deserialize<'de> for DisableResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = DisableResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(DisableResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for Disable {
type Params = DisableParams;
type Response = DisableResponse;
const METHOD: &'static str = "Network.disable";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct EmulateNetworkConditionsParams {
#[serde(rename = "offline")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub offline: bool,
#[serde(rename = "latency")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub latency: ydp_core::FiniteF64,
#[serde(rename = "downloadThroughput")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub download_throughput: ydp_core::FiniteF64,
#[serde(rename = "uploadThroughput")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub upload_throughput: ydp_core::FiniteF64,
#[serde(rename = "connectionType")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub connection_type: Option<crate::network::types::ConnectionType>,
#[serde(rename = "packetLoss")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub packet_loss: Option<ydp_core::FiniteF64>,
#[serde(rename = "packetQueueLength")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub packet_queue_length: Option<i64>,
#[serde(rename = "packetReordering")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub packet_reordering: Option<bool>,
}
impl<'de> serde::Deserialize<'de> for EmulateNetworkConditionsParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = EmulateNetworkConditionsParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "offline")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub offline: bool,
#[serde(rename = "latency")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub latency: ydp_core::FiniteF64,
#[serde(rename = "downloadThroughput")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub download_throughput: ydp_core::FiniteF64,
#[serde(rename = "uploadThroughput")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub upload_throughput: ydp_core::FiniteF64,
#[serde(rename = "connectionType")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub connection_type: Option<crate::network::types::ConnectionType>,
#[serde(rename = "packetLoss")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub packet_loss: Option<ydp_core::FiniteF64>,
#[serde(rename = "packetQueueLength")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub packet_queue_length: Option<i64>,
#[serde(rename = "packetReordering")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub packet_reordering: Option<bool>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(EmulateNetworkConditionsParams {
offline: fields.offline,
latency: fields.latency,
download_throughput: fields.download_throughput,
upload_throughput: fields.upload_throughput,
connection_type: fields.connection_type,
packet_loss: fields.packet_loss,
packet_queue_length: fields.packet_queue_length,
packet_reordering: fields.packet_reordering,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct EmulateNetworkConditions;
#[derive(Debug, Clone, serde::Serialize)]
pub struct EmulateNetworkConditionsResponse {}
impl<'de> serde::Deserialize<'de> for EmulateNetworkConditionsResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = EmulateNetworkConditionsResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(EmulateNetworkConditionsResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for EmulateNetworkConditions {
type Params = EmulateNetworkConditionsParams;
type Response = EmulateNetworkConditionsResponse;
const METHOD: &'static str = "Network.emulateNetworkConditions";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct EmulateNetworkConditionsByRuleParams {
#[serde(rename = "offline")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub offline: Option<bool>,
#[serde(rename = "emulateOfflineServiceWorker")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub emulate_offline_service_worker: Option<bool>,
#[serde(rename = "matchedNetworkConditions")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub matched_network_conditions: Vec<crate::network::types::NetworkConditions>,
}
impl<'de> serde::Deserialize<'de> for EmulateNetworkConditionsByRuleParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = EmulateNetworkConditionsByRuleParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "offline")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub offline: Option<bool>,
#[serde(rename = "emulateOfflineServiceWorker")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub emulate_offline_service_worker: Option<bool>,
#[serde(rename = "matchedNetworkConditions")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub matched_network_conditions: Vec<crate::network::types::NetworkConditions>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(EmulateNetworkConditionsByRuleParams {
offline: fields.offline,
emulate_offline_service_worker: fields.emulate_offline_service_worker,
matched_network_conditions: fields.matched_network_conditions,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct EmulateNetworkConditionsByRule;
#[derive(Debug, Clone, serde::Serialize)]
pub struct EmulateNetworkConditionsByRuleResponse {
#[serde(rename = "ruleIds")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub rule_ids: Vec<String>,
}
impl<'de> serde::Deserialize<'de> for EmulateNetworkConditionsByRuleResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = EmulateNetworkConditionsByRuleResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "ruleIds")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub rule_ids: Vec<String>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(EmulateNetworkConditionsByRuleResponse {
rule_ids: fields.rule_ids,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for EmulateNetworkConditionsByRule {
type Params = EmulateNetworkConditionsByRuleParams;
type Response = EmulateNetworkConditionsByRuleResponse;
const METHOD: &'static str = "Network.emulateNetworkConditionsByRule";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct EnableParams {
#[serde(rename = "maxTotalBufferSize")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub max_total_buffer_size: Option<i64>,
#[serde(rename = "maxResourceBufferSize")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub max_resource_buffer_size: Option<i64>,
#[serde(rename = "maxPostDataSize")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub max_post_data_size: Option<i64>,
#[serde(rename = "reportDirectSocketTraffic")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub report_direct_socket_traffic: Option<bool>,
#[serde(rename = "enableDurableMessages")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub enable_durable_messages: Option<bool>,
}
impl<'de> serde::Deserialize<'de> for EnableParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = EnableParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "maxTotalBufferSize")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub max_total_buffer_size: Option<i64>,
#[serde(rename = "maxResourceBufferSize")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub max_resource_buffer_size: Option<i64>,
#[serde(rename = "maxPostDataSize")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub max_post_data_size: Option<i64>,
#[serde(rename = "reportDirectSocketTraffic")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub report_direct_socket_traffic: Option<bool>,
#[serde(rename = "enableDurableMessages")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub enable_durable_messages: Option<bool>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(EnableParams {
max_total_buffer_size: fields.max_total_buffer_size,
max_resource_buffer_size: fields.max_resource_buffer_size,
max_post_data_size: fields.max_post_data_size,
report_direct_socket_traffic: fields.report_direct_socket_traffic,
enable_durable_messages: fields.enable_durable_messages,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct Enable;
#[derive(Debug, Clone, serde::Serialize)]
pub struct EnableResponse {}
impl<'de> serde::Deserialize<'de> for EnableResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = EnableResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(EnableResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for Enable {
type Params = EnableParams;
type Response = EnableResponse;
const METHOD: &'static str = "Network.enable";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct EnableDeviceBoundSessionsParams {
#[serde(rename = "enable")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub enable: bool,
}
impl<'de> serde::Deserialize<'de> for EnableDeviceBoundSessionsParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = EnableDeviceBoundSessionsParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "enable")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub enable: bool,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(EnableDeviceBoundSessionsParams {
enable: fields.enable,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct EnableDeviceBoundSessions;
#[derive(Debug, Clone, serde::Serialize)]
pub struct EnableDeviceBoundSessionsResponse {}
impl<'de> serde::Deserialize<'de> for EnableDeviceBoundSessionsResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = EnableDeviceBoundSessionsResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(EnableDeviceBoundSessionsResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for EnableDeviceBoundSessions {
type Params = EnableDeviceBoundSessionsParams;
type Response = EnableDeviceBoundSessionsResponse;
const METHOD: &'static str = "Network.enableDeviceBoundSessions";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct EnableReportingApiParams {
#[serde(rename = "enable")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub enable: bool,
}
impl<'de> serde::Deserialize<'de> for EnableReportingApiParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = EnableReportingApiParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "enable")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub enable: bool,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(EnableReportingApiParams {
enable: fields.enable,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct EnableReportingApi;
#[derive(Debug, Clone, serde::Serialize)]
pub struct EnableReportingApiResponse {}
impl<'de> serde::Deserialize<'de> for EnableReportingApiResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = EnableReportingApiResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(EnableReportingApiResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for EnableReportingApi {
type Params = EnableReportingApiParams;
type Response = EnableReportingApiResponse;
const METHOD: &'static str = "Network.enableReportingApi";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct FetchSchemefulSiteParams {
#[serde(rename = "origin")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub origin: String,
}
impl<'de> serde::Deserialize<'de> for FetchSchemefulSiteParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = FetchSchemefulSiteParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "origin")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub origin: String,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(FetchSchemefulSiteParams {
origin: fields.origin,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct FetchSchemefulSite;
#[derive(Debug, Clone, serde::Serialize)]
pub struct FetchSchemefulSiteResponse {
#[serde(rename = "schemefulSite")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub schemeful_site: String,
}
impl<'de> serde::Deserialize<'de> for FetchSchemefulSiteResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = FetchSchemefulSiteResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "schemefulSite")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub schemeful_site: String,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(FetchSchemefulSiteResponse {
schemeful_site: fields.schemeful_site,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for FetchSchemefulSite {
type Params = FetchSchemefulSiteParams;
type Response = FetchSchemefulSiteResponse;
const METHOD: &'static str = "Network.fetchSchemefulSite";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct GetAllCookiesParams {}
impl<'de> serde::Deserialize<'de> for GetAllCookiesParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetAllCookiesParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetAllCookiesParams {})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct GetAllCookies;
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetAllCookiesResponse {
#[serde(rename = "cookies")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub cookies: Vec<crate::network::types::Cookie>,
}
impl<'de> serde::Deserialize<'de> for GetAllCookiesResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetAllCookiesResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "cookies")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub cookies: Vec<crate::network::types::Cookie>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetAllCookiesResponse {
cookies: fields.cookies,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for GetAllCookies {
type Params = GetAllCookiesParams;
type Response = GetAllCookiesResponse;
const METHOD: &'static str = "Network.getAllCookies";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetCertificateParams {
#[serde(rename = "origin")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub origin: String,
}
impl<'de> serde::Deserialize<'de> for GetCertificateParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetCertificateParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "origin")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub origin: String,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetCertificateParams {
origin: fields.origin,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct GetCertificate;
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetCertificateResponse {
#[serde(rename = "tableNames")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub table_names: Vec<String>,
}
impl<'de> serde::Deserialize<'de> for GetCertificateResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetCertificateResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "tableNames")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub table_names: Vec<String>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetCertificateResponse {
table_names: fields.table_names,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for GetCertificate {
type Params = GetCertificateParams;
type Response = GetCertificateResponse;
const METHOD: &'static str = "Network.getCertificate";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct GetCookiesParams {
#[serde(rename = "urls")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub urls: Option<Vec<String>>,
}
impl<'de> serde::Deserialize<'de> for GetCookiesParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetCookiesParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "urls")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub urls: Option<Vec<String>>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetCookiesParams { urls: fields.urls })
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct GetCookies;
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetCookiesResponse {
#[serde(rename = "cookies")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub cookies: Vec<crate::network::types::Cookie>,
}
impl<'de> serde::Deserialize<'de> for GetCookiesResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetCookiesResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "cookies")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub cookies: Vec<crate::network::types::Cookie>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetCookiesResponse {
cookies: fields.cookies,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for GetCookies {
type Params = GetCookiesParams;
type Response = GetCookiesResponse;
const METHOD: &'static str = "Network.getCookies";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetRequestPostDataParams {
#[serde(rename = "requestId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub request_id: crate::network::types::RequestId,
}
impl<'de> serde::Deserialize<'de> for GetRequestPostDataParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetRequestPostDataParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "requestId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub request_id: crate::network::types::RequestId,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetRequestPostDataParams {
request_id: fields.request_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct GetRequestPostData;
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetRequestPostDataResponse {
#[serde(rename = "postData")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub post_data: String,
#[serde(rename = "base64Encoded")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub base64_encoded: bool,
}
impl<'de> serde::Deserialize<'de> for GetRequestPostDataResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetRequestPostDataResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "postData")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub post_data: String,
#[serde(rename = "base64Encoded")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub base64_encoded: bool,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetRequestPostDataResponse {
post_data: fields.post_data,
base64_encoded: fields.base64_encoded,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for GetRequestPostData {
type Params = GetRequestPostDataParams;
type Response = GetRequestPostDataResponse;
const METHOD: &'static str = "Network.getRequestPostData";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetResponseBodyParams {
#[serde(rename = "requestId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub request_id: crate::network::types::RequestId,
}
impl<'de> serde::Deserialize<'de> for GetResponseBodyParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetResponseBodyParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "requestId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub request_id: crate::network::types::RequestId,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetResponseBodyParams {
request_id: fields.request_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct GetResponseBody;
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetResponseBodyResponse {
#[serde(rename = "body")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub body: String,
#[serde(rename = "base64Encoded")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub base64_encoded: bool,
}
impl<'de> serde::Deserialize<'de> for GetResponseBodyResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetResponseBodyResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "body")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub body: String,
#[serde(rename = "base64Encoded")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub base64_encoded: bool,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetResponseBodyResponse {
body: fields.body,
base64_encoded: fields.base64_encoded,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for GetResponseBody {
type Params = GetResponseBodyParams;
type Response = GetResponseBodyResponse;
const METHOD: &'static str = "Network.getResponseBody";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct GetSecurityIsolationStatusParams {
#[serde(rename = "frameId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub frame_id: Option<crate::page::types::FrameId>,
}
impl<'de> serde::Deserialize<'de> for GetSecurityIsolationStatusParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetSecurityIsolationStatusParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "frameId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub frame_id: Option<crate::page::types::FrameId>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetSecurityIsolationStatusParams {
frame_id: fields.frame_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct GetSecurityIsolationStatus;
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetSecurityIsolationStatusResponse {
#[serde(rename = "status")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub status: crate::network::types::SecurityIsolationStatus,
}
impl<'de> serde::Deserialize<'de> for GetSecurityIsolationStatusResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetSecurityIsolationStatusResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "status")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub status: crate::network::types::SecurityIsolationStatus,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetSecurityIsolationStatusResponse {
status: fields.status,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for GetSecurityIsolationStatus {
type Params = GetSecurityIsolationStatusParams;
type Response = GetSecurityIsolationStatusResponse;
const METHOD: &'static str = "Network.getSecurityIsolationStatus";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct LoadNetworkResourceParams {
#[serde(rename = "frameId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub frame_id: Option<crate::page::types::FrameId>,
#[serde(rename = "url")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub url: String,
#[serde(rename = "options")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub options: crate::network::types::LoadNetworkResourceOptions,
}
impl<'de> serde::Deserialize<'de> for LoadNetworkResourceParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = LoadNetworkResourceParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "frameId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub frame_id: Option<crate::page::types::FrameId>,
#[serde(rename = "url")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub url: String,
#[serde(rename = "options")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub options: crate::network::types::LoadNetworkResourceOptions,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(LoadNetworkResourceParams {
frame_id: fields.frame_id,
url: fields.url,
options: fields.options,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct LoadNetworkResource;
#[derive(Debug, Clone, serde::Serialize)]
pub struct LoadNetworkResourceResponse {
#[serde(rename = "resource")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub resource: crate::network::types::LoadNetworkResourcePageResult,
}
impl<'de> serde::Deserialize<'de> for LoadNetworkResourceResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = LoadNetworkResourceResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "resource")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub resource: crate::network::types::LoadNetworkResourcePageResult,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(LoadNetworkResourceResponse {
resource: fields.resource,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for LoadNetworkResource {
type Params = LoadNetworkResourceParams;
type Response = LoadNetworkResourceResponse;
const METHOD: &'static str = "Network.loadNetworkResource";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct OverrideNetworkStateParams {
#[serde(rename = "offline")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub offline: bool,
#[serde(rename = "latency")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub latency: ydp_core::FiniteF64,
#[serde(rename = "downloadThroughput")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub download_throughput: ydp_core::FiniteF64,
#[serde(rename = "uploadThroughput")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub upload_throughput: ydp_core::FiniteF64,
#[serde(rename = "connectionType")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub connection_type: Option<crate::network::types::ConnectionType>,
}
impl<'de> serde::Deserialize<'de> for OverrideNetworkStateParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = OverrideNetworkStateParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "offline")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub offline: bool,
#[serde(rename = "latency")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub latency: ydp_core::FiniteF64,
#[serde(rename = "downloadThroughput")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub download_throughput: ydp_core::FiniteF64,
#[serde(rename = "uploadThroughput")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub upload_throughput: ydp_core::FiniteF64,
#[serde(rename = "connectionType")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub connection_type: Option<crate::network::types::ConnectionType>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(OverrideNetworkStateParams {
offline: fields.offline,
latency: fields.latency,
download_throughput: fields.download_throughput,
upload_throughput: fields.upload_throughput,
connection_type: fields.connection_type,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct OverrideNetworkState;
#[derive(Debug, Clone, serde::Serialize)]
pub struct OverrideNetworkStateResponse {}
impl<'de> serde::Deserialize<'de> for OverrideNetworkStateResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = OverrideNetworkStateResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(OverrideNetworkStateResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for OverrideNetworkState {
type Params = OverrideNetworkStateParams;
type Response = OverrideNetworkStateResponse;
const METHOD: &'static str = "Network.overrideNetworkState";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct ReplayXhrParams {
#[serde(rename = "requestId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub request_id: crate::network::types::RequestId,
}
impl<'de> serde::Deserialize<'de> for ReplayXhrParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ReplayXhrParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "requestId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub request_id: crate::network::types::RequestId,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(ReplayXhrParams {
request_id: fields.request_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct ReplayXhr;
#[derive(Debug, Clone, serde::Serialize)]
pub struct ReplayXhrResponse {}
impl<'de> serde::Deserialize<'de> for ReplayXhrResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ReplayXhrResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(ReplayXhrResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for ReplayXhr {
type Params = ReplayXhrParams;
type Response = ReplayXhrResponse;
const METHOD: &'static str = "Network.replayXHR";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SearchInResponseBodyParams {
#[serde(rename = "requestId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub request_id: crate::network::types::RequestId,
#[serde(rename = "query")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub query: String,
#[serde(rename = "caseSensitive")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub case_sensitive: Option<bool>,
#[serde(rename = "isRegex")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub is_regex: Option<bool>,
}
impl<'de> serde::Deserialize<'de> for SearchInResponseBodyParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SearchInResponseBodyParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "requestId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub request_id: crate::network::types::RequestId,
#[serde(rename = "query")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub query: String,
#[serde(rename = "caseSensitive")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub case_sensitive: Option<bool>,
#[serde(rename = "isRegex")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub is_regex: Option<bool>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SearchInResponseBodyParams {
request_id: fields.request_id,
query: fields.query,
case_sensitive: fields.case_sensitive,
is_regex: fields.is_regex,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SearchInResponseBody;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SearchInResponseBodyResponse {
#[serde(rename = "result")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub result: Vec<crate::debugger::types::SearchMatch>,
}
impl<'de> serde::Deserialize<'de> for SearchInResponseBodyResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SearchInResponseBodyResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "result")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub result: Vec<crate::debugger::types::SearchMatch>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SearchInResponseBodyResponse {
result: fields.result,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SearchInResponseBody {
type Params = SearchInResponseBodyParams;
type Response = SearchInResponseBodyResponse;
const METHOD: &'static str = "Network.searchInResponseBody";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetAttachDebugStackParams {
#[serde(rename = "enabled")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub enabled: bool,
}
impl<'de> serde::Deserialize<'de> for SetAttachDebugStackParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetAttachDebugStackParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "enabled")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub enabled: bool,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetAttachDebugStackParams {
enabled: fields.enabled,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetAttachDebugStack;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetAttachDebugStackResponse {}
impl<'de> serde::Deserialize<'de> for SetAttachDebugStackResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetAttachDebugStackResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetAttachDebugStackResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetAttachDebugStack {
type Params = SetAttachDebugStackParams;
type Response = SetAttachDebugStackResponse;
const METHOD: &'static str = "Network.setAttachDebugStack";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct SetBlockedUrLsParams {
#[serde(rename = "urlPatterns")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub url_patterns: Option<Vec<crate::network::types::BlockPattern>>,
#[serde(rename = "urls")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub urls: Option<Vec<String>>,
}
impl<'de> serde::Deserialize<'de> for SetBlockedUrLsParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetBlockedUrLsParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "urlPatterns")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub url_patterns: Option<Vec<crate::network::types::BlockPattern>>,
#[serde(rename = "urls")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub urls: Option<Vec<String>>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetBlockedUrLsParams {
url_patterns: fields.url_patterns,
urls: fields.urls,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetBlockedUrLs;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetBlockedUrLsResponse {}
impl<'de> serde::Deserialize<'de> for SetBlockedUrLsResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetBlockedUrLsResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetBlockedUrLsResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetBlockedUrLs {
type Params = SetBlockedUrLsParams;
type Response = SetBlockedUrLsResponse;
const METHOD: &'static str = "Network.setBlockedURLs";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetBypassServiceWorkerParams {
#[serde(rename = "bypass")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub bypass: bool,
}
impl<'de> serde::Deserialize<'de> for SetBypassServiceWorkerParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetBypassServiceWorkerParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "bypass")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub bypass: bool,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetBypassServiceWorkerParams {
bypass: fields.bypass,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetBypassServiceWorker;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetBypassServiceWorkerResponse {}
impl<'de> serde::Deserialize<'de> for SetBypassServiceWorkerResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetBypassServiceWorkerResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetBypassServiceWorkerResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetBypassServiceWorker {
type Params = SetBypassServiceWorkerParams;
type Response = SetBypassServiceWorkerResponse;
const METHOD: &'static str = "Network.setBypassServiceWorker";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetCacheDisabledParams {
#[serde(rename = "cacheDisabled")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub cache_disabled: bool,
}
impl<'de> serde::Deserialize<'de> for SetCacheDisabledParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetCacheDisabledParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "cacheDisabled")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub cache_disabled: bool,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetCacheDisabledParams {
cache_disabled: fields.cache_disabled,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetCacheDisabled;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetCacheDisabledResponse {}
impl<'de> serde::Deserialize<'de> for SetCacheDisabledResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetCacheDisabledResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetCacheDisabledResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetCacheDisabled {
type Params = SetCacheDisabledParams;
type Response = SetCacheDisabledResponse;
const METHOD: &'static str = "Network.setCacheDisabled";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetCookieParams {
#[serde(rename = "name")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub name: String,
#[serde(rename = "value")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub value: String,
#[serde(rename = "url")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub url: Option<String>,
#[serde(rename = "domain")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub domain: Option<String>,
#[serde(rename = "path")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub path: Option<String>,
#[serde(rename = "secure")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub secure: Option<bool>,
#[serde(rename = "httpOnly")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub http_only: Option<bool>,
#[serde(rename = "sameSite")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub same_site: Option<crate::network::types::CookieSameSite>,
#[serde(rename = "expires")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub expires: Option<crate::network::types::TimeSinceEpoch>,
#[serde(rename = "priority")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub priority: Option<crate::network::types::CookiePriority>,
#[serde(rename = "sourceScheme")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub source_scheme: Option<crate::network::types::CookieSourceScheme>,
#[serde(rename = "sourcePort")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub source_port: Option<i64>,
#[serde(rename = "partitionKey")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub partition_key: Option<crate::network::types::CookiePartitionKey>,
}
impl<'de> serde::Deserialize<'de> for SetCookieParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetCookieParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "name")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub name: String,
#[serde(rename = "value")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub value: String,
#[serde(rename = "url")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub url: Option<String>,
#[serde(rename = "domain")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub domain: Option<String>,
#[serde(rename = "path")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub path: Option<String>,
#[serde(rename = "secure")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub secure: Option<bool>,
#[serde(rename = "httpOnly")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub http_only: Option<bool>,
#[serde(rename = "sameSite")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub same_site: Option<crate::network::types::CookieSameSite>,
#[serde(rename = "expires")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub expires: Option<crate::network::types::TimeSinceEpoch>,
#[serde(rename = "priority")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub priority: Option<crate::network::types::CookiePriority>,
#[serde(rename = "sourceScheme")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub source_scheme: Option<crate::network::types::CookieSourceScheme>,
#[serde(rename = "sourcePort")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub source_port: Option<i64>,
#[serde(rename = "partitionKey")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub partition_key: Option<crate::network::types::CookiePartitionKey>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetCookieParams {
name: fields.name,
value: fields.value,
url: fields.url,
domain: fields.domain,
path: fields.path,
secure: fields.secure,
http_only: fields.http_only,
same_site: fields.same_site,
expires: fields.expires,
priority: fields.priority,
source_scheme: fields.source_scheme,
source_port: fields.source_port,
partition_key: fields.partition_key,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetCookie;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetCookieResponse {
#[serde(rename = "success")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub success: bool,
}
impl<'de> serde::Deserialize<'de> for SetCookieResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetCookieResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "success")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub success: bool,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetCookieResponse {
success: fields.success,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetCookie {
type Params = SetCookieParams;
type Response = SetCookieResponse;
const METHOD: &'static str = "Network.setCookie";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetCookieControlsParams {
#[serde(rename = "enableThirdPartyCookieRestriction")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub enable_third_party_cookie_restriction: bool,
}
impl<'de> serde::Deserialize<'de> for SetCookieControlsParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetCookieControlsParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "enableThirdPartyCookieRestriction")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub enable_third_party_cookie_restriction: bool,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetCookieControlsParams {
enable_third_party_cookie_restriction: fields
.enable_third_party_cookie_restriction,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetCookieControls;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetCookieControlsResponse {}
impl<'de> serde::Deserialize<'de> for SetCookieControlsResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetCookieControlsResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetCookieControlsResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetCookieControls {
type Params = SetCookieControlsParams;
type Response = SetCookieControlsResponse;
const METHOD: &'static str = "Network.setCookieControls";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetCookiesParams {
#[serde(rename = "cookies")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub cookies: Vec<crate::network::types::CookieParam>,
}
impl<'de> serde::Deserialize<'de> for SetCookiesParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetCookiesParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "cookies")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub cookies: Vec<crate::network::types::CookieParam>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetCookiesParams {
cookies: fields.cookies,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetCookies;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetCookiesResponse {}
impl<'de> serde::Deserialize<'de> for SetCookiesResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetCookiesResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetCookiesResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetCookies {
type Params = SetCookiesParams;
type Response = SetCookiesResponse;
const METHOD: &'static str = "Network.setCookies";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetExtraHttpHeadersParams {
#[serde(rename = "headers")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub headers: crate::network::types::Headers,
}
impl<'de> serde::Deserialize<'de> for SetExtraHttpHeadersParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetExtraHttpHeadersParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "headers")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub headers: crate::network::types::Headers,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetExtraHttpHeadersParams {
headers: fields.headers,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetExtraHttpHeaders;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetExtraHttpHeadersResponse {}
impl<'de> serde::Deserialize<'de> for SetExtraHttpHeadersResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetExtraHttpHeadersResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetExtraHttpHeadersResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetExtraHttpHeaders {
type Params = SetExtraHttpHeadersParams;
type Response = SetExtraHttpHeadersResponse;
const METHOD: &'static str = "Network.setExtraHTTPHeaders";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetUserAgentOverrideParams {
#[serde(rename = "userAgent")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub user_agent: String,
#[serde(rename = "acceptLanguage")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub accept_language: Option<String>,
#[serde(rename = "platform")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub platform: Option<String>,
#[serde(rename = "userAgentMetadata")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub user_agent_metadata: Option<crate::emulation::types::UserAgentMetadata>,
}
impl<'de> serde::Deserialize<'de> for SetUserAgentOverrideParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetUserAgentOverrideParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "userAgent")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub user_agent: String,
#[serde(rename = "acceptLanguage")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub accept_language: Option<String>,
#[serde(rename = "platform")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub platform: Option<String>,
#[serde(rename = "userAgentMetadata")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub user_agent_metadata: Option<crate::emulation::types::UserAgentMetadata>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetUserAgentOverrideParams {
user_agent: fields.user_agent,
accept_language: fields.accept_language,
platform: fields.platform,
user_agent_metadata: fields.user_agent_metadata,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetUserAgentOverride;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetUserAgentOverrideResponse {}
impl<'de> serde::Deserialize<'de> for SetUserAgentOverrideResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetUserAgentOverrideResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetUserAgentOverrideResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetUserAgentOverride {
type Params = SetUserAgentOverrideParams;
type Response = SetUserAgentOverrideResponse;
const METHOD: &'static str = "Network.setUserAgentOverride";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct StreamResourceContentParams {
#[serde(rename = "requestId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub request_id: crate::network::types::RequestId,
}
impl<'de> serde::Deserialize<'de> for StreamResourceContentParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = StreamResourceContentParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "requestId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub request_id: crate::network::types::RequestId,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(StreamResourceContentParams {
request_id: fields.request_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct StreamResourceContent;
#[derive(Debug, Clone, serde::Serialize)]
pub struct StreamResourceContentResponse {
#[serde(rename = "bufferedData")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub buffered_data: String,
}
impl<'de> serde::Deserialize<'de> for StreamResourceContentResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = StreamResourceContentResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "bufferedData")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub buffered_data: String,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(StreamResourceContentResponse {
buffered_data: fields.buffered_data,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for StreamResourceContent {
type Params = StreamResourceContentParams;
type Response = StreamResourceContentResponse;
const METHOD: &'static str = "Network.streamResourceContent";
}