cdp-protocol 0.3.1

A Rust implementation of the Chrome DevTools Protocol
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
// Auto-generated from Chrome at version 146.0.7680.165 domain: BluetoothEmulation
#![allow(dead_code)]
#[allow(unused_imports)]
use super::types::*;
#[allow(unused_imports)]
use derive_builder::Builder;
#[allow(unused_imports)]
use serde::{Deserialize, Serialize};
#[allow(unused_imports)]
use serde_json::Value as Json;
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
pub enum CentralState {
    #[serde(rename = "absent")]
    Absent,
    #[serde(rename = "powered-off")]
    PoweredOff,
    #[serde(rename = "powered-on")]
    PoweredOn,
}
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
pub enum GattOperationType {
    #[serde(rename = "connection")]
    Connection,
    #[serde(rename = "discovery")]
    Discovery,
}
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
pub enum CharacteristicWriteType {
    #[serde(rename = "write-default-deprecated")]
    WriteDefaultDeprecated,
    #[serde(rename = "write-with-response")]
    WriteWithResponse,
    #[serde(rename = "write-without-response")]
    WriteWithoutResponse,
}
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
pub enum CharacteristicOperationType {
    #[serde(rename = "read")]
    Read,
    #[serde(rename = "write")]
    Write,
    #[serde(rename = "subscribe-to-notifications")]
    SubscribeToNotifications,
    #[serde(rename = "unsubscribe-from-notifications")]
    UnsubscribeFromNotifications,
}
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
pub enum DescriptorOperationType {
    #[serde(rename = "read")]
    Read,
    #[serde(rename = "write")]
    Write,
}
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
#[builder(setter(into, strip_option))]
#[serde(rename_all = "camelCase")]
#[doc = "Stores the manufacturer data"]
pub struct ManufacturerData {
    #[serde(default)]
    #[doc = "Company identifier\n <https://bitbucket.org/bluetooth-SIG/public/src/main/assigned_numbers/company_identifiers/company_identifiers.yaml>\n <https://usb.org/developers>"]
    pub key: JsUInt,
    #[doc = "Manufacturer-specific data"]
    pub data: String,
}
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
#[builder(setter(into, strip_option))]
#[serde(rename_all = "camelCase")]
#[doc = "Stores the byte data of the advertisement packet sent by a Bluetooth device."]
pub struct ScanRecord {
    #[builder(default)]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub name: Option<String>,
    #[builder(default)]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub uuids: Option<Vec<String>>,
    #[builder(default)]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    #[doc = "Stores the external appearance description of the device."]
    pub appearance: Option<JsUInt>,
    #[builder(default)]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    #[doc = "Stores the transmission power of a broadcasting device."]
    pub tx_power: Option<JsUInt>,
    #[builder(default)]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[doc = "Key is the company identifier and the value is an array of bytes of\n manufacturer specific data."]
    pub manufacturer_data: Option<Vec<ManufacturerData>>,
}
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
#[builder(setter(into, strip_option))]
#[serde(rename_all = "camelCase")]
#[doc = "Stores the advertisement packet information that is sent by a Bluetooth device."]
pub struct ScanEntry {
    #[serde(default)]
    pub device_address: String,
    #[serde(default)]
    pub rssi: JsUInt,
    pub scan_record: ScanRecord,
}
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
#[builder(setter(into, strip_option))]
#[serde(rename_all = "camelCase")]
#[doc = "Describes the properties of a characteristic. This follows Bluetooth Core\n Specification BT 4.2 Vol 3 Part G 3.3.1. Characteristic Properties."]
pub struct CharacteristicProperties {
    #[builder(default)]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub broadcast: Option<bool>,
    #[builder(default)]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub read: Option<bool>,
    #[builder(default)]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub write_without_response: Option<bool>,
    #[builder(default)]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub write: Option<bool>,
    #[builder(default)]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub notify: Option<bool>,
    #[builder(default)]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub indicate: Option<bool>,
    #[builder(default)]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub authenticated_signed_writes: Option<bool>,
    #[builder(default)]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub extended_properties: Option<bool>,
}
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
#[builder(setter(into, strip_option))]
#[serde(rename_all = "camelCase")]
#[doc = "Enable the BluetoothEmulation domain."]
pub struct Enable {
    #[doc = "State of the simulated central."]
    pub state: CentralState,
    #[serde(default)]
    #[doc = "If the simulated central supports low-energy."]
    pub le_supported: bool,
}
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
#[builder(setter(into, strip_option))]
#[serde(rename_all = "camelCase")]
#[doc = "Set the state of the simulated central."]
pub struct SetSimulatedCentralState {
    #[doc = "State of the simulated central."]
    pub state: CentralState,
}
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
pub struct Disable(pub Option<Json>);
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
#[builder(setter(into, strip_option))]
#[serde(rename_all = "camelCase")]
#[doc = "Simulates a peripheral with |address|, |name| and |knownServiceUuids|\n that has already been connected to the system."]
pub struct SimulatePreconnectedPeripheral {
    #[serde(default)]
    pub address: String,
    #[serde(default)]
    pub name: String,
    pub manufacturer_data: Vec<ManufacturerData>,
    #[serde(default)]
    pub known_service_uuids: Vec<String>,
}
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
#[builder(setter(into, strip_option))]
#[serde(rename_all = "camelCase")]
#[doc = "Simulates an advertisement packet described in |entry| being received by\n the central."]
pub struct SimulateAdvertisement {
    pub entry: ScanEntry,
}
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
#[builder(setter(into, strip_option))]
#[serde(rename_all = "camelCase")]
#[doc = "Simulates the response code from the peripheral with |address| for a\n GATT operation of |type|. The |code| value follows the HCI Error Codes from\n Bluetooth Core Specification Vol 2 Part D 1.3 List Of Error Codes."]
pub struct SimulateGATTOperationResponse {
    #[serde(default)]
    pub address: String,
    pub r#type: GattOperationType,
    #[serde(default)]
    pub code: JsUInt,
}
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
#[builder(setter(into, strip_option))]
#[serde(rename_all = "camelCase")]
#[doc = "Simulates the response from the characteristic with |characteristicId| for a\n characteristic operation of |type|. The |code| value follows the Error\n Codes from Bluetooth Core Specification Vol 3 Part F 3.4.1.1 Error Response.\n The |data| is expected to exist when simulating a successful read operation\n response."]
pub struct SimulateCharacteristicOperationResponse {
    #[serde(default)]
    pub characteristic_id: String,
    pub r#type: CharacteristicOperationType,
    #[serde(default)]
    pub code: JsUInt,
    #[builder(default)]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub data: Option<Vec<u8>>,
}
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
#[builder(setter(into, strip_option))]
#[serde(rename_all = "camelCase")]
#[doc = "Simulates the response from the descriptor with |descriptorId| for a\n descriptor operation of |type|. The |code| value follows the Error\n Codes from Bluetooth Core Specification Vol 3 Part F 3.4.1.1 Error Response.\n The |data| is expected to exist when simulating a successful read operation\n response."]
pub struct SimulateDescriptorOperationResponse {
    #[serde(default)]
    pub descriptor_id: String,
    pub r#type: DescriptorOperationType,
    #[serde(default)]
    pub code: JsUInt,
    #[builder(default)]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub data: Option<Vec<u8>>,
}
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
#[builder(setter(into, strip_option))]
#[serde(rename_all = "camelCase")]
#[doc = "Adds a service with |serviceUuid| to the peripheral with |address|."]
pub struct AddService {
    #[serde(default)]
    pub address: String,
    #[serde(default)]
    pub service_uuid: String,
}
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
#[builder(setter(into, strip_option))]
#[serde(rename_all = "camelCase")]
#[doc = "Removes the service respresented by |serviceId| from the simulated central."]
pub struct RemoveService {
    #[serde(default)]
    pub service_id: String,
}
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
#[builder(setter(into, strip_option))]
#[serde(rename_all = "camelCase")]
#[doc = "Adds a characteristic with |characteristicUuid| and |properties| to the\n service represented by |serviceId|."]
pub struct AddCharacteristic {
    #[serde(default)]
    pub service_id: String,
    #[serde(default)]
    pub characteristic_uuid: String,
    pub properties: CharacteristicProperties,
}
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
#[builder(setter(into, strip_option))]
#[serde(rename_all = "camelCase")]
#[doc = "Removes the characteristic respresented by |characteristicId| from the\n simulated central."]
pub struct RemoveCharacteristic {
    #[serde(default)]
    pub characteristic_id: String,
}
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
#[builder(setter(into, strip_option))]
#[serde(rename_all = "camelCase")]
#[doc = "Adds a descriptor with |descriptorUuid| to the characteristic respresented\n by |characteristicId|."]
pub struct AddDescriptor {
    #[serde(default)]
    pub characteristic_id: String,
    #[serde(default)]
    pub descriptor_uuid: String,
}
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
#[builder(setter(into, strip_option))]
#[serde(rename_all = "camelCase")]
#[doc = "Removes the descriptor with |descriptorId| from the simulated central."]
pub struct RemoveDescriptor {
    #[serde(default)]
    pub descriptor_id: String,
}
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
#[builder(setter(into, strip_option))]
#[serde(rename_all = "camelCase")]
#[doc = "Simulates a GATT disconnection from the peripheral with |address|."]
pub struct SimulateGATTDisconnection {
    #[serde(default)]
    pub address: String,
}
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
#[doc = "Enable the BluetoothEmulation domain."]
pub struct EnableReturnObject(pub Option<Json>);
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
#[doc = "Set the state of the simulated central."]
pub struct SetSimulatedCentralStateReturnObject(pub Option<Json>);
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
#[doc = "Disable the BluetoothEmulation domain."]
pub struct DisableReturnObject(pub Option<Json>);
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
#[doc = "Simulates a peripheral with |address|, |name| and |knownServiceUuids|\n that has already been connected to the system."]
pub struct SimulatePreconnectedPeripheralReturnObject(pub Option<Json>);
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
#[doc = "Simulates an advertisement packet described in |entry| being received by\n the central."]
pub struct SimulateAdvertisementReturnObject(pub Option<Json>);
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
#[doc = "Simulates the response code from the peripheral with |address| for a\n GATT operation of |type|. The |code| value follows the HCI Error Codes from\n Bluetooth Core Specification Vol 2 Part D 1.3 List Of Error Codes."]
pub struct SimulateGATTOperationResponseReturnObject(pub Option<Json>);
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
#[doc = "Simulates the response from the characteristic with |characteristicId| for a\n characteristic operation of |type|. The |code| value follows the Error\n Codes from Bluetooth Core Specification Vol 3 Part F 3.4.1.1 Error Response.\n The |data| is expected to exist when simulating a successful read operation\n response."]
pub struct SimulateCharacteristicOperationResponseReturnObject(pub Option<Json>);
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
#[doc = "Simulates the response from the descriptor with |descriptorId| for a\n descriptor operation of |type|. The |code| value follows the Error\n Codes from Bluetooth Core Specification Vol 3 Part F 3.4.1.1 Error Response.\n The |data| is expected to exist when simulating a successful read operation\n response."]
pub struct SimulateDescriptorOperationResponseReturnObject(pub Option<Json>);
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
#[serde(rename_all = "camelCase")]
#[doc = "Adds a service with |serviceUuid| to the peripheral with |address|."]
pub struct AddServiceReturnObject {
    #[serde(default)]
    #[doc = "An identifier that uniquely represents this service."]
    pub service_id: String,
}
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
#[doc = "Removes the service respresented by |serviceId| from the simulated central."]
pub struct RemoveServiceReturnObject(pub Option<Json>);
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
#[serde(rename_all = "camelCase")]
#[doc = "Adds a characteristic with |characteristicUuid| and |properties| to the\n service represented by |serviceId|."]
pub struct AddCharacteristicReturnObject {
    #[serde(default)]
    #[doc = "An identifier that uniquely represents this characteristic."]
    pub characteristic_id: String,
}
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
#[doc = "Removes the characteristic respresented by |characteristicId| from the\n simulated central."]
pub struct RemoveCharacteristicReturnObject(pub Option<Json>);
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
#[serde(rename_all = "camelCase")]
#[doc = "Adds a descriptor with |descriptorUuid| to the characteristic respresented\n by |characteristicId|."]
pub struct AddDescriptorReturnObject {
    #[serde(default)]
    #[doc = "An identifier that uniquely represents this descriptor."]
    pub descriptor_id: String,
}
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
#[doc = "Removes the descriptor with |descriptorId| from the simulated central."]
pub struct RemoveDescriptorReturnObject(pub Option<Json>);
#[allow(deprecated)]
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
#[doc = "Simulates a GATT disconnection from the peripheral with |address|."]
pub struct SimulateGATTDisconnectionReturnObject(pub Option<Json>);
#[allow(deprecated)]
impl Method for Enable {
    const NAME: &'static str = "BluetoothEmulation.enable";
    type ReturnObject = EnableReturnObject;
}
#[allow(deprecated)]
impl Method for SetSimulatedCentralState {
    const NAME: &'static str = "BluetoothEmulation.setSimulatedCentralState";
    type ReturnObject = SetSimulatedCentralStateReturnObject;
}
#[allow(deprecated)]
impl Method for Disable {
    const NAME: &'static str = "BluetoothEmulation.disable";
    type ReturnObject = DisableReturnObject;
}
#[allow(deprecated)]
impl Method for SimulatePreconnectedPeripheral {
    const NAME: &'static str = "BluetoothEmulation.simulatePreconnectedPeripheral";
    type ReturnObject = SimulatePreconnectedPeripheralReturnObject;
}
#[allow(deprecated)]
impl Method for SimulateAdvertisement {
    const NAME: &'static str = "BluetoothEmulation.simulateAdvertisement";
    type ReturnObject = SimulateAdvertisementReturnObject;
}
#[allow(deprecated)]
impl Method for SimulateGATTOperationResponse {
    const NAME: &'static str = "BluetoothEmulation.simulateGATTOperationResponse";
    type ReturnObject = SimulateGATTOperationResponseReturnObject;
}
#[allow(deprecated)]
impl Method for SimulateCharacteristicOperationResponse {
    const NAME: &'static str = "BluetoothEmulation.simulateCharacteristicOperationResponse";
    type ReturnObject = SimulateCharacteristicOperationResponseReturnObject;
}
#[allow(deprecated)]
impl Method for SimulateDescriptorOperationResponse {
    const NAME: &'static str = "BluetoothEmulation.simulateDescriptorOperationResponse";
    type ReturnObject = SimulateDescriptorOperationResponseReturnObject;
}
#[allow(deprecated)]
impl Method for AddService {
    const NAME: &'static str = "BluetoothEmulation.addService";
    type ReturnObject = AddServiceReturnObject;
}
#[allow(deprecated)]
impl Method for RemoveService {
    const NAME: &'static str = "BluetoothEmulation.removeService";
    type ReturnObject = RemoveServiceReturnObject;
}
#[allow(deprecated)]
impl Method for AddCharacteristic {
    const NAME: &'static str = "BluetoothEmulation.addCharacteristic";
    type ReturnObject = AddCharacteristicReturnObject;
}
#[allow(deprecated)]
impl Method for RemoveCharacteristic {
    const NAME: &'static str = "BluetoothEmulation.removeCharacteristic";
    type ReturnObject = RemoveCharacteristicReturnObject;
}
#[allow(deprecated)]
impl Method for AddDescriptor {
    const NAME: &'static str = "BluetoothEmulation.addDescriptor";
    type ReturnObject = AddDescriptorReturnObject;
}
#[allow(deprecated)]
impl Method for RemoveDescriptor {
    const NAME: &'static str = "BluetoothEmulation.removeDescriptor";
    type ReturnObject = RemoveDescriptorReturnObject;
}
#[allow(deprecated)]
impl Method for SimulateGATTDisconnection {
    const NAME: &'static str = "BluetoothEmulation.simulateGATTDisconnection";
    type ReturnObject = SimulateGATTDisconnectionReturnObject;
}
#[allow(dead_code)]
pub mod events {
    #[allow(unused_imports)]
    use super::super::types::*;
    #[allow(unused_imports)]
    use derive_builder::Builder;
    #[allow(unused_imports)]
    use serde::{Deserialize, Serialize};
    #[allow(unused_imports)]
    use serde_json::Value as Json;
    #[allow(deprecated)]
    #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
    pub struct GattOperationReceivedEvent {
        pub params: GattOperationReceivedEventParams,
    }
    #[allow(deprecated)]
    #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
    #[serde(rename_all = "camelCase")]
    pub struct GattOperationReceivedEventParams {
        #[serde(default)]
        pub address: String,
        pub r#type: super::GattOperationType,
    }
    #[allow(deprecated)]
    #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
    pub struct CharacteristicOperationReceivedEvent {
        pub params: CharacteristicOperationReceivedEventParams,
    }
    #[allow(deprecated)]
    #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
    #[serde(rename_all = "camelCase")]
    pub struct CharacteristicOperationReceivedEventParams {
        #[serde(default)]
        pub characteristic_id: String,
        pub r#type: super::CharacteristicOperationType,
        #[builder(default)]
        #[serde(skip_serializing_if = "Option::is_none")]
        #[serde(default)]
        pub data: Option<String>,
        #[builder(default)]
        #[serde(skip_serializing_if = "Option::is_none")]
        pub write_type: Option<super::CharacteristicWriteType>,
    }
    #[allow(deprecated)]
    #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
    pub struct DescriptorOperationReceivedEvent {
        pub params: DescriptorOperationReceivedEventParams,
    }
    #[allow(deprecated)]
    #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
    #[serde(rename_all = "camelCase")]
    pub struct DescriptorOperationReceivedEventParams {
        #[serde(default)]
        pub descriptor_id: String,
        pub r#type: super::DescriptorOperationType,
        #[builder(default)]
        #[serde(skip_serializing_if = "Option::is_none")]
        #[serde(default)]
        pub data: Option<String>,
    }
}