gcloud_storage/http/notifications/
delete.rs

1use reqwest_middleware::{ClientWithMiddleware as Client, RequestBuilder};
2
3use crate::http::Escape;
4
5/// Request message for DeleteNotification.
6#[derive(Clone, PartialEq, Eq, serde::Deserialize, serde::Serialize, Debug)]
7#[serde(rename_all = "camelCase")]
8pub struct DeleteNotificationRequest {
9    /// Required. The parent bucket of the notification.
10    pub bucket: String,
11    /// Required. ID of the notification to delete.
12    pub notification: String,
13}
14pub(crate) fn build(base_url: &str, client: &Client, req: &DeleteNotificationRequest) -> RequestBuilder {
15    let url = format!(
16        "{}/b/{}/notificationConfigs/{}",
17        base_url,
18        req.bucket.escape(),
19        req.notification.escape()
20    );
21    client.delete(url)
22}