google_cloud_resource_manager/operations.rs
1use crate::Client;
2use crate::ClientResult;
3
4pub struct Operations {
5 pub client: Client,
6}
7
8impl Operations {
9 #[doc(hidden)]
10 pub fn new(client: Client) -> Self {
11 Operations { client }
12 }
13
14 /**
15 * This function performs a `GET` to the `/v1/{name}` endpoint.
16 *
17 * Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
18 *
19 * **Parameters:**
20 *
21 * * `name: &str` -- Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
22 */
23 pub async fn get(&self, name: &str) -> ClientResult<crate::Response<crate::types::Operation>> {
24 let url = self.client.url(
25 &format!("/v1/{}", crate::progenitor_support::encode_path(name),),
26 None,
27 );
28 self.client
29 .get(
30 &url,
31 crate::Message {
32 body: None,
33 content_type: None,
34 },
35 )
36 .await
37 }
38}