web_sys/features/
gen_CacheBatchOperation.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    # [wasm_bindgen (extends = :: js_sys :: Object , js_name = CacheBatchOperation)]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `CacheBatchOperation` dictionary."]
10    #[doc = ""]
11    #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`*"]
12    pub type CacheBatchOperation;
13    #[cfg(feature = "CacheQueryOptions")]
14    #[doc = "Get the `options` field of this object."]
15    #[doc = ""]
16    #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `CacheQueryOptions`*"]
17    #[wasm_bindgen(method, getter = "options")]
18    pub fn get_options(this: &CacheBatchOperation) -> Option<CacheQueryOptions>;
19    #[cfg(feature = "CacheQueryOptions")]
20    #[doc = "Change the `options` field of this object."]
21    #[doc = ""]
22    #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `CacheQueryOptions`*"]
23    #[wasm_bindgen(method, setter = "options")]
24    pub fn set_options(this: &CacheBatchOperation, val: &CacheQueryOptions);
25    #[cfg(feature = "Request")]
26    #[doc = "Get the `request` field of this object."]
27    #[doc = ""]
28    #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `Request`*"]
29    #[wasm_bindgen(method, getter = "request")]
30    pub fn get_request(this: &CacheBatchOperation) -> Option<Request>;
31    #[cfg(feature = "Request")]
32    #[doc = "Change the `request` field of this object."]
33    #[doc = ""]
34    #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `Request`*"]
35    #[wasm_bindgen(method, setter = "request")]
36    pub fn set_request(this: &CacheBatchOperation, val: &Request);
37    #[cfg(feature = "Response")]
38    #[doc = "Get the `response` field of this object."]
39    #[doc = ""]
40    #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `Response`*"]
41    #[wasm_bindgen(method, getter = "response")]
42    pub fn get_response(this: &CacheBatchOperation) -> Option<Response>;
43    #[cfg(feature = "Response")]
44    #[doc = "Change the `response` field of this object."]
45    #[doc = ""]
46    #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `Response`*"]
47    #[wasm_bindgen(method, setter = "response")]
48    pub fn set_response(this: &CacheBatchOperation, val: &Response);
49    #[doc = "Get the `type` field of this object."]
50    #[doc = ""]
51    #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`*"]
52    #[wasm_bindgen(method, getter = "type")]
53    pub fn get_type(this: &CacheBatchOperation) -> Option<::alloc::string::String>;
54    #[doc = "Change the `type` field of this object."]
55    #[doc = ""]
56    #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`*"]
57    #[wasm_bindgen(method, setter = "type")]
58    pub fn set_type(this: &CacheBatchOperation, val: &str);
59}
60impl CacheBatchOperation {
61    #[doc = "Construct a new `CacheBatchOperation`."]
62    #[doc = ""]
63    #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`*"]
64    pub fn new() -> Self {
65        #[allow(unused_mut)]
66        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
67        ret
68    }
69    #[cfg(feature = "CacheQueryOptions")]
70    #[deprecated = "Use `set_options()` instead."]
71    pub fn options(&mut self, val: &CacheQueryOptions) -> &mut Self {
72        self.set_options(val);
73        self
74    }
75    #[cfg(feature = "Request")]
76    #[deprecated = "Use `set_request()` instead."]
77    pub fn request(&mut self, val: &Request) -> &mut Self {
78        self.set_request(val);
79        self
80    }
81    #[cfg(feature = "Response")]
82    #[deprecated = "Use `set_response()` instead."]
83    pub fn response(&mut self, val: &Response) -> &mut Self {
84        self.set_response(val);
85        self
86    }
87    #[deprecated = "Use `set_type()` instead."]
88    pub fn type_(&mut self, val: &str) -> &mut Self {
89        self.set_type(val);
90        self
91    }
92}
93impl Default for CacheBatchOperation {
94    fn default() -> Self {
95        Self::new()
96    }
97}