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/// # async fn sample() -> gax::client_builder::Result<()> {
24/// # use google_cloud_netapp_v1::client::NetApp;
25/// let client = NetApp::builder().build().await?;
26/// // use `client` to make requests to the NetApp API.
27/// # Ok(()) }
28/// ```
29///
30/// # Service Description
31///
32/// NetApp Files Google Cloud Service
33///
34/// # Configuration
35///
36/// To configure `NetApp` use the `with_*` methods in the type returned
37/// by [builder()][NetApp::builder]. The default configuration should
38/// work for most applications. Common configuration changes include
39///
40/// * [with_endpoint()]: by default this client uses the global default endpoint
41/// (`https://netapp.googleapis.com`). Applications using regional
42/// endpoints or running in restricted networks (e.g. a network configured
43// with [Private Google Access with VPC Service Controls]) may want to
44/// override this default.
45/// * [with_credentials()]: by default this client uses
46/// [Application Default Credentials]. Applications using custom
47/// authentication may need to override this default.
48///
49/// [with_endpoint()]: super::builder::net_app::ClientBuilder::with_endpoint
50/// [with_credentials()]: super::builder::net_app::ClientBuilder::credentials
51/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
52/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
53///
54/// # Pooling and Cloning
55///
56/// `NetApp` holds a connection pool internally, it is advised to
57/// create one and the reuse it. You do not need to wrap `NetApp` in
58/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
59/// already uses an `Arc` internally.
60#[derive(Clone, Debug)]
61pub struct NetApp {
62 inner: std::sync::Arc<dyn super::stub::dynamic::NetApp>,
63}
64
65impl NetApp {
66 /// Returns a builder for [NetApp].
67 ///
68 /// ```
69 /// # async fn sample() -> gax::client_builder::Result<()> {
70 /// # use google_cloud_netapp_v1::client::NetApp;
71 /// let client = NetApp::builder().build().await?;
72 /// # Ok(()) }
73 /// ```
74 pub fn builder() -> super::builder::net_app::ClientBuilder {
75 gax::client_builder::internal::new_builder(super::builder::net_app::client::Factory)
76 }
77
78 /// Creates a new client from the provided stub.
79 ///
80 /// The most common case for calling this function is in tests mocking the
81 /// client's behavior.
82 pub fn from_stub<T>(stub: T) -> Self
83 where
84 T: super::stub::NetApp + 'static,
85 {
86 Self {
87 inner: std::sync::Arc::new(stub),
88 }
89 }
90
91 pub(crate) async fn new(
92 config: gaxi::options::ClientConfig,
93 ) -> gax::client_builder::Result<Self> {
94 let inner = Self::build_inner(config).await?;
95 Ok(Self { inner })
96 }
97
98 async fn build_inner(
99 conf: gaxi::options::ClientConfig,
100 ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::NetApp>> {
101 if gaxi::options::tracing_enabled(&conf) {
102 return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
103 }
104 Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
105 }
106
107 async fn build_transport(
108 conf: gaxi::options::ClientConfig,
109 ) -> gax::client_builder::Result<impl super::stub::NetApp> {
110 super::transport::NetApp::new(conf).await
111 }
112
113 async fn build_with_tracing(
114 conf: gaxi::options::ClientConfig,
115 ) -> gax::client_builder::Result<impl super::stub::NetApp> {
116 Self::build_transport(conf)
117 .await
118 .map(super::tracing::NetApp::new)
119 }
120
121 /// Returns descriptions of all storage pools owned by the caller.
122 pub fn list_storage_pools(&self) -> super::builder::net_app::ListStoragePools {
123 super::builder::net_app::ListStoragePools::new(self.inner.clone())
124 }
125
126 /// Creates a new storage pool.
127 ///
128 /// # Long running operations
129 ///
130 /// This method is used to start, and/or poll a [long-running Operation].
131 /// The [Working with long-running operations] chapter in the [user guide]
132 /// covers these operations in detail.
133 ///
134 /// [long-running operation]: https://google.aip.dev/151
135 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
136 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
137 pub fn create_storage_pool(&self) -> super::builder::net_app::CreateStoragePool {
138 super::builder::net_app::CreateStoragePool::new(self.inner.clone())
139 }
140
141 /// Returns the description of the specified storage pool by poolId.
142 pub fn get_storage_pool(&self) -> super::builder::net_app::GetStoragePool {
143 super::builder::net_app::GetStoragePool::new(self.inner.clone())
144 }
145
146 /// Updates the storage pool properties with the full spec
147 ///
148 /// # Long running operations
149 ///
150 /// This method is used to start, and/or poll a [long-running Operation].
151 /// The [Working with long-running operations] chapter in the [user guide]
152 /// covers these operations in detail.
153 ///
154 /// [long-running operation]: https://google.aip.dev/151
155 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
156 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
157 pub fn update_storage_pool(&self) -> super::builder::net_app::UpdateStoragePool {
158 super::builder::net_app::UpdateStoragePool::new(self.inner.clone())
159 }
160
161 /// Warning! This operation will permanently delete the storage pool.
162 ///
163 /// # Long running operations
164 ///
165 /// This method is used to start, and/or poll a [long-running Operation].
166 /// The [Working with long-running operations] chapter in the [user guide]
167 /// covers these operations in detail.
168 ///
169 /// [long-running operation]: https://google.aip.dev/151
170 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
171 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
172 pub fn delete_storage_pool(&self) -> super::builder::net_app::DeleteStoragePool {
173 super::builder::net_app::DeleteStoragePool::new(self.inner.clone())
174 }
175
176 /// ValidateDirectoryService does a connectivity check for a directory service
177 /// policy attached to the storage pool.
178 ///
179 /// # Long running operations
180 ///
181 /// This method is used to start, and/or poll a [long-running Operation].
182 /// The [Working with long-running operations] chapter in the [user guide]
183 /// covers these operations in detail.
184 ///
185 /// [long-running operation]: https://google.aip.dev/151
186 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
187 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
188 pub fn validate_directory_service(&self) -> super::builder::net_app::ValidateDirectoryService {
189 super::builder::net_app::ValidateDirectoryService::new(self.inner.clone())
190 }
191
192 /// This operation will switch the active/replica zone for a regional
193 /// storagePool.
194 ///
195 /// # Long running operations
196 ///
197 /// This method is used to start, and/or poll a [long-running Operation].
198 /// The [Working with long-running operations] chapter in the [user guide]
199 /// covers these operations in detail.
200 ///
201 /// [long-running operation]: https://google.aip.dev/151
202 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
203 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
204 pub fn switch_active_replica_zone(&self) -> super::builder::net_app::SwitchActiveReplicaZone {
205 super::builder::net_app::SwitchActiveReplicaZone::new(self.inner.clone())
206 }
207
208 /// Lists Volumes in a given project.
209 pub fn list_volumes(&self) -> super::builder::net_app::ListVolumes {
210 super::builder::net_app::ListVolumes::new(self.inner.clone())
211 }
212
213 /// Gets details of a single Volume.
214 pub fn get_volume(&self) -> super::builder::net_app::GetVolume {
215 super::builder::net_app::GetVolume::new(self.inner.clone())
216 }
217
218 /// Creates a new Volume in a given project and location.
219 ///
220 /// # Long running operations
221 ///
222 /// This method is used to start, and/or poll a [long-running Operation].
223 /// The [Working with long-running operations] chapter in the [user guide]
224 /// covers these operations in detail.
225 ///
226 /// [long-running operation]: https://google.aip.dev/151
227 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
228 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
229 pub fn create_volume(&self) -> super::builder::net_app::CreateVolume {
230 super::builder::net_app::CreateVolume::new(self.inner.clone())
231 }
232
233 /// Updates the parameters of a single Volume.
234 ///
235 /// # Long running operations
236 ///
237 /// This method is used to start, and/or poll a [long-running Operation].
238 /// The [Working with long-running operations] chapter in the [user guide]
239 /// covers these operations in detail.
240 ///
241 /// [long-running operation]: https://google.aip.dev/151
242 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
243 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
244 pub fn update_volume(&self) -> super::builder::net_app::UpdateVolume {
245 super::builder::net_app::UpdateVolume::new(self.inner.clone())
246 }
247
248 /// Deletes a single Volume.
249 ///
250 /// # Long running operations
251 ///
252 /// This method is used to start, and/or poll a [long-running Operation].
253 /// The [Working with long-running operations] chapter in the [user guide]
254 /// covers these operations in detail.
255 ///
256 /// [long-running operation]: https://google.aip.dev/151
257 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
258 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
259 pub fn delete_volume(&self) -> super::builder::net_app::DeleteVolume {
260 super::builder::net_app::DeleteVolume::new(self.inner.clone())
261 }
262
263 /// Revert an existing volume to a specified snapshot.
264 /// Warning! This operation will permanently revert all changes made after the
265 /// snapshot was created.
266 ///
267 /// # Long running operations
268 ///
269 /// This method is used to start, and/or poll a [long-running Operation].
270 /// The [Working with long-running operations] chapter in the [user guide]
271 /// covers these operations in detail.
272 ///
273 /// [long-running operation]: https://google.aip.dev/151
274 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
275 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
276 pub fn revert_volume(&self) -> super::builder::net_app::RevertVolume {
277 super::builder::net_app::RevertVolume::new(self.inner.clone())
278 }
279
280 /// Returns descriptions of all snapshots for a volume.
281 pub fn list_snapshots(&self) -> super::builder::net_app::ListSnapshots {
282 super::builder::net_app::ListSnapshots::new(self.inner.clone())
283 }
284
285 /// Describe a snapshot for a volume.
286 pub fn get_snapshot(&self) -> super::builder::net_app::GetSnapshot {
287 super::builder::net_app::GetSnapshot::new(self.inner.clone())
288 }
289
290 /// Create a new snapshot for a volume.
291 ///
292 /// # Long running operations
293 ///
294 /// This method is used to start, and/or poll a [long-running Operation].
295 /// The [Working with long-running operations] chapter in the [user guide]
296 /// covers these operations in detail.
297 ///
298 /// [long-running operation]: https://google.aip.dev/151
299 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
300 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
301 pub fn create_snapshot(&self) -> super::builder::net_app::CreateSnapshot {
302 super::builder::net_app::CreateSnapshot::new(self.inner.clone())
303 }
304
305 /// Deletes a snapshot.
306 ///
307 /// # Long running operations
308 ///
309 /// This method is used to start, and/or poll a [long-running Operation].
310 /// The [Working with long-running operations] chapter in the [user guide]
311 /// covers these operations in detail.
312 ///
313 /// [long-running operation]: https://google.aip.dev/151
314 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
315 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
316 pub fn delete_snapshot(&self) -> super::builder::net_app::DeleteSnapshot {
317 super::builder::net_app::DeleteSnapshot::new(self.inner.clone())
318 }
319
320 /// Updates the settings of a specific snapshot.
321 ///
322 /// # Long running operations
323 ///
324 /// This method is used to start, and/or poll a [long-running Operation].
325 /// The [Working with long-running operations] chapter in the [user guide]
326 /// covers these operations in detail.
327 ///
328 /// [long-running operation]: https://google.aip.dev/151
329 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
330 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
331 pub fn update_snapshot(&self) -> super::builder::net_app::UpdateSnapshot {
332 super::builder::net_app::UpdateSnapshot::new(self.inner.clone())
333 }
334
335 /// Lists active directories.
336 pub fn list_active_directories(&self) -> super::builder::net_app::ListActiveDirectories {
337 super::builder::net_app::ListActiveDirectories::new(self.inner.clone())
338 }
339
340 /// Describes a specified active directory.
341 pub fn get_active_directory(&self) -> super::builder::net_app::GetActiveDirectory {
342 super::builder::net_app::GetActiveDirectory::new(self.inner.clone())
343 }
344
345 /// CreateActiveDirectory
346 /// Creates the active directory specified in the request.
347 ///
348 /// # Long running operations
349 ///
350 /// This method is used to start, and/or poll a [long-running Operation].
351 /// The [Working with long-running operations] chapter in the [user guide]
352 /// covers these operations in detail.
353 ///
354 /// [long-running operation]: https://google.aip.dev/151
355 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
356 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
357 pub fn create_active_directory(&self) -> super::builder::net_app::CreateActiveDirectory {
358 super::builder::net_app::CreateActiveDirectory::new(self.inner.clone())
359 }
360
361 /// Update the parameters of an active directories.
362 ///
363 /// # Long running operations
364 ///
365 /// This method is used to start, and/or poll a [long-running Operation].
366 /// The [Working with long-running operations] chapter in the [user guide]
367 /// covers these operations in detail.
368 ///
369 /// [long-running operation]: https://google.aip.dev/151
370 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
371 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
372 pub fn update_active_directory(&self) -> super::builder::net_app::UpdateActiveDirectory {
373 super::builder::net_app::UpdateActiveDirectory::new(self.inner.clone())
374 }
375
376 /// Delete the active directory specified in the request.
377 ///
378 /// # Long running operations
379 ///
380 /// This method is used to start, and/or poll a [long-running Operation].
381 /// The [Working with long-running operations] chapter in the [user guide]
382 /// covers these operations in detail.
383 ///
384 /// [long-running operation]: https://google.aip.dev/151
385 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
386 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
387 pub fn delete_active_directory(&self) -> super::builder::net_app::DeleteActiveDirectory {
388 super::builder::net_app::DeleteActiveDirectory::new(self.inner.clone())
389 }
390
391 /// Returns descriptions of all KMS configs owned by the caller.
392 pub fn list_kms_configs(&self) -> super::builder::net_app::ListKmsConfigs {
393 super::builder::net_app::ListKmsConfigs::new(self.inner.clone())
394 }
395
396 /// Creates a new KMS config.
397 ///
398 /// # Long running operations
399 ///
400 /// This method is used to start, and/or poll a [long-running Operation].
401 /// The [Working with long-running operations] chapter in the [user guide]
402 /// covers these operations in detail.
403 ///
404 /// [long-running operation]: https://google.aip.dev/151
405 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
406 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
407 pub fn create_kms_config(&self) -> super::builder::net_app::CreateKmsConfig {
408 super::builder::net_app::CreateKmsConfig::new(self.inner.clone())
409 }
410
411 /// Returns the description of the specified KMS config by kms_config_id.
412 pub fn get_kms_config(&self) -> super::builder::net_app::GetKmsConfig {
413 super::builder::net_app::GetKmsConfig::new(self.inner.clone())
414 }
415
416 /// Updates the Kms config properties with the full spec
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 pub fn update_kms_config(&self) -> super::builder::net_app::UpdateKmsConfig {
428 super::builder::net_app::UpdateKmsConfig::new(self.inner.clone())
429 }
430
431 /// Encrypt the existing volumes without CMEK encryption with the desired the
432 /// KMS config for the whole region.
433 ///
434 /// # Long running operations
435 ///
436 /// This method is used to start, and/or poll a [long-running Operation].
437 /// The [Working with long-running operations] chapter in the [user guide]
438 /// covers these operations in detail.
439 ///
440 /// [long-running operation]: https://google.aip.dev/151
441 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
442 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
443 pub fn encrypt_volumes(&self) -> super::builder::net_app::EncryptVolumes {
444 super::builder::net_app::EncryptVolumes::new(self.inner.clone())
445 }
446
447 /// Verifies KMS config reachability.
448 pub fn verify_kms_config(&self) -> super::builder::net_app::VerifyKmsConfig {
449 super::builder::net_app::VerifyKmsConfig::new(self.inner.clone())
450 }
451
452 /// Warning! This operation will permanently delete the Kms config.
453 ///
454 /// # Long running operations
455 ///
456 /// This method is used to start, and/or poll a [long-running Operation].
457 /// The [Working with long-running operations] chapter in the [user guide]
458 /// covers these operations in detail.
459 ///
460 /// [long-running operation]: https://google.aip.dev/151
461 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
462 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
463 pub fn delete_kms_config(&self) -> super::builder::net_app::DeleteKmsConfig {
464 super::builder::net_app::DeleteKmsConfig::new(self.inner.clone())
465 }
466
467 /// Returns descriptions of all replications for a volume.
468 pub fn list_replications(&self) -> super::builder::net_app::ListReplications {
469 super::builder::net_app::ListReplications::new(self.inner.clone())
470 }
471
472 /// Describe a replication for a volume.
473 pub fn get_replication(&self) -> super::builder::net_app::GetReplication {
474 super::builder::net_app::GetReplication::new(self.inner.clone())
475 }
476
477 /// Create a new replication for a volume.
478 ///
479 /// # Long running operations
480 ///
481 /// This method is used to start, and/or poll a [long-running Operation].
482 /// The [Working with long-running operations] chapter in the [user guide]
483 /// covers these operations in detail.
484 ///
485 /// [long-running operation]: https://google.aip.dev/151
486 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
487 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
488 pub fn create_replication(&self) -> super::builder::net_app::CreateReplication {
489 super::builder::net_app::CreateReplication::new(self.inner.clone())
490 }
491
492 /// Deletes a replication.
493 ///
494 /// # Long running operations
495 ///
496 /// This method is used to start, and/or poll a [long-running Operation].
497 /// The [Working with long-running operations] chapter in the [user guide]
498 /// covers these operations in detail.
499 ///
500 /// [long-running operation]: https://google.aip.dev/151
501 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
502 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
503 pub fn delete_replication(&self) -> super::builder::net_app::DeleteReplication {
504 super::builder::net_app::DeleteReplication::new(self.inner.clone())
505 }
506
507 /// Updates the settings of a specific replication.
508 ///
509 /// # Long running operations
510 ///
511 /// This method is used to start, and/or poll a [long-running Operation].
512 /// The [Working with long-running operations] chapter in the [user guide]
513 /// covers these operations in detail.
514 ///
515 /// [long-running operation]: https://google.aip.dev/151
516 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
517 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
518 pub fn update_replication(&self) -> super::builder::net_app::UpdateReplication {
519 super::builder::net_app::UpdateReplication::new(self.inner.clone())
520 }
521
522 /// Stop Cross Region Replication.
523 ///
524 /// # Long running operations
525 ///
526 /// This method is used to start, and/or poll a [long-running Operation].
527 /// The [Working with long-running operations] chapter in the [user guide]
528 /// covers these operations in detail.
529 ///
530 /// [long-running operation]: https://google.aip.dev/151
531 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
532 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
533 pub fn stop_replication(&self) -> super::builder::net_app::StopReplication {
534 super::builder::net_app::StopReplication::new(self.inner.clone())
535 }
536
537 /// Resume Cross Region Replication.
538 ///
539 /// # Long running operations
540 ///
541 /// This method is used to start, and/or poll a [long-running Operation].
542 /// The [Working with long-running operations] chapter in the [user guide]
543 /// covers these operations in detail.
544 ///
545 /// [long-running operation]: https://google.aip.dev/151
546 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
547 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
548 pub fn resume_replication(&self) -> super::builder::net_app::ResumeReplication {
549 super::builder::net_app::ResumeReplication::new(self.inner.clone())
550 }
551
552 /// Reverses direction of replication. Source becomes destination and
553 /// destination becomes source.
554 ///
555 /// # Long running operations
556 ///
557 /// This method is used to start, and/or poll a [long-running Operation].
558 /// The [Working with long-running operations] chapter in the [user guide]
559 /// covers these operations in detail.
560 ///
561 /// [long-running operation]: https://google.aip.dev/151
562 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
563 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
564 pub fn reverse_replication_direction(
565 &self,
566 ) -> super::builder::net_app::ReverseReplicationDirection {
567 super::builder::net_app::ReverseReplicationDirection::new(self.inner.clone())
568 }
569
570 /// Establish replication peering.
571 ///
572 /// # Long running operations
573 ///
574 /// This method is used to start, and/or poll a [long-running Operation].
575 /// The [Working with long-running operations] chapter in the [user guide]
576 /// covers these operations in detail.
577 ///
578 /// [long-running operation]: https://google.aip.dev/151
579 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
580 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
581 pub fn establish_peering(&self) -> super::builder::net_app::EstablishPeering {
582 super::builder::net_app::EstablishPeering::new(self.inner.clone())
583 }
584
585 /// Syncs the replication. This will invoke one time volume data transfer from
586 /// source to destination.
587 ///
588 /// # Long running operations
589 ///
590 /// This method is used to start, and/or poll a [long-running Operation].
591 /// The [Working with long-running operations] chapter in the [user guide]
592 /// covers these operations in detail.
593 ///
594 /// [long-running operation]: https://google.aip.dev/151
595 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
596 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
597 pub fn sync_replication(&self) -> super::builder::net_app::SyncReplication {
598 super::builder::net_app::SyncReplication::new(self.inner.clone())
599 }
600
601 /// Creates new backup vault
602 ///
603 /// # Long running operations
604 ///
605 /// This method is used to start, and/or poll a [long-running Operation].
606 /// The [Working with long-running operations] chapter in the [user guide]
607 /// covers these operations in detail.
608 ///
609 /// [long-running operation]: https://google.aip.dev/151
610 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
611 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
612 pub fn create_backup_vault(&self) -> super::builder::net_app::CreateBackupVault {
613 super::builder::net_app::CreateBackupVault::new(self.inner.clone())
614 }
615
616 /// Returns the description of the specified backup vault
617 pub fn get_backup_vault(&self) -> super::builder::net_app::GetBackupVault {
618 super::builder::net_app::GetBackupVault::new(self.inner.clone())
619 }
620
621 /// Returns list of all available backup vaults.
622 pub fn list_backup_vaults(&self) -> super::builder::net_app::ListBackupVaults {
623 super::builder::net_app::ListBackupVaults::new(self.inner.clone())
624 }
625
626 /// Updates the settings of a specific backup vault.
627 ///
628 /// # Long running operations
629 ///
630 /// This method is used to start, and/or poll a [long-running Operation].
631 /// The [Working with long-running operations] chapter in the [user guide]
632 /// covers these operations in detail.
633 ///
634 /// [long-running operation]: https://google.aip.dev/151
635 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
636 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
637 pub fn update_backup_vault(&self) -> super::builder::net_app::UpdateBackupVault {
638 super::builder::net_app::UpdateBackupVault::new(self.inner.clone())
639 }
640
641 /// Warning! This operation will permanently delete the backup vault.
642 ///
643 /// # Long running operations
644 ///
645 /// This method is used to start, and/or poll a [long-running Operation].
646 /// The [Working with long-running operations] chapter in the [user guide]
647 /// covers these operations in detail.
648 ///
649 /// [long-running operation]: https://google.aip.dev/151
650 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
651 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
652 pub fn delete_backup_vault(&self) -> super::builder::net_app::DeleteBackupVault {
653 super::builder::net_app::DeleteBackupVault::new(self.inner.clone())
654 }
655
656 /// Creates a backup from the volume specified in the request
657 /// The backup can be created from the given snapshot if specified in the
658 /// request. If no snapshot specified, there'll be a new snapshot taken to
659 /// initiate the backup creation.
660 ///
661 /// # Long running operations
662 ///
663 /// This method is used to start, and/or poll a [long-running Operation].
664 /// The [Working with long-running operations] chapter in the [user guide]
665 /// covers these operations in detail.
666 ///
667 /// [long-running operation]: https://google.aip.dev/151
668 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
669 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
670 pub fn create_backup(&self) -> super::builder::net_app::CreateBackup {
671 super::builder::net_app::CreateBackup::new(self.inner.clone())
672 }
673
674 /// Returns the description of the specified backup
675 pub fn get_backup(&self) -> super::builder::net_app::GetBackup {
676 super::builder::net_app::GetBackup::new(self.inner.clone())
677 }
678
679 /// Returns descriptions of all backups for a backupVault.
680 pub fn list_backups(&self) -> super::builder::net_app::ListBackups {
681 super::builder::net_app::ListBackups::new(self.inner.clone())
682 }
683
684 /// Warning! This operation will permanently delete the backup.
685 ///
686 /// # Long running operations
687 ///
688 /// This method is used to start, and/or poll a [long-running Operation].
689 /// The [Working with long-running operations] chapter in the [user guide]
690 /// covers these operations in detail.
691 ///
692 /// [long-running operation]: https://google.aip.dev/151
693 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
694 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
695 pub fn delete_backup(&self) -> super::builder::net_app::DeleteBackup {
696 super::builder::net_app::DeleteBackup::new(self.inner.clone())
697 }
698
699 /// Update backup with full spec.
700 ///
701 /// # Long running operations
702 ///
703 /// This method is used to start, and/or poll a [long-running Operation].
704 /// The [Working with long-running operations] chapter in the [user guide]
705 /// covers these operations in detail.
706 ///
707 /// [long-running operation]: https://google.aip.dev/151
708 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
709 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
710 pub fn update_backup(&self) -> super::builder::net_app::UpdateBackup {
711 super::builder::net_app::UpdateBackup::new(self.inner.clone())
712 }
713
714 /// Creates new backup policy
715 ///
716 /// # Long running operations
717 ///
718 /// This method is used to start, and/or poll a [long-running Operation].
719 /// The [Working with long-running operations] chapter in the [user guide]
720 /// covers these operations in detail.
721 ///
722 /// [long-running operation]: https://google.aip.dev/151
723 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
724 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
725 pub fn create_backup_policy(&self) -> super::builder::net_app::CreateBackupPolicy {
726 super::builder::net_app::CreateBackupPolicy::new(self.inner.clone())
727 }
728
729 /// Returns the description of the specified backup policy by backup_policy_id.
730 pub fn get_backup_policy(&self) -> super::builder::net_app::GetBackupPolicy {
731 super::builder::net_app::GetBackupPolicy::new(self.inner.clone())
732 }
733
734 /// Returns list of all available backup policies.
735 pub fn list_backup_policies(&self) -> super::builder::net_app::ListBackupPolicies {
736 super::builder::net_app::ListBackupPolicies::new(self.inner.clone())
737 }
738
739 /// Updates settings of a specific backup policy.
740 ///
741 /// # Long running operations
742 ///
743 /// This method is used to start, and/or poll a [long-running Operation].
744 /// The [Working with long-running operations] chapter in the [user guide]
745 /// covers these operations in detail.
746 ///
747 /// [long-running operation]: https://google.aip.dev/151
748 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
749 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
750 pub fn update_backup_policy(&self) -> super::builder::net_app::UpdateBackupPolicy {
751 super::builder::net_app::UpdateBackupPolicy::new(self.inner.clone())
752 }
753
754 /// Warning! This operation will permanently delete the backup policy.
755 ///
756 /// # Long running operations
757 ///
758 /// This method is used to start, and/or poll a [long-running Operation].
759 /// The [Working with long-running operations] chapter in the [user guide]
760 /// covers these operations in detail.
761 ///
762 /// [long-running operation]: https://google.aip.dev/151
763 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
764 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
765 pub fn delete_backup_policy(&self) -> super::builder::net_app::DeleteBackupPolicy {
766 super::builder::net_app::DeleteBackupPolicy::new(self.inner.clone())
767 }
768
769 /// Returns list of all quota rules in a location.
770 pub fn list_quota_rules(&self) -> super::builder::net_app::ListQuotaRules {
771 super::builder::net_app::ListQuotaRules::new(self.inner.clone())
772 }
773
774 /// Returns details of the specified quota rule.
775 pub fn get_quota_rule(&self) -> super::builder::net_app::GetQuotaRule {
776 super::builder::net_app::GetQuotaRule::new(self.inner.clone())
777 }
778
779 /// Creates a new quota rule.
780 ///
781 /// # Long running operations
782 ///
783 /// This method is used to start, and/or poll a [long-running Operation].
784 /// The [Working with long-running operations] chapter in the [user guide]
785 /// covers these operations in detail.
786 ///
787 /// [long-running operation]: https://google.aip.dev/151
788 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
789 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
790 pub fn create_quota_rule(&self) -> super::builder::net_app::CreateQuotaRule {
791 super::builder::net_app::CreateQuotaRule::new(self.inner.clone())
792 }
793
794 /// Updates a quota rule.
795 ///
796 /// # Long running operations
797 ///
798 /// This method is used to start, and/or poll a [long-running Operation].
799 /// The [Working with long-running operations] chapter in the [user guide]
800 /// covers these operations in detail.
801 ///
802 /// [long-running operation]: https://google.aip.dev/151
803 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
804 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
805 pub fn update_quota_rule(&self) -> super::builder::net_app::UpdateQuotaRule {
806 super::builder::net_app::UpdateQuotaRule::new(self.inner.clone())
807 }
808
809 /// Deletes a quota rule.
810 ///
811 /// # Long running operations
812 ///
813 /// This method is used to start, and/or poll a [long-running Operation].
814 /// The [Working with long-running operations] chapter in the [user guide]
815 /// covers these operations in detail.
816 ///
817 /// [long-running operation]: https://google.aip.dev/151
818 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
819 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
820 pub fn delete_quota_rule(&self) -> super::builder::net_app::DeleteQuotaRule {
821 super::builder::net_app::DeleteQuotaRule::new(self.inner.clone())
822 }
823
824 /// Restore files from a backup to a volume.
825 ///
826 /// # Long running operations
827 ///
828 /// This method is used to start, and/or poll a [long-running Operation].
829 /// The [Working with long-running operations] chapter in the [user guide]
830 /// covers these operations in detail.
831 ///
832 /// [long-running operation]: https://google.aip.dev/151
833 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
834 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
835 pub fn restore_backup_files(&self) -> super::builder::net_app::RestoreBackupFiles {
836 super::builder::net_app::RestoreBackupFiles::new(self.inner.clone())
837 }
838
839 /// Returns a list of host groups in a `location`. Use `-` as location to list
840 /// host groups across all locations.
841 pub fn list_host_groups(&self) -> super::builder::net_app::ListHostGroups {
842 super::builder::net_app::ListHostGroups::new(self.inner.clone())
843 }
844
845 /// Returns details of the specified host group.
846 pub fn get_host_group(&self) -> super::builder::net_app::GetHostGroup {
847 super::builder::net_app::GetHostGroup::new(self.inner.clone())
848 }
849
850 /// Creates a new host group.
851 ///
852 /// # Long running operations
853 ///
854 /// This method is used to start, and/or poll a [long-running Operation].
855 /// The [Working with long-running operations] chapter in the [user guide]
856 /// covers these operations in detail.
857 ///
858 /// [long-running operation]: https://google.aip.dev/151
859 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
860 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
861 pub fn create_host_group(&self) -> super::builder::net_app::CreateHostGroup {
862 super::builder::net_app::CreateHostGroup::new(self.inner.clone())
863 }
864
865 /// Updates an existing host group.
866 ///
867 /// # Long running operations
868 ///
869 /// This method is used to start, and/or poll a [long-running Operation].
870 /// The [Working with long-running operations] chapter in the [user guide]
871 /// covers these operations in detail.
872 ///
873 /// [long-running operation]: https://google.aip.dev/151
874 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
875 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
876 pub fn update_host_group(&self) -> super::builder::net_app::UpdateHostGroup {
877 super::builder::net_app::UpdateHostGroup::new(self.inner.clone())
878 }
879
880 /// Deletes a host group.
881 ///
882 /// # Long running operations
883 ///
884 /// This method is used to start, and/or poll a [long-running Operation].
885 /// The [Working with long-running operations] chapter in the [user guide]
886 /// covers these operations in detail.
887 ///
888 /// [long-running operation]: https://google.aip.dev/151
889 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
890 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
891 pub fn delete_host_group(&self) -> super::builder::net_app::DeleteHostGroup {
892 super::builder::net_app::DeleteHostGroup::new(self.inner.clone())
893 }
894
895 /// Lists information about the supported locations for this service.
896 pub fn list_locations(&self) -> super::builder::net_app::ListLocations {
897 super::builder::net_app::ListLocations::new(self.inner.clone())
898 }
899
900 /// Gets information about a location.
901 pub fn get_location(&self) -> super::builder::net_app::GetLocation {
902 super::builder::net_app::GetLocation::new(self.inner.clone())
903 }
904
905 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
906 ///
907 /// [google.longrunning.Operations]: longrunning::client::Operations
908 pub fn list_operations(&self) -> super::builder::net_app::ListOperations {
909 super::builder::net_app::ListOperations::new(self.inner.clone())
910 }
911
912 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
913 ///
914 /// [google.longrunning.Operations]: longrunning::client::Operations
915 pub fn get_operation(&self) -> super::builder::net_app::GetOperation {
916 super::builder::net_app::GetOperation::new(self.inner.clone())
917 }
918
919 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
920 ///
921 /// [google.longrunning.Operations]: longrunning::client::Operations
922 pub fn delete_operation(&self) -> super::builder::net_app::DeleteOperation {
923 super::builder::net_app::DeleteOperation::new(self.inner.clone())
924 }
925
926 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
927 ///
928 /// [google.longrunning.Operations]: longrunning::client::Operations
929 pub fn cancel_operation(&self) -> super::builder::net_app::CancelOperation {
930 super::builder::net_app::CancelOperation::new(self.inner.clone())
931 }
932}