ruma_client_api/device/
delete_device.rs1pub mod v3 {
6    use ruma_common::{
11        api::{request, response, Metadata},
12        metadata, OwnedDeviceId,
13    };
14
15    use crate::uiaa::{AuthData, UiaaResponse};
16
17    const METADATA: Metadata = metadata! {
18        method: DELETE,
19        rate_limited: false,
20        authentication: AccessToken,
21        history: {
22            1.0 => "/_matrix/client/r0/devices/:device_id",
23            1.1 => "/_matrix/client/v3/devices/:device_id",
24        }
25    };
26
27    #[request(error = UiaaResponse)]
29    pub struct Request {
30        #[ruma_api(path)]
32        pub device_id: OwnedDeviceId,
33
34        #[serde(skip_serializing_if = "Option::is_none")]
36        pub auth: Option<AuthData>,
37    }
38
39    #[response(error = UiaaResponse)]
41    #[derive(Default)]
42    pub struct Response {}
43
44    impl Request {
45        pub fn new(device_id: OwnedDeviceId) -> Self {
47            Self { device_id, auth: None }
48        }
49    }
50
51    impl Response {
52        pub fn new() -> Self {
54            Self {}
55        }
56    }
57}