Skip to main content

google_cloud_netapp_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 NetApp API.
20///
21/// # Example
22/// ```
23/// # use google_cloud_netapp_v1::client::NetApp;
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 = NetApp::builder().build().await?;
30///     let mut list = client.list_storage_pools()
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/// NetApp Files Google Cloud Service
43///
44/// # Configuration
45///
46/// To configure `NetApp` use the `with_*` methods in the type returned
47/// by [builder()][NetApp::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://netapp.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::net_app::ClientBuilder::with_endpoint
60/// [with_credentials()]: super::builder::net_app::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/// `NetApp` holds a connection pool internally, it is advised to
67/// create one and reuse it. You do not need to wrap `NetApp` 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 NetApp {
72    inner: std::sync::Arc<dyn super::stub::dynamic::NetApp>,
73}
74
75impl NetApp {
76    /// Returns a builder for [NetApp].
77    ///
78    /// ```
79    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
80    /// # use google_cloud_netapp_v1::client::NetApp;
81    /// let client = NetApp::builder().build().await?;
82    /// # Ok(()) }
83    /// ```
84    pub fn builder() -> super::builder::net_app::ClientBuilder {
85        crate::new_client_builder(super::builder::net_app::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::NetApp + '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::NetApp>> {
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::NetApp> {
118        super::transport::NetApp::new(conf).await
119    }
120
121    async fn build_with_tracing(
122        conf: gaxi::options::ClientConfig,
123    ) -> crate::ClientBuilderResult<impl super::stub::NetApp> {
124        Self::build_transport(conf)
125            .await
126            .map(super::tracing::NetApp::new)
127    }
128
129    /// Returns descriptions of all storage pools owned by the caller.
130    ///
131    /// # Example
132    /// ```
133    /// # use google_cloud_netapp_v1::client::NetApp;
134    /// use google_cloud_gax::paginator::ItemPaginator as _;
135    /// use google_cloud_netapp_v1::Result;
136    /// async fn sample(
137    ///    client: &NetApp, project_id: &str, location_id: &str
138    /// ) -> Result<()> {
139    ///     let mut list = client.list_storage_pools()
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_storage_pools(&self) -> super::builder::net_app::ListStoragePools {
149        super::builder::net_app::ListStoragePools::new(self.inner.clone())
150    }
151
152    /// Creates a new storage pool.
153    ///
154    /// # Long running operations
155    ///
156    /// This method is used to start, and/or poll a [long-running Operation].
157    /// The [Working with long-running operations] chapter in the [user guide]
158    /// covers these operations in detail.
159    ///
160    /// [long-running operation]: https://google.aip.dev/151
161    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
162    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
163    ///
164    /// # Example
165    /// ```
166    /// # use google_cloud_netapp_v1::client::NetApp;
167    /// use google_cloud_lro::Poller;
168    /// use google_cloud_netapp_v1::model::StoragePool;
169    /// use google_cloud_netapp_v1::Result;
170    /// async fn sample(
171    ///    client: &NetApp, project_id: &str, location_id: &str
172    /// ) -> Result<()> {
173    ///     let response = client.create_storage_pool()
174    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}"))
175    ///         .set_storage_pool(
176    ///             StoragePool::new()/* set fields */
177    ///         )
178    ///         .poller().until_done().await?;
179    ///     println!("response {:?}", response);
180    ///     Ok(())
181    /// }
182    /// ```
183    pub fn create_storage_pool(&self) -> super::builder::net_app::CreateStoragePool {
184        super::builder::net_app::CreateStoragePool::new(self.inner.clone())
185    }
186
187    /// Returns the description of the specified storage pool by poolId.
188    ///
189    /// # Example
190    /// ```
191    /// # use google_cloud_netapp_v1::client::NetApp;
192    /// use google_cloud_netapp_v1::Result;
193    /// async fn sample(
194    ///    client: &NetApp, project_id: &str, location_id: &str, storage_pool_id: &str
195    /// ) -> Result<()> {
196    ///     let response = client.get_storage_pool()
197    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/storagePools/{storage_pool_id}"))
198    ///         .send().await?;
199    ///     println!("response {:?}", response);
200    ///     Ok(())
201    /// }
202    /// ```
203    pub fn get_storage_pool(&self) -> super::builder::net_app::GetStoragePool {
204        super::builder::net_app::GetStoragePool::new(self.inner.clone())
205    }
206
207    /// Updates the storage pool properties with the full spec
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_netapp_v1::client::NetApp;
222    /// use google_cloud_lro::Poller;
223    /// # extern crate wkt as google_cloud_wkt;
224    /// use google_cloud_wkt::FieldMask;
225    /// use google_cloud_netapp_v1::model::StoragePool;
226    /// use google_cloud_netapp_v1::Result;
227    /// async fn sample(
228    ///    client: &NetApp, project_id: &str, location_id: &str, storage_pool_id: &str
229    /// ) -> Result<()> {
230    ///     let response = client.update_storage_pool()
231    ///         .set_storage_pool(
232    ///             StoragePool::new().set_name(format!("projects/{project_id}/locations/{location_id}/storagePools/{storage_pool_id}"))/* 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_storage_pool(&self) -> super::builder::net_app::UpdateStoragePool {
241        super::builder::net_app::UpdateStoragePool::new(self.inner.clone())
242    }
243
244    /// Warning! This operation will permanently delete the storage pool.
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_netapp_v1::client::NetApp;
259    /// use google_cloud_lro::Poller;
260    /// use google_cloud_netapp_v1::Result;
261    /// async fn sample(
262    ///    client: &NetApp, project_id: &str, location_id: &str, storage_pool_id: &str
263    /// ) -> Result<()> {
264    ///     client.delete_storage_pool()
265    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/storagePools/{storage_pool_id}"))
266    ///         .poller().until_done().await?;
267    ///     Ok(())
268    /// }
269    /// ```
270    pub fn delete_storage_pool(&self) -> super::builder::net_app::DeleteStoragePool {
271        super::builder::net_app::DeleteStoragePool::new(self.inner.clone())
272    }
273
274    /// ValidateDirectoryService does a connectivity check for a directory service
275    /// policy attached to the storage pool.
276    ///
277    /// # Long running operations
278    ///
279    /// This method is used to start, and/or poll a [long-running Operation].
280    /// The [Working with long-running operations] chapter in the [user guide]
281    /// covers these operations in detail.
282    ///
283    /// [long-running operation]: https://google.aip.dev/151
284    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
285    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
286    ///
287    /// # Example
288    /// ```
289    /// # use google_cloud_netapp_v1::client::NetApp;
290    /// use google_cloud_lro::Poller;
291    /// use google_cloud_netapp_v1::Result;
292    /// async fn sample(
293    ///    client: &NetApp
294    /// ) -> Result<()> {
295    ///     client.validate_directory_service()
296    ///         /* set fields */
297    ///         .poller().until_done().await?;
298    ///     Ok(())
299    /// }
300    /// ```
301    pub fn validate_directory_service(&self) -> super::builder::net_app::ValidateDirectoryService {
302        super::builder::net_app::ValidateDirectoryService::new(self.inner.clone())
303    }
304
305    /// This operation will switch the active/replica zone for a regional
306    /// storagePool.
307    ///
308    /// # Long running operations
309    ///
310    /// This method is used to start, and/or poll a [long-running Operation].
311    /// The [Working with long-running operations] chapter in the [user guide]
312    /// covers these operations in detail.
313    ///
314    /// [long-running operation]: https://google.aip.dev/151
315    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
316    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
317    ///
318    /// # Example
319    /// ```
320    /// # use google_cloud_netapp_v1::client::NetApp;
321    /// use google_cloud_lro::Poller;
322    /// use google_cloud_netapp_v1::Result;
323    /// async fn sample(
324    ///    client: &NetApp
325    /// ) -> Result<()> {
326    ///     let response = client.switch_active_replica_zone()
327    ///         /* set fields */
328    ///         .poller().until_done().await?;
329    ///     println!("response {:?}", response);
330    ///     Ok(())
331    /// }
332    /// ```
333    pub fn switch_active_replica_zone(&self) -> super::builder::net_app::SwitchActiveReplicaZone {
334        super::builder::net_app::SwitchActiveReplicaZone::new(self.inner.clone())
335    }
336
337    /// Lists Volumes in a given project.
338    ///
339    /// # Example
340    /// ```
341    /// # use google_cloud_netapp_v1::client::NetApp;
342    /// use google_cloud_gax::paginator::ItemPaginator as _;
343    /// use google_cloud_netapp_v1::Result;
344    /// async fn sample(
345    ///    client: &NetApp, project_id: &str, location_id: &str
346    /// ) -> Result<()> {
347    ///     let mut list = client.list_volumes()
348    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}"))
349    ///         .by_item();
350    ///     while let Some(item) = list.next().await.transpose()? {
351    ///         println!("{:?}", item);
352    ///     }
353    ///     Ok(())
354    /// }
355    /// ```
356    pub fn list_volumes(&self) -> super::builder::net_app::ListVolumes {
357        super::builder::net_app::ListVolumes::new(self.inner.clone())
358    }
359
360    /// Gets details of a single Volume.
361    ///
362    /// # Example
363    /// ```
364    /// # use google_cloud_netapp_v1::client::NetApp;
365    /// use google_cloud_netapp_v1::Result;
366    /// async fn sample(
367    ///    client: &NetApp, project_id: &str, location_id: &str, volume_id: &str
368    /// ) -> Result<()> {
369    ///     let response = client.get_volume()
370    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/volumes/{volume_id}"))
371    ///         .send().await?;
372    ///     println!("response {:?}", response);
373    ///     Ok(())
374    /// }
375    /// ```
376    pub fn get_volume(&self) -> super::builder::net_app::GetVolume {
377        super::builder::net_app::GetVolume::new(self.inner.clone())
378    }
379
380    /// Creates a new Volume in a given project and location.
381    ///
382    /// # Long running operations
383    ///
384    /// This method is used to start, and/or poll a [long-running Operation].
385    /// The [Working with long-running operations] chapter in the [user guide]
386    /// covers these operations in detail.
387    ///
388    /// [long-running operation]: https://google.aip.dev/151
389    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
390    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
391    ///
392    /// # Example
393    /// ```
394    /// # use google_cloud_netapp_v1::client::NetApp;
395    /// use google_cloud_lro::Poller;
396    /// use google_cloud_netapp_v1::model::Volume;
397    /// use google_cloud_netapp_v1::Result;
398    /// async fn sample(
399    ///    client: &NetApp, project_id: &str, location_id: &str
400    /// ) -> Result<()> {
401    ///     let response = client.create_volume()
402    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}"))
403    ///         .set_volume_id("volume_id_value")
404    ///         .set_volume(
405    ///             Volume::new()/* set fields */
406    ///         )
407    ///         .poller().until_done().await?;
408    ///     println!("response {:?}", response);
409    ///     Ok(())
410    /// }
411    /// ```
412    pub fn create_volume(&self) -> super::builder::net_app::CreateVolume {
413        super::builder::net_app::CreateVolume::new(self.inner.clone())
414    }
415
416    /// Updates the parameters of a single Volume.
417    ///
418    /// # Long running operations
419    ///
420    /// This method is used to start, and/or poll a [long-running Operation].
421    /// The [Working with long-running operations] chapter in the [user guide]
422    /// covers these operations in detail.
423    ///
424    /// [long-running operation]: https://google.aip.dev/151
425    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
426    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
427    ///
428    /// # Example
429    /// ```
430    /// # use google_cloud_netapp_v1::client::NetApp;
431    /// use google_cloud_lro::Poller;
432    /// # extern crate wkt as google_cloud_wkt;
433    /// use google_cloud_wkt::FieldMask;
434    /// use google_cloud_netapp_v1::model::Volume;
435    /// use google_cloud_netapp_v1::Result;
436    /// async fn sample(
437    ///    client: &NetApp, project_id: &str, location_id: &str, volume_id: &str
438    /// ) -> Result<()> {
439    ///     let response = client.update_volume()
440    ///         .set_volume(
441    ///             Volume::new().set_name(format!("projects/{project_id}/locations/{location_id}/volumes/{volume_id}"))/* set fields */
442    ///         )
443    ///         .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
444    ///         .poller().until_done().await?;
445    ///     println!("response {:?}", response);
446    ///     Ok(())
447    /// }
448    /// ```
449    pub fn update_volume(&self) -> super::builder::net_app::UpdateVolume {
450        super::builder::net_app::UpdateVolume::new(self.inner.clone())
451    }
452
453    /// Deletes a single Volume.
454    ///
455    /// # Long running operations
456    ///
457    /// This method is used to start, and/or poll a [long-running Operation].
458    /// The [Working with long-running operations] chapter in the [user guide]
459    /// covers these operations in detail.
460    ///
461    /// [long-running operation]: https://google.aip.dev/151
462    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
463    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
464    ///
465    /// # Example
466    /// ```
467    /// # use google_cloud_netapp_v1::client::NetApp;
468    /// use google_cloud_lro::Poller;
469    /// use google_cloud_netapp_v1::Result;
470    /// async fn sample(
471    ///    client: &NetApp, project_id: &str, location_id: &str, volume_id: &str
472    /// ) -> Result<()> {
473    ///     client.delete_volume()
474    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/volumes/{volume_id}"))
475    ///         .poller().until_done().await?;
476    ///     Ok(())
477    /// }
478    /// ```
479    pub fn delete_volume(&self) -> super::builder::net_app::DeleteVolume {
480        super::builder::net_app::DeleteVolume::new(self.inner.clone())
481    }
482
483    /// Revert an existing volume to a specified snapshot.
484    /// Warning! This operation will permanently revert all changes made after the
485    /// snapshot was created.
486    ///
487    /// # Long running operations
488    ///
489    /// This method is used to start, and/or poll a [long-running Operation].
490    /// The [Working with long-running operations] chapter in the [user guide]
491    /// covers these operations in detail.
492    ///
493    /// [long-running operation]: https://google.aip.dev/151
494    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
495    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
496    ///
497    /// # Example
498    /// ```
499    /// # use google_cloud_netapp_v1::client::NetApp;
500    /// use google_cloud_lro::Poller;
501    /// use google_cloud_netapp_v1::Result;
502    /// async fn sample(
503    ///    client: &NetApp
504    /// ) -> Result<()> {
505    ///     let response = client.revert_volume()
506    ///         /* set fields */
507    ///         .poller().until_done().await?;
508    ///     println!("response {:?}", response);
509    ///     Ok(())
510    /// }
511    /// ```
512    pub fn revert_volume(&self) -> super::builder::net_app::RevertVolume {
513        super::builder::net_app::RevertVolume::new(self.inner.clone())
514    }
515
516    /// Establish volume peering. This is used to establish cluster and svm
517    /// peerings between the GCNV and OnPrem clusters.
518    ///
519    /// # Long running operations
520    ///
521    /// This method is used to start, and/or poll a [long-running Operation].
522    /// The [Working with long-running operations] chapter in the [user guide]
523    /// covers these operations in detail.
524    ///
525    /// [long-running operation]: https://google.aip.dev/151
526    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
527    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
528    ///
529    /// # Example
530    /// ```
531    /// # use google_cloud_netapp_v1::client::NetApp;
532    /// use google_cloud_lro::Poller;
533    /// use google_cloud_netapp_v1::Result;
534    /// async fn sample(
535    ///    client: &NetApp
536    /// ) -> Result<()> {
537    ///     let response = client.establish_volume_peering()
538    ///         /* set fields */
539    ///         .poller().until_done().await?;
540    ///     println!("response {:?}", response);
541    ///     Ok(())
542    /// }
543    /// ```
544    pub fn establish_volume_peering(&self) -> super::builder::net_app::EstablishVolumePeering {
545        super::builder::net_app::EstablishVolumePeering::new(self.inner.clone())
546    }
547
548    /// Returns descriptions of all snapshots for a volume.
549    ///
550    /// # Example
551    /// ```
552    /// # use google_cloud_netapp_v1::client::NetApp;
553    /// use google_cloud_gax::paginator::ItemPaginator as _;
554    /// use google_cloud_netapp_v1::Result;
555    /// async fn sample(
556    ///    client: &NetApp, project_id: &str, location_id: &str, volume_id: &str
557    /// ) -> Result<()> {
558    ///     let mut list = client.list_snapshots()
559    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}/volumes/{volume_id}"))
560    ///         .by_item();
561    ///     while let Some(item) = list.next().await.transpose()? {
562    ///         println!("{:?}", item);
563    ///     }
564    ///     Ok(())
565    /// }
566    /// ```
567    pub fn list_snapshots(&self) -> super::builder::net_app::ListSnapshots {
568        super::builder::net_app::ListSnapshots::new(self.inner.clone())
569    }
570
571    /// Describe a snapshot for a volume.
572    ///
573    /// # Example
574    /// ```
575    /// # use google_cloud_netapp_v1::client::NetApp;
576    /// use google_cloud_netapp_v1::Result;
577    /// async fn sample(
578    ///    client: &NetApp, project_id: &str, location_id: &str, volume_id: &str, snapshot_id: &str
579    /// ) -> Result<()> {
580    ///     let response = client.get_snapshot()
581    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/volumes/{volume_id}/snapshots/{snapshot_id}"))
582    ///         .send().await?;
583    ///     println!("response {:?}", response);
584    ///     Ok(())
585    /// }
586    /// ```
587    pub fn get_snapshot(&self) -> super::builder::net_app::GetSnapshot {
588        super::builder::net_app::GetSnapshot::new(self.inner.clone())
589    }
590
591    /// Create a new snapshot for a volume.
592    ///
593    /// # Long running operations
594    ///
595    /// This method is used to start, and/or poll a [long-running Operation].
596    /// The [Working with long-running operations] chapter in the [user guide]
597    /// covers these operations in detail.
598    ///
599    /// [long-running operation]: https://google.aip.dev/151
600    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
601    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
602    ///
603    /// # Example
604    /// ```
605    /// # use google_cloud_netapp_v1::client::NetApp;
606    /// use google_cloud_lro::Poller;
607    /// use google_cloud_netapp_v1::model::Snapshot;
608    /// use google_cloud_netapp_v1::Result;
609    /// async fn sample(
610    ///    client: &NetApp, project_id: &str, location_id: &str, volume_id: &str
611    /// ) -> Result<()> {
612    ///     let response = client.create_snapshot()
613    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}/volumes/{volume_id}"))
614    ///         .set_snapshot_id("snapshot_id_value")
615    ///         .set_snapshot(
616    ///             Snapshot::new()/* set fields */
617    ///         )
618    ///         .poller().until_done().await?;
619    ///     println!("response {:?}", response);
620    ///     Ok(())
621    /// }
622    /// ```
623    pub fn create_snapshot(&self) -> super::builder::net_app::CreateSnapshot {
624        super::builder::net_app::CreateSnapshot::new(self.inner.clone())
625    }
626
627    /// Deletes a snapshot.
628    ///
629    /// # Long running operations
630    ///
631    /// This method is used to start, and/or poll a [long-running Operation].
632    /// The [Working with long-running operations] chapter in the [user guide]
633    /// covers these operations in detail.
634    ///
635    /// [long-running operation]: https://google.aip.dev/151
636    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
637    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
638    ///
639    /// # Example
640    /// ```
641    /// # use google_cloud_netapp_v1::client::NetApp;
642    /// use google_cloud_lro::Poller;
643    /// use google_cloud_netapp_v1::Result;
644    /// async fn sample(
645    ///    client: &NetApp, project_id: &str, location_id: &str, volume_id: &str, snapshot_id: &str
646    /// ) -> Result<()> {
647    ///     client.delete_snapshot()
648    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/volumes/{volume_id}/snapshots/{snapshot_id}"))
649    ///         .poller().until_done().await?;
650    ///     Ok(())
651    /// }
652    /// ```
653    pub fn delete_snapshot(&self) -> super::builder::net_app::DeleteSnapshot {
654        super::builder::net_app::DeleteSnapshot::new(self.inner.clone())
655    }
656
657    /// Updates the settings of a specific snapshot.
658    ///
659    /// # Long running operations
660    ///
661    /// This method is used to start, and/or poll a [long-running Operation].
662    /// The [Working with long-running operations] chapter in the [user guide]
663    /// covers these operations in detail.
664    ///
665    /// [long-running operation]: https://google.aip.dev/151
666    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
667    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
668    ///
669    /// # Example
670    /// ```
671    /// # use google_cloud_netapp_v1::client::NetApp;
672    /// use google_cloud_lro::Poller;
673    /// # extern crate wkt as google_cloud_wkt;
674    /// use google_cloud_wkt::FieldMask;
675    /// use google_cloud_netapp_v1::model::Snapshot;
676    /// use google_cloud_netapp_v1::Result;
677    /// async fn sample(
678    ///    client: &NetApp, project_id: &str, location_id: &str, volume_id: &str, snapshot_id: &str
679    /// ) -> Result<()> {
680    ///     let response = client.update_snapshot()
681    ///         .set_snapshot(
682    ///             Snapshot::new().set_name(format!("projects/{project_id}/locations/{location_id}/volumes/{volume_id}/snapshots/{snapshot_id}"))/* set fields */
683    ///         )
684    ///         .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
685    ///         .poller().until_done().await?;
686    ///     println!("response {:?}", response);
687    ///     Ok(())
688    /// }
689    /// ```
690    pub fn update_snapshot(&self) -> super::builder::net_app::UpdateSnapshot {
691        super::builder::net_app::UpdateSnapshot::new(self.inner.clone())
692    }
693
694    /// Lists active directories.
695    ///
696    /// # Example
697    /// ```
698    /// # use google_cloud_netapp_v1::client::NetApp;
699    /// use google_cloud_gax::paginator::ItemPaginator as _;
700    /// use google_cloud_netapp_v1::Result;
701    /// async fn sample(
702    ///    client: &NetApp, project_id: &str, location_id: &str
703    /// ) -> Result<()> {
704    ///     let mut list = client.list_active_directories()
705    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}"))
706    ///         .by_item();
707    ///     while let Some(item) = list.next().await.transpose()? {
708    ///         println!("{:?}", item);
709    ///     }
710    ///     Ok(())
711    /// }
712    /// ```
713    pub fn list_active_directories(&self) -> super::builder::net_app::ListActiveDirectories {
714        super::builder::net_app::ListActiveDirectories::new(self.inner.clone())
715    }
716
717    /// Describes a specified active directory.
718    ///
719    /// # Example
720    /// ```
721    /// # use google_cloud_netapp_v1::client::NetApp;
722    /// use google_cloud_netapp_v1::Result;
723    /// async fn sample(
724    ///    client: &NetApp, project_id: &str, location_id: &str, active_directory_id: &str
725    /// ) -> Result<()> {
726    ///     let response = client.get_active_directory()
727    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/activeDirectories/{active_directory_id}"))
728    ///         .send().await?;
729    ///     println!("response {:?}", response);
730    ///     Ok(())
731    /// }
732    /// ```
733    pub fn get_active_directory(&self) -> super::builder::net_app::GetActiveDirectory {
734        super::builder::net_app::GetActiveDirectory::new(self.inner.clone())
735    }
736
737    /// CreateActiveDirectory
738    /// Creates the active directory specified in the request.
739    ///
740    /// # Long running operations
741    ///
742    /// This method is used to start, and/or poll a [long-running Operation].
743    /// The [Working with long-running operations] chapter in the [user guide]
744    /// covers these operations in detail.
745    ///
746    /// [long-running operation]: https://google.aip.dev/151
747    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
748    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
749    ///
750    /// # Example
751    /// ```
752    /// # use google_cloud_netapp_v1::client::NetApp;
753    /// use google_cloud_lro::Poller;
754    /// use google_cloud_netapp_v1::model::ActiveDirectory;
755    /// use google_cloud_netapp_v1::Result;
756    /// async fn sample(
757    ///    client: &NetApp, project_id: &str, location_id: &str
758    /// ) -> Result<()> {
759    ///     let response = client.create_active_directory()
760    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}"))
761    ///         .set_active_directory(
762    ///             ActiveDirectory::new()/* set fields */
763    ///         )
764    ///         .poller().until_done().await?;
765    ///     println!("response {:?}", response);
766    ///     Ok(())
767    /// }
768    /// ```
769    pub fn create_active_directory(&self) -> super::builder::net_app::CreateActiveDirectory {
770        super::builder::net_app::CreateActiveDirectory::new(self.inner.clone())
771    }
772
773    /// Update the parameters of an active directories.
774    ///
775    /// # Long running operations
776    ///
777    /// This method is used to start, and/or poll a [long-running Operation].
778    /// The [Working with long-running operations] chapter in the [user guide]
779    /// covers these operations in detail.
780    ///
781    /// [long-running operation]: https://google.aip.dev/151
782    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
783    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
784    ///
785    /// # Example
786    /// ```
787    /// # use google_cloud_netapp_v1::client::NetApp;
788    /// use google_cloud_lro::Poller;
789    /// # extern crate wkt as google_cloud_wkt;
790    /// use google_cloud_wkt::FieldMask;
791    /// use google_cloud_netapp_v1::model::ActiveDirectory;
792    /// use google_cloud_netapp_v1::Result;
793    /// async fn sample(
794    ///    client: &NetApp, project_id: &str, location_id: &str, active_directory_id: &str
795    /// ) -> Result<()> {
796    ///     let response = client.update_active_directory()
797    ///         .set_active_directory(
798    ///             ActiveDirectory::new().set_name(format!("projects/{project_id}/locations/{location_id}/activeDirectories/{active_directory_id}"))/* set fields */
799    ///         )
800    ///         .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
801    ///         .poller().until_done().await?;
802    ///     println!("response {:?}", response);
803    ///     Ok(())
804    /// }
805    /// ```
806    pub fn update_active_directory(&self) -> super::builder::net_app::UpdateActiveDirectory {
807        super::builder::net_app::UpdateActiveDirectory::new(self.inner.clone())
808    }
809
810    /// Delete the active directory specified in the request.
811    ///
812    /// # Long running operations
813    ///
814    /// This method is used to start, and/or poll a [long-running Operation].
815    /// The [Working with long-running operations] chapter in the [user guide]
816    /// covers these operations in detail.
817    ///
818    /// [long-running operation]: https://google.aip.dev/151
819    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
820    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
821    ///
822    /// # Example
823    /// ```
824    /// # use google_cloud_netapp_v1::client::NetApp;
825    /// use google_cloud_lro::Poller;
826    /// use google_cloud_netapp_v1::Result;
827    /// async fn sample(
828    ///    client: &NetApp, project_id: &str, location_id: &str, active_directory_id: &str
829    /// ) -> Result<()> {
830    ///     client.delete_active_directory()
831    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/activeDirectories/{active_directory_id}"))
832    ///         .poller().until_done().await?;
833    ///     Ok(())
834    /// }
835    /// ```
836    pub fn delete_active_directory(&self) -> super::builder::net_app::DeleteActiveDirectory {
837        super::builder::net_app::DeleteActiveDirectory::new(self.inner.clone())
838    }
839
840    /// Returns descriptions of all KMS configs owned by the caller.
841    ///
842    /// # Example
843    /// ```
844    /// # use google_cloud_netapp_v1::client::NetApp;
845    /// use google_cloud_gax::paginator::ItemPaginator as _;
846    /// use google_cloud_netapp_v1::Result;
847    /// async fn sample(
848    ///    client: &NetApp, project_id: &str, location_id: &str
849    /// ) -> Result<()> {
850    ///     let mut list = client.list_kms_configs()
851    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}"))
852    ///         .by_item();
853    ///     while let Some(item) = list.next().await.transpose()? {
854    ///         println!("{:?}", item);
855    ///     }
856    ///     Ok(())
857    /// }
858    /// ```
859    pub fn list_kms_configs(&self) -> super::builder::net_app::ListKmsConfigs {
860        super::builder::net_app::ListKmsConfigs::new(self.inner.clone())
861    }
862
863    /// Creates a new KMS config.
864    ///
865    /// # Long running operations
866    ///
867    /// This method is used to start, and/or poll a [long-running Operation].
868    /// The [Working with long-running operations] chapter in the [user guide]
869    /// covers these operations in detail.
870    ///
871    /// [long-running operation]: https://google.aip.dev/151
872    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
873    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
874    ///
875    /// # Example
876    /// ```
877    /// # use google_cloud_netapp_v1::client::NetApp;
878    /// use google_cloud_lro::Poller;
879    /// use google_cloud_netapp_v1::model::KmsConfig;
880    /// use google_cloud_netapp_v1::Result;
881    /// async fn sample(
882    ///    client: &NetApp, project_id: &str, location_id: &str
883    /// ) -> Result<()> {
884    ///     let response = client.create_kms_config()
885    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}"))
886    ///         .set_kms_config(
887    ///             KmsConfig::new()/* set fields */
888    ///         )
889    ///         .poller().until_done().await?;
890    ///     println!("response {:?}", response);
891    ///     Ok(())
892    /// }
893    /// ```
894    pub fn create_kms_config(&self) -> super::builder::net_app::CreateKmsConfig {
895        super::builder::net_app::CreateKmsConfig::new(self.inner.clone())
896    }
897
898    /// Returns the description of the specified KMS config by kms_config_id.
899    ///
900    /// # Example
901    /// ```
902    /// # use google_cloud_netapp_v1::client::NetApp;
903    /// use google_cloud_netapp_v1::Result;
904    /// async fn sample(
905    ///    client: &NetApp, project_id: &str, location_id: &str, kms_config_id: &str
906    /// ) -> Result<()> {
907    ///     let response = client.get_kms_config()
908    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/kmsConfigs/{kms_config_id}"))
909    ///         .send().await?;
910    ///     println!("response {:?}", response);
911    ///     Ok(())
912    /// }
913    /// ```
914    pub fn get_kms_config(&self) -> super::builder::net_app::GetKmsConfig {
915        super::builder::net_app::GetKmsConfig::new(self.inner.clone())
916    }
917
918    /// Updates the Kms config properties with the full spec
919    ///
920    /// # Long running operations
921    ///
922    /// This method is used to start, and/or poll a [long-running Operation].
923    /// The [Working with long-running operations] chapter in the [user guide]
924    /// covers these operations in detail.
925    ///
926    /// [long-running operation]: https://google.aip.dev/151
927    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
928    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
929    ///
930    /// # Example
931    /// ```
932    /// # use google_cloud_netapp_v1::client::NetApp;
933    /// use google_cloud_lro::Poller;
934    /// # extern crate wkt as google_cloud_wkt;
935    /// use google_cloud_wkt::FieldMask;
936    /// use google_cloud_netapp_v1::model::KmsConfig;
937    /// use google_cloud_netapp_v1::Result;
938    /// async fn sample(
939    ///    client: &NetApp, project_id: &str, location_id: &str, kms_config_id: &str
940    /// ) -> Result<()> {
941    ///     let response = client.update_kms_config()
942    ///         .set_kms_config(
943    ///             KmsConfig::new().set_name(format!("projects/{project_id}/locations/{location_id}/kmsConfigs/{kms_config_id}"))/* set fields */
944    ///         )
945    ///         .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
946    ///         .poller().until_done().await?;
947    ///     println!("response {:?}", response);
948    ///     Ok(())
949    /// }
950    /// ```
951    pub fn update_kms_config(&self) -> super::builder::net_app::UpdateKmsConfig {
952        super::builder::net_app::UpdateKmsConfig::new(self.inner.clone())
953    }
954
955    /// Encrypt the existing volumes without CMEK encryption with the desired the
956    /// KMS config for the whole region.
957    ///
958    /// # Long running operations
959    ///
960    /// This method is used to start, and/or poll a [long-running Operation].
961    /// The [Working with long-running operations] chapter in the [user guide]
962    /// covers these operations in detail.
963    ///
964    /// [long-running operation]: https://google.aip.dev/151
965    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
966    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
967    ///
968    /// # Example
969    /// ```
970    /// # use google_cloud_netapp_v1::client::NetApp;
971    /// use google_cloud_lro::Poller;
972    /// use google_cloud_netapp_v1::Result;
973    /// async fn sample(
974    ///    client: &NetApp
975    /// ) -> Result<()> {
976    ///     let response = client.encrypt_volumes()
977    ///         /* set fields */
978    ///         .poller().until_done().await?;
979    ///     println!("response {:?}", response);
980    ///     Ok(())
981    /// }
982    /// ```
983    pub fn encrypt_volumes(&self) -> super::builder::net_app::EncryptVolumes {
984        super::builder::net_app::EncryptVolumes::new(self.inner.clone())
985    }
986
987    /// Verifies KMS config reachability.
988    ///
989    /// # Example
990    /// ```
991    /// # use google_cloud_netapp_v1::client::NetApp;
992    /// use google_cloud_netapp_v1::Result;
993    /// async fn sample(
994    ///    client: &NetApp
995    /// ) -> Result<()> {
996    ///     let response = client.verify_kms_config()
997    ///         /* set fields */
998    ///         .send().await?;
999    ///     println!("response {:?}", response);
1000    ///     Ok(())
1001    /// }
1002    /// ```
1003    pub fn verify_kms_config(&self) -> super::builder::net_app::VerifyKmsConfig {
1004        super::builder::net_app::VerifyKmsConfig::new(self.inner.clone())
1005    }
1006
1007    /// Warning! This operation will permanently delete the Kms config.
1008    ///
1009    /// # Long running operations
1010    ///
1011    /// This method is used to start, and/or poll a [long-running Operation].
1012    /// The [Working with long-running operations] chapter in the [user guide]
1013    /// covers these operations in detail.
1014    ///
1015    /// [long-running operation]: https://google.aip.dev/151
1016    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1017    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1018    ///
1019    /// # Example
1020    /// ```
1021    /// # use google_cloud_netapp_v1::client::NetApp;
1022    /// use google_cloud_lro::Poller;
1023    /// use google_cloud_netapp_v1::Result;
1024    /// async fn sample(
1025    ///    client: &NetApp, project_id: &str, location_id: &str, kms_config_id: &str
1026    /// ) -> Result<()> {
1027    ///     client.delete_kms_config()
1028    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/kmsConfigs/{kms_config_id}"))
1029    ///         .poller().until_done().await?;
1030    ///     Ok(())
1031    /// }
1032    /// ```
1033    pub fn delete_kms_config(&self) -> super::builder::net_app::DeleteKmsConfig {
1034        super::builder::net_app::DeleteKmsConfig::new(self.inner.clone())
1035    }
1036
1037    /// Returns descriptions of all replications for a volume.
1038    ///
1039    /// # Example
1040    /// ```
1041    /// # use google_cloud_netapp_v1::client::NetApp;
1042    /// use google_cloud_gax::paginator::ItemPaginator as _;
1043    /// use google_cloud_netapp_v1::Result;
1044    /// async fn sample(
1045    ///    client: &NetApp, project_id: &str, location_id: &str, volume_id: &str
1046    /// ) -> Result<()> {
1047    ///     let mut list = client.list_replications()
1048    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}/volumes/{volume_id}"))
1049    ///         .by_item();
1050    ///     while let Some(item) = list.next().await.transpose()? {
1051    ///         println!("{:?}", item);
1052    ///     }
1053    ///     Ok(())
1054    /// }
1055    /// ```
1056    pub fn list_replications(&self) -> super::builder::net_app::ListReplications {
1057        super::builder::net_app::ListReplications::new(self.inner.clone())
1058    }
1059
1060    /// Describe a replication for a volume.
1061    ///
1062    /// # Example
1063    /// ```
1064    /// # use google_cloud_netapp_v1::client::NetApp;
1065    /// use google_cloud_netapp_v1::Result;
1066    /// async fn sample(
1067    ///    client: &NetApp, project_id: &str, location_id: &str, volume_id: &str, replication_id: &str
1068    /// ) -> Result<()> {
1069    ///     let response = client.get_replication()
1070    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/volumes/{volume_id}/replications/{replication_id}"))
1071    ///         .send().await?;
1072    ///     println!("response {:?}", response);
1073    ///     Ok(())
1074    /// }
1075    /// ```
1076    pub fn get_replication(&self) -> super::builder::net_app::GetReplication {
1077        super::builder::net_app::GetReplication::new(self.inner.clone())
1078    }
1079
1080    /// Create a new replication for a volume.
1081    ///
1082    /// # Long running operations
1083    ///
1084    /// This method is used to start, and/or poll a [long-running Operation].
1085    /// The [Working with long-running operations] chapter in the [user guide]
1086    /// covers these operations in detail.
1087    ///
1088    /// [long-running operation]: https://google.aip.dev/151
1089    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1090    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1091    ///
1092    /// # Example
1093    /// ```
1094    /// # use google_cloud_netapp_v1::client::NetApp;
1095    /// use google_cloud_lro::Poller;
1096    /// use google_cloud_netapp_v1::model::Replication;
1097    /// use google_cloud_netapp_v1::Result;
1098    /// async fn sample(
1099    ///    client: &NetApp, project_id: &str, location_id: &str, volume_id: &str
1100    /// ) -> Result<()> {
1101    ///     let response = client.create_replication()
1102    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}/volumes/{volume_id}"))
1103    ///         .set_replication_id("replication_id_value")
1104    ///         .set_replication(
1105    ///             Replication::new()/* set fields */
1106    ///         )
1107    ///         .poller().until_done().await?;
1108    ///     println!("response {:?}", response);
1109    ///     Ok(())
1110    /// }
1111    /// ```
1112    pub fn create_replication(&self) -> super::builder::net_app::CreateReplication {
1113        super::builder::net_app::CreateReplication::new(self.inner.clone())
1114    }
1115
1116    /// Deletes a replication.
1117    ///
1118    /// # Long running operations
1119    ///
1120    /// This method is used to start, and/or poll a [long-running Operation].
1121    /// The [Working with long-running operations] chapter in the [user guide]
1122    /// covers these operations in detail.
1123    ///
1124    /// [long-running operation]: https://google.aip.dev/151
1125    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1126    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1127    ///
1128    /// # Example
1129    /// ```
1130    /// # use google_cloud_netapp_v1::client::NetApp;
1131    /// use google_cloud_lro::Poller;
1132    /// use google_cloud_netapp_v1::Result;
1133    /// async fn sample(
1134    ///    client: &NetApp, project_id: &str, location_id: &str, volume_id: &str, replication_id: &str
1135    /// ) -> Result<()> {
1136    ///     client.delete_replication()
1137    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/volumes/{volume_id}/replications/{replication_id}"))
1138    ///         .poller().until_done().await?;
1139    ///     Ok(())
1140    /// }
1141    /// ```
1142    pub fn delete_replication(&self) -> super::builder::net_app::DeleteReplication {
1143        super::builder::net_app::DeleteReplication::new(self.inner.clone())
1144    }
1145
1146    /// Updates the settings of a specific replication.
1147    ///
1148    /// # Long running operations
1149    ///
1150    /// This method is used to start, and/or poll a [long-running Operation].
1151    /// The [Working with long-running operations] chapter in the [user guide]
1152    /// covers these operations in detail.
1153    ///
1154    /// [long-running operation]: https://google.aip.dev/151
1155    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1156    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1157    ///
1158    /// # Example
1159    /// ```
1160    /// # use google_cloud_netapp_v1::client::NetApp;
1161    /// use google_cloud_lro::Poller;
1162    /// # extern crate wkt as google_cloud_wkt;
1163    /// use google_cloud_wkt::FieldMask;
1164    /// use google_cloud_netapp_v1::model::Replication;
1165    /// use google_cloud_netapp_v1::Result;
1166    /// async fn sample(
1167    ///    client: &NetApp, project_id: &str, location_id: &str, volume_id: &str, replication_id: &str
1168    /// ) -> Result<()> {
1169    ///     let response = client.update_replication()
1170    ///         .set_replication(
1171    ///             Replication::new().set_name(format!("projects/{project_id}/locations/{location_id}/volumes/{volume_id}/replications/{replication_id}"))/* set fields */
1172    ///         )
1173    ///         .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
1174    ///         .poller().until_done().await?;
1175    ///     println!("response {:?}", response);
1176    ///     Ok(())
1177    /// }
1178    /// ```
1179    pub fn update_replication(&self) -> super::builder::net_app::UpdateReplication {
1180        super::builder::net_app::UpdateReplication::new(self.inner.clone())
1181    }
1182
1183    /// Stop Cross Region Replication.
1184    ///
1185    /// # Long running operations
1186    ///
1187    /// This method is used to start, and/or poll a [long-running Operation].
1188    /// The [Working with long-running operations] chapter in the [user guide]
1189    /// covers these operations in detail.
1190    ///
1191    /// [long-running operation]: https://google.aip.dev/151
1192    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1193    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1194    ///
1195    /// # Example
1196    /// ```
1197    /// # use google_cloud_netapp_v1::client::NetApp;
1198    /// use google_cloud_lro::Poller;
1199    /// use google_cloud_netapp_v1::Result;
1200    /// async fn sample(
1201    ///    client: &NetApp
1202    /// ) -> Result<()> {
1203    ///     let response = client.stop_replication()
1204    ///         /* set fields */
1205    ///         .poller().until_done().await?;
1206    ///     println!("response {:?}", response);
1207    ///     Ok(())
1208    /// }
1209    /// ```
1210    pub fn stop_replication(&self) -> super::builder::net_app::StopReplication {
1211        super::builder::net_app::StopReplication::new(self.inner.clone())
1212    }
1213
1214    /// Resume Cross Region Replication.
1215    ///
1216    /// # Long running operations
1217    ///
1218    /// This method is used to start, and/or poll a [long-running Operation].
1219    /// The [Working with long-running operations] chapter in the [user guide]
1220    /// covers these operations in detail.
1221    ///
1222    /// [long-running operation]: https://google.aip.dev/151
1223    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1224    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1225    ///
1226    /// # Example
1227    /// ```
1228    /// # use google_cloud_netapp_v1::client::NetApp;
1229    /// use google_cloud_lro::Poller;
1230    /// use google_cloud_netapp_v1::Result;
1231    /// async fn sample(
1232    ///    client: &NetApp
1233    /// ) -> Result<()> {
1234    ///     let response = client.resume_replication()
1235    ///         /* set fields */
1236    ///         .poller().until_done().await?;
1237    ///     println!("response {:?}", response);
1238    ///     Ok(())
1239    /// }
1240    /// ```
1241    pub fn resume_replication(&self) -> super::builder::net_app::ResumeReplication {
1242        super::builder::net_app::ResumeReplication::new(self.inner.clone())
1243    }
1244
1245    /// Reverses direction of replication. Source becomes destination and
1246    /// destination becomes source.
1247    ///
1248    /// # Long running operations
1249    ///
1250    /// This method is used to start, and/or poll a [long-running Operation].
1251    /// The [Working with long-running operations] chapter in the [user guide]
1252    /// covers these operations in detail.
1253    ///
1254    /// [long-running operation]: https://google.aip.dev/151
1255    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1256    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1257    ///
1258    /// # Example
1259    /// ```
1260    /// # use google_cloud_netapp_v1::client::NetApp;
1261    /// use google_cloud_lro::Poller;
1262    /// use google_cloud_netapp_v1::Result;
1263    /// async fn sample(
1264    ///    client: &NetApp
1265    /// ) -> Result<()> {
1266    ///     let response = client.reverse_replication_direction()
1267    ///         /* set fields */
1268    ///         .poller().until_done().await?;
1269    ///     println!("response {:?}", response);
1270    ///     Ok(())
1271    /// }
1272    /// ```
1273    pub fn reverse_replication_direction(
1274        &self,
1275    ) -> super::builder::net_app::ReverseReplicationDirection {
1276        super::builder::net_app::ReverseReplicationDirection::new(self.inner.clone())
1277    }
1278
1279    /// Establish replication peering.
1280    ///
1281    /// # Long running operations
1282    ///
1283    /// This method is used to start, and/or poll a [long-running Operation].
1284    /// The [Working with long-running operations] chapter in the [user guide]
1285    /// covers these operations in detail.
1286    ///
1287    /// [long-running operation]: https://google.aip.dev/151
1288    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1289    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1290    ///
1291    /// # Example
1292    /// ```
1293    /// # use google_cloud_netapp_v1::client::NetApp;
1294    /// use google_cloud_lro::Poller;
1295    /// use google_cloud_netapp_v1::Result;
1296    /// async fn sample(
1297    ///    client: &NetApp
1298    /// ) -> Result<()> {
1299    ///     let response = client.establish_peering()
1300    ///         /* set fields */
1301    ///         .poller().until_done().await?;
1302    ///     println!("response {:?}", response);
1303    ///     Ok(())
1304    /// }
1305    /// ```
1306    pub fn establish_peering(&self) -> super::builder::net_app::EstablishPeering {
1307        super::builder::net_app::EstablishPeering::new(self.inner.clone())
1308    }
1309
1310    /// Syncs the replication. This will invoke one time volume data transfer from
1311    /// source to destination.
1312    ///
1313    /// # Long running operations
1314    ///
1315    /// This method is used to start, and/or poll a [long-running Operation].
1316    /// The [Working with long-running operations] chapter in the [user guide]
1317    /// covers these operations in detail.
1318    ///
1319    /// [long-running operation]: https://google.aip.dev/151
1320    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1321    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1322    ///
1323    /// # Example
1324    /// ```
1325    /// # use google_cloud_netapp_v1::client::NetApp;
1326    /// use google_cloud_lro::Poller;
1327    /// use google_cloud_netapp_v1::Result;
1328    /// async fn sample(
1329    ///    client: &NetApp
1330    /// ) -> Result<()> {
1331    ///     let response = client.sync_replication()
1332    ///         /* set fields */
1333    ///         .poller().until_done().await?;
1334    ///     println!("response {:?}", response);
1335    ///     Ok(())
1336    /// }
1337    /// ```
1338    pub fn sync_replication(&self) -> super::builder::net_app::SyncReplication {
1339        super::builder::net_app::SyncReplication::new(self.inner.clone())
1340    }
1341
1342    /// Creates new backup vault
1343    ///
1344    /// # Long running operations
1345    ///
1346    /// This method is used to start, and/or poll a [long-running Operation].
1347    /// The [Working with long-running operations] chapter in the [user guide]
1348    /// covers these operations in detail.
1349    ///
1350    /// [long-running operation]: https://google.aip.dev/151
1351    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1352    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1353    ///
1354    /// # Example
1355    /// ```
1356    /// # use google_cloud_netapp_v1::client::NetApp;
1357    /// use google_cloud_lro::Poller;
1358    /// use google_cloud_netapp_v1::model::BackupVault;
1359    /// use google_cloud_netapp_v1::Result;
1360    /// async fn sample(
1361    ///    client: &NetApp, project_id: &str, location_id: &str
1362    /// ) -> Result<()> {
1363    ///     let response = client.create_backup_vault()
1364    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}"))
1365    ///         .set_backup_vault(
1366    ///             BackupVault::new()/* set fields */
1367    ///         )
1368    ///         .poller().until_done().await?;
1369    ///     println!("response {:?}", response);
1370    ///     Ok(())
1371    /// }
1372    /// ```
1373    pub fn create_backup_vault(&self) -> super::builder::net_app::CreateBackupVault {
1374        super::builder::net_app::CreateBackupVault::new(self.inner.clone())
1375    }
1376
1377    /// Returns the description of the specified backup vault
1378    ///
1379    /// # Example
1380    /// ```
1381    /// # use google_cloud_netapp_v1::client::NetApp;
1382    /// use google_cloud_netapp_v1::Result;
1383    /// async fn sample(
1384    ///    client: &NetApp, project_id: &str, location_id: &str, backup_vault_id: &str
1385    /// ) -> Result<()> {
1386    ///     let response = client.get_backup_vault()
1387    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/backupVaults/{backup_vault_id}"))
1388    ///         .send().await?;
1389    ///     println!("response {:?}", response);
1390    ///     Ok(())
1391    /// }
1392    /// ```
1393    pub fn get_backup_vault(&self) -> super::builder::net_app::GetBackupVault {
1394        super::builder::net_app::GetBackupVault::new(self.inner.clone())
1395    }
1396
1397    /// Returns list of all available backup vaults.
1398    ///
1399    /// # Example
1400    /// ```
1401    /// # use google_cloud_netapp_v1::client::NetApp;
1402    /// use google_cloud_gax::paginator::ItemPaginator as _;
1403    /// use google_cloud_netapp_v1::Result;
1404    /// async fn sample(
1405    ///    client: &NetApp, project_id: &str, location_id: &str
1406    /// ) -> Result<()> {
1407    ///     let mut list = client.list_backup_vaults()
1408    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}"))
1409    ///         .by_item();
1410    ///     while let Some(item) = list.next().await.transpose()? {
1411    ///         println!("{:?}", item);
1412    ///     }
1413    ///     Ok(())
1414    /// }
1415    /// ```
1416    pub fn list_backup_vaults(&self) -> super::builder::net_app::ListBackupVaults {
1417        super::builder::net_app::ListBackupVaults::new(self.inner.clone())
1418    }
1419
1420    /// Updates the settings of a specific backup vault.
1421    ///
1422    /// # Long running operations
1423    ///
1424    /// This method is used to start, and/or poll a [long-running Operation].
1425    /// The [Working with long-running operations] chapter in the [user guide]
1426    /// covers these operations in detail.
1427    ///
1428    /// [long-running operation]: https://google.aip.dev/151
1429    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1430    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1431    ///
1432    /// # Example
1433    /// ```
1434    /// # use google_cloud_netapp_v1::client::NetApp;
1435    /// use google_cloud_lro::Poller;
1436    /// # extern crate wkt as google_cloud_wkt;
1437    /// use google_cloud_wkt::FieldMask;
1438    /// use google_cloud_netapp_v1::model::BackupVault;
1439    /// use google_cloud_netapp_v1::Result;
1440    /// async fn sample(
1441    ///    client: &NetApp, project_id: &str, location_id: &str, backup_vault_id: &str
1442    /// ) -> Result<()> {
1443    ///     let response = client.update_backup_vault()
1444    ///         .set_backup_vault(
1445    ///             BackupVault::new().set_name(format!("projects/{project_id}/locations/{location_id}/backupVaults/{backup_vault_id}"))/* set fields */
1446    ///         )
1447    ///         .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
1448    ///         .poller().until_done().await?;
1449    ///     println!("response {:?}", response);
1450    ///     Ok(())
1451    /// }
1452    /// ```
1453    pub fn update_backup_vault(&self) -> super::builder::net_app::UpdateBackupVault {
1454        super::builder::net_app::UpdateBackupVault::new(self.inner.clone())
1455    }
1456
1457    /// Warning! This operation will permanently delete the backup vault.
1458    ///
1459    /// # Long running operations
1460    ///
1461    /// This method is used to start, and/or poll a [long-running Operation].
1462    /// The [Working with long-running operations] chapter in the [user guide]
1463    /// covers these operations in detail.
1464    ///
1465    /// [long-running operation]: https://google.aip.dev/151
1466    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1467    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1468    ///
1469    /// # Example
1470    /// ```
1471    /// # use google_cloud_netapp_v1::client::NetApp;
1472    /// use google_cloud_lro::Poller;
1473    /// use google_cloud_netapp_v1::Result;
1474    /// async fn sample(
1475    ///    client: &NetApp, project_id: &str, location_id: &str, backup_vault_id: &str
1476    /// ) -> Result<()> {
1477    ///     client.delete_backup_vault()
1478    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/backupVaults/{backup_vault_id}"))
1479    ///         .poller().until_done().await?;
1480    ///     Ok(())
1481    /// }
1482    /// ```
1483    pub fn delete_backup_vault(&self) -> super::builder::net_app::DeleteBackupVault {
1484        super::builder::net_app::DeleteBackupVault::new(self.inner.clone())
1485    }
1486
1487    /// Creates a backup from the volume specified in the request
1488    /// The backup can be created from the given snapshot if specified in the
1489    /// request. If no snapshot specified, there'll be a new snapshot taken to
1490    /// initiate the backup creation.
1491    ///
1492    /// # Long running operations
1493    ///
1494    /// This method is used to start, and/or poll a [long-running Operation].
1495    /// The [Working with long-running operations] chapter in the [user guide]
1496    /// covers these operations in detail.
1497    ///
1498    /// [long-running operation]: https://google.aip.dev/151
1499    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1500    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1501    ///
1502    /// # Example
1503    /// ```
1504    /// # use google_cloud_netapp_v1::client::NetApp;
1505    /// use google_cloud_lro::Poller;
1506    /// use google_cloud_netapp_v1::model::Backup;
1507    /// use google_cloud_netapp_v1::Result;
1508    /// async fn sample(
1509    ///    client: &NetApp, project_id: &str, location_id: &str, backup_vault_id: &str
1510    /// ) -> Result<()> {
1511    ///     let response = client.create_backup()
1512    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}/backupVaults/{backup_vault_id}"))
1513    ///         .set_backup_id("backup_id_value")
1514    ///         .set_backup(
1515    ///             Backup::new()/* set fields */
1516    ///         )
1517    ///         .poller().until_done().await?;
1518    ///     println!("response {:?}", response);
1519    ///     Ok(())
1520    /// }
1521    /// ```
1522    pub fn create_backup(&self) -> super::builder::net_app::CreateBackup {
1523        super::builder::net_app::CreateBackup::new(self.inner.clone())
1524    }
1525
1526    /// Returns the description of the specified backup
1527    ///
1528    /// # Example
1529    /// ```
1530    /// # use google_cloud_netapp_v1::client::NetApp;
1531    /// use google_cloud_netapp_v1::Result;
1532    /// async fn sample(
1533    ///    client: &NetApp, project_id: &str, location_id: &str, backup_vault_id: &str, backup_id: &str
1534    /// ) -> Result<()> {
1535    ///     let response = client.get_backup()
1536    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/backupVaults/{backup_vault_id}/backups/{backup_id}"))
1537    ///         .send().await?;
1538    ///     println!("response {:?}", response);
1539    ///     Ok(())
1540    /// }
1541    /// ```
1542    pub fn get_backup(&self) -> super::builder::net_app::GetBackup {
1543        super::builder::net_app::GetBackup::new(self.inner.clone())
1544    }
1545
1546    /// Returns descriptions of all backups for a backupVault.
1547    ///
1548    /// # Example
1549    /// ```
1550    /// # use google_cloud_netapp_v1::client::NetApp;
1551    /// use google_cloud_gax::paginator::ItemPaginator as _;
1552    /// use google_cloud_netapp_v1::Result;
1553    /// async fn sample(
1554    ///    client: &NetApp, project_id: &str, location_id: &str, backup_vault_id: &str
1555    /// ) -> Result<()> {
1556    ///     let mut list = client.list_backups()
1557    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}/backupVaults/{backup_vault_id}"))
1558    ///         .by_item();
1559    ///     while let Some(item) = list.next().await.transpose()? {
1560    ///         println!("{:?}", item);
1561    ///     }
1562    ///     Ok(())
1563    /// }
1564    /// ```
1565    pub fn list_backups(&self) -> super::builder::net_app::ListBackups {
1566        super::builder::net_app::ListBackups::new(self.inner.clone())
1567    }
1568
1569    /// Warning! This operation will permanently delete the backup.
1570    ///
1571    /// # Long running operations
1572    ///
1573    /// This method is used to start, and/or poll a [long-running Operation].
1574    /// The [Working with long-running operations] chapter in the [user guide]
1575    /// covers these operations in detail.
1576    ///
1577    /// [long-running operation]: https://google.aip.dev/151
1578    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1579    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1580    ///
1581    /// # Example
1582    /// ```
1583    /// # use google_cloud_netapp_v1::client::NetApp;
1584    /// use google_cloud_lro::Poller;
1585    /// use google_cloud_netapp_v1::Result;
1586    /// async fn sample(
1587    ///    client: &NetApp, project_id: &str, location_id: &str, backup_vault_id: &str, backup_id: &str
1588    /// ) -> Result<()> {
1589    ///     client.delete_backup()
1590    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/backupVaults/{backup_vault_id}/backups/{backup_id}"))
1591    ///         .poller().until_done().await?;
1592    ///     Ok(())
1593    /// }
1594    /// ```
1595    pub fn delete_backup(&self) -> super::builder::net_app::DeleteBackup {
1596        super::builder::net_app::DeleteBackup::new(self.inner.clone())
1597    }
1598
1599    /// Update backup with full spec.
1600    ///
1601    /// # Long running operations
1602    ///
1603    /// This method is used to start, and/or poll a [long-running Operation].
1604    /// The [Working with long-running operations] chapter in the [user guide]
1605    /// covers these operations in detail.
1606    ///
1607    /// [long-running operation]: https://google.aip.dev/151
1608    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1609    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1610    ///
1611    /// # Example
1612    /// ```
1613    /// # use google_cloud_netapp_v1::client::NetApp;
1614    /// use google_cloud_lro::Poller;
1615    /// # extern crate wkt as google_cloud_wkt;
1616    /// use google_cloud_wkt::FieldMask;
1617    /// use google_cloud_netapp_v1::model::Backup;
1618    /// use google_cloud_netapp_v1::Result;
1619    /// async fn sample(
1620    ///    client: &NetApp, project_id: &str, location_id: &str, backup_vault_id: &str, backup_id: &str
1621    /// ) -> Result<()> {
1622    ///     let response = client.update_backup()
1623    ///         .set_backup(
1624    ///             Backup::new().set_name(format!("projects/{project_id}/locations/{location_id}/backupVaults/{backup_vault_id}/backups/{backup_id}"))/* set fields */
1625    ///         )
1626    ///         .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
1627    ///         .poller().until_done().await?;
1628    ///     println!("response {:?}", response);
1629    ///     Ok(())
1630    /// }
1631    /// ```
1632    pub fn update_backup(&self) -> super::builder::net_app::UpdateBackup {
1633        super::builder::net_app::UpdateBackup::new(self.inner.clone())
1634    }
1635
1636    /// Creates new backup policy
1637    ///
1638    /// # Long running operations
1639    ///
1640    /// This method is used to start, and/or poll a [long-running Operation].
1641    /// The [Working with long-running operations] chapter in the [user guide]
1642    /// covers these operations in detail.
1643    ///
1644    /// [long-running operation]: https://google.aip.dev/151
1645    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1646    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1647    ///
1648    /// # Example
1649    /// ```
1650    /// # use google_cloud_netapp_v1::client::NetApp;
1651    /// use google_cloud_lro::Poller;
1652    /// use google_cloud_netapp_v1::model::BackupPolicy;
1653    /// use google_cloud_netapp_v1::Result;
1654    /// async fn sample(
1655    ///    client: &NetApp, project_id: &str, location_id: &str
1656    /// ) -> Result<()> {
1657    ///     let response = client.create_backup_policy()
1658    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}"))
1659    ///         .set_backup_policy(
1660    ///             BackupPolicy::new()/* set fields */
1661    ///         )
1662    ///         .poller().until_done().await?;
1663    ///     println!("response {:?}", response);
1664    ///     Ok(())
1665    /// }
1666    /// ```
1667    pub fn create_backup_policy(&self) -> super::builder::net_app::CreateBackupPolicy {
1668        super::builder::net_app::CreateBackupPolicy::new(self.inner.clone())
1669    }
1670
1671    /// Returns the description of the specified backup policy by backup_policy_id.
1672    ///
1673    /// # Example
1674    /// ```
1675    /// # use google_cloud_netapp_v1::client::NetApp;
1676    /// use google_cloud_netapp_v1::Result;
1677    /// async fn sample(
1678    ///    client: &NetApp, project_id: &str, location_id: &str, backup_policy_id: &str
1679    /// ) -> Result<()> {
1680    ///     let response = client.get_backup_policy()
1681    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/backupPolicies/{backup_policy_id}"))
1682    ///         .send().await?;
1683    ///     println!("response {:?}", response);
1684    ///     Ok(())
1685    /// }
1686    /// ```
1687    pub fn get_backup_policy(&self) -> super::builder::net_app::GetBackupPolicy {
1688        super::builder::net_app::GetBackupPolicy::new(self.inner.clone())
1689    }
1690
1691    /// Returns list of all available backup policies.
1692    ///
1693    /// # Example
1694    /// ```
1695    /// # use google_cloud_netapp_v1::client::NetApp;
1696    /// use google_cloud_gax::paginator::ItemPaginator as _;
1697    /// use google_cloud_netapp_v1::Result;
1698    /// async fn sample(
1699    ///    client: &NetApp, project_id: &str, location_id: &str
1700    /// ) -> Result<()> {
1701    ///     let mut list = client.list_backup_policies()
1702    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}"))
1703    ///         .by_item();
1704    ///     while let Some(item) = list.next().await.transpose()? {
1705    ///         println!("{:?}", item);
1706    ///     }
1707    ///     Ok(())
1708    /// }
1709    /// ```
1710    pub fn list_backup_policies(&self) -> super::builder::net_app::ListBackupPolicies {
1711        super::builder::net_app::ListBackupPolicies::new(self.inner.clone())
1712    }
1713
1714    /// Updates settings of a specific backup policy.
1715    ///
1716    /// # Long running operations
1717    ///
1718    /// This method is used to start, and/or poll a [long-running Operation].
1719    /// The [Working with long-running operations] chapter in the [user guide]
1720    /// covers these operations in detail.
1721    ///
1722    /// [long-running operation]: https://google.aip.dev/151
1723    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1724    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1725    ///
1726    /// # Example
1727    /// ```
1728    /// # use google_cloud_netapp_v1::client::NetApp;
1729    /// use google_cloud_lro::Poller;
1730    /// # extern crate wkt as google_cloud_wkt;
1731    /// use google_cloud_wkt::FieldMask;
1732    /// use google_cloud_netapp_v1::model::BackupPolicy;
1733    /// use google_cloud_netapp_v1::Result;
1734    /// async fn sample(
1735    ///    client: &NetApp, project_id: &str, location_id: &str, backup_policy_id: &str
1736    /// ) -> Result<()> {
1737    ///     let response = client.update_backup_policy()
1738    ///         .set_backup_policy(
1739    ///             BackupPolicy::new().set_name(format!("projects/{project_id}/locations/{location_id}/backupPolicies/{backup_policy_id}"))/* set fields */
1740    ///         )
1741    ///         .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
1742    ///         .poller().until_done().await?;
1743    ///     println!("response {:?}", response);
1744    ///     Ok(())
1745    /// }
1746    /// ```
1747    pub fn update_backup_policy(&self) -> super::builder::net_app::UpdateBackupPolicy {
1748        super::builder::net_app::UpdateBackupPolicy::new(self.inner.clone())
1749    }
1750
1751    /// Warning! This operation will permanently delete the backup policy.
1752    ///
1753    /// # Long running operations
1754    ///
1755    /// This method is used to start, and/or poll a [long-running Operation].
1756    /// The [Working with long-running operations] chapter in the [user guide]
1757    /// covers these operations in detail.
1758    ///
1759    /// [long-running operation]: https://google.aip.dev/151
1760    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1761    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1762    ///
1763    /// # Example
1764    /// ```
1765    /// # use google_cloud_netapp_v1::client::NetApp;
1766    /// use google_cloud_lro::Poller;
1767    /// use google_cloud_netapp_v1::Result;
1768    /// async fn sample(
1769    ///    client: &NetApp, project_id: &str, location_id: &str, backup_policy_id: &str
1770    /// ) -> Result<()> {
1771    ///     client.delete_backup_policy()
1772    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/backupPolicies/{backup_policy_id}"))
1773    ///         .poller().until_done().await?;
1774    ///     Ok(())
1775    /// }
1776    /// ```
1777    pub fn delete_backup_policy(&self) -> super::builder::net_app::DeleteBackupPolicy {
1778        super::builder::net_app::DeleteBackupPolicy::new(self.inner.clone())
1779    }
1780
1781    /// Returns list of all quota rules in a location.
1782    ///
1783    /// # Example
1784    /// ```
1785    /// # use google_cloud_netapp_v1::client::NetApp;
1786    /// use google_cloud_gax::paginator::ItemPaginator as _;
1787    /// use google_cloud_netapp_v1::Result;
1788    /// async fn sample(
1789    ///    client: &NetApp, project_id: &str, location_id: &str, volume_id: &str
1790    /// ) -> Result<()> {
1791    ///     let mut list = client.list_quota_rules()
1792    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}/volumes/{volume_id}"))
1793    ///         .by_item();
1794    ///     while let Some(item) = list.next().await.transpose()? {
1795    ///         println!("{:?}", item);
1796    ///     }
1797    ///     Ok(())
1798    /// }
1799    /// ```
1800    pub fn list_quota_rules(&self) -> super::builder::net_app::ListQuotaRules {
1801        super::builder::net_app::ListQuotaRules::new(self.inner.clone())
1802    }
1803
1804    /// Returns details of the specified quota rule.
1805    ///
1806    /// # Example
1807    /// ```
1808    /// # use google_cloud_netapp_v1::client::NetApp;
1809    /// use google_cloud_netapp_v1::Result;
1810    /// async fn sample(
1811    ///    client: &NetApp, project_id: &str, location_id: &str, volume_id: &str, quota_rule_id: &str
1812    /// ) -> Result<()> {
1813    ///     let response = client.get_quota_rule()
1814    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/volumes/{volume_id}/quotaRules/{quota_rule_id}"))
1815    ///         .send().await?;
1816    ///     println!("response {:?}", response);
1817    ///     Ok(())
1818    /// }
1819    /// ```
1820    pub fn get_quota_rule(&self) -> super::builder::net_app::GetQuotaRule {
1821        super::builder::net_app::GetQuotaRule::new(self.inner.clone())
1822    }
1823
1824    /// Creates a new quota rule.
1825    ///
1826    /// # Long running operations
1827    ///
1828    /// This method is used to start, and/or poll a [long-running Operation].
1829    /// The [Working with long-running operations] chapter in the [user guide]
1830    /// covers these operations in detail.
1831    ///
1832    /// [long-running operation]: https://google.aip.dev/151
1833    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1834    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1835    ///
1836    /// # Example
1837    /// ```
1838    /// # use google_cloud_netapp_v1::client::NetApp;
1839    /// use google_cloud_lro::Poller;
1840    /// use google_cloud_netapp_v1::model::QuotaRule;
1841    /// use google_cloud_netapp_v1::Result;
1842    /// async fn sample(
1843    ///    client: &NetApp, project_id: &str, location_id: &str, volume_id: &str
1844    /// ) -> Result<()> {
1845    ///     let response = client.create_quota_rule()
1846    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}/volumes/{volume_id}"))
1847    ///         .set_quota_rule(
1848    ///             QuotaRule::new()/* set fields */
1849    ///         )
1850    ///         .poller().until_done().await?;
1851    ///     println!("response {:?}", response);
1852    ///     Ok(())
1853    /// }
1854    /// ```
1855    pub fn create_quota_rule(&self) -> super::builder::net_app::CreateQuotaRule {
1856        super::builder::net_app::CreateQuotaRule::new(self.inner.clone())
1857    }
1858
1859    /// Updates a quota rule.
1860    ///
1861    /// # Long running operations
1862    ///
1863    /// This method is used to start, and/or poll a [long-running Operation].
1864    /// The [Working with long-running operations] chapter in the [user guide]
1865    /// covers these operations in detail.
1866    ///
1867    /// [long-running operation]: https://google.aip.dev/151
1868    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1869    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1870    ///
1871    /// # Example
1872    /// ```
1873    /// # use google_cloud_netapp_v1::client::NetApp;
1874    /// use google_cloud_lro::Poller;
1875    /// # extern crate wkt as google_cloud_wkt;
1876    /// use google_cloud_wkt::FieldMask;
1877    /// use google_cloud_netapp_v1::model::QuotaRule;
1878    /// use google_cloud_netapp_v1::Result;
1879    /// async fn sample(
1880    ///    client: &NetApp, project_id: &str, location_id: &str, volume_id: &str, quota_rule_id: &str
1881    /// ) -> Result<()> {
1882    ///     let response = client.update_quota_rule()
1883    ///         .set_quota_rule(
1884    ///             QuotaRule::new().set_name(format!("projects/{project_id}/locations/{location_id}/volumes/{volume_id}/quotaRules/{quota_rule_id}"))/* set fields */
1885    ///         )
1886    ///         .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
1887    ///         .poller().until_done().await?;
1888    ///     println!("response {:?}", response);
1889    ///     Ok(())
1890    /// }
1891    /// ```
1892    pub fn update_quota_rule(&self) -> super::builder::net_app::UpdateQuotaRule {
1893        super::builder::net_app::UpdateQuotaRule::new(self.inner.clone())
1894    }
1895
1896    /// Deletes a quota rule.
1897    ///
1898    /// # Long running operations
1899    ///
1900    /// This method is used to start, and/or poll a [long-running Operation].
1901    /// The [Working with long-running operations] chapter in the [user guide]
1902    /// covers these operations in detail.
1903    ///
1904    /// [long-running operation]: https://google.aip.dev/151
1905    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1906    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1907    ///
1908    /// # Example
1909    /// ```
1910    /// # use google_cloud_netapp_v1::client::NetApp;
1911    /// use google_cloud_lro::Poller;
1912    /// use google_cloud_netapp_v1::Result;
1913    /// async fn sample(
1914    ///    client: &NetApp, project_id: &str, location_id: &str, volume_id: &str, quota_rule_id: &str
1915    /// ) -> Result<()> {
1916    ///     client.delete_quota_rule()
1917    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/volumes/{volume_id}/quotaRules/{quota_rule_id}"))
1918    ///         .poller().until_done().await?;
1919    ///     Ok(())
1920    /// }
1921    /// ```
1922    pub fn delete_quota_rule(&self) -> super::builder::net_app::DeleteQuotaRule {
1923        super::builder::net_app::DeleteQuotaRule::new(self.inner.clone())
1924    }
1925
1926    /// Restore files from a backup to a volume.
1927    ///
1928    /// # Long running operations
1929    ///
1930    /// This method is used to start, and/or poll a [long-running Operation].
1931    /// The [Working with long-running operations] chapter in the [user guide]
1932    /// covers these operations in detail.
1933    ///
1934    /// [long-running operation]: https://google.aip.dev/151
1935    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1936    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1937    ///
1938    /// # Example
1939    /// ```
1940    /// # use google_cloud_netapp_v1::client::NetApp;
1941    /// use google_cloud_lro::Poller;
1942    /// use google_cloud_netapp_v1::Result;
1943    /// async fn sample(
1944    ///    client: &NetApp
1945    /// ) -> Result<()> {
1946    ///     let response = client.restore_backup_files()
1947    ///         /* set fields */
1948    ///         .poller().until_done().await?;
1949    ///     println!("response {:?}", response);
1950    ///     Ok(())
1951    /// }
1952    /// ```
1953    pub fn restore_backup_files(&self) -> super::builder::net_app::RestoreBackupFiles {
1954        super::builder::net_app::RestoreBackupFiles::new(self.inner.clone())
1955    }
1956
1957    /// Returns a list of host groups in a `location`. Use `-` as location to list
1958    /// host groups across all locations.
1959    ///
1960    /// # Example
1961    /// ```
1962    /// # use google_cloud_netapp_v1::client::NetApp;
1963    /// use google_cloud_gax::paginator::ItemPaginator as _;
1964    /// use google_cloud_netapp_v1::Result;
1965    /// async fn sample(
1966    ///    client: &NetApp, project_id: &str, location_id: &str
1967    /// ) -> Result<()> {
1968    ///     let mut list = client.list_host_groups()
1969    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}"))
1970    ///         .by_item();
1971    ///     while let Some(item) = list.next().await.transpose()? {
1972    ///         println!("{:?}", item);
1973    ///     }
1974    ///     Ok(())
1975    /// }
1976    /// ```
1977    pub fn list_host_groups(&self) -> super::builder::net_app::ListHostGroups {
1978        super::builder::net_app::ListHostGroups::new(self.inner.clone())
1979    }
1980
1981    /// Returns details of the specified host group.
1982    ///
1983    /// # Example
1984    /// ```
1985    /// # use google_cloud_netapp_v1::client::NetApp;
1986    /// use google_cloud_netapp_v1::Result;
1987    /// async fn sample(
1988    ///    client: &NetApp, project_id: &str, location_id: &str, host_group_id: &str
1989    /// ) -> Result<()> {
1990    ///     let response = client.get_host_group()
1991    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/hostGroups/{host_group_id}"))
1992    ///         .send().await?;
1993    ///     println!("response {:?}", response);
1994    ///     Ok(())
1995    /// }
1996    /// ```
1997    pub fn get_host_group(&self) -> super::builder::net_app::GetHostGroup {
1998        super::builder::net_app::GetHostGroup::new(self.inner.clone())
1999    }
2000
2001    /// Creates a new host group.
2002    ///
2003    /// # Long running operations
2004    ///
2005    /// This method is used to start, and/or poll a [long-running Operation].
2006    /// The [Working with long-running operations] chapter in the [user guide]
2007    /// covers these operations in detail.
2008    ///
2009    /// [long-running operation]: https://google.aip.dev/151
2010    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
2011    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
2012    ///
2013    /// # Example
2014    /// ```
2015    /// # use google_cloud_netapp_v1::client::NetApp;
2016    /// use google_cloud_lro::Poller;
2017    /// use google_cloud_netapp_v1::model::HostGroup;
2018    /// use google_cloud_netapp_v1::Result;
2019    /// async fn sample(
2020    ///    client: &NetApp, project_id: &str, location_id: &str
2021    /// ) -> Result<()> {
2022    ///     let response = client.create_host_group()
2023    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}"))
2024    ///         .set_host_group(
2025    ///             HostGroup::new()/* set fields */
2026    ///         )
2027    ///         .poller().until_done().await?;
2028    ///     println!("response {:?}", response);
2029    ///     Ok(())
2030    /// }
2031    /// ```
2032    pub fn create_host_group(&self) -> super::builder::net_app::CreateHostGroup {
2033        super::builder::net_app::CreateHostGroup::new(self.inner.clone())
2034    }
2035
2036    /// Updates an existing host group.
2037    ///
2038    /// # Long running operations
2039    ///
2040    /// This method is used to start, and/or poll a [long-running Operation].
2041    /// The [Working with long-running operations] chapter in the [user guide]
2042    /// covers these operations in detail.
2043    ///
2044    /// [long-running operation]: https://google.aip.dev/151
2045    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
2046    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
2047    ///
2048    /// # Example
2049    /// ```
2050    /// # use google_cloud_netapp_v1::client::NetApp;
2051    /// use google_cloud_lro::Poller;
2052    /// # extern crate wkt as google_cloud_wkt;
2053    /// use google_cloud_wkt::FieldMask;
2054    /// use google_cloud_netapp_v1::model::HostGroup;
2055    /// use google_cloud_netapp_v1::Result;
2056    /// async fn sample(
2057    ///    client: &NetApp, project_id: &str, location_id: &str, host_group_id: &str
2058    /// ) -> Result<()> {
2059    ///     let response = client.update_host_group()
2060    ///         .set_host_group(
2061    ///             HostGroup::new().set_name(format!("projects/{project_id}/locations/{location_id}/hostGroups/{host_group_id}"))/* set fields */
2062    ///         )
2063    ///         .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
2064    ///         .poller().until_done().await?;
2065    ///     println!("response {:?}", response);
2066    ///     Ok(())
2067    /// }
2068    /// ```
2069    pub fn update_host_group(&self) -> super::builder::net_app::UpdateHostGroup {
2070        super::builder::net_app::UpdateHostGroup::new(self.inner.clone())
2071    }
2072
2073    /// Deletes a host group.
2074    ///
2075    /// # Long running operations
2076    ///
2077    /// This method is used to start, and/or poll a [long-running Operation].
2078    /// The [Working with long-running operations] chapter in the [user guide]
2079    /// covers these operations in detail.
2080    ///
2081    /// [long-running operation]: https://google.aip.dev/151
2082    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
2083    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
2084    ///
2085    /// # Example
2086    /// ```
2087    /// # use google_cloud_netapp_v1::client::NetApp;
2088    /// use google_cloud_lro::Poller;
2089    /// use google_cloud_netapp_v1::Result;
2090    /// async fn sample(
2091    ///    client: &NetApp, project_id: &str, location_id: &str, host_group_id: &str
2092    /// ) -> Result<()> {
2093    ///     client.delete_host_group()
2094    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/hostGroups/{host_group_id}"))
2095    ///         .poller().until_done().await?;
2096    ///     Ok(())
2097    /// }
2098    /// ```
2099    pub fn delete_host_group(&self) -> super::builder::net_app::DeleteHostGroup {
2100        super::builder::net_app::DeleteHostGroup::new(self.inner.clone())
2101    }
2102
2103    /// `ExecuteOntapPost` dispatches the ONTAP `POST` request to the
2104    /// `StoragePool` cluster.
2105    ///
2106    /// # Example
2107    /// ```
2108    /// # use google_cloud_netapp_v1::client::NetApp;
2109    /// use google_cloud_netapp_v1::Result;
2110    /// async fn sample(
2111    ///    client: &NetApp
2112    /// ) -> Result<()> {
2113    ///     let response = client.execute_ontap_post()
2114    ///         /* set fields */
2115    ///         .send().await?;
2116    ///     println!("response {:?}", response);
2117    ///     Ok(())
2118    /// }
2119    /// ```
2120    pub fn execute_ontap_post(&self) -> super::builder::net_app::ExecuteOntapPost {
2121        super::builder::net_app::ExecuteOntapPost::new(self.inner.clone())
2122    }
2123
2124    /// `ExecuteOntapGet` dispatches the ONTAP `GET` request to the
2125    /// `StoragePool` cluster.
2126    ///
2127    /// # Example
2128    /// ```
2129    /// # use google_cloud_netapp_v1::client::NetApp;
2130    /// use google_cloud_netapp_v1::Result;
2131    /// async fn sample(
2132    ///    client: &NetApp
2133    /// ) -> Result<()> {
2134    ///     let response = client.execute_ontap_get()
2135    ///         /* set fields */
2136    ///         .send().await?;
2137    ///     println!("response {:?}", response);
2138    ///     Ok(())
2139    /// }
2140    /// ```
2141    pub fn execute_ontap_get(&self) -> super::builder::net_app::ExecuteOntapGet {
2142        super::builder::net_app::ExecuteOntapGet::new(self.inner.clone())
2143    }
2144
2145    /// `ExecuteOntapDelete` dispatches the ONTAP `DELETE` request to the
2146    /// `StoragePool` cluster.
2147    ///
2148    /// # Example
2149    /// ```
2150    /// # use google_cloud_netapp_v1::client::NetApp;
2151    /// use google_cloud_netapp_v1::Result;
2152    /// async fn sample(
2153    ///    client: &NetApp
2154    /// ) -> Result<()> {
2155    ///     let response = client.execute_ontap_delete()
2156    ///         /* set fields */
2157    ///         .send().await?;
2158    ///     println!("response {:?}", response);
2159    ///     Ok(())
2160    /// }
2161    /// ```
2162    pub fn execute_ontap_delete(&self) -> super::builder::net_app::ExecuteOntapDelete {
2163        super::builder::net_app::ExecuteOntapDelete::new(self.inner.clone())
2164    }
2165
2166    /// `ExecuteOntapPatch` dispatches the ONTAP `PATCH` request to the
2167    /// `StoragePool` cluster.
2168    ///
2169    /// # Example
2170    /// ```
2171    /// # use google_cloud_netapp_v1::client::NetApp;
2172    /// use google_cloud_netapp_v1::Result;
2173    /// async fn sample(
2174    ///    client: &NetApp
2175    /// ) -> Result<()> {
2176    ///     let response = client.execute_ontap_patch()
2177    ///         /* set fields */
2178    ///         .send().await?;
2179    ///     println!("response {:?}", response);
2180    ///     Ok(())
2181    /// }
2182    /// ```
2183    pub fn execute_ontap_patch(&self) -> super::builder::net_app::ExecuteOntapPatch {
2184        super::builder::net_app::ExecuteOntapPatch::new(self.inner.clone())
2185    }
2186
2187    /// Lists information about the supported locations for this service.
2188    ///
2189    /// This method lists locations based on the resource scope provided in
2190    /// the [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: *
2191    /// **Global locations**: If `name` is empty, the method lists the
2192    /// public locations available to all projects. * **Project-specific
2193    /// locations**: If `name` follows the format
2194    /// `projects/{project}`, the method lists locations visible to that
2195    /// specific project. This includes public, private, or other
2196    /// project-specific locations enabled for the project.
2197    ///
2198    /// For gRPC and client library implementations, the resource name is
2199    /// passed as the `name` field. For direct service calls, the resource
2200    /// name is
2201    /// incorporated into the request path based on the specific service
2202    /// implementation and version.
2203    ///
2204    /// [google.cloud.location.ListLocationsRequest.name]: google_cloud_location::model::ListLocationsRequest::name
2205    ///
2206    /// # Example
2207    /// ```
2208    /// # use google_cloud_netapp_v1::client::NetApp;
2209    /// use google_cloud_gax::paginator::ItemPaginator as _;
2210    /// use google_cloud_netapp_v1::Result;
2211    /// async fn sample(
2212    ///    client: &NetApp
2213    /// ) -> Result<()> {
2214    ///     let mut list = client.list_locations()
2215    ///         /* set fields */
2216    ///         .by_item();
2217    ///     while let Some(item) = list.next().await.transpose()? {
2218    ///         println!("{:?}", item);
2219    ///     }
2220    ///     Ok(())
2221    /// }
2222    /// ```
2223    pub fn list_locations(&self) -> super::builder::net_app::ListLocations {
2224        super::builder::net_app::ListLocations::new(self.inner.clone())
2225    }
2226
2227    /// Gets information about a location.
2228    ///
2229    /// # Example
2230    /// ```
2231    /// # use google_cloud_netapp_v1::client::NetApp;
2232    /// use google_cloud_netapp_v1::Result;
2233    /// async fn sample(
2234    ///    client: &NetApp
2235    /// ) -> Result<()> {
2236    ///     let response = client.get_location()
2237    ///         /* set fields */
2238    ///         .send().await?;
2239    ///     println!("response {:?}", response);
2240    ///     Ok(())
2241    /// }
2242    /// ```
2243    pub fn get_location(&self) -> super::builder::net_app::GetLocation {
2244        super::builder::net_app::GetLocation::new(self.inner.clone())
2245    }
2246
2247    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
2248    ///
2249    /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
2250    ///
2251    /// # Example
2252    /// ```
2253    /// # use google_cloud_netapp_v1::client::NetApp;
2254    /// use google_cloud_gax::paginator::ItemPaginator as _;
2255    /// use google_cloud_netapp_v1::Result;
2256    /// async fn sample(
2257    ///    client: &NetApp
2258    /// ) -> Result<()> {
2259    ///     let mut list = client.list_operations()
2260    ///         /* set fields */
2261    ///         .by_item();
2262    ///     while let Some(item) = list.next().await.transpose()? {
2263    ///         println!("{:?}", item);
2264    ///     }
2265    ///     Ok(())
2266    /// }
2267    /// ```
2268    pub fn list_operations(&self) -> super::builder::net_app::ListOperations {
2269        super::builder::net_app::ListOperations::new(self.inner.clone())
2270    }
2271
2272    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
2273    ///
2274    /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
2275    ///
2276    /// # Example
2277    /// ```
2278    /// # use google_cloud_netapp_v1::client::NetApp;
2279    /// use google_cloud_netapp_v1::Result;
2280    /// async fn sample(
2281    ///    client: &NetApp
2282    /// ) -> Result<()> {
2283    ///     let response = client.get_operation()
2284    ///         /* set fields */
2285    ///         .send().await?;
2286    ///     println!("response {:?}", response);
2287    ///     Ok(())
2288    /// }
2289    /// ```
2290    pub fn get_operation(&self) -> super::builder::net_app::GetOperation {
2291        super::builder::net_app::GetOperation::new(self.inner.clone())
2292    }
2293
2294    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
2295    ///
2296    /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
2297    ///
2298    /// # Example
2299    /// ```
2300    /// # use google_cloud_netapp_v1::client::NetApp;
2301    /// use google_cloud_netapp_v1::Result;
2302    /// async fn sample(
2303    ///    client: &NetApp
2304    /// ) -> Result<()> {
2305    ///     client.delete_operation()
2306    ///         /* set fields */
2307    ///         .send().await?;
2308    ///     Ok(())
2309    /// }
2310    /// ```
2311    pub fn delete_operation(&self) -> super::builder::net_app::DeleteOperation {
2312        super::builder::net_app::DeleteOperation::new(self.inner.clone())
2313    }
2314
2315    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
2316    ///
2317    /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
2318    ///
2319    /// # Example
2320    /// ```
2321    /// # use google_cloud_netapp_v1::client::NetApp;
2322    /// use google_cloud_netapp_v1::Result;
2323    /// async fn sample(
2324    ///    client: &NetApp
2325    /// ) -> Result<()> {
2326    ///     client.cancel_operation()
2327    ///         /* set fields */
2328    ///         .send().await?;
2329    ///     Ok(())
2330    /// }
2331    /// ```
2332    pub fn cancel_operation(&self) -> super::builder::net_app::CancelOperation {
2333        super::builder::net_app::CancelOperation::new(self.inner.clone())
2334    }
2335}