Skip to main content

google_cloud_edgecontainer_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 Distributed Cloud Edge Container API.
20///
21/// # Example
22/// ```
23/// # use google_cloud_edgecontainer_v1::client::EdgeContainer;
24/// use google_cloud_gax::paginator::ItemPaginator as _;
25/// # async fn sample() -> Result<(), Box<dyn std::error::Error>> {
26///     let client = EdgeContainer::builder().build().await?;
27///     let parent = "parent_value";
28///     let mut list = client.list_clusters()
29///         .set_parent(parent)
30///         .by_item();
31///     while let Some(item) = list.next().await.transpose()? {
32///         println!("{:?}", item);
33///     }
34/// # Ok(()) }
35/// ```
36///
37/// # Service Description
38///
39/// EdgeContainer API provides management of Kubernetes Clusters on Google Edge
40/// Cloud deployments.
41///
42/// # Configuration
43///
44/// To configure `EdgeContainer` use the `with_*` methods in the type returned
45/// by [builder()][EdgeContainer::builder]. The default configuration should
46/// work for most applications. Common configuration changes include
47///
48/// * [with_endpoint()]: by default this client uses the global default endpoint
49///   (`https://edgecontainer.googleapis.com`). Applications using regional
50///   endpoints or running in restricted networks (e.g. a network configured
51//    with [Private Google Access with VPC Service Controls]) may want to
52///   override this default.
53/// * [with_credentials()]: by default this client uses
54///   [Application Default Credentials]. Applications using custom
55///   authentication may need to override this default.
56///
57/// [with_endpoint()]: super::builder::edge_container::ClientBuilder::with_endpoint
58/// [with_credentials()]: super::builder::edge_container::ClientBuilder::with_credentials
59/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
60/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
61///
62/// # Pooling and Cloning
63///
64/// `EdgeContainer` holds a connection pool internally, it is advised to
65/// create one and reuse it. You do not need to wrap `EdgeContainer` in
66/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
67/// already uses an `Arc` internally.
68#[derive(Clone, Debug)]
69pub struct EdgeContainer {
70    inner: std::sync::Arc<dyn super::stub::dynamic::EdgeContainer>,
71}
72
73impl EdgeContainer {
74    /// Returns a builder for [EdgeContainer].
75    ///
76    /// ```
77    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
78    /// # use google_cloud_edgecontainer_v1::client::EdgeContainer;
79    /// let client = EdgeContainer::builder().build().await?;
80    /// # Ok(()) }
81    /// ```
82    pub fn builder() -> super::builder::edge_container::ClientBuilder {
83        crate::new_client_builder(super::builder::edge_container::client::Factory)
84    }
85
86    /// Creates a new client from the provided stub.
87    ///
88    /// The most common case for calling this function is in tests mocking the
89    /// client's behavior.
90    pub fn from_stub<T>(stub: T) -> Self
91    where
92        T: super::stub::EdgeContainer + 'static,
93    {
94        Self {
95            inner: std::sync::Arc::new(stub),
96        }
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::EdgeContainer>> {
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::EdgeContainer> {
118        super::transport::EdgeContainer::new(conf).await
119    }
120
121    async fn build_with_tracing(
122        conf: gaxi::options::ClientConfig,
123    ) -> crate::ClientBuilderResult<impl super::stub::EdgeContainer> {
124        Self::build_transport(conf)
125            .await
126            .map(super::tracing::EdgeContainer::new)
127    }
128
129    /// Lists Clusters in a given project and location.
130    ///
131    /// # Example
132    /// ```
133    /// # use google_cloud_edgecontainer_v1::client::EdgeContainer;
134    /// use google_cloud_gax::paginator::ItemPaginator as _;
135    /// use google_cloud_edgecontainer_v1::Result;
136    /// async fn sample(
137    ///    client: &EdgeContainer, parent: &str
138    /// ) -> Result<()> {
139    ///     let mut list = client.list_clusters()
140    ///         .set_parent(parent)
141    ///         .by_item();
142    ///     while let Some(item) = list.next().await.transpose()? {
143    ///         println!("{:?}", item);
144    ///     }
145    ///     Ok(())
146    /// }
147    /// ```
148    pub fn list_clusters(&self) -> super::builder::edge_container::ListClusters {
149        super::builder::edge_container::ListClusters::new(self.inner.clone())
150    }
151
152    /// Gets details of a single Cluster.
153    ///
154    /// # Example
155    /// ```
156    /// # use google_cloud_edgecontainer_v1::client::EdgeContainer;
157    /// use google_cloud_edgecontainer_v1::Result;
158    /// async fn sample(
159    ///    client: &EdgeContainer, name: &str
160    /// ) -> Result<()> {
161    ///     let response = client.get_cluster()
162    ///         .set_name(name)
163    ///         .send().await?;
164    ///     println!("response {:?}", response);
165    ///     Ok(())
166    /// }
167    /// ```
168    pub fn get_cluster(&self) -> super::builder::edge_container::GetCluster {
169        super::builder::edge_container::GetCluster::new(self.inner.clone())
170    }
171
172    /// Creates a new Cluster in a given project and location.
173    ///
174    /// # Long running operations
175    ///
176    /// This method is used to start, and/or poll a [long-running Operation].
177    /// The [Working with long-running operations] chapter in the [user guide]
178    /// covers these operations in detail.
179    ///
180    /// [long-running operation]: https://google.aip.dev/151
181    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
182    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
183    ///
184    /// # Example
185    /// ```
186    /// # use google_cloud_edgecontainer_v1::client::EdgeContainer;
187    /// use google_cloud_lro::Poller;
188    /// use google_cloud_edgecontainer_v1::model::Cluster;
189    /// use google_cloud_edgecontainer_v1::Result;
190    /// async fn sample(
191    ///    client: &EdgeContainer, parent: &str
192    /// ) -> Result<()> {
193    ///     let response = client.create_cluster()
194    ///         .set_parent(parent)
195    ///         .set_cluster_id("cluster_id_value")
196    ///         .set_cluster(
197    ///             Cluster::new()/* set fields */
198    ///         )
199    ///         .poller().until_done().await?;
200    ///     println!("response {:?}", response);
201    ///     Ok(())
202    /// }
203    /// ```
204    pub fn create_cluster(&self) -> super::builder::edge_container::CreateCluster {
205        super::builder::edge_container::CreateCluster::new(self.inner.clone())
206    }
207
208    /// Updates the parameters of a single Cluster.
209    ///
210    /// # Long running operations
211    ///
212    /// This method is used to start, and/or poll a [long-running Operation].
213    /// The [Working with long-running operations] chapter in the [user guide]
214    /// covers these operations in detail.
215    ///
216    /// [long-running operation]: https://google.aip.dev/151
217    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
218    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
219    ///
220    /// # Example
221    /// ```
222    /// # use google_cloud_edgecontainer_v1::client::EdgeContainer;
223    /// use google_cloud_lro::Poller;
224    /// # extern crate wkt as google_cloud_wkt;
225    /// use google_cloud_wkt::FieldMask;
226    /// use google_cloud_edgecontainer_v1::model::Cluster;
227    /// use google_cloud_edgecontainer_v1::Result;
228    /// async fn sample(
229    ///    client: &EdgeContainer, name: &str
230    /// ) -> Result<()> {
231    ///     let response = client.update_cluster()
232    ///         .set_cluster(
233    ///             Cluster::new().set_name(name)/* set fields */
234    ///         )
235    ///         .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
236    ///         .poller().until_done().await?;
237    ///     println!("response {:?}", response);
238    ///     Ok(())
239    /// }
240    /// ```
241    pub fn update_cluster(&self) -> super::builder::edge_container::UpdateCluster {
242        super::builder::edge_container::UpdateCluster::new(self.inner.clone())
243    }
244
245    /// Upgrades a single cluster.
246    ///
247    /// # Long running operations
248    ///
249    /// This method is used to start, and/or poll a [long-running Operation].
250    /// The [Working with long-running operations] chapter in the [user guide]
251    /// covers these operations in detail.
252    ///
253    /// [long-running operation]: https://google.aip.dev/151
254    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
255    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
256    ///
257    /// # Example
258    /// ```
259    /// # use google_cloud_edgecontainer_v1::client::EdgeContainer;
260    /// use google_cloud_lro::Poller;
261    /// use google_cloud_edgecontainer_v1::Result;
262    /// async fn sample(
263    ///    client: &EdgeContainer
264    /// ) -> Result<()> {
265    ///     let response = client.upgrade_cluster()
266    ///         /* set fields */
267    ///         .poller().until_done().await?;
268    ///     println!("response {:?}", response);
269    ///     Ok(())
270    /// }
271    /// ```
272    pub fn upgrade_cluster(&self) -> super::builder::edge_container::UpgradeCluster {
273        super::builder::edge_container::UpgradeCluster::new(self.inner.clone())
274    }
275
276    /// Deletes a single Cluster.
277    ///
278    /// # Long running operations
279    ///
280    /// This method is used to start, and/or poll a [long-running Operation].
281    /// The [Working with long-running operations] chapter in the [user guide]
282    /// covers these operations in detail.
283    ///
284    /// [long-running operation]: https://google.aip.dev/151
285    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
286    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
287    ///
288    /// # Example
289    /// ```
290    /// # use google_cloud_edgecontainer_v1::client::EdgeContainer;
291    /// use google_cloud_lro::Poller;
292    /// use google_cloud_edgecontainer_v1::Result;
293    /// async fn sample(
294    ///    client: &EdgeContainer, name: &str
295    /// ) -> Result<()> {
296    ///     client.delete_cluster()
297    ///         .set_name(name)
298    ///         .poller().until_done().await?;
299    ///     Ok(())
300    /// }
301    /// ```
302    pub fn delete_cluster(&self) -> super::builder::edge_container::DeleteCluster {
303        super::builder::edge_container::DeleteCluster::new(self.inner.clone())
304    }
305
306    /// Generates an access token for a Cluster.
307    ///
308    /// # Example
309    /// ```
310    /// # use google_cloud_edgecontainer_v1::client::EdgeContainer;
311    /// use google_cloud_edgecontainer_v1::Result;
312    /// async fn sample(
313    ///    client: &EdgeContainer
314    /// ) -> Result<()> {
315    ///     let response = client.generate_access_token()
316    ///         /* set fields */
317    ///         .send().await?;
318    ///     println!("response {:?}", response);
319    ///     Ok(())
320    /// }
321    /// ```
322    pub fn generate_access_token(&self) -> super::builder::edge_container::GenerateAccessToken {
323        super::builder::edge_container::GenerateAccessToken::new(self.inner.clone())
324    }
325
326    /// Generates an offline credential for a Cluster.
327    ///
328    /// # Example
329    /// ```
330    /// # use google_cloud_edgecontainer_v1::client::EdgeContainer;
331    /// use google_cloud_edgecontainer_v1::Result;
332    /// async fn sample(
333    ///    client: &EdgeContainer
334    /// ) -> Result<()> {
335    ///     let response = client.generate_offline_credential()
336    ///         /* set fields */
337    ///         .send().await?;
338    ///     println!("response {:?}", response);
339    ///     Ok(())
340    /// }
341    /// ```
342    pub fn generate_offline_credential(
343        &self,
344    ) -> super::builder::edge_container::GenerateOfflineCredential {
345        super::builder::edge_container::GenerateOfflineCredential::new(self.inner.clone())
346    }
347
348    /// Lists NodePools in a given project and location.
349    ///
350    /// # Example
351    /// ```
352    /// # use google_cloud_edgecontainer_v1::client::EdgeContainer;
353    /// use google_cloud_gax::paginator::ItemPaginator as _;
354    /// use google_cloud_edgecontainer_v1::Result;
355    /// async fn sample(
356    ///    client: &EdgeContainer, parent: &str
357    /// ) -> Result<()> {
358    ///     let mut list = client.list_node_pools()
359    ///         .set_parent(parent)
360    ///         .by_item();
361    ///     while let Some(item) = list.next().await.transpose()? {
362    ///         println!("{:?}", item);
363    ///     }
364    ///     Ok(())
365    /// }
366    /// ```
367    pub fn list_node_pools(&self) -> super::builder::edge_container::ListNodePools {
368        super::builder::edge_container::ListNodePools::new(self.inner.clone())
369    }
370
371    /// Gets details of a single NodePool.
372    ///
373    /// # Example
374    /// ```
375    /// # use google_cloud_edgecontainer_v1::client::EdgeContainer;
376    /// use google_cloud_edgecontainer_v1::Result;
377    /// async fn sample(
378    ///    client: &EdgeContainer, name: &str
379    /// ) -> Result<()> {
380    ///     let response = client.get_node_pool()
381    ///         .set_name(name)
382    ///         .send().await?;
383    ///     println!("response {:?}", response);
384    ///     Ok(())
385    /// }
386    /// ```
387    pub fn get_node_pool(&self) -> super::builder::edge_container::GetNodePool {
388        super::builder::edge_container::GetNodePool::new(self.inner.clone())
389    }
390
391    /// Creates a new NodePool in a given project and location.
392    ///
393    /// # Long running operations
394    ///
395    /// This method is used to start, and/or poll a [long-running Operation].
396    /// The [Working with long-running operations] chapter in the [user guide]
397    /// covers these operations in detail.
398    ///
399    /// [long-running operation]: https://google.aip.dev/151
400    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
401    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
402    ///
403    /// # Example
404    /// ```
405    /// # use google_cloud_edgecontainer_v1::client::EdgeContainer;
406    /// use google_cloud_lro::Poller;
407    /// use google_cloud_edgecontainer_v1::model::NodePool;
408    /// use google_cloud_edgecontainer_v1::Result;
409    /// async fn sample(
410    ///    client: &EdgeContainer, parent: &str
411    /// ) -> Result<()> {
412    ///     let response = client.create_node_pool()
413    ///         .set_parent(parent)
414    ///         .set_node_pool(
415    ///             NodePool::new()/* set fields */
416    ///         )
417    ///         .poller().until_done().await?;
418    ///     println!("response {:?}", response);
419    ///     Ok(())
420    /// }
421    /// ```
422    pub fn create_node_pool(&self) -> super::builder::edge_container::CreateNodePool {
423        super::builder::edge_container::CreateNodePool::new(self.inner.clone())
424    }
425
426    /// Updates the parameters of a single NodePool.
427    ///
428    /// # Long running operations
429    ///
430    /// This method is used to start, and/or poll a [long-running Operation].
431    /// The [Working with long-running operations] chapter in the [user guide]
432    /// covers these operations in detail.
433    ///
434    /// [long-running operation]: https://google.aip.dev/151
435    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
436    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
437    ///
438    /// # Example
439    /// ```
440    /// # use google_cloud_edgecontainer_v1::client::EdgeContainer;
441    /// use google_cloud_lro::Poller;
442    /// # extern crate wkt as google_cloud_wkt;
443    /// use google_cloud_wkt::FieldMask;
444    /// use google_cloud_edgecontainer_v1::model::NodePool;
445    /// use google_cloud_edgecontainer_v1::Result;
446    /// async fn sample(
447    ///    client: &EdgeContainer, name: &str
448    /// ) -> Result<()> {
449    ///     let response = client.update_node_pool()
450    ///         .set_node_pool(
451    ///             NodePool::new().set_name(name)/* set fields */
452    ///         )
453    ///         .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
454    ///         .poller().until_done().await?;
455    ///     println!("response {:?}", response);
456    ///     Ok(())
457    /// }
458    /// ```
459    pub fn update_node_pool(&self) -> super::builder::edge_container::UpdateNodePool {
460        super::builder::edge_container::UpdateNodePool::new(self.inner.clone())
461    }
462
463    /// Deletes a single NodePool.
464    ///
465    /// # Long running operations
466    ///
467    /// This method is used to start, and/or poll a [long-running Operation].
468    /// The [Working with long-running operations] chapter in the [user guide]
469    /// covers these operations in detail.
470    ///
471    /// [long-running operation]: https://google.aip.dev/151
472    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
473    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
474    ///
475    /// # Example
476    /// ```
477    /// # use google_cloud_edgecontainer_v1::client::EdgeContainer;
478    /// use google_cloud_lro::Poller;
479    /// use google_cloud_edgecontainer_v1::Result;
480    /// async fn sample(
481    ///    client: &EdgeContainer, name: &str
482    /// ) -> Result<()> {
483    ///     client.delete_node_pool()
484    ///         .set_name(name)
485    ///         .poller().until_done().await?;
486    ///     Ok(())
487    /// }
488    /// ```
489    pub fn delete_node_pool(&self) -> super::builder::edge_container::DeleteNodePool {
490        super::builder::edge_container::DeleteNodePool::new(self.inner.clone())
491    }
492
493    /// Lists Machines in a given project and location.
494    ///
495    /// # Example
496    /// ```
497    /// # use google_cloud_edgecontainer_v1::client::EdgeContainer;
498    /// use google_cloud_gax::paginator::ItemPaginator as _;
499    /// use google_cloud_edgecontainer_v1::Result;
500    /// async fn sample(
501    ///    client: &EdgeContainer, parent: &str
502    /// ) -> Result<()> {
503    ///     let mut list = client.list_machines()
504    ///         .set_parent(parent)
505    ///         .by_item();
506    ///     while let Some(item) = list.next().await.transpose()? {
507    ///         println!("{:?}", item);
508    ///     }
509    ///     Ok(())
510    /// }
511    /// ```
512    pub fn list_machines(&self) -> super::builder::edge_container::ListMachines {
513        super::builder::edge_container::ListMachines::new(self.inner.clone())
514    }
515
516    /// Gets details of a single Machine.
517    ///
518    /// # Example
519    /// ```
520    /// # use google_cloud_edgecontainer_v1::client::EdgeContainer;
521    /// use google_cloud_edgecontainer_v1::Result;
522    /// async fn sample(
523    ///    client: &EdgeContainer, name: &str
524    /// ) -> Result<()> {
525    ///     let response = client.get_machine()
526    ///         .set_name(name)
527    ///         .send().await?;
528    ///     println!("response {:?}", response);
529    ///     Ok(())
530    /// }
531    /// ```
532    pub fn get_machine(&self) -> super::builder::edge_container::GetMachine {
533        super::builder::edge_container::GetMachine::new(self.inner.clone())
534    }
535
536    /// Lists VPN connections in a given project and location.
537    ///
538    /// # Example
539    /// ```
540    /// # use google_cloud_edgecontainer_v1::client::EdgeContainer;
541    /// use google_cloud_gax::paginator::ItemPaginator as _;
542    /// use google_cloud_edgecontainer_v1::Result;
543    /// async fn sample(
544    ///    client: &EdgeContainer, parent: &str
545    /// ) -> Result<()> {
546    ///     let mut list = client.list_vpn_connections()
547    ///         .set_parent(parent)
548    ///         .by_item();
549    ///     while let Some(item) = list.next().await.transpose()? {
550    ///         println!("{:?}", item);
551    ///     }
552    ///     Ok(())
553    /// }
554    /// ```
555    pub fn list_vpn_connections(&self) -> super::builder::edge_container::ListVpnConnections {
556        super::builder::edge_container::ListVpnConnections::new(self.inner.clone())
557    }
558
559    /// Gets details of a single VPN connection.
560    ///
561    /// # Example
562    /// ```
563    /// # use google_cloud_edgecontainer_v1::client::EdgeContainer;
564    /// use google_cloud_edgecontainer_v1::Result;
565    /// async fn sample(
566    ///    client: &EdgeContainer, name: &str
567    /// ) -> Result<()> {
568    ///     let response = client.get_vpn_connection()
569    ///         .set_name(name)
570    ///         .send().await?;
571    ///     println!("response {:?}", response);
572    ///     Ok(())
573    /// }
574    /// ```
575    pub fn get_vpn_connection(&self) -> super::builder::edge_container::GetVpnConnection {
576        super::builder::edge_container::GetVpnConnection::new(self.inner.clone())
577    }
578
579    /// Creates a new VPN connection in a given project and location.
580    ///
581    /// # Long running operations
582    ///
583    /// This method is used to start, and/or poll a [long-running Operation].
584    /// The [Working with long-running operations] chapter in the [user guide]
585    /// covers these operations in detail.
586    ///
587    /// [long-running operation]: https://google.aip.dev/151
588    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
589    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
590    ///
591    /// # Example
592    /// ```
593    /// # use google_cloud_edgecontainer_v1::client::EdgeContainer;
594    /// use google_cloud_lro::Poller;
595    /// use google_cloud_edgecontainer_v1::model::VpnConnection;
596    /// use google_cloud_edgecontainer_v1::Result;
597    /// async fn sample(
598    ///    client: &EdgeContainer, parent: &str
599    /// ) -> Result<()> {
600    ///     let response = client.create_vpn_connection()
601    ///         .set_parent(parent)
602    ///         .set_vpn_connection(
603    ///             VpnConnection::new()/* set fields */
604    ///         )
605    ///         .poller().until_done().await?;
606    ///     println!("response {:?}", response);
607    ///     Ok(())
608    /// }
609    /// ```
610    pub fn create_vpn_connection(&self) -> super::builder::edge_container::CreateVpnConnection {
611        super::builder::edge_container::CreateVpnConnection::new(self.inner.clone())
612    }
613
614    /// Deletes a single VPN connection.
615    ///
616    /// # Long running operations
617    ///
618    /// This method is used to start, and/or poll a [long-running Operation].
619    /// The [Working with long-running operations] chapter in the [user guide]
620    /// covers these operations in detail.
621    ///
622    /// [long-running operation]: https://google.aip.dev/151
623    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
624    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
625    ///
626    /// # Example
627    /// ```
628    /// # use google_cloud_edgecontainer_v1::client::EdgeContainer;
629    /// use google_cloud_lro::Poller;
630    /// use google_cloud_edgecontainer_v1::Result;
631    /// async fn sample(
632    ///    client: &EdgeContainer, name: &str
633    /// ) -> Result<()> {
634    ///     client.delete_vpn_connection()
635    ///         .set_name(name)
636    ///         .poller().until_done().await?;
637    ///     Ok(())
638    /// }
639    /// ```
640    pub fn delete_vpn_connection(&self) -> super::builder::edge_container::DeleteVpnConnection {
641        super::builder::edge_container::DeleteVpnConnection::new(self.inner.clone())
642    }
643
644    /// Gets the server config.
645    ///
646    /// # Example
647    /// ```
648    /// # use google_cloud_edgecontainer_v1::client::EdgeContainer;
649    /// use google_cloud_edgecontainer_v1::Result;
650    /// async fn sample(
651    ///    client: &EdgeContainer
652    /// ) -> Result<()> {
653    ///     let response = client.get_server_config()
654    ///         /* set fields */
655    ///         .send().await?;
656    ///     println!("response {:?}", response);
657    ///     Ok(())
658    /// }
659    /// ```
660    pub fn get_server_config(&self) -> super::builder::edge_container::GetServerConfig {
661        super::builder::edge_container::GetServerConfig::new(self.inner.clone())
662    }
663
664    /// Lists information about the supported locations for this service.
665    ///
666    /// # Example
667    /// ```
668    /// # use google_cloud_edgecontainer_v1::client::EdgeContainer;
669    /// use google_cloud_gax::paginator::ItemPaginator as _;
670    /// use google_cloud_edgecontainer_v1::Result;
671    /// async fn sample(
672    ///    client: &EdgeContainer
673    /// ) -> Result<()> {
674    ///     let mut list = client.list_locations()
675    ///         /* set fields */
676    ///         .by_item();
677    ///     while let Some(item) = list.next().await.transpose()? {
678    ///         println!("{:?}", item);
679    ///     }
680    ///     Ok(())
681    /// }
682    /// ```
683    pub fn list_locations(&self) -> super::builder::edge_container::ListLocations {
684        super::builder::edge_container::ListLocations::new(self.inner.clone())
685    }
686
687    /// Gets information about a location.
688    ///
689    /// # Example
690    /// ```
691    /// # use google_cloud_edgecontainer_v1::client::EdgeContainer;
692    /// use google_cloud_edgecontainer_v1::Result;
693    /// async fn sample(
694    ///    client: &EdgeContainer
695    /// ) -> Result<()> {
696    ///     let response = client.get_location()
697    ///         /* set fields */
698    ///         .send().await?;
699    ///     println!("response {:?}", response);
700    ///     Ok(())
701    /// }
702    /// ```
703    pub fn get_location(&self) -> super::builder::edge_container::GetLocation {
704        super::builder::edge_container::GetLocation::new(self.inner.clone())
705    }
706
707    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
708    ///
709    /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
710    ///
711    /// # Example
712    /// ```
713    /// # use google_cloud_edgecontainer_v1::client::EdgeContainer;
714    /// use google_cloud_gax::paginator::ItemPaginator as _;
715    /// use google_cloud_edgecontainer_v1::Result;
716    /// async fn sample(
717    ///    client: &EdgeContainer
718    /// ) -> Result<()> {
719    ///     let mut list = client.list_operations()
720    ///         /* set fields */
721    ///         .by_item();
722    ///     while let Some(item) = list.next().await.transpose()? {
723    ///         println!("{:?}", item);
724    ///     }
725    ///     Ok(())
726    /// }
727    /// ```
728    pub fn list_operations(&self) -> super::builder::edge_container::ListOperations {
729        super::builder::edge_container::ListOperations::new(self.inner.clone())
730    }
731
732    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
733    ///
734    /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
735    ///
736    /// # Example
737    /// ```
738    /// # use google_cloud_edgecontainer_v1::client::EdgeContainer;
739    /// use google_cloud_edgecontainer_v1::Result;
740    /// async fn sample(
741    ///    client: &EdgeContainer
742    /// ) -> Result<()> {
743    ///     let response = client.get_operation()
744    ///         /* set fields */
745    ///         .send().await?;
746    ///     println!("response {:?}", response);
747    ///     Ok(())
748    /// }
749    /// ```
750    pub fn get_operation(&self) -> super::builder::edge_container::GetOperation {
751        super::builder::edge_container::GetOperation::new(self.inner.clone())
752    }
753
754    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
755    ///
756    /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
757    ///
758    /// # Example
759    /// ```
760    /// # use google_cloud_edgecontainer_v1::client::EdgeContainer;
761    /// use google_cloud_edgecontainer_v1::Result;
762    /// async fn sample(
763    ///    client: &EdgeContainer
764    /// ) -> Result<()> {
765    ///     client.delete_operation()
766    ///         /* set fields */
767    ///         .send().await?;
768    ///     Ok(())
769    /// }
770    /// ```
771    pub fn delete_operation(&self) -> super::builder::edge_container::DeleteOperation {
772        super::builder::edge_container::DeleteOperation::new(self.inner.clone())
773    }
774
775    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
776    ///
777    /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
778    ///
779    /// # Example
780    /// ```
781    /// # use google_cloud_edgecontainer_v1::client::EdgeContainer;
782    /// use google_cloud_edgecontainer_v1::Result;
783    /// async fn sample(
784    ///    client: &EdgeContainer
785    /// ) -> Result<()> {
786    ///     client.cancel_operation()
787    ///         /* set fields */
788    ///         .send().await?;
789    ///     Ok(())
790    /// }
791    /// ```
792    pub fn cancel_operation(&self) -> super::builder::edge_container::CancelOperation {
793        super::builder::edge_container::CancelOperation::new(self.inner.clone())
794    }
795}