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