gcloud_storage/http/notifications/
get.rs

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