use serde::{Serialize, Deserialize};
use serde_json::Value as JsonValue;
use std::borrow::Cow;
pub type RequestId<'a> = Cow<'a, str>;
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
pub enum RequestStage {
#[default]
#[serde(rename = "Request")]
Request,
#[serde(rename = "Response")]
Response,
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct RequestPattern<'a> {
#[serde(skip_serializing_if = "Option::is_none")]
urlPattern: Option<Cow<'a, str>>,
#[serde(skip_serializing_if = "Option::is_none")]
resourceType: Option<crate::network::ResourceType>,
#[serde(skip_serializing_if = "Option::is_none")]
requestStage: Option<RequestStage>,
}
impl<'a> RequestPattern<'a> {
pub fn builder() -> RequestPatternBuilder<'a> {
RequestPatternBuilder {
urlPattern: None,
resourceType: None,
requestStage: None,
}
}
pub fn urlPattern(&self) -> Option<&str> { self.urlPattern.as_deref() }
pub fn resourceType(&self) -> Option<&crate::network::ResourceType> { self.resourceType.as_ref() }
pub fn requestStage(&self) -> Option<&RequestStage> { self.requestStage.as_ref() }
}
#[derive(Default)]
pub struct RequestPatternBuilder<'a> {
urlPattern: Option<Cow<'a, str>>,
resourceType: Option<crate::network::ResourceType>,
requestStage: Option<RequestStage>,
}
impl<'a> RequestPatternBuilder<'a> {
pub fn urlPattern(mut self, urlPattern: impl Into<Cow<'a, str>>) -> Self { self.urlPattern = Some(urlPattern.into()); self }
pub fn resourceType(mut self, resourceType: crate::network::ResourceType) -> Self { self.resourceType = Some(resourceType); self }
pub fn requestStage(mut self, requestStage: RequestStage) -> Self { self.requestStage = Some(requestStage); self }
pub fn build(self) -> RequestPattern<'a> {
RequestPattern {
urlPattern: self.urlPattern,
resourceType: self.resourceType,
requestStage: self.requestStage,
}
}
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct HeaderEntry<'a> {
name: Cow<'a, str>,
value: Cow<'a, str>,
}
impl<'a> HeaderEntry<'a> {
pub fn builder(name: impl Into<Cow<'a, str>>, value: impl Into<Cow<'a, str>>) -> HeaderEntryBuilder<'a> {
HeaderEntryBuilder {
name: name.into(),
value: value.into(),
}
}
pub fn name(&self) -> &str { self.name.as_ref() }
pub fn value(&self) -> &str { self.value.as_ref() }
}
pub struct HeaderEntryBuilder<'a> {
name: Cow<'a, str>,
value: Cow<'a, str>,
}
impl<'a> HeaderEntryBuilder<'a> {
pub fn build(self) -> HeaderEntry<'a> {
HeaderEntry {
name: self.name,
value: self.value,
}
}
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct AuthChallenge<'a> {
#[serde(skip_serializing_if = "Option::is_none")]
source: Option<Cow<'a, str>>,
origin: Cow<'a, str>,
scheme: Cow<'a, str>,
realm: Cow<'a, str>,
}
impl<'a> AuthChallenge<'a> {
pub fn builder(origin: impl Into<Cow<'a, str>>, scheme: impl Into<Cow<'a, str>>, realm: impl Into<Cow<'a, str>>) -> AuthChallengeBuilder<'a> {
AuthChallengeBuilder {
source: None,
origin: origin.into(),
scheme: scheme.into(),
realm: realm.into(),
}
}
pub fn source(&self) -> Option<&str> { self.source.as_deref() }
pub fn origin(&self) -> &str { self.origin.as_ref() }
pub fn scheme(&self) -> &str { self.scheme.as_ref() }
pub fn realm(&self) -> &str { self.realm.as_ref() }
}
pub struct AuthChallengeBuilder<'a> {
source: Option<Cow<'a, str>>,
origin: Cow<'a, str>,
scheme: Cow<'a, str>,
realm: Cow<'a, str>,
}
impl<'a> AuthChallengeBuilder<'a> {
pub fn source(mut self, source: impl Into<Cow<'a, str>>) -> Self { self.source = Some(source.into()); self }
pub fn build(self) -> AuthChallenge<'a> {
AuthChallenge {
source: self.source,
origin: self.origin,
scheme: self.scheme,
realm: self.realm,
}
}
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct AuthChallengeResponse<'a> {
response: Cow<'a, str>,
#[serde(skip_serializing_if = "Option::is_none")]
username: Option<Cow<'a, str>>,
#[serde(skip_serializing_if = "Option::is_none")]
password: Option<Cow<'a, str>>,
}
impl<'a> AuthChallengeResponse<'a> {
pub fn builder(response: impl Into<Cow<'a, str>>) -> AuthChallengeResponseBuilder<'a> {
AuthChallengeResponseBuilder {
response: response.into(),
username: None,
password: None,
}
}
pub fn response(&self) -> &str { self.response.as_ref() }
pub fn username(&self) -> Option<&str> { self.username.as_deref() }
pub fn password(&self) -> Option<&str> { self.password.as_deref() }
}
pub struct AuthChallengeResponseBuilder<'a> {
response: Cow<'a, str>,
username: Option<Cow<'a, str>>,
password: Option<Cow<'a, str>>,
}
impl<'a> AuthChallengeResponseBuilder<'a> {
pub fn username(mut self, username: impl Into<Cow<'a, str>>) -> Self { self.username = Some(username.into()); self }
pub fn password(mut self, password: impl Into<Cow<'a, str>>) -> Self { self.password = Some(password.into()); self }
pub fn build(self) -> AuthChallengeResponse<'a> {
AuthChallengeResponse {
response: self.response,
username: self.username,
password: self.password,
}
}
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
pub struct DisableParams {}
impl DisableParams { pub const METHOD: &'static str = "Fetch.disable"; }
impl<'a> crate::CdpCommand<'a> for DisableParams {
const METHOD: &'static str = "Fetch.disable";
type Response = crate::EmptyReturns;
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct EnableParams<'a> {
#[serde(skip_serializing_if = "Option::is_none")]
patterns: Option<Vec<RequestPattern<'a>>>,
#[serde(skip_serializing_if = "Option::is_none")]
handleAuthRequests: Option<bool>,
}
impl<'a> EnableParams<'a> {
pub fn builder() -> EnableParamsBuilder<'a> {
EnableParamsBuilder {
patterns: None,
handleAuthRequests: None,
}
}
pub fn patterns(&self) -> Option<&[RequestPattern<'a>]> { self.patterns.as_deref() }
pub fn handleAuthRequests(&self) -> Option<bool> { self.handleAuthRequests }
}
#[derive(Default)]
pub struct EnableParamsBuilder<'a> {
patterns: Option<Vec<RequestPattern<'a>>>,
handleAuthRequests: Option<bool>,
}
impl<'a> EnableParamsBuilder<'a> {
pub fn patterns(mut self, patterns: Vec<RequestPattern<'a>>) -> Self { self.patterns = Some(patterns); self }
pub fn handleAuthRequests(mut self, handleAuthRequests: bool) -> Self { self.handleAuthRequests = Some(handleAuthRequests); self }
pub fn build(self) -> EnableParams<'a> {
EnableParams {
patterns: self.patterns,
handleAuthRequests: self.handleAuthRequests,
}
}
}
impl<'a> EnableParams<'a> { pub const METHOD: &'static str = "Fetch.enable"; }
impl<'a> crate::CdpCommand<'a> for EnableParams<'a> {
const METHOD: &'static str = "Fetch.enable";
type Response = crate::EmptyReturns;
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct FailRequestParams<'a> {
requestId: RequestId<'a>,
errorReason: crate::network::ErrorReason,
}
impl<'a> FailRequestParams<'a> {
pub fn builder(requestId: RequestId<'a>, errorReason: crate::network::ErrorReason) -> FailRequestParamsBuilder<'a> {
FailRequestParamsBuilder {
requestId: requestId,
errorReason: errorReason,
}
}
pub fn requestId(&self) -> &RequestId<'a> { &self.requestId }
pub fn errorReason(&self) -> &crate::network::ErrorReason { &self.errorReason }
}
pub struct FailRequestParamsBuilder<'a> {
requestId: RequestId<'a>,
errorReason: crate::network::ErrorReason,
}
impl<'a> FailRequestParamsBuilder<'a> {
pub fn build(self) -> FailRequestParams<'a> {
FailRequestParams {
requestId: self.requestId,
errorReason: self.errorReason,
}
}
}
impl<'a> FailRequestParams<'a> { pub const METHOD: &'static str = "Fetch.failRequest"; }
impl<'a> crate::CdpCommand<'a> for FailRequestParams<'a> {
const METHOD: &'static str = "Fetch.failRequest";
type Response = crate::EmptyReturns;
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct FulfillRequestParams<'a> {
requestId: RequestId<'a>,
responseCode: i64,
#[serde(skip_serializing_if = "Option::is_none")]
responseHeaders: Option<Vec<HeaderEntry<'a>>>,
#[serde(skip_serializing_if = "Option::is_none")]
binaryResponseHeaders: Option<Cow<'a, str>>,
#[serde(skip_serializing_if = "Option::is_none")]
body: Option<Cow<'a, str>>,
#[serde(skip_serializing_if = "Option::is_none")]
responsePhrase: Option<Cow<'a, str>>,
}
impl<'a> FulfillRequestParams<'a> {
pub fn builder(requestId: RequestId<'a>, responseCode: i64) -> FulfillRequestParamsBuilder<'a> {
FulfillRequestParamsBuilder {
requestId: requestId,
responseCode: responseCode,
responseHeaders: None,
binaryResponseHeaders: None,
body: None,
responsePhrase: None,
}
}
pub fn requestId(&self) -> &RequestId<'a> { &self.requestId }
pub fn responseCode(&self) -> i64 { self.responseCode }
pub fn responseHeaders(&self) -> Option<&[HeaderEntry<'a>]> { self.responseHeaders.as_deref() }
pub fn binaryResponseHeaders(&self) -> Option<&str> { self.binaryResponseHeaders.as_deref() }
pub fn body(&self) -> Option<&str> { self.body.as_deref() }
pub fn responsePhrase(&self) -> Option<&str> { self.responsePhrase.as_deref() }
}
pub struct FulfillRequestParamsBuilder<'a> {
requestId: RequestId<'a>,
responseCode: i64,
responseHeaders: Option<Vec<HeaderEntry<'a>>>,
binaryResponseHeaders: Option<Cow<'a, str>>,
body: Option<Cow<'a, str>>,
responsePhrase: Option<Cow<'a, str>>,
}
impl<'a> FulfillRequestParamsBuilder<'a> {
pub fn responseHeaders(mut self, responseHeaders: Vec<HeaderEntry<'a>>) -> Self { self.responseHeaders = Some(responseHeaders); self }
pub fn binaryResponseHeaders(mut self, binaryResponseHeaders: impl Into<Cow<'a, str>>) -> Self { self.binaryResponseHeaders = Some(binaryResponseHeaders.into()); self }
pub fn body(mut self, body: impl Into<Cow<'a, str>>) -> Self { self.body = Some(body.into()); self }
pub fn responsePhrase(mut self, responsePhrase: impl Into<Cow<'a, str>>) -> Self { self.responsePhrase = Some(responsePhrase.into()); self }
pub fn build(self) -> FulfillRequestParams<'a> {
FulfillRequestParams {
requestId: self.requestId,
responseCode: self.responseCode,
responseHeaders: self.responseHeaders,
binaryResponseHeaders: self.binaryResponseHeaders,
body: self.body,
responsePhrase: self.responsePhrase,
}
}
}
impl<'a> FulfillRequestParams<'a> { pub const METHOD: &'static str = "Fetch.fulfillRequest"; }
impl<'a> crate::CdpCommand<'a> for FulfillRequestParams<'a> {
const METHOD: &'static str = "Fetch.fulfillRequest";
type Response = crate::EmptyReturns;
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct ContinueRequestParams<'a> {
requestId: RequestId<'a>,
#[serde(skip_serializing_if = "Option::is_none")]
url: Option<Cow<'a, str>>,
#[serde(skip_serializing_if = "Option::is_none")]
method: Option<Cow<'a, str>>,
#[serde(skip_serializing_if = "Option::is_none")]
postData: Option<Cow<'a, str>>,
#[serde(skip_serializing_if = "Option::is_none")]
headers: Option<Vec<HeaderEntry<'a>>>,
#[serde(skip_serializing_if = "Option::is_none")]
interceptResponse: Option<bool>,
}
impl<'a> ContinueRequestParams<'a> {
pub fn builder(requestId: RequestId<'a>) -> ContinueRequestParamsBuilder<'a> {
ContinueRequestParamsBuilder {
requestId: requestId,
url: None,
method: None,
postData: None,
headers: None,
interceptResponse: None,
}
}
pub fn requestId(&self) -> &RequestId<'a> { &self.requestId }
pub fn url(&self) -> Option<&str> { self.url.as_deref() }
pub fn method(&self) -> Option<&str> { self.method.as_deref() }
pub fn postData(&self) -> Option<&str> { self.postData.as_deref() }
pub fn headers(&self) -> Option<&[HeaderEntry<'a>]> { self.headers.as_deref() }
pub fn interceptResponse(&self) -> Option<bool> { self.interceptResponse }
}
pub struct ContinueRequestParamsBuilder<'a> {
requestId: RequestId<'a>,
url: Option<Cow<'a, str>>,
method: Option<Cow<'a, str>>,
postData: Option<Cow<'a, str>>,
headers: Option<Vec<HeaderEntry<'a>>>,
interceptResponse: Option<bool>,
}
impl<'a> ContinueRequestParamsBuilder<'a> {
pub fn url(mut self, url: impl Into<Cow<'a, str>>) -> Self { self.url = Some(url.into()); self }
pub fn method(mut self, method: impl Into<Cow<'a, str>>) -> Self { self.method = Some(method.into()); self }
pub fn postData(mut self, postData: impl Into<Cow<'a, str>>) -> Self { self.postData = Some(postData.into()); self }
pub fn headers(mut self, headers: Vec<HeaderEntry<'a>>) -> Self { self.headers = Some(headers); self }
pub fn interceptResponse(mut self, interceptResponse: bool) -> Self { self.interceptResponse = Some(interceptResponse); self }
pub fn build(self) -> ContinueRequestParams<'a> {
ContinueRequestParams {
requestId: self.requestId,
url: self.url,
method: self.method,
postData: self.postData,
headers: self.headers,
interceptResponse: self.interceptResponse,
}
}
}
impl<'a> ContinueRequestParams<'a> { pub const METHOD: &'static str = "Fetch.continueRequest"; }
impl<'a> crate::CdpCommand<'a> for ContinueRequestParams<'a> {
const METHOD: &'static str = "Fetch.continueRequest";
type Response = crate::EmptyReturns;
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct ContinueWithAuthParams<'a> {
requestId: RequestId<'a>,
authChallengeResponse: AuthChallengeResponse<'a>,
}
impl<'a> ContinueWithAuthParams<'a> {
pub fn builder(requestId: RequestId<'a>, authChallengeResponse: AuthChallengeResponse<'a>) -> ContinueWithAuthParamsBuilder<'a> {
ContinueWithAuthParamsBuilder {
requestId: requestId,
authChallengeResponse: authChallengeResponse,
}
}
pub fn requestId(&self) -> &RequestId<'a> { &self.requestId }
pub fn authChallengeResponse(&self) -> &AuthChallengeResponse<'a> { &self.authChallengeResponse }
}
pub struct ContinueWithAuthParamsBuilder<'a> {
requestId: RequestId<'a>,
authChallengeResponse: AuthChallengeResponse<'a>,
}
impl<'a> ContinueWithAuthParamsBuilder<'a> {
pub fn build(self) -> ContinueWithAuthParams<'a> {
ContinueWithAuthParams {
requestId: self.requestId,
authChallengeResponse: self.authChallengeResponse,
}
}
}
impl<'a> ContinueWithAuthParams<'a> { pub const METHOD: &'static str = "Fetch.continueWithAuth"; }
impl<'a> crate::CdpCommand<'a> for ContinueWithAuthParams<'a> {
const METHOD: &'static str = "Fetch.continueWithAuth";
type Response = crate::EmptyReturns;
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct ContinueResponseParams<'a> {
requestId: RequestId<'a>,
#[serde(skip_serializing_if = "Option::is_none")]
responseCode: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
responsePhrase: Option<Cow<'a, str>>,
#[serde(skip_serializing_if = "Option::is_none")]
responseHeaders: Option<Vec<HeaderEntry<'a>>>,
#[serde(skip_serializing_if = "Option::is_none")]
binaryResponseHeaders: Option<Cow<'a, str>>,
}
impl<'a> ContinueResponseParams<'a> {
pub fn builder(requestId: RequestId<'a>) -> ContinueResponseParamsBuilder<'a> {
ContinueResponseParamsBuilder {
requestId: requestId,
responseCode: None,
responsePhrase: None,
responseHeaders: None,
binaryResponseHeaders: None,
}
}
pub fn requestId(&self) -> &RequestId<'a> { &self.requestId }
pub fn responseCode(&self) -> Option<i64> { self.responseCode }
pub fn responsePhrase(&self) -> Option<&str> { self.responsePhrase.as_deref() }
pub fn responseHeaders(&self) -> Option<&[HeaderEntry<'a>]> { self.responseHeaders.as_deref() }
pub fn binaryResponseHeaders(&self) -> Option<&str> { self.binaryResponseHeaders.as_deref() }
}
pub struct ContinueResponseParamsBuilder<'a> {
requestId: RequestId<'a>,
responseCode: Option<i64>,
responsePhrase: Option<Cow<'a, str>>,
responseHeaders: Option<Vec<HeaderEntry<'a>>>,
binaryResponseHeaders: Option<Cow<'a, str>>,
}
impl<'a> ContinueResponseParamsBuilder<'a> {
pub fn responseCode(mut self, responseCode: i64) -> Self { self.responseCode = Some(responseCode); self }
pub fn responsePhrase(mut self, responsePhrase: impl Into<Cow<'a, str>>) -> Self { self.responsePhrase = Some(responsePhrase.into()); self }
pub fn responseHeaders(mut self, responseHeaders: Vec<HeaderEntry<'a>>) -> Self { self.responseHeaders = Some(responseHeaders); self }
pub fn binaryResponseHeaders(mut self, binaryResponseHeaders: impl Into<Cow<'a, str>>) -> Self { self.binaryResponseHeaders = Some(binaryResponseHeaders.into()); self }
pub fn build(self) -> ContinueResponseParams<'a> {
ContinueResponseParams {
requestId: self.requestId,
responseCode: self.responseCode,
responsePhrase: self.responsePhrase,
responseHeaders: self.responseHeaders,
binaryResponseHeaders: self.binaryResponseHeaders,
}
}
}
impl<'a> ContinueResponseParams<'a> { pub const METHOD: &'static str = "Fetch.continueResponse"; }
impl<'a> crate::CdpCommand<'a> for ContinueResponseParams<'a> {
const METHOD: &'static str = "Fetch.continueResponse";
type Response = crate::EmptyReturns;
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct GetResponseBodyParams<'a> {
requestId: RequestId<'a>,
}
impl<'a> GetResponseBodyParams<'a> {
pub fn builder(requestId: RequestId<'a>) -> GetResponseBodyParamsBuilder<'a> {
GetResponseBodyParamsBuilder {
requestId: requestId,
}
}
pub fn requestId(&self) -> &RequestId<'a> { &self.requestId }
}
pub struct GetResponseBodyParamsBuilder<'a> {
requestId: RequestId<'a>,
}
impl<'a> GetResponseBodyParamsBuilder<'a> {
pub fn build(self) -> GetResponseBodyParams<'a> {
GetResponseBodyParams {
requestId: self.requestId,
}
}
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct GetResponseBodyReturns<'a> {
body: Cow<'a, str>,
base64Encoded: bool,
}
impl<'a> GetResponseBodyReturns<'a> {
pub fn builder(body: impl Into<Cow<'a, str>>, base64Encoded: bool) -> GetResponseBodyReturnsBuilder<'a> {
GetResponseBodyReturnsBuilder {
body: body.into(),
base64Encoded: base64Encoded,
}
}
pub fn body(&self) -> &str { self.body.as_ref() }
pub fn base64Encoded(&self) -> bool { self.base64Encoded }
}
pub struct GetResponseBodyReturnsBuilder<'a> {
body: Cow<'a, str>,
base64Encoded: bool,
}
impl<'a> GetResponseBodyReturnsBuilder<'a> {
pub fn build(self) -> GetResponseBodyReturns<'a> {
GetResponseBodyReturns {
body: self.body,
base64Encoded: self.base64Encoded,
}
}
}
impl<'a> GetResponseBodyParams<'a> { pub const METHOD: &'static str = "Fetch.getResponseBody"; }
impl<'a> crate::CdpCommand<'a> for GetResponseBodyParams<'a> {
const METHOD: &'static str = "Fetch.getResponseBody";
type Response = GetResponseBodyReturns<'a>;
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct TakeResponseBodyAsStreamParams<'a> {
requestId: RequestId<'a>,
}
impl<'a> TakeResponseBodyAsStreamParams<'a> {
pub fn builder(requestId: RequestId<'a>) -> TakeResponseBodyAsStreamParamsBuilder<'a> {
TakeResponseBodyAsStreamParamsBuilder {
requestId: requestId,
}
}
pub fn requestId(&self) -> &RequestId<'a> { &self.requestId }
}
pub struct TakeResponseBodyAsStreamParamsBuilder<'a> {
requestId: RequestId<'a>,
}
impl<'a> TakeResponseBodyAsStreamParamsBuilder<'a> {
pub fn build(self) -> TakeResponseBodyAsStreamParams<'a> {
TakeResponseBodyAsStreamParams {
requestId: self.requestId,
}
}
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct TakeResponseBodyAsStreamReturns<'a> {
stream: crate::io::StreamHandle<'a>,
}
impl<'a> TakeResponseBodyAsStreamReturns<'a> {
pub fn builder(stream: crate::io::StreamHandle<'a>) -> TakeResponseBodyAsStreamReturnsBuilder<'a> {
TakeResponseBodyAsStreamReturnsBuilder {
stream: stream,
}
}
pub fn stream(&self) -> &crate::io::StreamHandle<'a> { &self.stream }
}
pub struct TakeResponseBodyAsStreamReturnsBuilder<'a> {
stream: crate::io::StreamHandle<'a>,
}
impl<'a> TakeResponseBodyAsStreamReturnsBuilder<'a> {
pub fn build(self) -> TakeResponseBodyAsStreamReturns<'a> {
TakeResponseBodyAsStreamReturns {
stream: self.stream,
}
}
}
impl<'a> TakeResponseBodyAsStreamParams<'a> { pub const METHOD: &'static str = "Fetch.takeResponseBodyAsStream"; }
impl<'a> crate::CdpCommand<'a> for TakeResponseBodyAsStreamParams<'a> {
const METHOD: &'static str = "Fetch.takeResponseBodyAsStream";
type Response = TakeResponseBodyAsStreamReturns<'a>;
}