Skip to main content

google_cloud_memorystore_v1/
client.rs

1// Copyright 2025 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// Code generated by sidekick. DO NOT EDIT.
16#![allow(rustdoc::redundant_explicit_links)]
17#![allow(rustdoc::broken_intra_doc_links)]
18
19/// Implements a client for the Memorystore API.
20///
21/// # Example
22/// ```
23/// # use google_cloud_memorystore_v1::client::Memorystore;
24/// use google_cloud_gax::paginator::ItemPaginator as _;
25/// async fn sample(
26///    project_id: &str,
27///    location_id: &str,
28/// ) -> anyhow::Result<()> {
29///     let client = Memorystore::builder().build().await?;
30///     let mut list = client.list_instances()
31///         .set_parent(format!("projects/{project_id}/locations/{location_id}"))
32///         .by_item();
33///     while let Some(item) = list.next().await.transpose()? {
34///         println!("{:?}", item);
35///     }
36///     Ok(())
37/// }
38/// ```
39///
40/// # Service Description
41///
42/// Service describing handlers for resources
43///
44/// # Configuration
45///
46/// To configure `Memorystore` use the `with_*` methods in the type returned
47/// by [builder()][Memorystore::builder]. The default configuration should
48/// work for most applications. Common configuration changes include
49///
50/// * [with_endpoint()]: by default this client uses the global default endpoint
51///   (`https://memorystore.googleapis.com`). Applications using regional
52///   endpoints or running in restricted networks (e.g. a network configured
53//    with [Private Google Access with VPC Service Controls]) may want to
54///   override this default.
55/// * [with_credentials()]: by default this client uses
56///   [Application Default Credentials]. Applications using custom
57///   authentication may need to override this default.
58///
59/// [with_endpoint()]: super::builder::memorystore::ClientBuilder::with_endpoint
60/// [with_credentials()]: super::builder::memorystore::ClientBuilder::with_credentials
61/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
62/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
63///
64/// # Pooling and Cloning
65///
66/// `Memorystore` holds a connection pool internally, it is advised to
67/// create one and reuse it. You do not need to wrap `Memorystore` in
68/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
69/// already uses an `Arc` internally.
70#[derive(Clone, Debug)]
71pub struct Memorystore {
72    inner: std::sync::Arc<dyn super::stub::dynamic::Memorystore>,
73}
74
75impl Memorystore {
76    /// Returns a builder for [Memorystore].
77    ///
78    /// ```
79    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
80    /// # use google_cloud_memorystore_v1::client::Memorystore;
81    /// let client = Memorystore::builder().build().await?;
82    /// # Ok(()) }
83    /// ```
84    pub fn builder() -> super::builder::memorystore::ClientBuilder {
85        crate::new_client_builder(super::builder::memorystore::client::Factory)
86    }
87
88    /// Creates a new client from the provided stub.
89    ///
90    /// The most common case for calling this function is in tests mocking the
91    /// client's behavior.
92    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
93    where
94        T: super::stub::Memorystore + 'static,
95    {
96        Self { inner: stub.into() }
97    }
98
99    pub(crate) async fn new(
100        config: gaxi::options::ClientConfig,
101    ) -> crate::ClientBuilderResult<Self> {
102        let inner = Self::build_inner(config).await?;
103        Ok(Self { inner })
104    }
105
106    async fn build_inner(
107        conf: gaxi::options::ClientConfig,
108    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::Memorystore>> {
109        if gaxi::options::tracing_enabled(&conf) {
110            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
111        }
112        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
113    }
114
115    async fn build_transport(
116        conf: gaxi::options::ClientConfig,
117    ) -> crate::ClientBuilderResult<impl super::stub::Memorystore> {
118        super::transport::Memorystore::new(conf).await
119    }
120
121    async fn build_with_tracing(
122        conf: gaxi::options::ClientConfig,
123    ) -> crate::ClientBuilderResult<impl super::stub::Memorystore> {
124        Self::build_transport(conf)
125            .await
126            .map(super::tracing::Memorystore::new)
127    }
128
129    /// Lists Instances in a given project and location.
130    ///
131    /// # Example
132    /// ```
133    /// # use google_cloud_memorystore_v1::client::Memorystore;
134    /// use google_cloud_gax::paginator::ItemPaginator as _;
135    /// use google_cloud_memorystore_v1::Result;
136    /// async fn sample(
137    ///    client: &Memorystore, project_id: &str, location_id: &str
138    /// ) -> Result<()> {
139    ///     let mut list = client.list_instances()
140    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}"))
141    ///         .by_item();
142    ///     while let Some(item) = list.next().await.transpose()? {
143    ///         println!("{:?}", item);
144    ///     }
145    ///     Ok(())
146    /// }
147    /// ```
148    pub fn list_instances(&self) -> super::builder::memorystore::ListInstances {
149        super::builder::memorystore::ListInstances::new(self.inner.clone())
150    }
151
152    /// Gets details of a single Instance.
153    ///
154    /// # Example
155    /// ```
156    /// # use google_cloud_memorystore_v1::client::Memorystore;
157    /// use google_cloud_memorystore_v1::Result;
158    /// async fn sample(
159    ///    client: &Memorystore, project_id: &str, location_id: &str, instance_id: &str
160    /// ) -> Result<()> {
161    ///     let response = client.get_instance()
162    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"))
163    ///         .send().await?;
164    ///     println!("response {:?}", response);
165    ///     Ok(())
166    /// }
167    /// ```
168    pub fn get_instance(&self) -> super::builder::memorystore::GetInstance {
169        super::builder::memorystore::GetInstance::new(self.inner.clone())
170    }
171
172    /// Creates a new Instance in a given project and location.
173    ///
174    /// # Long running operations
175    ///
176    /// This method is used to start, and/or poll a [long-running Operation].
177    /// The [Working with long-running operations] chapter in the [user guide]
178    /// covers these operations in detail.
179    ///
180    /// [long-running operation]: https://google.aip.dev/151
181    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
182    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
183    ///
184    /// # Example
185    /// ```
186    /// # use google_cloud_memorystore_v1::client::Memorystore;
187    /// use google_cloud_lro::Poller;
188    /// use google_cloud_memorystore_v1::model::Instance;
189    /// use google_cloud_memorystore_v1::Result;
190    /// async fn sample(
191    ///    client: &Memorystore, project_id: &str, location_id: &str
192    /// ) -> Result<()> {
193    ///     let response = client.create_instance()
194    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}"))
195    ///         .set_instance_id("instance_id_value")
196    ///         .set_instance(
197    ///             Instance::new()/* set fields */
198    ///         )
199    ///         .poller().until_done().await?;
200    ///     println!("response {:?}", response);
201    ///     Ok(())
202    /// }
203    /// ```
204    pub fn create_instance(&self) -> super::builder::memorystore::CreateInstance {
205        super::builder::memorystore::CreateInstance::new(self.inner.clone())
206    }
207
208    /// Updates the parameters of a single Instance.
209    ///
210    /// # Long running operations
211    ///
212    /// This method is used to start, and/or poll a [long-running Operation].
213    /// The [Working with long-running operations] chapter in the [user guide]
214    /// covers these operations in detail.
215    ///
216    /// [long-running operation]: https://google.aip.dev/151
217    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
218    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
219    ///
220    /// # Example
221    /// ```
222    /// # use google_cloud_memorystore_v1::client::Memorystore;
223    /// use google_cloud_lro::Poller;
224    /// # extern crate wkt as google_cloud_wkt;
225    /// use google_cloud_wkt::FieldMask;
226    /// use google_cloud_memorystore_v1::model::Instance;
227    /// use google_cloud_memorystore_v1::Result;
228    /// async fn sample(
229    ///    client: &Memorystore, project_id: &str, location_id: &str, instance_id: &str
230    /// ) -> Result<()> {
231    ///     let response = client.update_instance()
232    ///         .set_instance(
233    ///             Instance::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"))/* set fields */
234    ///         )
235    ///         .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
236    ///         .poller().until_done().await?;
237    ///     println!("response {:?}", response);
238    ///     Ok(())
239    /// }
240    /// ```
241    pub fn update_instance(&self) -> super::builder::memorystore::UpdateInstance {
242        super::builder::memorystore::UpdateInstance::new(self.inner.clone())
243    }
244
245    /// Deletes a single Instance.
246    ///
247    /// # Long running operations
248    ///
249    /// This method is used to start, and/or poll a [long-running Operation].
250    /// The [Working with long-running operations] chapter in the [user guide]
251    /// covers these operations in detail.
252    ///
253    /// [long-running operation]: https://google.aip.dev/151
254    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
255    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
256    ///
257    /// # Example
258    /// ```
259    /// # use google_cloud_memorystore_v1::client::Memorystore;
260    /// use google_cloud_lro::Poller;
261    /// use google_cloud_memorystore_v1::Result;
262    /// async fn sample(
263    ///    client: &Memorystore, project_id: &str, location_id: &str, instance_id: &str
264    /// ) -> Result<()> {
265    ///     client.delete_instance()
266    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"))
267    ///         .poller().until_done().await?;
268    ///     Ok(())
269    /// }
270    /// ```
271    pub fn delete_instance(&self) -> super::builder::memorystore::DeleteInstance {
272        super::builder::memorystore::DeleteInstance::new(self.inner.clone())
273    }
274
275    /// Gets details about the certificate authority for an Instance.
276    ///
277    /// # Example
278    /// ```
279    /// # use google_cloud_memorystore_v1::client::Memorystore;
280    /// use google_cloud_memorystore_v1::Result;
281    /// async fn sample(
282    ///    client: &Memorystore
283    /// ) -> Result<()> {
284    ///     let response = client.get_certificate_authority()
285    ///         /* set fields */
286    ///         .send().await?;
287    ///     println!("response {:?}", response);
288    ///     Ok(())
289    /// }
290    /// ```
291    pub fn get_certificate_authority(
292        &self,
293    ) -> super::builder::memorystore::GetCertificateAuthority {
294        super::builder::memorystore::GetCertificateAuthority::new(self.inner.clone())
295    }
296
297    /// Gets the details of shared regional certificate authority information for
298    /// Memorystore instance.
299    ///
300    /// # Example
301    /// ```
302    /// # use google_cloud_memorystore_v1::client::Memorystore;
303    /// use google_cloud_memorystore_v1::Result;
304    /// async fn sample(
305    ///    client: &Memorystore, project_id: &str, location_id: &str
306    /// ) -> Result<()> {
307    ///     let response = client.get_shared_regional_certificate_authority()
308    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/sharedRegionalCertificateAuthority"))
309    ///         .send().await?;
310    ///     println!("response {:?}", response);
311    ///     Ok(())
312    /// }
313    /// ```
314    pub fn get_shared_regional_certificate_authority(
315        &self,
316    ) -> super::builder::memorystore::GetSharedRegionalCertificateAuthority {
317        super::builder::memorystore::GetSharedRegionalCertificateAuthority::new(self.inner.clone())
318    }
319
320    /// Reschedules upcoming maintenance event.
321    ///
322    /// # Long running operations
323    ///
324    /// This method is used to start, and/or poll a [long-running Operation].
325    /// The [Working with long-running operations] chapter in the [user guide]
326    /// covers these operations in detail.
327    ///
328    /// [long-running operation]: https://google.aip.dev/151
329    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
330    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
331    ///
332    /// # Example
333    /// ```
334    /// # use google_cloud_memorystore_v1::client::Memorystore;
335    /// use google_cloud_lro::Poller;
336    /// use google_cloud_memorystore_v1::Result;
337    /// async fn sample(
338    ///    client: &Memorystore
339    /// ) -> Result<()> {
340    ///     let response = client.reschedule_maintenance()
341    ///         /* set fields */
342    ///         .poller().until_done().await?;
343    ///     println!("response {:?}", response);
344    ///     Ok(())
345    /// }
346    /// ```
347    pub fn reschedule_maintenance(&self) -> super::builder::memorystore::RescheduleMaintenance {
348        super::builder::memorystore::RescheduleMaintenance::new(self.inner.clone())
349    }
350
351    /// Lists all backup collections owned by a consumer project in either the
352    /// specified location (region) or all locations.
353    ///
354    /// If `location_id` is specified as `-` (wildcard), then all regions
355    /// available to the project are queried, and the results are aggregated.
356    ///
357    /// # Example
358    /// ```
359    /// # use google_cloud_memorystore_v1::client::Memorystore;
360    /// use google_cloud_gax::paginator::ItemPaginator as _;
361    /// use google_cloud_memorystore_v1::Result;
362    /// async fn sample(
363    ///    client: &Memorystore, project_id: &str, location_id: &str
364    /// ) -> Result<()> {
365    ///     let mut list = client.list_backup_collections()
366    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}"))
367    ///         .by_item();
368    ///     while let Some(item) = list.next().await.transpose()? {
369    ///         println!("{:?}", item);
370    ///     }
371    ///     Ok(())
372    /// }
373    /// ```
374    pub fn list_backup_collections(&self) -> super::builder::memorystore::ListBackupCollections {
375        super::builder::memorystore::ListBackupCollections::new(self.inner.clone())
376    }
377
378    /// Get a backup collection.
379    ///
380    /// # Example
381    /// ```
382    /// # use google_cloud_memorystore_v1::client::Memorystore;
383    /// use google_cloud_memorystore_v1::Result;
384    /// async fn sample(
385    ///    client: &Memorystore, project_id: &str, location_id: &str, backup_collection_id: &str
386    /// ) -> Result<()> {
387    ///     let response = client.get_backup_collection()
388    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}"))
389    ///         .send().await?;
390    ///     println!("response {:?}", response);
391    ///     Ok(())
392    /// }
393    /// ```
394    pub fn get_backup_collection(&self) -> super::builder::memorystore::GetBackupCollection {
395        super::builder::memorystore::GetBackupCollection::new(self.inner.clone())
396    }
397
398    /// Lists all backups owned by a backup collection.
399    ///
400    /// # Example
401    /// ```
402    /// # use google_cloud_memorystore_v1::client::Memorystore;
403    /// use google_cloud_gax::paginator::ItemPaginator as _;
404    /// use google_cloud_memorystore_v1::Result;
405    /// async fn sample(
406    ///    client: &Memorystore, project_id: &str, location_id: &str, backup_collection_id: &str
407    /// ) -> Result<()> {
408    ///     let mut list = client.list_backups()
409    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}"))
410    ///         .by_item();
411    ///     while let Some(item) = list.next().await.transpose()? {
412    ///         println!("{:?}", item);
413    ///     }
414    ///     Ok(())
415    /// }
416    /// ```
417    pub fn list_backups(&self) -> super::builder::memorystore::ListBackups {
418        super::builder::memorystore::ListBackups::new(self.inner.clone())
419    }
420
421    /// Gets the details of a specific backup.
422    ///
423    /// # Example
424    /// ```
425    /// # use google_cloud_memorystore_v1::client::Memorystore;
426    /// use google_cloud_memorystore_v1::Result;
427    /// async fn sample(
428    ///    client: &Memorystore, project_id: &str, location_id: &str, backup_collection_id: &str, backup_id: &str
429    /// ) -> Result<()> {
430    ///     let response = client.get_backup()
431    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}"))
432    ///         .send().await?;
433    ///     println!("response {:?}", response);
434    ///     Ok(())
435    /// }
436    /// ```
437    pub fn get_backup(&self) -> super::builder::memorystore::GetBackup {
438        super::builder::memorystore::GetBackup::new(self.inner.clone())
439    }
440
441    /// Deletes a specific backup.
442    ///
443    /// # Long running operations
444    ///
445    /// This method is used to start, and/or poll a [long-running Operation].
446    /// The [Working with long-running operations] chapter in the [user guide]
447    /// covers these operations in detail.
448    ///
449    /// [long-running operation]: https://google.aip.dev/151
450    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
451    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
452    ///
453    /// # Example
454    /// ```
455    /// # use google_cloud_memorystore_v1::client::Memorystore;
456    /// use google_cloud_lro::Poller;
457    /// use google_cloud_memorystore_v1::Result;
458    /// async fn sample(
459    ///    client: &Memorystore, project_id: &str, location_id: &str, backup_collection_id: &str, backup_id: &str
460    /// ) -> Result<()> {
461    ///     client.delete_backup()
462    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}"))
463    ///         .poller().until_done().await?;
464    ///     Ok(())
465    /// }
466    /// ```
467    pub fn delete_backup(&self) -> super::builder::memorystore::DeleteBackup {
468        super::builder::memorystore::DeleteBackup::new(self.inner.clone())
469    }
470
471    /// Exports a specific backup to a customer target Cloud Storage URI.
472    ///
473    /// # Long running operations
474    ///
475    /// This method is used to start, and/or poll a [long-running Operation].
476    /// The [Working with long-running operations] chapter in the [user guide]
477    /// covers these operations in detail.
478    ///
479    /// [long-running operation]: https://google.aip.dev/151
480    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
481    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
482    ///
483    /// # Example
484    /// ```
485    /// # use google_cloud_memorystore_v1::client::Memorystore;
486    /// use google_cloud_lro::Poller;
487    /// use google_cloud_memorystore_v1::Result;
488    /// async fn sample(
489    ///    client: &Memorystore
490    /// ) -> Result<()> {
491    ///     let response = client.export_backup()
492    ///         /* set fields */
493    ///         .poller().until_done().await?;
494    ///     println!("response {:?}", response);
495    ///     Ok(())
496    /// }
497    /// ```
498    pub fn export_backup(&self) -> super::builder::memorystore::ExportBackup {
499        super::builder::memorystore::ExportBackup::new(self.inner.clone())
500    }
501
502    /// Backup Instance.
503    /// If this is the first time a backup is being created, a backup collection
504    /// will be created at the backend, and this backup belongs to this collection.
505    /// Both collection and backup will have a resource name. Backup will be
506    /// executed for each shard. A replica (primary if nonHA) will be selected to
507    /// perform the execution. Backup call will be rejected if there is an ongoing
508    /// backup or update operation. Be aware that during preview, if the instance's
509    /// internal software version is too old, critical update will be performed
510    /// before actual backup. Once the internal software version is updated to the
511    /// minimum version required by the backup feature, subsequent backups will not
512    /// require critical update. After preview, there will be no critical update
513    /// needed for backup.
514    ///
515    /// # Long running operations
516    ///
517    /// This method is used to start, and/or poll a [long-running Operation].
518    /// The [Working with long-running operations] chapter in the [user guide]
519    /// covers these operations in detail.
520    ///
521    /// [long-running operation]: https://google.aip.dev/151
522    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
523    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
524    ///
525    /// # Example
526    /// ```
527    /// # use google_cloud_memorystore_v1::client::Memorystore;
528    /// use google_cloud_lro::Poller;
529    /// use google_cloud_memorystore_v1::Result;
530    /// async fn sample(
531    ///    client: &Memorystore
532    /// ) -> Result<()> {
533    ///     let response = client.backup_instance()
534    ///         /* set fields */
535    ///         .poller().until_done().await?;
536    ///     println!("response {:?}", response);
537    ///     Ok(())
538    /// }
539    /// ```
540    pub fn backup_instance(&self) -> super::builder::memorystore::BackupInstance {
541        super::builder::memorystore::BackupInstance::new(self.inner.clone())
542    }
543
544    /// Lists information about the supported locations for this service.
545    ///
546    /// # Example
547    /// ```
548    /// # use google_cloud_memorystore_v1::client::Memorystore;
549    /// use google_cloud_gax::paginator::ItemPaginator as _;
550    /// use google_cloud_memorystore_v1::Result;
551    /// async fn sample(
552    ///    client: &Memorystore
553    /// ) -> Result<()> {
554    ///     let mut list = client.list_locations()
555    ///         /* set fields */
556    ///         .by_item();
557    ///     while let Some(item) = list.next().await.transpose()? {
558    ///         println!("{:?}", item);
559    ///     }
560    ///     Ok(())
561    /// }
562    /// ```
563    pub fn list_locations(&self) -> super::builder::memorystore::ListLocations {
564        super::builder::memorystore::ListLocations::new(self.inner.clone())
565    }
566
567    /// Gets information about a location.
568    ///
569    /// # Example
570    /// ```
571    /// # use google_cloud_memorystore_v1::client::Memorystore;
572    /// use google_cloud_memorystore_v1::Result;
573    /// async fn sample(
574    ///    client: &Memorystore
575    /// ) -> Result<()> {
576    ///     let response = client.get_location()
577    ///         /* set fields */
578    ///         .send().await?;
579    ///     println!("response {:?}", response);
580    ///     Ok(())
581    /// }
582    /// ```
583    pub fn get_location(&self) -> super::builder::memorystore::GetLocation {
584        super::builder::memorystore::GetLocation::new(self.inner.clone())
585    }
586
587    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
588    ///
589    /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
590    ///
591    /// # Example
592    /// ```
593    /// # use google_cloud_memorystore_v1::client::Memorystore;
594    /// use google_cloud_gax::paginator::ItemPaginator as _;
595    /// use google_cloud_memorystore_v1::Result;
596    /// async fn sample(
597    ///    client: &Memorystore
598    /// ) -> Result<()> {
599    ///     let mut list = client.list_operations()
600    ///         /* set fields */
601    ///         .by_item();
602    ///     while let Some(item) = list.next().await.transpose()? {
603    ///         println!("{:?}", item);
604    ///     }
605    ///     Ok(())
606    /// }
607    /// ```
608    pub fn list_operations(&self) -> super::builder::memorystore::ListOperations {
609        super::builder::memorystore::ListOperations::new(self.inner.clone())
610    }
611
612    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
613    ///
614    /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
615    ///
616    /// # Example
617    /// ```
618    /// # use google_cloud_memorystore_v1::client::Memorystore;
619    /// use google_cloud_memorystore_v1::Result;
620    /// async fn sample(
621    ///    client: &Memorystore
622    /// ) -> Result<()> {
623    ///     let response = client.get_operation()
624    ///         /* set fields */
625    ///         .send().await?;
626    ///     println!("response {:?}", response);
627    ///     Ok(())
628    /// }
629    /// ```
630    pub fn get_operation(&self) -> super::builder::memorystore::GetOperation {
631        super::builder::memorystore::GetOperation::new(self.inner.clone())
632    }
633
634    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
635    ///
636    /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
637    ///
638    /// # Example
639    /// ```
640    /// # use google_cloud_memorystore_v1::client::Memorystore;
641    /// use google_cloud_memorystore_v1::Result;
642    /// async fn sample(
643    ///    client: &Memorystore
644    /// ) -> Result<()> {
645    ///     client.delete_operation()
646    ///         /* set fields */
647    ///         .send().await?;
648    ///     Ok(())
649    /// }
650    /// ```
651    pub fn delete_operation(&self) -> super::builder::memorystore::DeleteOperation {
652        super::builder::memorystore::DeleteOperation::new(self.inner.clone())
653    }
654
655    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
656    ///
657    /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
658    ///
659    /// # Example
660    /// ```
661    /// # use google_cloud_memorystore_v1::client::Memorystore;
662    /// use google_cloud_memorystore_v1::Result;
663    /// async fn sample(
664    ///    client: &Memorystore
665    /// ) -> Result<()> {
666    ///     client.cancel_operation()
667    ///         /* set fields */
668    ///         .send().await?;
669    ///     Ok(())
670    /// }
671    /// ```
672    pub fn cancel_operation(&self) -> super::builder::memorystore::CancelOperation {
673        super::builder::memorystore::CancelOperation::new(self.inner.clone())
674    }
675}