Skip to main content

google_cloud_compute_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::bare_urls)]
17#![allow(rustdoc::broken_intra_doc_links)]
18#![allow(rustdoc::invalid_html_tags)]
19#![allow(rustdoc::redundant_explicit_links)]
20
21/// Implements a client for the Compute Engine API.
22///
23/// # Example
24/// ```
25/// # use google_cloud_compute_v1::client::AcceleratorTypes;
26/// async fn sample(
27/// ) -> anyhow::Result<()> {
28///     let client = AcceleratorTypes::builder().build().await?;
29///     // use `client` to make requests to the Compute Engine API.
30///     Ok(())
31/// }
32/// ```
33///
34/// # Service Description
35///
36/// Service for the `acceleratorTypes` resource.
37///
38/// The client library was generated with API version 2026-09-01.
39///
40/// # Configuration
41///
42/// To configure `AcceleratorTypes` use the `with_*` methods in the type returned
43/// by [builder()][AcceleratorTypes::builder]. The default configuration should
44/// work for most applications. Common configuration changes include
45///
46/// * [with_endpoint()]: by default this client uses the global default endpoint
47///   (`https://compute.googleapis.com`). Applications using regional
48///   endpoints or running in restricted networks (e.g. a network configured
49///   with [Private Google Access with VPC Service Controls]) may want to
50///   override this default.
51/// * [with_credentials()]: by default this client uses
52///   [Application Default Credentials]. Applications using custom
53///   authentication may need to override this default.
54///
55/// [with_endpoint()]: super::builder::accelerator_types::ClientBuilder::with_endpoint
56/// [with_credentials()]: super::builder::accelerator_types::ClientBuilder::with_credentials
57/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
58/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
59///
60/// # Pooling and Cloning
61///
62/// `AcceleratorTypes` holds a connection pool internally, it is advised to
63/// create one and reuse it. You do not need to wrap `AcceleratorTypes` in
64/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
65/// already uses an `Arc` internally.
66#[cfg(feature = "accelerator-types")]
67#[cfg_attr(docsrs, doc(cfg(feature = "accelerator-types")))]
68#[derive(Clone, Debug)]
69pub struct AcceleratorTypes {
70    inner: std::sync::Arc<dyn super::stub::dynamic::AcceleratorTypes>,
71}
72
73#[cfg(feature = "accelerator-types")]
74impl AcceleratorTypes {
75    /// Returns a builder for [AcceleratorTypes].
76    ///
77    /// ```
78    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
79    /// # use google_cloud_compute_v1::client::AcceleratorTypes;
80    /// let client = AcceleratorTypes::builder().build().await?;
81    /// # Ok(()) }
82    /// ```
83    pub fn builder() -> super::builder::accelerator_types::ClientBuilder {
84        crate::new_client_builder(super::builder::accelerator_types::client::Factory)
85    }
86
87    /// Creates a new client from the provided stub.
88    ///
89    /// The most common case for calling this function is in tests mocking the
90    /// client's behavior.
91    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
92    where
93        T: super::stub::AcceleratorTypes + 'static,
94    {
95        Self { inner: stub.into() }
96    }
97
98    pub(crate) async fn new(
99        config: gaxi::options::ClientConfig,
100    ) -> crate::ClientBuilderResult<Self> {
101        let inner = Self::build_inner(config).await?;
102        Ok(Self { inner })
103    }
104
105    async fn build_inner(
106        conf: gaxi::options::ClientConfig,
107    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::AcceleratorTypes>>
108    {
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::AcceleratorTypes> {
118        super::transport::AcceleratorTypes::new(conf).await
119    }
120
121    async fn build_with_tracing(
122        conf: gaxi::options::ClientConfig,
123    ) -> crate::ClientBuilderResult<impl super::stub::AcceleratorTypes> {
124        Self::build_transport(conf)
125            .await
126            .map(super::tracing::AcceleratorTypes::new)
127    }
128
129    /// Retrieves an aggregated list of accelerator types.
130    ///
131    /// To prevent failure, it is recommended that you set the
132    /// `returnPartialSuccess` parameter to `true`.
133    pub fn aggregated_list(&self) -> super::builder::accelerator_types::AggregatedList {
134        super::builder::accelerator_types::AggregatedList::new(self.inner.clone())
135    }
136
137    /// Returns the specified accelerator type.
138    pub fn get(&self) -> super::builder::accelerator_types::Get {
139        super::builder::accelerator_types::Get::new(self.inner.clone())
140    }
141
142    /// Retrieves a list of accelerator types that are available to the specified
143    /// project.
144    pub fn list(&self) -> super::builder::accelerator_types::List {
145        super::builder::accelerator_types::List::new(self.inner.clone())
146    }
147}
148
149/// Implements a client for the Compute Engine API.
150///
151/// # Example
152/// ```
153/// # use google_cloud_compute_v1::client::Addresses;
154/// async fn sample(
155/// ) -> anyhow::Result<()> {
156///     let client = Addresses::builder().build().await?;
157///     // use `client` to make requests to the Compute Engine API.
158///     Ok(())
159/// }
160/// ```
161///
162/// # Service Description
163///
164/// Service for the `addresses` resource.
165///
166/// The client library was generated with API version 2026-09-01.
167///
168/// # Configuration
169///
170/// To configure `Addresses` use the `with_*` methods in the type returned
171/// by [builder()][Addresses::builder]. The default configuration should
172/// work for most applications. Common configuration changes include
173///
174/// * [with_endpoint()]: by default this client uses the global default endpoint
175///   (`https://compute.googleapis.com`). Applications using regional
176///   endpoints or running in restricted networks (e.g. a network configured
177///   with [Private Google Access with VPC Service Controls]) may want to
178///   override this default.
179/// * [with_credentials()]: by default this client uses
180///   [Application Default Credentials]. Applications using custom
181///   authentication may need to override this default.
182///
183/// [with_endpoint()]: super::builder::addresses::ClientBuilder::with_endpoint
184/// [with_credentials()]: super::builder::addresses::ClientBuilder::with_credentials
185/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
186/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
187///
188/// # Pooling and Cloning
189///
190/// `Addresses` holds a connection pool internally, it is advised to
191/// create one and reuse it. You do not need to wrap `Addresses` in
192/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
193/// already uses an `Arc` internally.
194#[cfg(feature = "addresses")]
195#[cfg_attr(docsrs, doc(cfg(feature = "addresses")))]
196#[derive(Clone, Debug)]
197pub struct Addresses {
198    inner: std::sync::Arc<dyn super::stub::dynamic::Addresses>,
199}
200
201#[cfg(feature = "addresses")]
202impl Addresses {
203    /// Returns a builder for [Addresses].
204    ///
205    /// ```
206    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
207    /// # use google_cloud_compute_v1::client::Addresses;
208    /// let client = Addresses::builder().build().await?;
209    /// # Ok(()) }
210    /// ```
211    pub fn builder() -> super::builder::addresses::ClientBuilder {
212        crate::new_client_builder(super::builder::addresses::client::Factory)
213    }
214
215    /// Creates a new client from the provided stub.
216    ///
217    /// The most common case for calling this function is in tests mocking the
218    /// client's behavior.
219    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
220    where
221        T: super::stub::Addresses + 'static,
222    {
223        Self { inner: stub.into() }
224    }
225
226    pub(crate) async fn new(
227        config: gaxi::options::ClientConfig,
228    ) -> crate::ClientBuilderResult<Self> {
229        let inner = Self::build_inner(config).await?;
230        Ok(Self { inner })
231    }
232
233    async fn build_inner(
234        conf: gaxi::options::ClientConfig,
235    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::Addresses>> {
236        if gaxi::options::tracing_enabled(&conf) {
237            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
238        }
239        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
240    }
241
242    async fn build_transport(
243        conf: gaxi::options::ClientConfig,
244    ) -> crate::ClientBuilderResult<impl super::stub::Addresses> {
245        super::transport::Addresses::new(conf).await
246    }
247
248    async fn build_with_tracing(
249        conf: gaxi::options::ClientConfig,
250    ) -> crate::ClientBuilderResult<impl super::stub::Addresses> {
251        Self::build_transport(conf)
252            .await
253            .map(super::tracing::Addresses::new)
254    }
255
256    /// Retrieves an aggregated list of addresses.
257    ///
258    /// To prevent failure, it is recommended that you set the
259    /// `returnPartialSuccess` parameter to `true`.
260    pub fn aggregated_list(&self) -> super::builder::addresses::AggregatedList {
261        super::builder::addresses::AggregatedList::new(self.inner.clone())
262    }
263
264    /// Deletes the specified address resource.
265    pub fn delete(&self) -> super::builder::addresses::Delete {
266        super::builder::addresses::Delete::new(self.inner.clone())
267    }
268
269    /// Returns the specified address resource.
270    pub fn get(&self) -> super::builder::addresses::Get {
271        super::builder::addresses::Get::new(self.inner.clone())
272    }
273
274    /// Creates an address resource in the specified project by using the data
275    /// included in the request.
276    pub fn insert(&self) -> super::builder::addresses::Insert {
277        super::builder::addresses::Insert::new(self.inner.clone())
278    }
279
280    /// Retrieves a list of addresses contained within
281    /// the specified region.
282    pub fn list(&self) -> super::builder::addresses::List {
283        super::builder::addresses::List::new(self.inner.clone())
284    }
285
286    /// Moves the specified address resource.
287    pub fn r#move(&self) -> super::builder::addresses::Move {
288        super::builder::addresses::Move::new(self.inner.clone())
289    }
290
291    /// Sets the labels on an Address. To learn more about labels, read theLabeling
292    /// Resources documentation.
293    pub fn set_labels(&self) -> super::builder::addresses::SetLabels {
294        super::builder::addresses::SetLabels::new(self.inner.clone())
295    }
296
297    /// Returns permissions that a caller has on the specified resource.
298    pub fn test_iam_permissions(&self) -> super::builder::addresses::TestIamPermissions {
299        super::builder::addresses::TestIamPermissions::new(self.inner.clone())
300    }
301
302    /// Retrieves the specified region-specific Operations resource.
303    pub fn get_operation(&self) -> super::builder::addresses::GetOperation {
304        super::builder::addresses::GetOperation::new(self.inner.clone())
305    }
306}
307
308/// Implements a client for the Compute Engine API.
309///
310/// # Example
311/// ```
312/// # use google_cloud_compute_v1::client::Advice;
313/// async fn sample(
314/// ) -> anyhow::Result<()> {
315///     let client = Advice::builder().build().await?;
316///     // use `client` to make requests to the Compute Engine API.
317///     Ok(())
318/// }
319/// ```
320///
321/// # Service Description
322///
323/// Service for the `advice` resource.
324///
325/// The client library was generated with API version 2026-09-01.
326///
327/// # Configuration
328///
329/// To configure `Advice` use the `with_*` methods in the type returned
330/// by [builder()][Advice::builder]. The default configuration should
331/// work for most applications. Common configuration changes include
332///
333/// * [with_endpoint()]: by default this client uses the global default endpoint
334///   (`https://compute.googleapis.com`). Applications using regional
335///   endpoints or running in restricted networks (e.g. a network configured
336///   with [Private Google Access with VPC Service Controls]) may want to
337///   override this default.
338/// * [with_credentials()]: by default this client uses
339///   [Application Default Credentials]. Applications using custom
340///   authentication may need to override this default.
341///
342/// [with_endpoint()]: super::builder::advice::ClientBuilder::with_endpoint
343/// [with_credentials()]: super::builder::advice::ClientBuilder::with_credentials
344/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
345/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
346///
347/// # Pooling and Cloning
348///
349/// `Advice` holds a connection pool internally, it is advised to
350/// create one and reuse it. You do not need to wrap `Advice` in
351/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
352/// already uses an `Arc` internally.
353#[cfg(feature = "advice")]
354#[cfg_attr(docsrs, doc(cfg(feature = "advice")))]
355#[derive(Clone, Debug)]
356pub struct Advice {
357    inner: std::sync::Arc<dyn super::stub::dynamic::Advice>,
358}
359
360#[cfg(feature = "advice")]
361impl Advice {
362    /// Returns a builder for [Advice].
363    ///
364    /// ```
365    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
366    /// # use google_cloud_compute_v1::client::Advice;
367    /// let client = Advice::builder().build().await?;
368    /// # Ok(()) }
369    /// ```
370    pub fn builder() -> super::builder::advice::ClientBuilder {
371        crate::new_client_builder(super::builder::advice::client::Factory)
372    }
373
374    /// Creates a new client from the provided stub.
375    ///
376    /// The most common case for calling this function is in tests mocking the
377    /// client's behavior.
378    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
379    where
380        T: super::stub::Advice + 'static,
381    {
382        Self { inner: stub.into() }
383    }
384
385    pub(crate) async fn new(
386        config: gaxi::options::ClientConfig,
387    ) -> crate::ClientBuilderResult<Self> {
388        let inner = Self::build_inner(config).await?;
389        Ok(Self { inner })
390    }
391
392    async fn build_inner(
393        conf: gaxi::options::ClientConfig,
394    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::Advice>> {
395        if gaxi::options::tracing_enabled(&conf) {
396            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
397        }
398        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
399    }
400
401    async fn build_transport(
402        conf: gaxi::options::ClientConfig,
403    ) -> crate::ClientBuilderResult<impl super::stub::Advice> {
404        super::transport::Advice::new(conf).await
405    }
406
407    async fn build_with_tracing(
408        conf: gaxi::options::ClientConfig,
409    ) -> crate::ClientBuilderResult<impl super::stub::Advice> {
410        Self::build_transport(conf)
411            .await
412            .map(super::tracing::Advice::new)
413    }
414
415    /// Advise how, where and when to create the requested amount of instances
416    /// with specified accelerators, within the specified time and location limits.
417    /// The method recommends creating future reservations for the requested
418    /// resources.
419    pub fn calendar_mode(&self) -> super::builder::advice::CalendarMode {
420        super::builder::advice::CalendarMode::new(self.inner.clone())
421    }
422
423    /// Advice on making real-time decisions (such as choosing zone or
424    /// machine types) during deployment to maximize your chances of obtaining
425    /// capacity.
426    pub fn capacity(&self) -> super::builder::advice::Capacity {
427        super::builder::advice::Capacity::new(self.inner.clone())
428    }
429
430    /// Gets the capacity history.
431    pub fn capacity_history(&self) -> super::builder::advice::CapacityHistory {
432        super::builder::advice::CapacityHistory::new(self.inner.clone())
433    }
434}
435
436/// Implements a client for the Compute Engine API.
437///
438/// # Example
439/// ```
440/// # use google_cloud_compute_v1::client::Autoscalers;
441/// async fn sample(
442/// ) -> anyhow::Result<()> {
443///     let client = Autoscalers::builder().build().await?;
444///     // use `client` to make requests to the Compute Engine API.
445///     Ok(())
446/// }
447/// ```
448///
449/// # Service Description
450///
451/// Service for the `autoscalers` resource.
452///
453/// The client library was generated with API version 2026-09-01.
454///
455/// # Configuration
456///
457/// To configure `Autoscalers` use the `with_*` methods in the type returned
458/// by [builder()][Autoscalers::builder]. The default configuration should
459/// work for most applications. Common configuration changes include
460///
461/// * [with_endpoint()]: by default this client uses the global default endpoint
462///   (`https://compute.googleapis.com`). Applications using regional
463///   endpoints or running in restricted networks (e.g. a network configured
464///   with [Private Google Access with VPC Service Controls]) may want to
465///   override this default.
466/// * [with_credentials()]: by default this client uses
467///   [Application Default Credentials]. Applications using custom
468///   authentication may need to override this default.
469///
470/// [with_endpoint()]: super::builder::autoscalers::ClientBuilder::with_endpoint
471/// [with_credentials()]: super::builder::autoscalers::ClientBuilder::with_credentials
472/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
473/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
474///
475/// # Pooling and Cloning
476///
477/// `Autoscalers` holds a connection pool internally, it is advised to
478/// create one and reuse it. You do not need to wrap `Autoscalers` in
479/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
480/// already uses an `Arc` internally.
481#[cfg(feature = "autoscalers")]
482#[cfg_attr(docsrs, doc(cfg(feature = "autoscalers")))]
483#[derive(Clone, Debug)]
484pub struct Autoscalers {
485    inner: std::sync::Arc<dyn super::stub::dynamic::Autoscalers>,
486}
487
488#[cfg(feature = "autoscalers")]
489impl Autoscalers {
490    /// Returns a builder for [Autoscalers].
491    ///
492    /// ```
493    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
494    /// # use google_cloud_compute_v1::client::Autoscalers;
495    /// let client = Autoscalers::builder().build().await?;
496    /// # Ok(()) }
497    /// ```
498    pub fn builder() -> super::builder::autoscalers::ClientBuilder {
499        crate::new_client_builder(super::builder::autoscalers::client::Factory)
500    }
501
502    /// Creates a new client from the provided stub.
503    ///
504    /// The most common case for calling this function is in tests mocking the
505    /// client's behavior.
506    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
507    where
508        T: super::stub::Autoscalers + 'static,
509    {
510        Self { inner: stub.into() }
511    }
512
513    pub(crate) async fn new(
514        config: gaxi::options::ClientConfig,
515    ) -> crate::ClientBuilderResult<Self> {
516        let inner = Self::build_inner(config).await?;
517        Ok(Self { inner })
518    }
519
520    async fn build_inner(
521        conf: gaxi::options::ClientConfig,
522    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::Autoscalers>> {
523        if gaxi::options::tracing_enabled(&conf) {
524            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
525        }
526        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
527    }
528
529    async fn build_transport(
530        conf: gaxi::options::ClientConfig,
531    ) -> crate::ClientBuilderResult<impl super::stub::Autoscalers> {
532        super::transport::Autoscalers::new(conf).await
533    }
534
535    async fn build_with_tracing(
536        conf: gaxi::options::ClientConfig,
537    ) -> crate::ClientBuilderResult<impl super::stub::Autoscalers> {
538        Self::build_transport(conf)
539            .await
540            .map(super::tracing::Autoscalers::new)
541    }
542
543    /// Retrieves an aggregated list of autoscalers.
544    ///
545    /// To prevent failure, it is recommended that you set the
546    /// `returnPartialSuccess` parameter to `true`.
547    pub fn aggregated_list(&self) -> super::builder::autoscalers::AggregatedList {
548        super::builder::autoscalers::AggregatedList::new(self.inner.clone())
549    }
550
551    /// Deletes the specified autoscaler.
552    pub fn delete(&self) -> super::builder::autoscalers::Delete {
553        super::builder::autoscalers::Delete::new(self.inner.clone())
554    }
555
556    /// Returns the specified autoscaler resource.
557    pub fn get(&self) -> super::builder::autoscalers::Get {
558        super::builder::autoscalers::Get::new(self.inner.clone())
559    }
560
561    /// Creates an autoscaler in the specified project using the data
562    /// included in the request.
563    pub fn insert(&self) -> super::builder::autoscalers::Insert {
564        super::builder::autoscalers::Insert::new(self.inner.clone())
565    }
566
567    /// Retrieves a list of autoscalers contained within
568    /// the specified zone.
569    pub fn list(&self) -> super::builder::autoscalers::List {
570        super::builder::autoscalers::List::new(self.inner.clone())
571    }
572
573    /// Updates an autoscaler in the specified project using the data
574    /// included in the request. This method supportsPATCH
575    /// semantics and uses theJSON merge
576    /// patch format and processing rules.
577    pub fn patch(&self) -> super::builder::autoscalers::Patch {
578        super::builder::autoscalers::Patch::new(self.inner.clone())
579    }
580
581    /// Returns permissions that a caller has on the specified resource.
582    pub fn test_iam_permissions(&self) -> super::builder::autoscalers::TestIamPermissions {
583        super::builder::autoscalers::TestIamPermissions::new(self.inner.clone())
584    }
585
586    /// Updates an autoscaler in the specified project using the data
587    /// included in the request.
588    pub fn update(&self) -> super::builder::autoscalers::Update {
589        super::builder::autoscalers::Update::new(self.inner.clone())
590    }
591
592    /// Retrieves the specified zone-specific Operations resource.
593    pub fn get_operation(&self) -> super::builder::autoscalers::GetOperation {
594        super::builder::autoscalers::GetOperation::new(self.inner.clone())
595    }
596}
597
598/// Implements a client for the Compute Engine API.
599///
600/// # Example
601/// ```
602/// # use google_cloud_compute_v1::client::BackendBuckets;
603/// async fn sample(
604/// ) -> anyhow::Result<()> {
605///     let client = BackendBuckets::builder().build().await?;
606///     // use `client` to make requests to the Compute Engine API.
607///     Ok(())
608/// }
609/// ```
610///
611/// # Service Description
612///
613/// Service for the `backendBuckets` resource.
614///
615/// The client library was generated with API version 2026-09-01.
616///
617/// # Configuration
618///
619/// To configure `BackendBuckets` use the `with_*` methods in the type returned
620/// by [builder()][BackendBuckets::builder]. The default configuration should
621/// work for most applications. Common configuration changes include
622///
623/// * [with_endpoint()]: by default this client uses the global default endpoint
624///   (`https://compute.googleapis.com`). Applications using regional
625///   endpoints or running in restricted networks (e.g. a network configured
626///   with [Private Google Access with VPC Service Controls]) may want to
627///   override this default.
628/// * [with_credentials()]: by default this client uses
629///   [Application Default Credentials]. Applications using custom
630///   authentication may need to override this default.
631///
632/// [with_endpoint()]: super::builder::backend_buckets::ClientBuilder::with_endpoint
633/// [with_credentials()]: super::builder::backend_buckets::ClientBuilder::with_credentials
634/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
635/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
636///
637/// # Pooling and Cloning
638///
639/// `BackendBuckets` holds a connection pool internally, it is advised to
640/// create one and reuse it. You do not need to wrap `BackendBuckets` in
641/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
642/// already uses an `Arc` internally.
643#[cfg(feature = "backend-buckets")]
644#[cfg_attr(docsrs, doc(cfg(feature = "backend-buckets")))]
645#[derive(Clone, Debug)]
646pub struct BackendBuckets {
647    inner: std::sync::Arc<dyn super::stub::dynamic::BackendBuckets>,
648}
649
650#[cfg(feature = "backend-buckets")]
651impl BackendBuckets {
652    /// Returns a builder for [BackendBuckets].
653    ///
654    /// ```
655    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
656    /// # use google_cloud_compute_v1::client::BackendBuckets;
657    /// let client = BackendBuckets::builder().build().await?;
658    /// # Ok(()) }
659    /// ```
660    pub fn builder() -> super::builder::backend_buckets::ClientBuilder {
661        crate::new_client_builder(super::builder::backend_buckets::client::Factory)
662    }
663
664    /// Creates a new client from the provided stub.
665    ///
666    /// The most common case for calling this function is in tests mocking the
667    /// client's behavior.
668    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
669    where
670        T: super::stub::BackendBuckets + 'static,
671    {
672        Self { inner: stub.into() }
673    }
674
675    pub(crate) async fn new(
676        config: gaxi::options::ClientConfig,
677    ) -> crate::ClientBuilderResult<Self> {
678        let inner = Self::build_inner(config).await?;
679        Ok(Self { inner })
680    }
681
682    async fn build_inner(
683        conf: gaxi::options::ClientConfig,
684    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::BackendBuckets>> {
685        if gaxi::options::tracing_enabled(&conf) {
686            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
687        }
688        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
689    }
690
691    async fn build_transport(
692        conf: gaxi::options::ClientConfig,
693    ) -> crate::ClientBuilderResult<impl super::stub::BackendBuckets> {
694        super::transport::BackendBuckets::new(conf).await
695    }
696
697    async fn build_with_tracing(
698        conf: gaxi::options::ClientConfig,
699    ) -> crate::ClientBuilderResult<impl super::stub::BackendBuckets> {
700        Self::build_transport(conf)
701            .await
702            .map(super::tracing::BackendBuckets::new)
703    }
704
705    /// Adds a key for validating requests with signed URLs for this backend
706    /// bucket.
707    pub fn add_signed_url_key(&self) -> super::builder::backend_buckets::AddSignedUrlKey {
708        super::builder::backend_buckets::AddSignedUrlKey::new(self.inner.clone())
709    }
710
711    /// Retrieves the list of all BackendBucket resources, regional and global,
712    /// available to the specified project.
713    ///
714    /// To prevent failure, it is recommended that you set the
715    /// `returnPartialSuccess` parameter to `true`.
716    pub fn aggregated_list(&self) -> super::builder::backend_buckets::AggregatedList {
717        super::builder::backend_buckets::AggregatedList::new(self.inner.clone())
718    }
719
720    /// Deletes the specified BackendBucket resource.
721    pub fn delete(&self) -> super::builder::backend_buckets::Delete {
722        super::builder::backend_buckets::Delete::new(self.inner.clone())
723    }
724
725    /// Deletes a key for validating requests with signed URLs for this backend
726    /// bucket.
727    pub fn delete_signed_url_key(&self) -> super::builder::backend_buckets::DeleteSignedUrlKey {
728        super::builder::backend_buckets::DeleteSignedUrlKey::new(self.inner.clone())
729    }
730
731    /// Returns the specified BackendBucket resource.
732    pub fn get(&self) -> super::builder::backend_buckets::Get {
733        super::builder::backend_buckets::Get::new(self.inner.clone())
734    }
735
736    /// Gets the access control policy for a resource. May be empty if no such
737    /// policy or resource exists.
738    pub fn get_iam_policy(&self) -> super::builder::backend_buckets::GetIamPolicy {
739        super::builder::backend_buckets::GetIamPolicy::new(self.inner.clone())
740    }
741
742    /// Creates a BackendBucket resource in the specified project using
743    /// the data included in the request.
744    pub fn insert(&self) -> super::builder::backend_buckets::Insert {
745        super::builder::backend_buckets::Insert::new(self.inner.clone())
746    }
747
748    /// Retrieves the list of BackendBucket resources available to the specified
749    /// project.
750    pub fn list(&self) -> super::builder::backend_buckets::List {
751        super::builder::backend_buckets::List::new(self.inner.clone())
752    }
753
754    /// Retrieves a list of all usable backend buckets in the specified project.
755    pub fn list_usable(&self) -> super::builder::backend_buckets::ListUsable {
756        super::builder::backend_buckets::ListUsable::new(self.inner.clone())
757    }
758
759    /// Updates the specified BackendBucket resource with the data included in the
760    /// request. This method supportsPATCH
761    /// semantics and uses theJSON merge
762    /// patch format and processing rules.
763    pub fn patch(&self) -> super::builder::backend_buckets::Patch {
764        super::builder::backend_buckets::Patch::new(self.inner.clone())
765    }
766
767    /// Sets the edge security policy for the specified backend bucket.
768    pub fn set_edge_security_policy(
769        &self,
770    ) -> super::builder::backend_buckets::SetEdgeSecurityPolicy {
771        super::builder::backend_buckets::SetEdgeSecurityPolicy::new(self.inner.clone())
772    }
773
774    /// Sets the access control policy on the specified resource.
775    /// Replaces any existing policy.
776    pub fn set_iam_policy(&self) -> super::builder::backend_buckets::SetIamPolicy {
777        super::builder::backend_buckets::SetIamPolicy::new(self.inner.clone())
778    }
779
780    /// Returns permissions that a caller has on the specified resource.
781    pub fn test_iam_permissions(&self) -> super::builder::backend_buckets::TestIamPermissions {
782        super::builder::backend_buckets::TestIamPermissions::new(self.inner.clone())
783    }
784
785    /// Updates the specified BackendBucket resource with the data included in the
786    /// request.
787    pub fn update(&self) -> super::builder::backend_buckets::Update {
788        super::builder::backend_buckets::Update::new(self.inner.clone())
789    }
790
791    /// Retrieves the specified Operations resource.
792    pub fn get_operation(&self) -> super::builder::backend_buckets::GetOperation {
793        super::builder::backend_buckets::GetOperation::new(self.inner.clone())
794    }
795}
796
797/// Implements a client for the Compute Engine API.
798///
799/// # Example
800/// ```
801/// # use google_cloud_compute_v1::client::BackendServices;
802/// async fn sample(
803/// ) -> anyhow::Result<()> {
804///     let client = BackendServices::builder().build().await?;
805///     // use `client` to make requests to the Compute Engine API.
806///     Ok(())
807/// }
808/// ```
809///
810/// # Service Description
811///
812/// Service for the `backendServices` resource.
813///
814/// The client library was generated with API version 2026-09-01.
815///
816/// # Configuration
817///
818/// To configure `BackendServices` use the `with_*` methods in the type returned
819/// by [builder()][BackendServices::builder]. The default configuration should
820/// work for most applications. Common configuration changes include
821///
822/// * [with_endpoint()]: by default this client uses the global default endpoint
823///   (`https://compute.googleapis.com`). Applications using regional
824///   endpoints or running in restricted networks (e.g. a network configured
825///   with [Private Google Access with VPC Service Controls]) may want to
826///   override this default.
827/// * [with_credentials()]: by default this client uses
828///   [Application Default Credentials]. Applications using custom
829///   authentication may need to override this default.
830///
831/// [with_endpoint()]: super::builder::backend_services::ClientBuilder::with_endpoint
832/// [with_credentials()]: super::builder::backend_services::ClientBuilder::with_credentials
833/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
834/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
835///
836/// # Pooling and Cloning
837///
838/// `BackendServices` holds a connection pool internally, it is advised to
839/// create one and reuse it. You do not need to wrap `BackendServices` in
840/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
841/// already uses an `Arc` internally.
842#[cfg(feature = "backend-services")]
843#[cfg_attr(docsrs, doc(cfg(feature = "backend-services")))]
844#[derive(Clone, Debug)]
845pub struct BackendServices {
846    inner: std::sync::Arc<dyn super::stub::dynamic::BackendServices>,
847}
848
849#[cfg(feature = "backend-services")]
850impl BackendServices {
851    /// Returns a builder for [BackendServices].
852    ///
853    /// ```
854    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
855    /// # use google_cloud_compute_v1::client::BackendServices;
856    /// let client = BackendServices::builder().build().await?;
857    /// # Ok(()) }
858    /// ```
859    pub fn builder() -> super::builder::backend_services::ClientBuilder {
860        crate::new_client_builder(super::builder::backend_services::client::Factory)
861    }
862
863    /// Creates a new client from the provided stub.
864    ///
865    /// The most common case for calling this function is in tests mocking the
866    /// client's behavior.
867    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
868    where
869        T: super::stub::BackendServices + 'static,
870    {
871        Self { inner: stub.into() }
872    }
873
874    pub(crate) async fn new(
875        config: gaxi::options::ClientConfig,
876    ) -> crate::ClientBuilderResult<Self> {
877        let inner = Self::build_inner(config).await?;
878        Ok(Self { inner })
879    }
880
881    async fn build_inner(
882        conf: gaxi::options::ClientConfig,
883    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::BackendServices>> {
884        if gaxi::options::tracing_enabled(&conf) {
885            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
886        }
887        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
888    }
889
890    async fn build_transport(
891        conf: gaxi::options::ClientConfig,
892    ) -> crate::ClientBuilderResult<impl super::stub::BackendServices> {
893        super::transport::BackendServices::new(conf).await
894    }
895
896    async fn build_with_tracing(
897        conf: gaxi::options::ClientConfig,
898    ) -> crate::ClientBuilderResult<impl super::stub::BackendServices> {
899        Self::build_transport(conf)
900            .await
901            .map(super::tracing::BackendServices::new)
902    }
903
904    /// Adds a key for validating requests with signed URLs for this backend
905    /// service.
906    pub fn add_signed_url_key(&self) -> super::builder::backend_services::AddSignedUrlKey {
907        super::builder::backend_services::AddSignedUrlKey::new(self.inner.clone())
908    }
909
910    /// Retrieves the list of all BackendService resources, regional and global,
911    /// available to the specified project.
912    ///
913    /// To prevent failure, it is recommended that you set the
914    /// `returnPartialSuccess` parameter to `true`.
915    pub fn aggregated_list(&self) -> super::builder::backend_services::AggregatedList {
916        super::builder::backend_services::AggregatedList::new(self.inner.clone())
917    }
918
919    /// Deletes the specified BackendService resource.
920    pub fn delete(&self) -> super::builder::backend_services::Delete {
921        super::builder::backend_services::Delete::new(self.inner.clone())
922    }
923
924    /// Deletes a key for validating requests with signed URLs for this backend
925    /// service.
926    pub fn delete_signed_url_key(&self) -> super::builder::backend_services::DeleteSignedUrlKey {
927        super::builder::backend_services::DeleteSignedUrlKey::new(self.inner.clone())
928    }
929
930    /// Returns the specified BackendService resource.
931    pub fn get(&self) -> super::builder::backend_services::Get {
932        super::builder::backend_services::Get::new(self.inner.clone())
933    }
934
935    /// Returns effective security policies applied to this backend service.
936    pub fn get_effective_security_policies(
937        &self,
938    ) -> super::builder::backend_services::GetEffectiveSecurityPolicies {
939        super::builder::backend_services::GetEffectiveSecurityPolicies::new(self.inner.clone())
940    }
941
942    /// Gets the most recent health check results for this
943    /// BackendService.
944    ///
945    /// Example request body:
946    ///
947    /// {
948    /// "group": "/zones/us-east1-b/instanceGroups/lb-backend-example"
949    /// }
950    pub fn get_health(&self) -> super::builder::backend_services::GetHealth {
951        super::builder::backend_services::GetHealth::new(self.inner.clone())
952    }
953
954    /// Gets the access control policy for a resource. May be empty if no such
955    /// policy or resource exists.
956    pub fn get_iam_policy(&self) -> super::builder::backend_services::GetIamPolicy {
957        super::builder::backend_services::GetIamPolicy::new(self.inner.clone())
958    }
959
960    /// Creates a BackendService resource in the specified project using
961    /// the data included in the request. For more information, see
962    /// Backend services overview.
963    pub fn insert(&self) -> super::builder::backend_services::Insert {
964        super::builder::backend_services::Insert::new(self.inner.clone())
965    }
966
967    /// Retrieves the list of BackendService resources available to the specified
968    /// project.
969    pub fn list(&self) -> super::builder::backend_services::List {
970        super::builder::backend_services::List::new(self.inner.clone())
971    }
972
973    /// Retrieves a list of all usable backend services for Application Load
974    /// Balancers and Proxy Network Load Balancers in the specified project.
975    /// Backend services for external and internal passthrough Network Load
976    /// Balancers are not included in the response.
977    pub fn list_usable(&self) -> super::builder::backend_services::ListUsable {
978        super::builder::backend_services::ListUsable::new(self.inner.clone())
979    }
980
981    /// Patches the specified BackendService resource with the data included in the
982    /// request. For more information, see
983    /// Backend services overview. This method
984    /// supports PATCH semantics and uses the JSON merge
985    /// patch format and processing rules.
986    pub fn patch(&self) -> super::builder::backend_services::Patch {
987        super::builder::backend_services::Patch::new(self.inner.clone())
988    }
989
990    /// Sets the edge security policy for the specified backend service.
991    pub fn set_edge_security_policy(
992        &self,
993    ) -> super::builder::backend_services::SetEdgeSecurityPolicy {
994        super::builder::backend_services::SetEdgeSecurityPolicy::new(self.inner.clone())
995    }
996
997    /// Sets the access control policy on the specified resource.
998    /// Replaces any existing policy.
999    pub fn set_iam_policy(&self) -> super::builder::backend_services::SetIamPolicy {
1000        super::builder::backend_services::SetIamPolicy::new(self.inner.clone())
1001    }
1002
1003    /// Sets the Google Cloud Armor security policy for the specified backend
1004    /// service. For more information, seeGoogle
1005    /// Cloud Armor Overview
1006    pub fn set_security_policy(&self) -> super::builder::backend_services::SetSecurityPolicy {
1007        super::builder::backend_services::SetSecurityPolicy::new(self.inner.clone())
1008    }
1009
1010    /// Returns permissions that a caller has on the specified resource.
1011    pub fn test_iam_permissions(&self) -> super::builder::backend_services::TestIamPermissions {
1012        super::builder::backend_services::TestIamPermissions::new(self.inner.clone())
1013    }
1014
1015    /// Updates the specified BackendService resource with the data included in the
1016    /// request. For more information, seeBackend
1017    /// services overview.
1018    pub fn update(&self) -> super::builder::backend_services::Update {
1019        super::builder::backend_services::Update::new(self.inner.clone())
1020    }
1021
1022    /// Retrieves the specified Operations resource.
1023    pub fn get_operation(&self) -> super::builder::backend_services::GetOperation {
1024        super::builder::backend_services::GetOperation::new(self.inner.clone())
1025    }
1026}
1027
1028/// Implements a client for the Compute Engine API.
1029///
1030/// # Example
1031/// ```
1032/// # use google_cloud_compute_v1::client::CrossSiteNetworks;
1033/// async fn sample(
1034/// ) -> anyhow::Result<()> {
1035///     let client = CrossSiteNetworks::builder().build().await?;
1036///     // use `client` to make requests to the Compute Engine API.
1037///     Ok(())
1038/// }
1039/// ```
1040///
1041/// # Service Description
1042///
1043/// Service for the `crossSiteNetworks` resource.
1044///
1045/// The client library was generated with API version 2026-09-01.
1046///
1047/// # Configuration
1048///
1049/// To configure `CrossSiteNetworks` use the `with_*` methods in the type returned
1050/// by [builder()][CrossSiteNetworks::builder]. The default configuration should
1051/// work for most applications. Common configuration changes include
1052///
1053/// * [with_endpoint()]: by default this client uses the global default endpoint
1054///   (`https://compute.googleapis.com`). Applications using regional
1055///   endpoints or running in restricted networks (e.g. a network configured
1056///   with [Private Google Access with VPC Service Controls]) may want to
1057///   override this default.
1058/// * [with_credentials()]: by default this client uses
1059///   [Application Default Credentials]. Applications using custom
1060///   authentication may need to override this default.
1061///
1062/// [with_endpoint()]: super::builder::cross_site_networks::ClientBuilder::with_endpoint
1063/// [with_credentials()]: super::builder::cross_site_networks::ClientBuilder::with_credentials
1064/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
1065/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
1066///
1067/// # Pooling and Cloning
1068///
1069/// `CrossSiteNetworks` holds a connection pool internally, it is advised to
1070/// create one and reuse it. You do not need to wrap `CrossSiteNetworks` in
1071/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
1072/// already uses an `Arc` internally.
1073#[cfg(feature = "cross-site-networks")]
1074#[cfg_attr(docsrs, doc(cfg(feature = "cross-site-networks")))]
1075#[derive(Clone, Debug)]
1076pub struct CrossSiteNetworks {
1077    inner: std::sync::Arc<dyn super::stub::dynamic::CrossSiteNetworks>,
1078}
1079
1080#[cfg(feature = "cross-site-networks")]
1081impl CrossSiteNetworks {
1082    /// Returns a builder for [CrossSiteNetworks].
1083    ///
1084    /// ```
1085    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
1086    /// # use google_cloud_compute_v1::client::CrossSiteNetworks;
1087    /// let client = CrossSiteNetworks::builder().build().await?;
1088    /// # Ok(()) }
1089    /// ```
1090    pub fn builder() -> super::builder::cross_site_networks::ClientBuilder {
1091        crate::new_client_builder(super::builder::cross_site_networks::client::Factory)
1092    }
1093
1094    /// Creates a new client from the provided stub.
1095    ///
1096    /// The most common case for calling this function is in tests mocking the
1097    /// client's behavior.
1098    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
1099    where
1100        T: super::stub::CrossSiteNetworks + 'static,
1101    {
1102        Self { inner: stub.into() }
1103    }
1104
1105    pub(crate) async fn new(
1106        config: gaxi::options::ClientConfig,
1107    ) -> crate::ClientBuilderResult<Self> {
1108        let inner = Self::build_inner(config).await?;
1109        Ok(Self { inner })
1110    }
1111
1112    async fn build_inner(
1113        conf: gaxi::options::ClientConfig,
1114    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::CrossSiteNetworks>>
1115    {
1116        if gaxi::options::tracing_enabled(&conf) {
1117            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
1118        }
1119        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
1120    }
1121
1122    async fn build_transport(
1123        conf: gaxi::options::ClientConfig,
1124    ) -> crate::ClientBuilderResult<impl super::stub::CrossSiteNetworks> {
1125        super::transport::CrossSiteNetworks::new(conf).await
1126    }
1127
1128    async fn build_with_tracing(
1129        conf: gaxi::options::ClientConfig,
1130    ) -> crate::ClientBuilderResult<impl super::stub::CrossSiteNetworks> {
1131        Self::build_transport(conf)
1132            .await
1133            .map(super::tracing::CrossSiteNetworks::new)
1134    }
1135
1136    /// Deletes the specified cross-site network in the given scope.
1137    pub fn delete(&self) -> super::builder::cross_site_networks::Delete {
1138        super::builder::cross_site_networks::Delete::new(self.inner.clone())
1139    }
1140
1141    /// Returns the specified cross-site network in the given scope.
1142    pub fn get(&self) -> super::builder::cross_site_networks::Get {
1143        super::builder::cross_site_networks::Get::new(self.inner.clone())
1144    }
1145
1146    /// Creates a cross-site network in the specified project in the given scope
1147    /// using the parameters that are included in the request.
1148    pub fn insert(&self) -> super::builder::cross_site_networks::Insert {
1149        super::builder::cross_site_networks::Insert::new(self.inner.clone())
1150    }
1151
1152    /// Lists the cross-site networks for a project in the given scope.
1153    pub fn list(&self) -> super::builder::cross_site_networks::List {
1154        super::builder::cross_site_networks::List::new(self.inner.clone())
1155    }
1156
1157    /// Updates the specified cross-site network with the data included in
1158    /// the request. This method supportsPATCH
1159    /// semantics and uses theJSON merge
1160    /// patch format and processing rules.
1161    pub fn patch(&self) -> super::builder::cross_site_networks::Patch {
1162        super::builder::cross_site_networks::Patch::new(self.inner.clone())
1163    }
1164
1165    /// Retrieves the specified Operations resource.
1166    pub fn get_operation(&self) -> super::builder::cross_site_networks::GetOperation {
1167        super::builder::cross_site_networks::GetOperation::new(self.inner.clone())
1168    }
1169}
1170
1171/// Implements a client for the Compute Engine API.
1172///
1173/// # Example
1174/// ```
1175/// # use google_cloud_compute_v1::client::DiskTypes;
1176/// async fn sample(
1177/// ) -> anyhow::Result<()> {
1178///     let client = DiskTypes::builder().build().await?;
1179///     // use `client` to make requests to the Compute Engine API.
1180///     Ok(())
1181/// }
1182/// ```
1183///
1184/// # Service Description
1185///
1186/// Service for the `diskTypes` resource.
1187///
1188/// The client library was generated with API version 2026-09-01.
1189///
1190/// # Configuration
1191///
1192/// To configure `DiskTypes` use the `with_*` methods in the type returned
1193/// by [builder()][DiskTypes::builder]. The default configuration should
1194/// work for most applications. Common configuration changes include
1195///
1196/// * [with_endpoint()]: by default this client uses the global default endpoint
1197///   (`https://compute.googleapis.com`). Applications using regional
1198///   endpoints or running in restricted networks (e.g. a network configured
1199///   with [Private Google Access with VPC Service Controls]) may want to
1200///   override this default.
1201/// * [with_credentials()]: by default this client uses
1202///   [Application Default Credentials]. Applications using custom
1203///   authentication may need to override this default.
1204///
1205/// [with_endpoint()]: super::builder::disk_types::ClientBuilder::with_endpoint
1206/// [with_credentials()]: super::builder::disk_types::ClientBuilder::with_credentials
1207/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
1208/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
1209///
1210/// # Pooling and Cloning
1211///
1212/// `DiskTypes` holds a connection pool internally, it is advised to
1213/// create one and reuse it. You do not need to wrap `DiskTypes` in
1214/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
1215/// already uses an `Arc` internally.
1216#[cfg(feature = "disk-types")]
1217#[cfg_attr(docsrs, doc(cfg(feature = "disk-types")))]
1218#[derive(Clone, Debug)]
1219pub struct DiskTypes {
1220    inner: std::sync::Arc<dyn super::stub::dynamic::DiskTypes>,
1221}
1222
1223#[cfg(feature = "disk-types")]
1224impl DiskTypes {
1225    /// Returns a builder for [DiskTypes].
1226    ///
1227    /// ```
1228    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
1229    /// # use google_cloud_compute_v1::client::DiskTypes;
1230    /// let client = DiskTypes::builder().build().await?;
1231    /// # Ok(()) }
1232    /// ```
1233    pub fn builder() -> super::builder::disk_types::ClientBuilder {
1234        crate::new_client_builder(super::builder::disk_types::client::Factory)
1235    }
1236
1237    /// Creates a new client from the provided stub.
1238    ///
1239    /// The most common case for calling this function is in tests mocking the
1240    /// client's behavior.
1241    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
1242    where
1243        T: super::stub::DiskTypes + 'static,
1244    {
1245        Self { inner: stub.into() }
1246    }
1247
1248    pub(crate) async fn new(
1249        config: gaxi::options::ClientConfig,
1250    ) -> crate::ClientBuilderResult<Self> {
1251        let inner = Self::build_inner(config).await?;
1252        Ok(Self { inner })
1253    }
1254
1255    async fn build_inner(
1256        conf: gaxi::options::ClientConfig,
1257    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::DiskTypes>> {
1258        if gaxi::options::tracing_enabled(&conf) {
1259            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
1260        }
1261        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
1262    }
1263
1264    async fn build_transport(
1265        conf: gaxi::options::ClientConfig,
1266    ) -> crate::ClientBuilderResult<impl super::stub::DiskTypes> {
1267        super::transport::DiskTypes::new(conf).await
1268    }
1269
1270    async fn build_with_tracing(
1271        conf: gaxi::options::ClientConfig,
1272    ) -> crate::ClientBuilderResult<impl super::stub::DiskTypes> {
1273        Self::build_transport(conf)
1274            .await
1275            .map(super::tracing::DiskTypes::new)
1276    }
1277
1278    /// Retrieves an aggregated list of disk types.
1279    ///
1280    /// To prevent failure, it is recommended that you set the
1281    /// `returnPartialSuccess` parameter to `true`.
1282    pub fn aggregated_list(&self) -> super::builder::disk_types::AggregatedList {
1283        super::builder::disk_types::AggregatedList::new(self.inner.clone())
1284    }
1285
1286    /// Returns the specified disk type.
1287    pub fn get(&self) -> super::builder::disk_types::Get {
1288        super::builder::disk_types::Get::new(self.inner.clone())
1289    }
1290
1291    /// Retrieves a list of disk types available to the specified
1292    /// project.
1293    pub fn list(&self) -> super::builder::disk_types::List {
1294        super::builder::disk_types::List::new(self.inner.clone())
1295    }
1296}
1297
1298/// Implements a client for the Compute Engine API.
1299///
1300/// # Example
1301/// ```
1302/// # use google_cloud_compute_v1::client::Disks;
1303/// async fn sample(
1304/// ) -> anyhow::Result<()> {
1305///     let client = Disks::builder().build().await?;
1306///     // use `client` to make requests to the Compute Engine API.
1307///     Ok(())
1308/// }
1309/// ```
1310///
1311/// # Service Description
1312///
1313/// Service for the `disks` resource.
1314///
1315/// The client library was generated with API version 2026-09-01.
1316///
1317/// # Configuration
1318///
1319/// To configure `Disks` use the `with_*` methods in the type returned
1320/// by [builder()][Disks::builder]. The default configuration should
1321/// work for most applications. Common configuration changes include
1322///
1323/// * [with_endpoint()]: by default this client uses the global default endpoint
1324///   (`https://compute.googleapis.com`). Applications using regional
1325///   endpoints or running in restricted networks (e.g. a network configured
1326///   with [Private Google Access with VPC Service Controls]) may want to
1327///   override this default.
1328/// * [with_credentials()]: by default this client uses
1329///   [Application Default Credentials]. Applications using custom
1330///   authentication may need to override this default.
1331///
1332/// [with_endpoint()]: super::builder::disks::ClientBuilder::with_endpoint
1333/// [with_credentials()]: super::builder::disks::ClientBuilder::with_credentials
1334/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
1335/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
1336///
1337/// # Pooling and Cloning
1338///
1339/// `Disks` holds a connection pool internally, it is advised to
1340/// create one and reuse it. You do not need to wrap `Disks` in
1341/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
1342/// already uses an `Arc` internally.
1343#[cfg(feature = "disks")]
1344#[cfg_attr(docsrs, doc(cfg(feature = "disks")))]
1345#[derive(Clone, Debug)]
1346pub struct Disks {
1347    inner: std::sync::Arc<dyn super::stub::dynamic::Disks>,
1348}
1349
1350#[cfg(feature = "disks")]
1351impl Disks {
1352    /// Returns a builder for [Disks].
1353    ///
1354    /// ```
1355    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
1356    /// # use google_cloud_compute_v1::client::Disks;
1357    /// let client = Disks::builder().build().await?;
1358    /// # Ok(()) }
1359    /// ```
1360    pub fn builder() -> super::builder::disks::ClientBuilder {
1361        crate::new_client_builder(super::builder::disks::client::Factory)
1362    }
1363
1364    /// Creates a new client from the provided stub.
1365    ///
1366    /// The most common case for calling this function is in tests mocking the
1367    /// client's behavior.
1368    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
1369    where
1370        T: super::stub::Disks + 'static,
1371    {
1372        Self { inner: stub.into() }
1373    }
1374
1375    pub(crate) async fn new(
1376        config: gaxi::options::ClientConfig,
1377    ) -> crate::ClientBuilderResult<Self> {
1378        let inner = Self::build_inner(config).await?;
1379        Ok(Self { inner })
1380    }
1381
1382    async fn build_inner(
1383        conf: gaxi::options::ClientConfig,
1384    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::Disks>> {
1385        if gaxi::options::tracing_enabled(&conf) {
1386            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
1387        }
1388        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
1389    }
1390
1391    async fn build_transport(
1392        conf: gaxi::options::ClientConfig,
1393    ) -> crate::ClientBuilderResult<impl super::stub::Disks> {
1394        super::transport::Disks::new(conf).await
1395    }
1396
1397    async fn build_with_tracing(
1398        conf: gaxi::options::ClientConfig,
1399    ) -> crate::ClientBuilderResult<impl super::stub::Disks> {
1400        Self::build_transport(conf)
1401            .await
1402            .map(super::tracing::Disks::new)
1403    }
1404
1405    /// Adds existing resource policies to a disk. You can only add one
1406    /// policy which will be applied to this disk for scheduling snapshot
1407    /// creation.
1408    pub fn add_resource_policies(&self) -> super::builder::disks::AddResourcePolicies {
1409        super::builder::disks::AddResourcePolicies::new(self.inner.clone())
1410    }
1411
1412    /// Retrieves an aggregated list of persistent disks.
1413    ///
1414    /// To prevent failure, it is recommended that you set the
1415    /// `returnPartialSuccess` parameter to `true`.
1416    pub fn aggregated_list(&self) -> super::builder::disks::AggregatedList {
1417        super::builder::disks::AggregatedList::new(self.inner.clone())
1418    }
1419
1420    /// Bulk create a set of disks.
1421    pub fn bulk_insert(&self) -> super::builder::disks::BulkInsert {
1422        super::builder::disks::BulkInsert::new(self.inner.clone())
1423    }
1424
1425    /// Sets the labels on many disks at once. To learn more about labels, read theLabeling
1426    /// Resources documentation.
1427    pub fn bulk_set_labels(&self) -> super::builder::disks::BulkSetLabels {
1428        super::builder::disks::BulkSetLabels::new(self.inner.clone())
1429    }
1430
1431    /// Creates a snapshot of a specified persistent disk. For regular snapshot
1432    /// creation, consider using snapshots.insert
1433    /// instead, as that method supports more features, such as creating snapshots
1434    /// in a project different from the source disk project.
1435    pub fn create_snapshot(&self) -> super::builder::disks::CreateSnapshot {
1436        super::builder::disks::CreateSnapshot::new(self.inner.clone())
1437    }
1438
1439    /// Deletes the specified persistent disk. Deleting a disk removes its data
1440    /// permanently and is irreversible. However, deleting a disk does not
1441    /// delete any snapshots
1442    /// previously made from the disk. You must separatelydelete
1443    /// snapshots.
1444    pub fn delete(&self) -> super::builder::disks::Delete {
1445        super::builder::disks::Delete::new(self.inner.clone())
1446    }
1447
1448    /// Returns the specified persistent disk.
1449    pub fn get(&self) -> super::builder::disks::Get {
1450        super::builder::disks::Get::new(self.inner.clone())
1451    }
1452
1453    /// Gets the access control policy for a resource. May be empty if no such
1454    /// policy or resource exists.
1455    pub fn get_iam_policy(&self) -> super::builder::disks::GetIamPolicy {
1456        super::builder::disks::GetIamPolicy::new(self.inner.clone())
1457    }
1458
1459    /// Creates a persistent disk in the specified project using the data
1460    /// in the request. You can create a disk from a source
1461    /// (sourceImage, sourceSnapshot, orsourceDisk) or create an empty 500 GB data disk by
1462    /// omitting all properties. You can also create a disk that is larger than
1463    /// the default size by specifying the sizeGb property.
1464    pub fn insert(&self) -> super::builder::disks::Insert {
1465        super::builder::disks::Insert::new(self.inner.clone())
1466    }
1467
1468    /// Retrieves a list of persistent disks contained within
1469    /// the specified zone.
1470    pub fn list(&self) -> super::builder::disks::List {
1471        super::builder::disks::List::new(self.inner.clone())
1472    }
1473
1474    /// Removes resource policies from a disk.
1475    pub fn remove_resource_policies(&self) -> super::builder::disks::RemoveResourcePolicies {
1476        super::builder::disks::RemoveResourcePolicies::new(self.inner.clone())
1477    }
1478
1479    /// Resizes the specified persistent disk.
1480    /// You can only increase the size of the disk.
1481    pub fn resize(&self) -> super::builder::disks::Resize {
1482        super::builder::disks::Resize::new(self.inner.clone())
1483    }
1484
1485    /// Sets the access control policy on the specified resource.
1486    /// Replaces any existing policy.
1487    pub fn set_iam_policy(&self) -> super::builder::disks::SetIamPolicy {
1488        super::builder::disks::SetIamPolicy::new(self.inner.clone())
1489    }
1490
1491    /// Sets the labels on a disk. To learn more about labels, read theLabeling
1492    /// Resources documentation.
1493    pub fn set_labels(&self) -> super::builder::disks::SetLabels {
1494        super::builder::disks::SetLabels::new(self.inner.clone())
1495    }
1496
1497    /// Starts asynchronous replication.
1498    /// Must be invoked on the primary disk.
1499    pub fn start_async_replication(&self) -> super::builder::disks::StartAsyncReplication {
1500        super::builder::disks::StartAsyncReplication::new(self.inner.clone())
1501    }
1502
1503    /// Stops asynchronous replication.
1504    /// Can be invoked either on the primary or on the secondary disk.
1505    pub fn stop_async_replication(&self) -> super::builder::disks::StopAsyncReplication {
1506        super::builder::disks::StopAsyncReplication::new(self.inner.clone())
1507    }
1508
1509    /// Stops asynchronous replication for a consistency group of disks.
1510    /// Can be invoked either in the primary or secondary scope.
1511    pub fn stop_group_async_replication(&self) -> super::builder::disks::StopGroupAsyncReplication {
1512        super::builder::disks::StopGroupAsyncReplication::new(self.inner.clone())
1513    }
1514
1515    /// Returns permissions that a caller has on the specified resource.
1516    pub fn test_iam_permissions(&self) -> super::builder::disks::TestIamPermissions {
1517        super::builder::disks::TestIamPermissions::new(self.inner.clone())
1518    }
1519
1520    /// Updates the specified disk with the data included in the request.
1521    /// The update is performed only on selected fields included as part
1522    /// of update-mask.
1523    pub fn update(&self) -> super::builder::disks::Update {
1524        super::builder::disks::Update::new(self.inner.clone())
1525    }
1526
1527    /// Rotates the customer-managed
1528    /// encryption key to the latest version for the specified persistent disk.
1529    pub fn update_kms_key(&self) -> super::builder::disks::UpdateKmsKey {
1530        super::builder::disks::UpdateKmsKey::new(self.inner.clone())
1531    }
1532
1533    /// Retrieves the specified zone-specific Operations resource.
1534    pub fn get_operation(&self) -> super::builder::disks::GetOperation {
1535        super::builder::disks::GetOperation::new(self.inner.clone())
1536    }
1537}
1538
1539/// Implements a client for the Compute Engine API.
1540///
1541/// # Example
1542/// ```
1543/// # use google_cloud_compute_v1::client::ExternalVpnGateways;
1544/// async fn sample(
1545/// ) -> anyhow::Result<()> {
1546///     let client = ExternalVpnGateways::builder().build().await?;
1547///     // use `client` to make requests to the Compute Engine API.
1548///     Ok(())
1549/// }
1550/// ```
1551///
1552/// # Service Description
1553///
1554/// Service for the `externalVpnGateways` resource.
1555///
1556/// The client library was generated with API version 2026-09-01.
1557///
1558/// # Configuration
1559///
1560/// To configure `ExternalVpnGateways` use the `with_*` methods in the type returned
1561/// by [builder()][ExternalVpnGateways::builder]. The default configuration should
1562/// work for most applications. Common configuration changes include
1563///
1564/// * [with_endpoint()]: by default this client uses the global default endpoint
1565///   (`https://compute.googleapis.com`). Applications using regional
1566///   endpoints or running in restricted networks (e.g. a network configured
1567///   with [Private Google Access with VPC Service Controls]) may want to
1568///   override this default.
1569/// * [with_credentials()]: by default this client uses
1570///   [Application Default Credentials]. Applications using custom
1571///   authentication may need to override this default.
1572///
1573/// [with_endpoint()]: super::builder::external_vpn_gateways::ClientBuilder::with_endpoint
1574/// [with_credentials()]: super::builder::external_vpn_gateways::ClientBuilder::with_credentials
1575/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
1576/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
1577///
1578/// # Pooling and Cloning
1579///
1580/// `ExternalVpnGateways` holds a connection pool internally, it is advised to
1581/// create one and reuse it. You do not need to wrap `ExternalVpnGateways` in
1582/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
1583/// already uses an `Arc` internally.
1584#[cfg(feature = "external-vpn-gateways")]
1585#[cfg_attr(docsrs, doc(cfg(feature = "external-vpn-gateways")))]
1586#[derive(Clone, Debug)]
1587pub struct ExternalVpnGateways {
1588    inner: std::sync::Arc<dyn super::stub::dynamic::ExternalVpnGateways>,
1589}
1590
1591#[cfg(feature = "external-vpn-gateways")]
1592impl ExternalVpnGateways {
1593    /// Returns a builder for [ExternalVpnGateways].
1594    ///
1595    /// ```
1596    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
1597    /// # use google_cloud_compute_v1::client::ExternalVpnGateways;
1598    /// let client = ExternalVpnGateways::builder().build().await?;
1599    /// # Ok(()) }
1600    /// ```
1601    pub fn builder() -> super::builder::external_vpn_gateways::ClientBuilder {
1602        crate::new_client_builder(super::builder::external_vpn_gateways::client::Factory)
1603    }
1604
1605    /// Creates a new client from the provided stub.
1606    ///
1607    /// The most common case for calling this function is in tests mocking the
1608    /// client's behavior.
1609    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
1610    where
1611        T: super::stub::ExternalVpnGateways + 'static,
1612    {
1613        Self { inner: stub.into() }
1614    }
1615
1616    pub(crate) async fn new(
1617        config: gaxi::options::ClientConfig,
1618    ) -> crate::ClientBuilderResult<Self> {
1619        let inner = Self::build_inner(config).await?;
1620        Ok(Self { inner })
1621    }
1622
1623    async fn build_inner(
1624        conf: gaxi::options::ClientConfig,
1625    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::ExternalVpnGateways>>
1626    {
1627        if gaxi::options::tracing_enabled(&conf) {
1628            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
1629        }
1630        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
1631    }
1632
1633    async fn build_transport(
1634        conf: gaxi::options::ClientConfig,
1635    ) -> crate::ClientBuilderResult<impl super::stub::ExternalVpnGateways> {
1636        super::transport::ExternalVpnGateways::new(conf).await
1637    }
1638
1639    async fn build_with_tracing(
1640        conf: gaxi::options::ClientConfig,
1641    ) -> crate::ClientBuilderResult<impl super::stub::ExternalVpnGateways> {
1642        Self::build_transport(conf)
1643            .await
1644            .map(super::tracing::ExternalVpnGateways::new)
1645    }
1646
1647    /// Deletes the specified externalVpnGateway.
1648    pub fn delete(&self) -> super::builder::external_vpn_gateways::Delete {
1649        super::builder::external_vpn_gateways::Delete::new(self.inner.clone())
1650    }
1651
1652    /// Returns the specified externalVpnGateway. Get a list of available
1653    /// externalVpnGateways by making a list() request.
1654    pub fn get(&self) -> super::builder::external_vpn_gateways::Get {
1655        super::builder::external_vpn_gateways::Get::new(self.inner.clone())
1656    }
1657
1658    /// Creates a ExternalVpnGateway in the specified project using
1659    /// the data included in the request.
1660    pub fn insert(&self) -> super::builder::external_vpn_gateways::Insert {
1661        super::builder::external_vpn_gateways::Insert::new(self.inner.clone())
1662    }
1663
1664    /// Retrieves the list of ExternalVpnGateway available to the specified
1665    /// project.
1666    pub fn list(&self) -> super::builder::external_vpn_gateways::List {
1667        super::builder::external_vpn_gateways::List::new(self.inner.clone())
1668    }
1669
1670    /// Sets the labels on an ExternalVpnGateway. To learn more about labels,
1671    /// read the Labeling
1672    /// Resources documentation.
1673    pub fn set_labels(&self) -> super::builder::external_vpn_gateways::SetLabels {
1674        super::builder::external_vpn_gateways::SetLabels::new(self.inner.clone())
1675    }
1676
1677    /// Returns permissions that a caller has on the specified resource.
1678    pub fn test_iam_permissions(
1679        &self,
1680    ) -> super::builder::external_vpn_gateways::TestIamPermissions {
1681        super::builder::external_vpn_gateways::TestIamPermissions::new(self.inner.clone())
1682    }
1683
1684    /// Retrieves the specified Operations resource.
1685    pub fn get_operation(&self) -> super::builder::external_vpn_gateways::GetOperation {
1686        super::builder::external_vpn_gateways::GetOperation::new(self.inner.clone())
1687    }
1688}
1689
1690/// Implements a client for the Compute Engine API.
1691///
1692/// # Example
1693/// ```
1694/// # use google_cloud_compute_v1::client::FirewallPolicies;
1695/// async fn sample(
1696/// ) -> anyhow::Result<()> {
1697///     let client = FirewallPolicies::builder().build().await?;
1698///     // use `client` to make requests to the Compute Engine API.
1699///     Ok(())
1700/// }
1701/// ```
1702///
1703/// # Service Description
1704///
1705/// Service for the `firewallPolicies` resource.
1706///
1707/// The client library was generated with API version 2026-09-01.
1708///
1709/// # Configuration
1710///
1711/// To configure `FirewallPolicies` use the `with_*` methods in the type returned
1712/// by [builder()][FirewallPolicies::builder]. The default configuration should
1713/// work for most applications. Common configuration changes include
1714///
1715/// * [with_endpoint()]: by default this client uses the global default endpoint
1716///   (`https://compute.googleapis.com`). Applications using regional
1717///   endpoints or running in restricted networks (e.g. a network configured
1718///   with [Private Google Access with VPC Service Controls]) may want to
1719///   override this default.
1720/// * [with_credentials()]: by default this client uses
1721///   [Application Default Credentials]. Applications using custom
1722///   authentication may need to override this default.
1723///
1724/// [with_endpoint()]: super::builder::firewall_policies::ClientBuilder::with_endpoint
1725/// [with_credentials()]: super::builder::firewall_policies::ClientBuilder::with_credentials
1726/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
1727/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
1728///
1729/// # Pooling and Cloning
1730///
1731/// `FirewallPolicies` holds a connection pool internally, it is advised to
1732/// create one and reuse it. You do not need to wrap `FirewallPolicies` in
1733/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
1734/// already uses an `Arc` internally.
1735#[cfg(feature = "firewall-policies")]
1736#[cfg_attr(docsrs, doc(cfg(feature = "firewall-policies")))]
1737#[derive(Clone, Debug)]
1738pub struct FirewallPolicies {
1739    inner: std::sync::Arc<dyn super::stub::dynamic::FirewallPolicies>,
1740}
1741
1742#[cfg(feature = "firewall-policies")]
1743impl FirewallPolicies {
1744    /// Returns a builder for [FirewallPolicies].
1745    ///
1746    /// ```
1747    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
1748    /// # use google_cloud_compute_v1::client::FirewallPolicies;
1749    /// let client = FirewallPolicies::builder().build().await?;
1750    /// # Ok(()) }
1751    /// ```
1752    pub fn builder() -> super::builder::firewall_policies::ClientBuilder {
1753        crate::new_client_builder(super::builder::firewall_policies::client::Factory)
1754    }
1755
1756    /// Creates a new client from the provided stub.
1757    ///
1758    /// The most common case for calling this function is in tests mocking the
1759    /// client's behavior.
1760    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
1761    where
1762        T: super::stub::FirewallPolicies + 'static,
1763    {
1764        Self { inner: stub.into() }
1765    }
1766
1767    pub(crate) async fn new(
1768        config: gaxi::options::ClientConfig,
1769    ) -> crate::ClientBuilderResult<Self> {
1770        let inner = Self::build_inner(config).await?;
1771        Ok(Self { inner })
1772    }
1773
1774    async fn build_inner(
1775        conf: gaxi::options::ClientConfig,
1776    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::FirewallPolicies>>
1777    {
1778        if gaxi::options::tracing_enabled(&conf) {
1779            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
1780        }
1781        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
1782    }
1783
1784    async fn build_transport(
1785        conf: gaxi::options::ClientConfig,
1786    ) -> crate::ClientBuilderResult<impl super::stub::FirewallPolicies> {
1787        super::transport::FirewallPolicies::new(conf).await
1788    }
1789
1790    async fn build_with_tracing(
1791        conf: gaxi::options::ClientConfig,
1792    ) -> crate::ClientBuilderResult<impl super::stub::FirewallPolicies> {
1793        Self::build_transport(conf)
1794            .await
1795            .map(super::tracing::FirewallPolicies::new)
1796    }
1797
1798    /// Inserts an association for the specified firewall policy.
1799    pub fn add_association(&self) -> super::builder::firewall_policies::AddAssociation {
1800        super::builder::firewall_policies::AddAssociation::new(self.inner.clone())
1801    }
1802
1803    /// Inserts a rule into a firewall policy.
1804    pub fn add_rule(&self) -> super::builder::firewall_policies::AddRule {
1805        super::builder::firewall_policies::AddRule::new(self.inner.clone())
1806    }
1807
1808    /// Copies rules to the specified firewall policy.
1809    pub fn clone_rules(&self) -> super::builder::firewall_policies::CloneRules {
1810        super::builder::firewall_policies::CloneRules::new(self.inner.clone())
1811    }
1812
1813    /// Deletes the specified policy.
1814    pub fn delete(&self) -> super::builder::firewall_policies::Delete {
1815        super::builder::firewall_policies::Delete::new(self.inner.clone())
1816    }
1817
1818    /// Returns the specified firewall policy.
1819    pub fn get(&self) -> super::builder::firewall_policies::Get {
1820        super::builder::firewall_policies::Get::new(self.inner.clone())
1821    }
1822
1823    /// Gets an association with the specified name.
1824    pub fn get_association(&self) -> super::builder::firewall_policies::GetAssociation {
1825        super::builder::firewall_policies::GetAssociation::new(self.inner.clone())
1826    }
1827
1828    /// Gets the access control policy for a resource. May be empty if no such
1829    /// policy or resource exists.
1830    pub fn get_iam_policy(&self) -> super::builder::firewall_policies::GetIamPolicy {
1831        super::builder::firewall_policies::GetIamPolicy::new(self.inner.clone())
1832    }
1833
1834    /// Gets a rule of the specified priority.
1835    pub fn get_rule(&self) -> super::builder::firewall_policies::GetRule {
1836        super::builder::firewall_policies::GetRule::new(self.inner.clone())
1837    }
1838
1839    /// Creates a new policy in the specified project using the data included in
1840    /// the request.
1841    pub fn insert(&self) -> super::builder::firewall_policies::Insert {
1842        super::builder::firewall_policies::Insert::new(self.inner.clone())
1843    }
1844
1845    /// Lists all the policies that have been configured for the specified
1846    /// folder or organization.
1847    pub fn list(&self) -> super::builder::firewall_policies::List {
1848        super::builder::firewall_policies::List::new(self.inner.clone())
1849    }
1850
1851    /// Lists associations of a specified target, i.e., organization or folder.
1852    pub fn list_associations(&self) -> super::builder::firewall_policies::ListAssociations {
1853        super::builder::firewall_policies::ListAssociations::new(self.inner.clone())
1854    }
1855
1856    /// Moves the specified firewall policy.
1857    pub fn r#move(&self) -> super::builder::firewall_policies::Move {
1858        super::builder::firewall_policies::Move::new(self.inner.clone())
1859    }
1860
1861    /// Patches the specified policy with the data included in the request.
1862    pub fn patch(&self) -> super::builder::firewall_policies::Patch {
1863        super::builder::firewall_policies::Patch::new(self.inner.clone())
1864    }
1865
1866    /// Patches a rule of the specified priority.
1867    pub fn patch_rule(&self) -> super::builder::firewall_policies::PatchRule {
1868        super::builder::firewall_policies::PatchRule::new(self.inner.clone())
1869    }
1870
1871    /// Removes an association for the specified firewall policy.
1872    pub fn remove_association(&self) -> super::builder::firewall_policies::RemoveAssociation {
1873        super::builder::firewall_policies::RemoveAssociation::new(self.inner.clone())
1874    }
1875
1876    /// Deletes a rule of the specified priority.
1877    pub fn remove_rule(&self) -> super::builder::firewall_policies::RemoveRule {
1878        super::builder::firewall_policies::RemoveRule::new(self.inner.clone())
1879    }
1880
1881    /// Sets the access control policy on the specified resource.
1882    /// Replaces any existing policy.
1883    pub fn set_iam_policy(&self) -> super::builder::firewall_policies::SetIamPolicy {
1884        super::builder::firewall_policies::SetIamPolicy::new(self.inner.clone())
1885    }
1886
1887    /// Returns permissions that a caller has on the specified resource.
1888    pub fn test_iam_permissions(&self) -> super::builder::firewall_policies::TestIamPermissions {
1889        super::builder::firewall_policies::TestIamPermissions::new(self.inner.clone())
1890    }
1891
1892    /// Retrieves the specified Operations resource. Gets a list of operations
1893    /// by making a `list()` request.
1894    pub fn get_operation(&self) -> super::builder::firewall_policies::GetOperation {
1895        super::builder::firewall_policies::GetOperation::new(self.inner.clone())
1896    }
1897}
1898
1899/// Implements a client for the Compute Engine API.
1900///
1901/// # Example
1902/// ```
1903/// # use google_cloud_compute_v1::client::Firewalls;
1904/// async fn sample(
1905/// ) -> anyhow::Result<()> {
1906///     let client = Firewalls::builder().build().await?;
1907///     // use `client` to make requests to the Compute Engine API.
1908///     Ok(())
1909/// }
1910/// ```
1911///
1912/// # Service Description
1913///
1914/// Service for the `firewalls` resource.
1915///
1916/// The client library was generated with API version 2026-09-01.
1917///
1918/// # Configuration
1919///
1920/// To configure `Firewalls` use the `with_*` methods in the type returned
1921/// by [builder()][Firewalls::builder]. The default configuration should
1922/// work for most applications. Common configuration changes include
1923///
1924/// * [with_endpoint()]: by default this client uses the global default endpoint
1925///   (`https://compute.googleapis.com`). Applications using regional
1926///   endpoints or running in restricted networks (e.g. a network configured
1927///   with [Private Google Access with VPC Service Controls]) may want to
1928///   override this default.
1929/// * [with_credentials()]: by default this client uses
1930///   [Application Default Credentials]. Applications using custom
1931///   authentication may need to override this default.
1932///
1933/// [with_endpoint()]: super::builder::firewalls::ClientBuilder::with_endpoint
1934/// [with_credentials()]: super::builder::firewalls::ClientBuilder::with_credentials
1935/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
1936/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
1937///
1938/// # Pooling and Cloning
1939///
1940/// `Firewalls` holds a connection pool internally, it is advised to
1941/// create one and reuse it. You do not need to wrap `Firewalls` in
1942/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
1943/// already uses an `Arc` internally.
1944#[cfg(feature = "firewalls")]
1945#[cfg_attr(docsrs, doc(cfg(feature = "firewalls")))]
1946#[derive(Clone, Debug)]
1947pub struct Firewalls {
1948    inner: std::sync::Arc<dyn super::stub::dynamic::Firewalls>,
1949}
1950
1951#[cfg(feature = "firewalls")]
1952impl Firewalls {
1953    /// Returns a builder for [Firewalls].
1954    ///
1955    /// ```
1956    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
1957    /// # use google_cloud_compute_v1::client::Firewalls;
1958    /// let client = Firewalls::builder().build().await?;
1959    /// # Ok(()) }
1960    /// ```
1961    pub fn builder() -> super::builder::firewalls::ClientBuilder {
1962        crate::new_client_builder(super::builder::firewalls::client::Factory)
1963    }
1964
1965    /// Creates a new client from the provided stub.
1966    ///
1967    /// The most common case for calling this function is in tests mocking the
1968    /// client's behavior.
1969    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
1970    where
1971        T: super::stub::Firewalls + 'static,
1972    {
1973        Self { inner: stub.into() }
1974    }
1975
1976    pub(crate) async fn new(
1977        config: gaxi::options::ClientConfig,
1978    ) -> crate::ClientBuilderResult<Self> {
1979        let inner = Self::build_inner(config).await?;
1980        Ok(Self { inner })
1981    }
1982
1983    async fn build_inner(
1984        conf: gaxi::options::ClientConfig,
1985    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::Firewalls>> {
1986        if gaxi::options::tracing_enabled(&conf) {
1987            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
1988        }
1989        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
1990    }
1991
1992    async fn build_transport(
1993        conf: gaxi::options::ClientConfig,
1994    ) -> crate::ClientBuilderResult<impl super::stub::Firewalls> {
1995        super::transport::Firewalls::new(conf).await
1996    }
1997
1998    async fn build_with_tracing(
1999        conf: gaxi::options::ClientConfig,
2000    ) -> crate::ClientBuilderResult<impl super::stub::Firewalls> {
2001        Self::build_transport(conf)
2002            .await
2003            .map(super::tracing::Firewalls::new)
2004    }
2005
2006    /// Deletes the specified firewall.
2007    pub fn delete(&self) -> super::builder::firewalls::Delete {
2008        super::builder::firewalls::Delete::new(self.inner.clone())
2009    }
2010
2011    /// Returns the specified firewall.
2012    pub fn get(&self) -> super::builder::firewalls::Get {
2013        super::builder::firewalls::Get::new(self.inner.clone())
2014    }
2015
2016    /// Creates a firewall rule in the specified project using the data
2017    /// included in the request.
2018    pub fn insert(&self) -> super::builder::firewalls::Insert {
2019        super::builder::firewalls::Insert::new(self.inner.clone())
2020    }
2021
2022    /// Retrieves the list of firewall rules available to the specified
2023    /// project.
2024    pub fn list(&self) -> super::builder::firewalls::List {
2025        super::builder::firewalls::List::new(self.inner.clone())
2026    }
2027
2028    /// Updates the specified firewall rule with the data included in the
2029    /// request. This method supportsPATCH
2030    /// semantics and uses theJSON merge
2031    /// patch format and processing rules.
2032    pub fn patch(&self) -> super::builder::firewalls::Patch {
2033        super::builder::firewalls::Patch::new(self.inner.clone())
2034    }
2035
2036    /// Returns permissions that a caller has on the specified resource.
2037    pub fn test_iam_permissions(&self) -> super::builder::firewalls::TestIamPermissions {
2038        super::builder::firewalls::TestIamPermissions::new(self.inner.clone())
2039    }
2040
2041    /// Updates the specified firewall rule with the data included in the
2042    /// request.
2043    /// Note that all fields will be updated if using PUT, even fields that are not
2044    /// specified. To update individual fields, please use PATCH instead.
2045    pub fn update(&self) -> super::builder::firewalls::Update {
2046        super::builder::firewalls::Update::new(self.inner.clone())
2047    }
2048
2049    /// Retrieves the specified Operations resource.
2050    pub fn get_operation(&self) -> super::builder::firewalls::GetOperation {
2051        super::builder::firewalls::GetOperation::new(self.inner.clone())
2052    }
2053}
2054
2055/// Implements a client for the Compute Engine API.
2056///
2057/// # Example
2058/// ```
2059/// # use google_cloud_compute_v1::client::ForwardingRules;
2060/// async fn sample(
2061/// ) -> anyhow::Result<()> {
2062///     let client = ForwardingRules::builder().build().await?;
2063///     // use `client` to make requests to the Compute Engine API.
2064///     Ok(())
2065/// }
2066/// ```
2067///
2068/// # Service Description
2069///
2070/// Service for the `forwardingRules` resource.
2071///
2072/// The client library was generated with API version 2026-09-01.
2073///
2074/// # Configuration
2075///
2076/// To configure `ForwardingRules` use the `with_*` methods in the type returned
2077/// by [builder()][ForwardingRules::builder]. The default configuration should
2078/// work for most applications. Common configuration changes include
2079///
2080/// * [with_endpoint()]: by default this client uses the global default endpoint
2081///   (`https://compute.googleapis.com`). Applications using regional
2082///   endpoints or running in restricted networks (e.g. a network configured
2083///   with [Private Google Access with VPC Service Controls]) may want to
2084///   override this default.
2085/// * [with_credentials()]: by default this client uses
2086///   [Application Default Credentials]. Applications using custom
2087///   authentication may need to override this default.
2088///
2089/// [with_endpoint()]: super::builder::forwarding_rules::ClientBuilder::with_endpoint
2090/// [with_credentials()]: super::builder::forwarding_rules::ClientBuilder::with_credentials
2091/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
2092/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
2093///
2094/// # Pooling and Cloning
2095///
2096/// `ForwardingRules` holds a connection pool internally, it is advised to
2097/// create one and reuse it. You do not need to wrap `ForwardingRules` in
2098/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
2099/// already uses an `Arc` internally.
2100#[cfg(feature = "forwarding-rules")]
2101#[cfg_attr(docsrs, doc(cfg(feature = "forwarding-rules")))]
2102#[derive(Clone, Debug)]
2103pub struct ForwardingRules {
2104    inner: std::sync::Arc<dyn super::stub::dynamic::ForwardingRules>,
2105}
2106
2107#[cfg(feature = "forwarding-rules")]
2108impl ForwardingRules {
2109    /// Returns a builder for [ForwardingRules].
2110    ///
2111    /// ```
2112    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
2113    /// # use google_cloud_compute_v1::client::ForwardingRules;
2114    /// let client = ForwardingRules::builder().build().await?;
2115    /// # Ok(()) }
2116    /// ```
2117    pub fn builder() -> super::builder::forwarding_rules::ClientBuilder {
2118        crate::new_client_builder(super::builder::forwarding_rules::client::Factory)
2119    }
2120
2121    /// Creates a new client from the provided stub.
2122    ///
2123    /// The most common case for calling this function is in tests mocking the
2124    /// client's behavior.
2125    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
2126    where
2127        T: super::stub::ForwardingRules + 'static,
2128    {
2129        Self { inner: stub.into() }
2130    }
2131
2132    pub(crate) async fn new(
2133        config: gaxi::options::ClientConfig,
2134    ) -> crate::ClientBuilderResult<Self> {
2135        let inner = Self::build_inner(config).await?;
2136        Ok(Self { inner })
2137    }
2138
2139    async fn build_inner(
2140        conf: gaxi::options::ClientConfig,
2141    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::ForwardingRules>> {
2142        if gaxi::options::tracing_enabled(&conf) {
2143            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
2144        }
2145        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
2146    }
2147
2148    async fn build_transport(
2149        conf: gaxi::options::ClientConfig,
2150    ) -> crate::ClientBuilderResult<impl super::stub::ForwardingRules> {
2151        super::transport::ForwardingRules::new(conf).await
2152    }
2153
2154    async fn build_with_tracing(
2155        conf: gaxi::options::ClientConfig,
2156    ) -> crate::ClientBuilderResult<impl super::stub::ForwardingRules> {
2157        Self::build_transport(conf)
2158            .await
2159            .map(super::tracing::ForwardingRules::new)
2160    }
2161
2162    /// Retrieves an aggregated list of forwarding rules.
2163    ///
2164    /// To prevent failure, it is recommended that you set the
2165    /// `returnPartialSuccess` parameter to `true`.
2166    pub fn aggregated_list(&self) -> super::builder::forwarding_rules::AggregatedList {
2167        super::builder::forwarding_rules::AggregatedList::new(self.inner.clone())
2168    }
2169
2170    /// Deletes the specified ForwardingRule resource.
2171    pub fn delete(&self) -> super::builder::forwarding_rules::Delete {
2172        super::builder::forwarding_rules::Delete::new(self.inner.clone())
2173    }
2174
2175    /// Returns the specified ForwardingRule resource.
2176    pub fn get(&self) -> super::builder::forwarding_rules::Get {
2177        super::builder::forwarding_rules::Get::new(self.inner.clone())
2178    }
2179
2180    /// Creates a ForwardingRule resource in the specified project and region using
2181    /// the data included in the request.
2182    pub fn insert(&self) -> super::builder::forwarding_rules::Insert {
2183        super::builder::forwarding_rules::Insert::new(self.inner.clone())
2184    }
2185
2186    /// Retrieves a list of ForwardingRule resources available to the specified
2187    /// project and region.
2188    pub fn list(&self) -> super::builder::forwarding_rules::List {
2189        super::builder::forwarding_rules::List::new(self.inner.clone())
2190    }
2191
2192    /// Updates the specified forwarding rule with the data included in the
2193    /// request. This method supportsPATCH
2194    /// semantics and uses theJSON merge
2195    /// patch format and processing rules. Currently, you can only
2196    /// patch the network_tier field.
2197    pub fn patch(&self) -> super::builder::forwarding_rules::Patch {
2198        super::builder::forwarding_rules::Patch::new(self.inner.clone())
2199    }
2200
2201    /// Sets the labels on the specified resource. To learn more about labels,
2202    /// read the
2203    /// Labeling Resources documentation.
2204    pub fn set_labels(&self) -> super::builder::forwarding_rules::SetLabels {
2205        super::builder::forwarding_rules::SetLabels::new(self.inner.clone())
2206    }
2207
2208    /// Changes target URL for forwarding rule. The new target should be of the
2209    /// same type as the old target.
2210    pub fn set_target(&self) -> super::builder::forwarding_rules::SetTarget {
2211        super::builder::forwarding_rules::SetTarget::new(self.inner.clone())
2212    }
2213
2214    /// Retrieves the specified region-specific Operations resource.
2215    pub fn get_operation(&self) -> super::builder::forwarding_rules::GetOperation {
2216        super::builder::forwarding_rules::GetOperation::new(self.inner.clone())
2217    }
2218}
2219
2220/// Implements a client for the Compute Engine API.
2221///
2222/// # Example
2223/// ```
2224/// # use google_cloud_compute_v1::client::FutureReservations;
2225/// async fn sample(
2226/// ) -> anyhow::Result<()> {
2227///     let client = FutureReservations::builder().build().await?;
2228///     // use `client` to make requests to the Compute Engine API.
2229///     Ok(())
2230/// }
2231/// ```
2232///
2233/// # Service Description
2234///
2235/// Service for the `futureReservations` resource.
2236///
2237/// The client library was generated with API version 2026-09-01.
2238///
2239/// # Configuration
2240///
2241/// To configure `FutureReservations` use the `with_*` methods in the type returned
2242/// by [builder()][FutureReservations::builder]. The default configuration should
2243/// work for most applications. Common configuration changes include
2244///
2245/// * [with_endpoint()]: by default this client uses the global default endpoint
2246///   (`https://compute.googleapis.com`). Applications using regional
2247///   endpoints or running in restricted networks (e.g. a network configured
2248///   with [Private Google Access with VPC Service Controls]) may want to
2249///   override this default.
2250/// * [with_credentials()]: by default this client uses
2251///   [Application Default Credentials]. Applications using custom
2252///   authentication may need to override this default.
2253///
2254/// [with_endpoint()]: super::builder::future_reservations::ClientBuilder::with_endpoint
2255/// [with_credentials()]: super::builder::future_reservations::ClientBuilder::with_credentials
2256/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
2257/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
2258///
2259/// # Pooling and Cloning
2260///
2261/// `FutureReservations` holds a connection pool internally, it is advised to
2262/// create one and reuse it. You do not need to wrap `FutureReservations` in
2263/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
2264/// already uses an `Arc` internally.
2265#[cfg(feature = "future-reservations")]
2266#[cfg_attr(docsrs, doc(cfg(feature = "future-reservations")))]
2267#[derive(Clone, Debug)]
2268pub struct FutureReservations {
2269    inner: std::sync::Arc<dyn super::stub::dynamic::FutureReservations>,
2270}
2271
2272#[cfg(feature = "future-reservations")]
2273impl FutureReservations {
2274    /// Returns a builder for [FutureReservations].
2275    ///
2276    /// ```
2277    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
2278    /// # use google_cloud_compute_v1::client::FutureReservations;
2279    /// let client = FutureReservations::builder().build().await?;
2280    /// # Ok(()) }
2281    /// ```
2282    pub fn builder() -> super::builder::future_reservations::ClientBuilder {
2283        crate::new_client_builder(super::builder::future_reservations::client::Factory)
2284    }
2285
2286    /// Creates a new client from the provided stub.
2287    ///
2288    /// The most common case for calling this function is in tests mocking the
2289    /// client's behavior.
2290    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
2291    where
2292        T: super::stub::FutureReservations + 'static,
2293    {
2294        Self { inner: stub.into() }
2295    }
2296
2297    pub(crate) async fn new(
2298        config: gaxi::options::ClientConfig,
2299    ) -> crate::ClientBuilderResult<Self> {
2300        let inner = Self::build_inner(config).await?;
2301        Ok(Self { inner })
2302    }
2303
2304    async fn build_inner(
2305        conf: gaxi::options::ClientConfig,
2306    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::FutureReservations>>
2307    {
2308        if gaxi::options::tracing_enabled(&conf) {
2309            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
2310        }
2311        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
2312    }
2313
2314    async fn build_transport(
2315        conf: gaxi::options::ClientConfig,
2316    ) -> crate::ClientBuilderResult<impl super::stub::FutureReservations> {
2317        super::transport::FutureReservations::new(conf).await
2318    }
2319
2320    async fn build_with_tracing(
2321        conf: gaxi::options::ClientConfig,
2322    ) -> crate::ClientBuilderResult<impl super::stub::FutureReservations> {
2323        Self::build_transport(conf)
2324            .await
2325            .map(super::tracing::FutureReservations::new)
2326    }
2327
2328    /// Retrieves an aggregated list of future reservations.
2329    ///
2330    /// To prevent failure, it is recommended that you set the
2331    /// `returnPartialSuccess` parameter to `true`.
2332    pub fn aggregated_list(&self) -> super::builder::future_reservations::AggregatedList {
2333        super::builder::future_reservations::AggregatedList::new(self.inner.clone())
2334    }
2335
2336    /// Cancel the specified future reservation.
2337    pub fn cancel(&self) -> super::builder::future_reservations::Cancel {
2338        super::builder::future_reservations::Cancel::new(self.inner.clone())
2339    }
2340
2341    /// Deletes the specified future reservation.
2342    pub fn delete(&self) -> super::builder::future_reservations::Delete {
2343        super::builder::future_reservations::Delete::new(self.inner.clone())
2344    }
2345
2346    /// Retrieves information about the specified future reservation.
2347    pub fn get(&self) -> super::builder::future_reservations::Get {
2348        super::builder::future_reservations::Get::new(self.inner.clone())
2349    }
2350
2351    /// Creates a new Future Reservation.
2352    pub fn insert(&self) -> super::builder::future_reservations::Insert {
2353        super::builder::future_reservations::Insert::new(self.inner.clone())
2354    }
2355
2356    /// A list of all the future reservations that have been configured for the
2357    /// specified project in specified zone.
2358    pub fn list(&self) -> super::builder::future_reservations::List {
2359        super::builder::future_reservations::List::new(self.inner.clone())
2360    }
2361
2362    /// Updates the specified future reservation.
2363    pub fn update(&self) -> super::builder::future_reservations::Update {
2364        super::builder::future_reservations::Update::new(self.inner.clone())
2365    }
2366
2367    /// Retrieves the specified zone-specific Operations resource.
2368    pub fn get_operation(&self) -> super::builder::future_reservations::GetOperation {
2369        super::builder::future_reservations::GetOperation::new(self.inner.clone())
2370    }
2371}
2372
2373/// Implements a client for the Compute Engine API.
2374///
2375/// # Example
2376/// ```
2377/// # use google_cloud_compute_v1::client::GlobalAddresses;
2378/// async fn sample(
2379/// ) -> anyhow::Result<()> {
2380///     let client = GlobalAddresses::builder().build().await?;
2381///     // use `client` to make requests to the Compute Engine API.
2382///     Ok(())
2383/// }
2384/// ```
2385///
2386/// # Service Description
2387///
2388/// Service for the `globalAddresses` resource.
2389///
2390/// The client library was generated with API version 2026-09-01.
2391///
2392/// # Configuration
2393///
2394/// To configure `GlobalAddresses` use the `with_*` methods in the type returned
2395/// by [builder()][GlobalAddresses::builder]. The default configuration should
2396/// work for most applications. Common configuration changes include
2397///
2398/// * [with_endpoint()]: by default this client uses the global default endpoint
2399///   (`https://compute.googleapis.com`). Applications using regional
2400///   endpoints or running in restricted networks (e.g. a network configured
2401///   with [Private Google Access with VPC Service Controls]) may want to
2402///   override this default.
2403/// * [with_credentials()]: by default this client uses
2404///   [Application Default Credentials]. Applications using custom
2405///   authentication may need to override this default.
2406///
2407/// [with_endpoint()]: super::builder::global_addresses::ClientBuilder::with_endpoint
2408/// [with_credentials()]: super::builder::global_addresses::ClientBuilder::with_credentials
2409/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
2410/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
2411///
2412/// # Pooling and Cloning
2413///
2414/// `GlobalAddresses` holds a connection pool internally, it is advised to
2415/// create one and reuse it. You do not need to wrap `GlobalAddresses` in
2416/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
2417/// already uses an `Arc` internally.
2418#[cfg(feature = "global-addresses")]
2419#[cfg_attr(docsrs, doc(cfg(feature = "global-addresses")))]
2420#[derive(Clone, Debug)]
2421pub struct GlobalAddresses {
2422    inner: std::sync::Arc<dyn super::stub::dynamic::GlobalAddresses>,
2423}
2424
2425#[cfg(feature = "global-addresses")]
2426impl GlobalAddresses {
2427    /// Returns a builder for [GlobalAddresses].
2428    ///
2429    /// ```
2430    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
2431    /// # use google_cloud_compute_v1::client::GlobalAddresses;
2432    /// let client = GlobalAddresses::builder().build().await?;
2433    /// # Ok(()) }
2434    /// ```
2435    pub fn builder() -> super::builder::global_addresses::ClientBuilder {
2436        crate::new_client_builder(super::builder::global_addresses::client::Factory)
2437    }
2438
2439    /// Creates a new client from the provided stub.
2440    ///
2441    /// The most common case for calling this function is in tests mocking the
2442    /// client's behavior.
2443    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
2444    where
2445        T: super::stub::GlobalAddresses + 'static,
2446    {
2447        Self { inner: stub.into() }
2448    }
2449
2450    pub(crate) async fn new(
2451        config: gaxi::options::ClientConfig,
2452    ) -> crate::ClientBuilderResult<Self> {
2453        let inner = Self::build_inner(config).await?;
2454        Ok(Self { inner })
2455    }
2456
2457    async fn build_inner(
2458        conf: gaxi::options::ClientConfig,
2459    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::GlobalAddresses>> {
2460        if gaxi::options::tracing_enabled(&conf) {
2461            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
2462        }
2463        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
2464    }
2465
2466    async fn build_transport(
2467        conf: gaxi::options::ClientConfig,
2468    ) -> crate::ClientBuilderResult<impl super::stub::GlobalAddresses> {
2469        super::transport::GlobalAddresses::new(conf).await
2470    }
2471
2472    async fn build_with_tracing(
2473        conf: gaxi::options::ClientConfig,
2474    ) -> crate::ClientBuilderResult<impl super::stub::GlobalAddresses> {
2475        Self::build_transport(conf)
2476            .await
2477            .map(super::tracing::GlobalAddresses::new)
2478    }
2479
2480    /// Deletes the specified address resource.
2481    pub fn delete(&self) -> super::builder::global_addresses::Delete {
2482        super::builder::global_addresses::Delete::new(self.inner.clone())
2483    }
2484
2485    /// Returns the specified address resource.
2486    pub fn get(&self) -> super::builder::global_addresses::Get {
2487        super::builder::global_addresses::Get::new(self.inner.clone())
2488    }
2489
2490    /// Creates an address resource in the specified project by using the data
2491    /// included in the request.
2492    pub fn insert(&self) -> super::builder::global_addresses::Insert {
2493        super::builder::global_addresses::Insert::new(self.inner.clone())
2494    }
2495
2496    /// Retrieves a list of global addresses.
2497    pub fn list(&self) -> super::builder::global_addresses::List {
2498        super::builder::global_addresses::List::new(self.inner.clone())
2499    }
2500
2501    /// Moves the specified address resource from one project to another project.
2502    pub fn r#move(&self) -> super::builder::global_addresses::Move {
2503        super::builder::global_addresses::Move::new(self.inner.clone())
2504    }
2505
2506    /// Sets the labels on a GlobalAddress. To learn more about labels, read theLabeling
2507    /// Resources documentation.
2508    pub fn set_labels(&self) -> super::builder::global_addresses::SetLabels {
2509        super::builder::global_addresses::SetLabels::new(self.inner.clone())
2510    }
2511
2512    /// Returns permissions that a caller has on the specified resource.
2513    pub fn test_iam_permissions(&self) -> super::builder::global_addresses::TestIamPermissions {
2514        super::builder::global_addresses::TestIamPermissions::new(self.inner.clone())
2515    }
2516
2517    /// Retrieves the specified Operations resource.
2518    pub fn get_operation(&self) -> super::builder::global_addresses::GetOperation {
2519        super::builder::global_addresses::GetOperation::new(self.inner.clone())
2520    }
2521}
2522
2523/// Implements a client for the Compute Engine API.
2524///
2525/// # Example
2526/// ```
2527/// # use google_cloud_compute_v1::client::GlobalForwardingRules;
2528/// async fn sample(
2529/// ) -> anyhow::Result<()> {
2530///     let client = GlobalForwardingRules::builder().build().await?;
2531///     // use `client` to make requests to the Compute Engine API.
2532///     Ok(())
2533/// }
2534/// ```
2535///
2536/// # Service Description
2537///
2538/// Service for the `globalForwardingRules` resource.
2539///
2540/// The client library was generated with API version 2026-09-01.
2541///
2542/// # Configuration
2543///
2544/// To configure `GlobalForwardingRules` use the `with_*` methods in the type returned
2545/// by [builder()][GlobalForwardingRules::builder]. The default configuration should
2546/// work for most applications. Common configuration changes include
2547///
2548/// * [with_endpoint()]: by default this client uses the global default endpoint
2549///   (`https://compute.googleapis.com`). Applications using regional
2550///   endpoints or running in restricted networks (e.g. a network configured
2551///   with [Private Google Access with VPC Service Controls]) may want to
2552///   override this default.
2553/// * [with_credentials()]: by default this client uses
2554///   [Application Default Credentials]. Applications using custom
2555///   authentication may need to override this default.
2556///
2557/// [with_endpoint()]: super::builder::global_forwarding_rules::ClientBuilder::with_endpoint
2558/// [with_credentials()]: super::builder::global_forwarding_rules::ClientBuilder::with_credentials
2559/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
2560/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
2561///
2562/// # Pooling and Cloning
2563///
2564/// `GlobalForwardingRules` holds a connection pool internally, it is advised to
2565/// create one and reuse it. You do not need to wrap `GlobalForwardingRules` in
2566/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
2567/// already uses an `Arc` internally.
2568#[cfg(feature = "global-forwarding-rules")]
2569#[cfg_attr(docsrs, doc(cfg(feature = "global-forwarding-rules")))]
2570#[derive(Clone, Debug)]
2571pub struct GlobalForwardingRules {
2572    inner: std::sync::Arc<dyn super::stub::dynamic::GlobalForwardingRules>,
2573}
2574
2575#[cfg(feature = "global-forwarding-rules")]
2576impl GlobalForwardingRules {
2577    /// Returns a builder for [GlobalForwardingRules].
2578    ///
2579    /// ```
2580    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
2581    /// # use google_cloud_compute_v1::client::GlobalForwardingRules;
2582    /// let client = GlobalForwardingRules::builder().build().await?;
2583    /// # Ok(()) }
2584    /// ```
2585    pub fn builder() -> super::builder::global_forwarding_rules::ClientBuilder {
2586        crate::new_client_builder(super::builder::global_forwarding_rules::client::Factory)
2587    }
2588
2589    /// Creates a new client from the provided stub.
2590    ///
2591    /// The most common case for calling this function is in tests mocking the
2592    /// client's behavior.
2593    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
2594    where
2595        T: super::stub::GlobalForwardingRules + 'static,
2596    {
2597        Self { inner: stub.into() }
2598    }
2599
2600    pub(crate) async fn new(
2601        config: gaxi::options::ClientConfig,
2602    ) -> crate::ClientBuilderResult<Self> {
2603        let inner = Self::build_inner(config).await?;
2604        Ok(Self { inner })
2605    }
2606
2607    async fn build_inner(
2608        conf: gaxi::options::ClientConfig,
2609    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::GlobalForwardingRules>>
2610    {
2611        if gaxi::options::tracing_enabled(&conf) {
2612            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
2613        }
2614        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
2615    }
2616
2617    async fn build_transport(
2618        conf: gaxi::options::ClientConfig,
2619    ) -> crate::ClientBuilderResult<impl super::stub::GlobalForwardingRules> {
2620        super::transport::GlobalForwardingRules::new(conf).await
2621    }
2622
2623    async fn build_with_tracing(
2624        conf: gaxi::options::ClientConfig,
2625    ) -> crate::ClientBuilderResult<impl super::stub::GlobalForwardingRules> {
2626        Self::build_transport(conf)
2627            .await
2628            .map(super::tracing::GlobalForwardingRules::new)
2629    }
2630
2631    /// Deletes the specified GlobalForwardingRule resource.
2632    pub fn delete(&self) -> super::builder::global_forwarding_rules::Delete {
2633        super::builder::global_forwarding_rules::Delete::new(self.inner.clone())
2634    }
2635
2636    /// Returns the specified GlobalForwardingRule resource. Gets a list of
2637    /// available forwarding rules by making a list() request.
2638    pub fn get(&self) -> super::builder::global_forwarding_rules::Get {
2639        super::builder::global_forwarding_rules::Get::new(self.inner.clone())
2640    }
2641
2642    /// Creates a GlobalForwardingRule resource in the specified project using
2643    /// the data included in the request.
2644    pub fn insert(&self) -> super::builder::global_forwarding_rules::Insert {
2645        super::builder::global_forwarding_rules::Insert::new(self.inner.clone())
2646    }
2647
2648    /// Retrieves a list of GlobalForwardingRule resources available to the
2649    /// specified project.
2650    pub fn list(&self) -> super::builder::global_forwarding_rules::List {
2651        super::builder::global_forwarding_rules::List::new(self.inner.clone())
2652    }
2653
2654    /// Updates the specified forwarding rule with the data included in the
2655    /// request. This method supportsPATCH
2656    /// semantics and uses theJSON merge
2657    /// patch format and processing rules. Currently, you can only
2658    /// patch the network_tier field.
2659    pub fn patch(&self) -> super::builder::global_forwarding_rules::Patch {
2660        super::builder::global_forwarding_rules::Patch::new(self.inner.clone())
2661    }
2662
2663    /// Sets the labels on the specified resource. To learn more about labels,
2664    /// read the
2665    /// Labeling resources documentation.
2666    pub fn set_labels(&self) -> super::builder::global_forwarding_rules::SetLabels {
2667        super::builder::global_forwarding_rules::SetLabels::new(self.inner.clone())
2668    }
2669
2670    /// Changes target URL for the GlobalForwardingRule resource. The new target
2671    /// should be of the same type as the old target.
2672    pub fn set_target(&self) -> super::builder::global_forwarding_rules::SetTarget {
2673        super::builder::global_forwarding_rules::SetTarget::new(self.inner.clone())
2674    }
2675
2676    /// Retrieves the specified Operations resource.
2677    pub fn get_operation(&self) -> super::builder::global_forwarding_rules::GetOperation {
2678        super::builder::global_forwarding_rules::GetOperation::new(self.inner.clone())
2679    }
2680}
2681
2682/// Implements a client for the Compute Engine API.
2683///
2684/// # Example
2685/// ```
2686/// # use google_cloud_compute_v1::client::GlobalFrontendSettings;
2687/// async fn sample(
2688/// ) -> anyhow::Result<()> {
2689///     let client = GlobalFrontendSettings::builder().build().await?;
2690///     // use `client` to make requests to the Compute Engine API.
2691///     Ok(())
2692/// }
2693/// ```
2694///
2695/// # Service Description
2696///
2697/// Service for the `globalFrontendSettings` resource.
2698///
2699/// The client library was generated with API version 2026-09-01.
2700///
2701/// # Configuration
2702///
2703/// To configure `GlobalFrontendSettings` use the `with_*` methods in the type returned
2704/// by [builder()][GlobalFrontendSettings::builder]. The default configuration should
2705/// work for most applications. Common configuration changes include
2706///
2707/// * [with_endpoint()]: by default this client uses the global default endpoint
2708///   (`https://compute.googleapis.com`). Applications using regional
2709///   endpoints or running in restricted networks (e.g. a network configured
2710///   with [Private Google Access with VPC Service Controls]) may want to
2711///   override this default.
2712/// * [with_credentials()]: by default this client uses
2713///   [Application Default Credentials]. Applications using custom
2714///   authentication may need to override this default.
2715///
2716/// [with_endpoint()]: super::builder::global_frontend_settings::ClientBuilder::with_endpoint
2717/// [with_credentials()]: super::builder::global_frontend_settings::ClientBuilder::with_credentials
2718/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
2719/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
2720///
2721/// # Pooling and Cloning
2722///
2723/// `GlobalFrontendSettings` holds a connection pool internally, it is advised to
2724/// create one and reuse it. You do not need to wrap `GlobalFrontendSettings` in
2725/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
2726/// already uses an `Arc` internally.
2727#[cfg(feature = "global-frontend-settings")]
2728#[cfg_attr(docsrs, doc(cfg(feature = "global-frontend-settings")))]
2729#[derive(Clone, Debug)]
2730pub struct GlobalFrontendSettings {
2731    inner: std::sync::Arc<dyn super::stub::dynamic::GlobalFrontendSettings>,
2732}
2733
2734#[cfg(feature = "global-frontend-settings")]
2735impl GlobalFrontendSettings {
2736    /// Returns a builder for [GlobalFrontendSettings].
2737    ///
2738    /// ```
2739    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
2740    /// # use google_cloud_compute_v1::client::GlobalFrontendSettings;
2741    /// let client = GlobalFrontendSettings::builder().build().await?;
2742    /// # Ok(()) }
2743    /// ```
2744    pub fn builder() -> super::builder::global_frontend_settings::ClientBuilder {
2745        crate::new_client_builder(super::builder::global_frontend_settings::client::Factory)
2746    }
2747
2748    /// Creates a new client from the provided stub.
2749    ///
2750    /// The most common case for calling this function is in tests mocking the
2751    /// client's behavior.
2752    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
2753    where
2754        T: super::stub::GlobalFrontendSettings + 'static,
2755    {
2756        Self { inner: stub.into() }
2757    }
2758
2759    pub(crate) async fn new(
2760        config: gaxi::options::ClientConfig,
2761    ) -> crate::ClientBuilderResult<Self> {
2762        let inner = Self::build_inner(config).await?;
2763        Ok(Self { inner })
2764    }
2765
2766    async fn build_inner(
2767        conf: gaxi::options::ClientConfig,
2768    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::GlobalFrontendSettings>>
2769    {
2770        if gaxi::options::tracing_enabled(&conf) {
2771            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
2772        }
2773        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
2774    }
2775
2776    async fn build_transport(
2777        conf: gaxi::options::ClientConfig,
2778    ) -> crate::ClientBuilderResult<impl super::stub::GlobalFrontendSettings> {
2779        super::transport::GlobalFrontendSettings::new(conf).await
2780    }
2781
2782    async fn build_with_tracing(
2783        conf: gaxi::options::ClientConfig,
2784    ) -> crate::ClientBuilderResult<impl super::stub::GlobalFrontendSettings> {
2785        Self::build_transport(conf)
2786            .await
2787            .map(super::tracing::GlobalFrontendSettings::new)
2788    }
2789
2790    /// Gets the Global Frontend Billing Bundle Settings for a project.
2791    pub fn get(&self) -> super::builder::global_frontend_settings::Get {
2792        super::builder::global_frontend_settings::Get::new(self.inner.clone())
2793    }
2794
2795    /// Updates the Global Frontend Billing Bundle Settings for a project.
2796    pub fn patch(&self) -> super::builder::global_frontend_settings::Patch {
2797        super::builder::global_frontend_settings::Patch::new(self.inner.clone())
2798    }
2799}
2800
2801/// Implements a client for the Compute Engine API.
2802///
2803/// # Example
2804/// ```
2805/// # use google_cloud_compute_v1::client::GlobalNetworkEndpointGroups;
2806/// async fn sample(
2807/// ) -> anyhow::Result<()> {
2808///     let client = GlobalNetworkEndpointGroups::builder().build().await?;
2809///     // use `client` to make requests to the Compute Engine API.
2810///     Ok(())
2811/// }
2812/// ```
2813///
2814/// # Service Description
2815///
2816/// Service for the `globalNetworkEndpointGroups` resource.
2817///
2818/// The client library was generated with API version 2026-09-01.
2819///
2820/// # Configuration
2821///
2822/// To configure `GlobalNetworkEndpointGroups` use the `with_*` methods in the type returned
2823/// by [builder()][GlobalNetworkEndpointGroups::builder]. The default configuration should
2824/// work for most applications. Common configuration changes include
2825///
2826/// * [with_endpoint()]: by default this client uses the global default endpoint
2827///   (`https://compute.googleapis.com`). Applications using regional
2828///   endpoints or running in restricted networks (e.g. a network configured
2829///   with [Private Google Access with VPC Service Controls]) may want to
2830///   override this default.
2831/// * [with_credentials()]: by default this client uses
2832///   [Application Default Credentials]. Applications using custom
2833///   authentication may need to override this default.
2834///
2835/// [with_endpoint()]: super::builder::global_network_endpoint_groups::ClientBuilder::with_endpoint
2836/// [with_credentials()]: super::builder::global_network_endpoint_groups::ClientBuilder::with_credentials
2837/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
2838/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
2839///
2840/// # Pooling and Cloning
2841///
2842/// `GlobalNetworkEndpointGroups` holds a connection pool internally, it is advised to
2843/// create one and reuse it. You do not need to wrap `GlobalNetworkEndpointGroups` in
2844/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
2845/// already uses an `Arc` internally.
2846#[cfg(feature = "global-network-endpoint-groups")]
2847#[cfg_attr(docsrs, doc(cfg(feature = "global-network-endpoint-groups")))]
2848#[derive(Clone, Debug)]
2849pub struct GlobalNetworkEndpointGroups {
2850    inner: std::sync::Arc<dyn super::stub::dynamic::GlobalNetworkEndpointGroups>,
2851}
2852
2853#[cfg(feature = "global-network-endpoint-groups")]
2854impl GlobalNetworkEndpointGroups {
2855    /// Returns a builder for [GlobalNetworkEndpointGroups].
2856    ///
2857    /// ```
2858    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
2859    /// # use google_cloud_compute_v1::client::GlobalNetworkEndpointGroups;
2860    /// let client = GlobalNetworkEndpointGroups::builder().build().await?;
2861    /// # Ok(()) }
2862    /// ```
2863    pub fn builder() -> super::builder::global_network_endpoint_groups::ClientBuilder {
2864        crate::new_client_builder(super::builder::global_network_endpoint_groups::client::Factory)
2865    }
2866
2867    /// Creates a new client from the provided stub.
2868    ///
2869    /// The most common case for calling this function is in tests mocking the
2870    /// client's behavior.
2871    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
2872    where
2873        T: super::stub::GlobalNetworkEndpointGroups + 'static,
2874    {
2875        Self { inner: stub.into() }
2876    }
2877
2878    pub(crate) async fn new(
2879        config: gaxi::options::ClientConfig,
2880    ) -> crate::ClientBuilderResult<Self> {
2881        let inner = Self::build_inner(config).await?;
2882        Ok(Self { inner })
2883    }
2884
2885    async fn build_inner(
2886        conf: gaxi::options::ClientConfig,
2887    ) -> crate::ClientBuilderResult<
2888        std::sync::Arc<dyn super::stub::dynamic::GlobalNetworkEndpointGroups>,
2889    > {
2890        if gaxi::options::tracing_enabled(&conf) {
2891            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
2892        }
2893        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
2894    }
2895
2896    async fn build_transport(
2897        conf: gaxi::options::ClientConfig,
2898    ) -> crate::ClientBuilderResult<impl super::stub::GlobalNetworkEndpointGroups> {
2899        super::transport::GlobalNetworkEndpointGroups::new(conf).await
2900    }
2901
2902    async fn build_with_tracing(
2903        conf: gaxi::options::ClientConfig,
2904    ) -> crate::ClientBuilderResult<impl super::stub::GlobalNetworkEndpointGroups> {
2905        Self::build_transport(conf)
2906            .await
2907            .map(super::tracing::GlobalNetworkEndpointGroups::new)
2908    }
2909
2910    /// Attach a network endpoint to the specified network endpoint group.
2911    pub fn attach_network_endpoints(
2912        &self,
2913    ) -> super::builder::global_network_endpoint_groups::AttachNetworkEndpoints {
2914        super::builder::global_network_endpoint_groups::AttachNetworkEndpoints::new(
2915            self.inner.clone(),
2916        )
2917    }
2918
2919    /// Deletes the specified network endpoint group.Note that the NEG cannot be
2920    /// deleted if there are backend services referencing it.
2921    pub fn delete(&self) -> super::builder::global_network_endpoint_groups::Delete {
2922        super::builder::global_network_endpoint_groups::Delete::new(self.inner.clone())
2923    }
2924
2925    /// Detach the network endpoint from the specified network endpoint group.
2926    pub fn detach_network_endpoints(
2927        &self,
2928    ) -> super::builder::global_network_endpoint_groups::DetachNetworkEndpoints {
2929        super::builder::global_network_endpoint_groups::DetachNetworkEndpoints::new(
2930            self.inner.clone(),
2931        )
2932    }
2933
2934    /// Returns the specified network endpoint group.
2935    pub fn get(&self) -> super::builder::global_network_endpoint_groups::Get {
2936        super::builder::global_network_endpoint_groups::Get::new(self.inner.clone())
2937    }
2938
2939    /// Creates a network endpoint group in the specified project using the
2940    /// parameters that are included in the request.
2941    ///
2942    /// Note: Use the following APIs to manage network endpoint groups:
2943    ///
2944    /// - To manage NEGs with zonal scope (such as zonal NEGs, hybrid connectivity
2945    ///   NEGs): zonal
2946    ///   API
2947    /// - To manage NEGs with regional scope (such as regional internet NEGs,
2948    ///   serverless NEGs, Private Service Connect NEGs): regional
2949    ///   API
2950    /// - To manage NEGs with global scope (such as global internet NEGs):global
2951    ///   API
2952    pub fn insert(&self) -> super::builder::global_network_endpoint_groups::Insert {
2953        super::builder::global_network_endpoint_groups::Insert::new(self.inner.clone())
2954    }
2955
2956    /// Retrieves the list of network endpoint groups that are located in the
2957    /// specified project.
2958    pub fn list(&self) -> super::builder::global_network_endpoint_groups::List {
2959        super::builder::global_network_endpoint_groups::List::new(self.inner.clone())
2960    }
2961
2962    /// Lists the network endpoints in the specified network endpoint group.
2963    pub fn list_network_endpoints(
2964        &self,
2965    ) -> super::builder::global_network_endpoint_groups::ListNetworkEndpoints {
2966        super::builder::global_network_endpoint_groups::ListNetworkEndpoints::new(
2967            self.inner.clone(),
2968        )
2969    }
2970
2971    /// Retrieves the specified Operations resource.
2972    pub fn get_operation(&self) -> super::builder::global_network_endpoint_groups::GetOperation {
2973        super::builder::global_network_endpoint_groups::GetOperation::new(self.inner.clone())
2974    }
2975}
2976
2977/// Implements a client for the Compute Engine API.
2978///
2979/// # Example
2980/// ```
2981/// # use google_cloud_compute_v1::client::GlobalOperations;
2982/// async fn sample(
2983/// ) -> anyhow::Result<()> {
2984///     let client = GlobalOperations::builder().build().await?;
2985///     // use `client` to make requests to the Compute Engine API.
2986///     Ok(())
2987/// }
2988/// ```
2989///
2990/// # Service Description
2991///
2992/// Service for the `globalOperations` resource.
2993///
2994/// The client library was generated with API version 2026-09-01.
2995///
2996/// # Configuration
2997///
2998/// To configure `GlobalOperations` use the `with_*` methods in the type returned
2999/// by [builder()][GlobalOperations::builder]. The default configuration should
3000/// work for most applications. Common configuration changes include
3001///
3002/// * [with_endpoint()]: by default this client uses the global default endpoint
3003///   (`https://compute.googleapis.com`). Applications using regional
3004///   endpoints or running in restricted networks (e.g. a network configured
3005///   with [Private Google Access with VPC Service Controls]) may want to
3006///   override this default.
3007/// * [with_credentials()]: by default this client uses
3008///   [Application Default Credentials]. Applications using custom
3009///   authentication may need to override this default.
3010///
3011/// [with_endpoint()]: super::builder::global_operations::ClientBuilder::with_endpoint
3012/// [with_credentials()]: super::builder::global_operations::ClientBuilder::with_credentials
3013/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
3014/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
3015///
3016/// # Pooling and Cloning
3017///
3018/// `GlobalOperations` holds a connection pool internally, it is advised to
3019/// create one and reuse it. You do not need to wrap `GlobalOperations` in
3020/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
3021/// already uses an `Arc` internally.
3022#[cfg(feature = "global-operations")]
3023#[cfg_attr(docsrs, doc(cfg(feature = "global-operations")))]
3024#[derive(Clone, Debug)]
3025pub struct GlobalOperations {
3026    inner: std::sync::Arc<dyn super::stub::dynamic::GlobalOperations>,
3027}
3028
3029#[cfg(feature = "global-operations")]
3030impl GlobalOperations {
3031    /// Returns a builder for [GlobalOperations].
3032    ///
3033    /// ```
3034    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
3035    /// # use google_cloud_compute_v1::client::GlobalOperations;
3036    /// let client = GlobalOperations::builder().build().await?;
3037    /// # Ok(()) }
3038    /// ```
3039    pub fn builder() -> super::builder::global_operations::ClientBuilder {
3040        crate::new_client_builder(super::builder::global_operations::client::Factory)
3041    }
3042
3043    /// Creates a new client from the provided stub.
3044    ///
3045    /// The most common case for calling this function is in tests mocking the
3046    /// client's behavior.
3047    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
3048    where
3049        T: super::stub::GlobalOperations + 'static,
3050    {
3051        Self { inner: stub.into() }
3052    }
3053
3054    pub(crate) async fn new(
3055        config: gaxi::options::ClientConfig,
3056    ) -> crate::ClientBuilderResult<Self> {
3057        let inner = Self::build_inner(config).await?;
3058        Ok(Self { inner })
3059    }
3060
3061    async fn build_inner(
3062        conf: gaxi::options::ClientConfig,
3063    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::GlobalOperations>>
3064    {
3065        if gaxi::options::tracing_enabled(&conf) {
3066            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
3067        }
3068        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
3069    }
3070
3071    async fn build_transport(
3072        conf: gaxi::options::ClientConfig,
3073    ) -> crate::ClientBuilderResult<impl super::stub::GlobalOperations> {
3074        super::transport::GlobalOperations::new(conf).await
3075    }
3076
3077    async fn build_with_tracing(
3078        conf: gaxi::options::ClientConfig,
3079    ) -> crate::ClientBuilderResult<impl super::stub::GlobalOperations> {
3080        Self::build_transport(conf)
3081            .await
3082            .map(super::tracing::GlobalOperations::new)
3083    }
3084
3085    /// Retrieves an aggregated list of all operations.
3086    ///
3087    /// To prevent failure, Google recommends that you set the
3088    /// `returnPartialSuccess` parameter to `true`.
3089    pub fn aggregated_list(&self) -> super::builder::global_operations::AggregatedList {
3090        super::builder::global_operations::AggregatedList::new(self.inner.clone())
3091    }
3092
3093    /// Deletes the specified Operations resource.
3094    pub fn delete(&self) -> super::builder::global_operations::Delete {
3095        super::builder::global_operations::Delete::new(self.inner.clone())
3096    }
3097
3098    /// Retrieves the specified Operations resource.
3099    pub fn get(&self) -> super::builder::global_operations::Get {
3100        super::builder::global_operations::Get::new(self.inner.clone())
3101    }
3102
3103    /// Retrieves a list of Operation resources contained within the specified
3104    /// project.
3105    pub fn list(&self) -> super::builder::global_operations::List {
3106        super::builder::global_operations::List::new(self.inner.clone())
3107    }
3108
3109    /// Waits for the specified Operation resource to return as `DONE`
3110    /// or for the request to approach the 2 minute deadline, and retrieves the
3111    /// specified Operation resource. This method differs from the
3112    /// `GET` method in that it waits for no more than the default
3113    /// deadline (2 minutes) and then returns the current state of the operation,
3114    /// which might be `DONE` or still in progress.
3115    ///
3116    /// This method is called on a best-effort basis. Specifically:
3117    ///
3118    /// ```norust
3119    /// - In uncommon cases, when the server is overloaded, the request might
3120    /// return before the default deadline is reached, or might return after zero
3121    /// seconds.
3122    /// ```
3123    ///
3124    /// - If the default deadline is reached, there is no guarantee that the
3125    ///   operation is actually done when the method returns. Be prepared to retry
3126    ///   if the operation is not `DONE`.
3127    pub fn wait(&self) -> super::builder::global_operations::Wait {
3128        super::builder::global_operations::Wait::new(self.inner.clone())
3129    }
3130}
3131
3132/// Implements a client for the Compute Engine API.
3133///
3134/// # Example
3135/// ```
3136/// # use google_cloud_compute_v1::client::GlobalOrganizationOperations;
3137/// async fn sample(
3138/// ) -> anyhow::Result<()> {
3139///     let client = GlobalOrganizationOperations::builder().build().await?;
3140///     // use `client` to make requests to the Compute Engine API.
3141///     Ok(())
3142/// }
3143/// ```
3144///
3145/// # Service Description
3146///
3147/// Service for the `globalOrganizationOperations` resource.
3148///
3149/// The client library was generated with API version 2026-09-01.
3150///
3151/// # Configuration
3152///
3153/// To configure `GlobalOrganizationOperations` use the `with_*` methods in the type returned
3154/// by [builder()][GlobalOrganizationOperations::builder]. The default configuration should
3155/// work for most applications. Common configuration changes include
3156///
3157/// * [with_endpoint()]: by default this client uses the global default endpoint
3158///   (`https://compute.googleapis.com`). Applications using regional
3159///   endpoints or running in restricted networks (e.g. a network configured
3160///   with [Private Google Access with VPC Service Controls]) may want to
3161///   override this default.
3162/// * [with_credentials()]: by default this client uses
3163///   [Application Default Credentials]. Applications using custom
3164///   authentication may need to override this default.
3165///
3166/// [with_endpoint()]: super::builder::global_organization_operations::ClientBuilder::with_endpoint
3167/// [with_credentials()]: super::builder::global_organization_operations::ClientBuilder::with_credentials
3168/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
3169/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
3170///
3171/// # Pooling and Cloning
3172///
3173/// `GlobalOrganizationOperations` holds a connection pool internally, it is advised to
3174/// create one and reuse it. You do not need to wrap `GlobalOrganizationOperations` in
3175/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
3176/// already uses an `Arc` internally.
3177#[cfg(feature = "global-organization-operations")]
3178#[cfg_attr(docsrs, doc(cfg(feature = "global-organization-operations")))]
3179#[derive(Clone, Debug)]
3180pub struct GlobalOrganizationOperations {
3181    inner: std::sync::Arc<dyn super::stub::dynamic::GlobalOrganizationOperations>,
3182}
3183
3184#[cfg(feature = "global-organization-operations")]
3185impl GlobalOrganizationOperations {
3186    /// Returns a builder for [GlobalOrganizationOperations].
3187    ///
3188    /// ```
3189    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
3190    /// # use google_cloud_compute_v1::client::GlobalOrganizationOperations;
3191    /// let client = GlobalOrganizationOperations::builder().build().await?;
3192    /// # Ok(()) }
3193    /// ```
3194    pub fn builder() -> super::builder::global_organization_operations::ClientBuilder {
3195        crate::new_client_builder(super::builder::global_organization_operations::client::Factory)
3196    }
3197
3198    /// Creates a new client from the provided stub.
3199    ///
3200    /// The most common case for calling this function is in tests mocking the
3201    /// client's behavior.
3202    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
3203    where
3204        T: super::stub::GlobalOrganizationOperations + 'static,
3205    {
3206        Self { inner: stub.into() }
3207    }
3208
3209    pub(crate) async fn new(
3210        config: gaxi::options::ClientConfig,
3211    ) -> crate::ClientBuilderResult<Self> {
3212        let inner = Self::build_inner(config).await?;
3213        Ok(Self { inner })
3214    }
3215
3216    async fn build_inner(
3217        conf: gaxi::options::ClientConfig,
3218    ) -> crate::ClientBuilderResult<
3219        std::sync::Arc<dyn super::stub::dynamic::GlobalOrganizationOperations>,
3220    > {
3221        if gaxi::options::tracing_enabled(&conf) {
3222            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
3223        }
3224        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
3225    }
3226
3227    async fn build_transport(
3228        conf: gaxi::options::ClientConfig,
3229    ) -> crate::ClientBuilderResult<impl super::stub::GlobalOrganizationOperations> {
3230        super::transport::GlobalOrganizationOperations::new(conf).await
3231    }
3232
3233    async fn build_with_tracing(
3234        conf: gaxi::options::ClientConfig,
3235    ) -> crate::ClientBuilderResult<impl super::stub::GlobalOrganizationOperations> {
3236        Self::build_transport(conf)
3237            .await
3238            .map(super::tracing::GlobalOrganizationOperations::new)
3239    }
3240
3241    /// Deletes the specified Operations resource.
3242    pub fn delete(&self) -> super::builder::global_organization_operations::Delete {
3243        super::builder::global_organization_operations::Delete::new(self.inner.clone())
3244    }
3245
3246    /// Retrieves the specified Operations resource. Gets a list of operations
3247    /// by making a `list()` request.
3248    pub fn get(&self) -> super::builder::global_organization_operations::Get {
3249        super::builder::global_organization_operations::Get::new(self.inner.clone())
3250    }
3251
3252    /// Retrieves a list of Operation resources contained within the specified
3253    /// organization.
3254    pub fn list(&self) -> super::builder::global_organization_operations::List {
3255        super::builder::global_organization_operations::List::new(self.inner.clone())
3256    }
3257}
3258
3259/// Implements a client for the Compute Engine API.
3260///
3261/// # Example
3262/// ```
3263/// # use google_cloud_compute_v1::client::GlobalPublicDelegatedPrefixes;
3264/// async fn sample(
3265/// ) -> anyhow::Result<()> {
3266///     let client = GlobalPublicDelegatedPrefixes::builder().build().await?;
3267///     // use `client` to make requests to the Compute Engine API.
3268///     Ok(())
3269/// }
3270/// ```
3271///
3272/// # Service Description
3273///
3274/// Service for the `globalPublicDelegatedPrefixes` resource.
3275///
3276/// The client library was generated with API version 2026-09-01.
3277///
3278/// # Configuration
3279///
3280/// To configure `GlobalPublicDelegatedPrefixes` use the `with_*` methods in the type returned
3281/// by [builder()][GlobalPublicDelegatedPrefixes::builder]. The default configuration should
3282/// work for most applications. Common configuration changes include
3283///
3284/// * [with_endpoint()]: by default this client uses the global default endpoint
3285///   (`https://compute.googleapis.com`). Applications using regional
3286///   endpoints or running in restricted networks (e.g. a network configured
3287///   with [Private Google Access with VPC Service Controls]) may want to
3288///   override this default.
3289/// * [with_credentials()]: by default this client uses
3290///   [Application Default Credentials]. Applications using custom
3291///   authentication may need to override this default.
3292///
3293/// [with_endpoint()]: super::builder::global_public_delegated_prefixes::ClientBuilder::with_endpoint
3294/// [with_credentials()]: super::builder::global_public_delegated_prefixes::ClientBuilder::with_credentials
3295/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
3296/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
3297///
3298/// # Pooling and Cloning
3299///
3300/// `GlobalPublicDelegatedPrefixes` holds a connection pool internally, it is advised to
3301/// create one and reuse it. You do not need to wrap `GlobalPublicDelegatedPrefixes` in
3302/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
3303/// already uses an `Arc` internally.
3304#[cfg(feature = "global-public-delegated-prefixes")]
3305#[cfg_attr(docsrs, doc(cfg(feature = "global-public-delegated-prefixes")))]
3306#[derive(Clone, Debug)]
3307pub struct GlobalPublicDelegatedPrefixes {
3308    inner: std::sync::Arc<dyn super::stub::dynamic::GlobalPublicDelegatedPrefixes>,
3309}
3310
3311#[cfg(feature = "global-public-delegated-prefixes")]
3312impl GlobalPublicDelegatedPrefixes {
3313    /// Returns a builder for [GlobalPublicDelegatedPrefixes].
3314    ///
3315    /// ```
3316    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
3317    /// # use google_cloud_compute_v1::client::GlobalPublicDelegatedPrefixes;
3318    /// let client = GlobalPublicDelegatedPrefixes::builder().build().await?;
3319    /// # Ok(()) }
3320    /// ```
3321    pub fn builder() -> super::builder::global_public_delegated_prefixes::ClientBuilder {
3322        crate::new_client_builder(super::builder::global_public_delegated_prefixes::client::Factory)
3323    }
3324
3325    /// Creates a new client from the provided stub.
3326    ///
3327    /// The most common case for calling this function is in tests mocking the
3328    /// client's behavior.
3329    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
3330    where
3331        T: super::stub::GlobalPublicDelegatedPrefixes + 'static,
3332    {
3333        Self { inner: stub.into() }
3334    }
3335
3336    pub(crate) async fn new(
3337        config: gaxi::options::ClientConfig,
3338    ) -> crate::ClientBuilderResult<Self> {
3339        let inner = Self::build_inner(config).await?;
3340        Ok(Self { inner })
3341    }
3342
3343    async fn build_inner(
3344        conf: gaxi::options::ClientConfig,
3345    ) -> crate::ClientBuilderResult<
3346        std::sync::Arc<dyn super::stub::dynamic::GlobalPublicDelegatedPrefixes>,
3347    > {
3348        if gaxi::options::tracing_enabled(&conf) {
3349            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
3350        }
3351        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
3352    }
3353
3354    async fn build_transport(
3355        conf: gaxi::options::ClientConfig,
3356    ) -> crate::ClientBuilderResult<impl super::stub::GlobalPublicDelegatedPrefixes> {
3357        super::transport::GlobalPublicDelegatedPrefixes::new(conf).await
3358    }
3359
3360    async fn build_with_tracing(
3361        conf: gaxi::options::ClientConfig,
3362    ) -> crate::ClientBuilderResult<impl super::stub::GlobalPublicDelegatedPrefixes> {
3363        Self::build_transport(conf)
3364            .await
3365            .map(super::tracing::GlobalPublicDelegatedPrefixes::new)
3366    }
3367
3368    /// Deletes the specified global PublicDelegatedPrefix.
3369    pub fn delete(&self) -> super::builder::global_public_delegated_prefixes::Delete {
3370        super::builder::global_public_delegated_prefixes::Delete::new(self.inner.clone())
3371    }
3372
3373    /// Returns the specified global PublicDelegatedPrefix resource.
3374    pub fn get(&self) -> super::builder::global_public_delegated_prefixes::Get {
3375        super::builder::global_public_delegated_prefixes::Get::new(self.inner.clone())
3376    }
3377
3378    /// Creates a global PublicDelegatedPrefix in the specified project using the
3379    /// parameters that are included in the request.
3380    pub fn insert(&self) -> super::builder::global_public_delegated_prefixes::Insert {
3381        super::builder::global_public_delegated_prefixes::Insert::new(self.inner.clone())
3382    }
3383
3384    /// Lists the global PublicDelegatedPrefixes for a project.
3385    pub fn list(&self) -> super::builder::global_public_delegated_prefixes::List {
3386        super::builder::global_public_delegated_prefixes::List::new(self.inner.clone())
3387    }
3388
3389    /// Patches the specified global PublicDelegatedPrefix resource with the data
3390    /// included in the request. This method supportsPATCH
3391    /// semantics and usesJSON merge
3392    /// patch format and processing rules.
3393    pub fn patch(&self) -> super::builder::global_public_delegated_prefixes::Patch {
3394        super::builder::global_public_delegated_prefixes::Patch::new(self.inner.clone())
3395    }
3396
3397    /// Retrieves the specified Operations resource.
3398    pub fn get_operation(&self) -> super::builder::global_public_delegated_prefixes::GetOperation {
3399        super::builder::global_public_delegated_prefixes::GetOperation::new(self.inner.clone())
3400    }
3401}
3402
3403/// Implements a client for the Compute Engine API.
3404///
3405/// # Example
3406/// ```
3407/// # use google_cloud_compute_v1::client::GlobalVmExtensionPolicies;
3408/// async fn sample(
3409/// ) -> anyhow::Result<()> {
3410///     let client = GlobalVmExtensionPolicies::builder().build().await?;
3411///     // use `client` to make requests to the Compute Engine API.
3412///     Ok(())
3413/// }
3414/// ```
3415///
3416/// # Service Description
3417///
3418/// Service for the `globalVmExtensionPolicies` resource.
3419///
3420/// The client library was generated with API version 2026-09-01.
3421///
3422/// # Configuration
3423///
3424/// To configure `GlobalVmExtensionPolicies` use the `with_*` methods in the type returned
3425/// by [builder()][GlobalVmExtensionPolicies::builder]. The default configuration should
3426/// work for most applications. Common configuration changes include
3427///
3428/// * [with_endpoint()]: by default this client uses the global default endpoint
3429///   (`https://compute.googleapis.com`). Applications using regional
3430///   endpoints or running in restricted networks (e.g. a network configured
3431///   with [Private Google Access with VPC Service Controls]) may want to
3432///   override this default.
3433/// * [with_credentials()]: by default this client uses
3434///   [Application Default Credentials]. Applications using custom
3435///   authentication may need to override this default.
3436///
3437/// [with_endpoint()]: super::builder::global_vm_extension_policies::ClientBuilder::with_endpoint
3438/// [with_credentials()]: super::builder::global_vm_extension_policies::ClientBuilder::with_credentials
3439/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
3440/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
3441///
3442/// # Pooling and Cloning
3443///
3444/// `GlobalVmExtensionPolicies` holds a connection pool internally, it is advised to
3445/// create one and reuse it. You do not need to wrap `GlobalVmExtensionPolicies` in
3446/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
3447/// already uses an `Arc` internally.
3448#[cfg(feature = "global-vm-extension-policies")]
3449#[cfg_attr(docsrs, doc(cfg(feature = "global-vm-extension-policies")))]
3450#[derive(Clone, Debug)]
3451pub struct GlobalVmExtensionPolicies {
3452    inner: std::sync::Arc<dyn super::stub::dynamic::GlobalVmExtensionPolicies>,
3453}
3454
3455#[cfg(feature = "global-vm-extension-policies")]
3456impl GlobalVmExtensionPolicies {
3457    /// Returns a builder for [GlobalVmExtensionPolicies].
3458    ///
3459    /// ```
3460    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
3461    /// # use google_cloud_compute_v1::client::GlobalVmExtensionPolicies;
3462    /// let client = GlobalVmExtensionPolicies::builder().build().await?;
3463    /// # Ok(()) }
3464    /// ```
3465    pub fn builder() -> super::builder::global_vm_extension_policies::ClientBuilder {
3466        crate::new_client_builder(super::builder::global_vm_extension_policies::client::Factory)
3467    }
3468
3469    /// Creates a new client from the provided stub.
3470    ///
3471    /// The most common case for calling this function is in tests mocking the
3472    /// client's behavior.
3473    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
3474    where
3475        T: super::stub::GlobalVmExtensionPolicies + 'static,
3476    {
3477        Self { inner: stub.into() }
3478    }
3479
3480    pub(crate) async fn new(
3481        config: gaxi::options::ClientConfig,
3482    ) -> crate::ClientBuilderResult<Self> {
3483        let inner = Self::build_inner(config).await?;
3484        Ok(Self { inner })
3485    }
3486
3487    async fn build_inner(
3488        conf: gaxi::options::ClientConfig,
3489    ) -> crate::ClientBuilderResult<
3490        std::sync::Arc<dyn super::stub::dynamic::GlobalVmExtensionPolicies>,
3491    > {
3492        if gaxi::options::tracing_enabled(&conf) {
3493            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
3494        }
3495        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
3496    }
3497
3498    async fn build_transport(
3499        conf: gaxi::options::ClientConfig,
3500    ) -> crate::ClientBuilderResult<impl super::stub::GlobalVmExtensionPolicies> {
3501        super::transport::GlobalVmExtensionPolicies::new(conf).await
3502    }
3503
3504    async fn build_with_tracing(
3505        conf: gaxi::options::ClientConfig,
3506    ) -> crate::ClientBuilderResult<impl super::stub::GlobalVmExtensionPolicies> {
3507        Self::build_transport(conf)
3508            .await
3509            .map(super::tracing::GlobalVmExtensionPolicies::new)
3510    }
3511
3512    /// Retrieves the list of all VM Extension Policy resources
3513    /// available to the specified project.
3514    ///
3515    /// To prevent failure, it's recommended that you set the
3516    /// `returnPartialSuccess` parameter to `true`.
3517    pub fn aggregated_list(&self) -> super::builder::global_vm_extension_policies::AggregatedList {
3518        super::builder::global_vm_extension_policies::AggregatedList::new(self.inner.clone())
3519    }
3520
3521    /// Purge scoped resources (zonal policies) from a global VM extension
3522    /// policy, and then delete the global VM extension policy. Purge of the scoped
3523    /// resources is a pre-condition of the global VM extension policy deletion.
3524    /// The deletion of the global VM extension policy happens after the purge
3525    /// rollout is done, so it's not a part of the LRO. It's an automatic process
3526    /// that triggers in the backend.
3527    pub fn delete(&self) -> super::builder::global_vm_extension_policies::Delete {
3528        super::builder::global_vm_extension_policies::Delete::new(self.inner.clone())
3529    }
3530
3531    /// Gets details of a global VM extension policy.
3532    pub fn get(&self) -> super::builder::global_vm_extension_policies::Get {
3533        super::builder::global_vm_extension_policies::Get::new(self.inner.clone())
3534    }
3535
3536    /// Creates a new project level GlobalVmExtensionPolicy.
3537    pub fn insert(&self) -> super::builder::global_vm_extension_policies::Insert {
3538        super::builder::global_vm_extension_policies::Insert::new(self.inner.clone())
3539    }
3540
3541    /// Lists global VM extension policies.
3542    pub fn list(&self) -> super::builder::global_vm_extension_policies::List {
3543        super::builder::global_vm_extension_policies::List::new(self.inner.clone())
3544    }
3545
3546    /// Updates a global VM extension policy.
3547    pub fn update(&self) -> super::builder::global_vm_extension_policies::Update {
3548        super::builder::global_vm_extension_policies::Update::new(self.inner.clone())
3549    }
3550
3551    /// Retrieves the specified Operations resource.
3552    pub fn get_operation(&self) -> super::builder::global_vm_extension_policies::GetOperation {
3553        super::builder::global_vm_extension_policies::GetOperation::new(self.inner.clone())
3554    }
3555}
3556
3557/// Implements a client for the Compute Engine API.
3558///
3559/// # Example
3560/// ```
3561/// # use google_cloud_compute_v1::client::HealthChecks;
3562/// async fn sample(
3563/// ) -> anyhow::Result<()> {
3564///     let client = HealthChecks::builder().build().await?;
3565///     // use `client` to make requests to the Compute Engine API.
3566///     Ok(())
3567/// }
3568/// ```
3569///
3570/// # Service Description
3571///
3572/// Service for the `healthChecks` resource.
3573///
3574/// The client library was generated with API version 2026-09-01.
3575///
3576/// # Configuration
3577///
3578/// To configure `HealthChecks` use the `with_*` methods in the type returned
3579/// by [builder()][HealthChecks::builder]. The default configuration should
3580/// work for most applications. Common configuration changes include
3581///
3582/// * [with_endpoint()]: by default this client uses the global default endpoint
3583///   (`https://compute.googleapis.com`). Applications using regional
3584///   endpoints or running in restricted networks (e.g. a network configured
3585///   with [Private Google Access with VPC Service Controls]) may want to
3586///   override this default.
3587/// * [with_credentials()]: by default this client uses
3588///   [Application Default Credentials]. Applications using custom
3589///   authentication may need to override this default.
3590///
3591/// [with_endpoint()]: super::builder::health_checks::ClientBuilder::with_endpoint
3592/// [with_credentials()]: super::builder::health_checks::ClientBuilder::with_credentials
3593/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
3594/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
3595///
3596/// # Pooling and Cloning
3597///
3598/// `HealthChecks` holds a connection pool internally, it is advised to
3599/// create one and reuse it. You do not need to wrap `HealthChecks` in
3600/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
3601/// already uses an `Arc` internally.
3602#[cfg(feature = "health-checks")]
3603#[cfg_attr(docsrs, doc(cfg(feature = "health-checks")))]
3604#[derive(Clone, Debug)]
3605pub struct HealthChecks {
3606    inner: std::sync::Arc<dyn super::stub::dynamic::HealthChecks>,
3607}
3608
3609#[cfg(feature = "health-checks")]
3610impl HealthChecks {
3611    /// Returns a builder for [HealthChecks].
3612    ///
3613    /// ```
3614    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
3615    /// # use google_cloud_compute_v1::client::HealthChecks;
3616    /// let client = HealthChecks::builder().build().await?;
3617    /// # Ok(()) }
3618    /// ```
3619    pub fn builder() -> super::builder::health_checks::ClientBuilder {
3620        crate::new_client_builder(super::builder::health_checks::client::Factory)
3621    }
3622
3623    /// Creates a new client from the provided stub.
3624    ///
3625    /// The most common case for calling this function is in tests mocking the
3626    /// client's behavior.
3627    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
3628    where
3629        T: super::stub::HealthChecks + 'static,
3630    {
3631        Self { inner: stub.into() }
3632    }
3633
3634    pub(crate) async fn new(
3635        config: gaxi::options::ClientConfig,
3636    ) -> crate::ClientBuilderResult<Self> {
3637        let inner = Self::build_inner(config).await?;
3638        Ok(Self { inner })
3639    }
3640
3641    async fn build_inner(
3642        conf: gaxi::options::ClientConfig,
3643    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::HealthChecks>> {
3644        if gaxi::options::tracing_enabled(&conf) {
3645            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
3646        }
3647        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
3648    }
3649
3650    async fn build_transport(
3651        conf: gaxi::options::ClientConfig,
3652    ) -> crate::ClientBuilderResult<impl super::stub::HealthChecks> {
3653        super::transport::HealthChecks::new(conf).await
3654    }
3655
3656    async fn build_with_tracing(
3657        conf: gaxi::options::ClientConfig,
3658    ) -> crate::ClientBuilderResult<impl super::stub::HealthChecks> {
3659        Self::build_transport(conf)
3660            .await
3661            .map(super::tracing::HealthChecks::new)
3662    }
3663
3664    /// Retrieves the list of all HealthCheck resources, regional and global,
3665    /// available to the specified project.
3666    ///
3667    /// To prevent failure, Google recommends that you set the
3668    /// `returnPartialSuccess` parameter to `true`.
3669    pub fn aggregated_list(&self) -> super::builder::health_checks::AggregatedList {
3670        super::builder::health_checks::AggregatedList::new(self.inner.clone())
3671    }
3672
3673    /// Deletes the specified HealthCheck resource.
3674    pub fn delete(&self) -> super::builder::health_checks::Delete {
3675        super::builder::health_checks::Delete::new(self.inner.clone())
3676    }
3677
3678    /// Returns the specified HealthCheck resource.
3679    pub fn get(&self) -> super::builder::health_checks::Get {
3680        super::builder::health_checks::Get::new(self.inner.clone())
3681    }
3682
3683    /// Creates a HealthCheck resource in the specified project using the data
3684    /// included in the request.
3685    pub fn insert(&self) -> super::builder::health_checks::Insert {
3686        super::builder::health_checks::Insert::new(self.inner.clone())
3687    }
3688
3689    /// Retrieves the list of HealthCheck resources available to the specified
3690    /// project.
3691    pub fn list(&self) -> super::builder::health_checks::List {
3692        super::builder::health_checks::List::new(self.inner.clone())
3693    }
3694
3695    /// Updates a HealthCheck resource in the specified project using the data
3696    /// included in the request. This method supportsPATCH
3697    /// semantics and uses theJSON merge
3698    /// patch format and processing rules.
3699    pub fn patch(&self) -> super::builder::health_checks::Patch {
3700        super::builder::health_checks::Patch::new(self.inner.clone())
3701    }
3702
3703    /// Returns permissions that a caller has on the specified resource.
3704    pub fn test_iam_permissions(&self) -> super::builder::health_checks::TestIamPermissions {
3705        super::builder::health_checks::TestIamPermissions::new(self.inner.clone())
3706    }
3707
3708    /// Updates a HealthCheck resource in the specified project using the data
3709    /// included in the request.
3710    pub fn update(&self) -> super::builder::health_checks::Update {
3711        super::builder::health_checks::Update::new(self.inner.clone())
3712    }
3713
3714    /// Retrieves the specified Operations resource.
3715    pub fn get_operation(&self) -> super::builder::health_checks::GetOperation {
3716        super::builder::health_checks::GetOperation::new(self.inner.clone())
3717    }
3718}
3719
3720/// Implements a client for the Compute Engine API.
3721///
3722/// # Example
3723/// ```
3724/// # use google_cloud_compute_v1::client::Hosts;
3725/// async fn sample(
3726/// ) -> anyhow::Result<()> {
3727///     let client = Hosts::builder().build().await?;
3728///     // use `client` to make requests to the Compute Engine API.
3729///     Ok(())
3730/// }
3731/// ```
3732///
3733/// # Service Description
3734///
3735/// Service for the `hosts` resource.
3736///
3737/// The client library was generated with API version 2026-09-01.
3738///
3739/// # Configuration
3740///
3741/// To configure `Hosts` use the `with_*` methods in the type returned
3742/// by [builder()][Hosts::builder]. The default configuration should
3743/// work for most applications. Common configuration changes include
3744///
3745/// * [with_endpoint()]: by default this client uses the global default endpoint
3746///   (`https://compute.googleapis.com`). Applications using regional
3747///   endpoints or running in restricted networks (e.g. a network configured
3748///   with [Private Google Access with VPC Service Controls]) may want to
3749///   override this default.
3750/// * [with_credentials()]: by default this client uses
3751///   [Application Default Credentials]. Applications using custom
3752///   authentication may need to override this default.
3753///
3754/// [with_endpoint()]: super::builder::hosts::ClientBuilder::with_endpoint
3755/// [with_credentials()]: super::builder::hosts::ClientBuilder::with_credentials
3756/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
3757/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
3758///
3759/// # Pooling and Cloning
3760///
3761/// `Hosts` holds a connection pool internally, it is advised to
3762/// create one and reuse it. You do not need to wrap `Hosts` in
3763/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
3764/// already uses an `Arc` internally.
3765#[cfg(feature = "hosts")]
3766#[cfg_attr(docsrs, doc(cfg(feature = "hosts")))]
3767#[derive(Clone, Debug)]
3768pub struct Hosts {
3769    inner: std::sync::Arc<dyn super::stub::dynamic::Hosts>,
3770}
3771
3772#[cfg(feature = "hosts")]
3773impl Hosts {
3774    /// Returns a builder for [Hosts].
3775    ///
3776    /// ```
3777    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
3778    /// # use google_cloud_compute_v1::client::Hosts;
3779    /// let client = Hosts::builder().build().await?;
3780    /// # Ok(()) }
3781    /// ```
3782    pub fn builder() -> super::builder::hosts::ClientBuilder {
3783        crate::new_client_builder(super::builder::hosts::client::Factory)
3784    }
3785
3786    /// Creates a new client from the provided stub.
3787    ///
3788    /// The most common case for calling this function is in tests mocking the
3789    /// client's behavior.
3790    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
3791    where
3792        T: super::stub::Hosts + 'static,
3793    {
3794        Self { inner: stub.into() }
3795    }
3796
3797    pub(crate) async fn new(
3798        config: gaxi::options::ClientConfig,
3799    ) -> crate::ClientBuilderResult<Self> {
3800        let inner = Self::build_inner(config).await?;
3801        Ok(Self { inner })
3802    }
3803
3804    async fn build_inner(
3805        conf: gaxi::options::ClientConfig,
3806    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::Hosts>> {
3807        if gaxi::options::tracing_enabled(&conf) {
3808            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
3809        }
3810        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
3811    }
3812
3813    async fn build_transport(
3814        conf: gaxi::options::ClientConfig,
3815    ) -> crate::ClientBuilderResult<impl super::stub::Hosts> {
3816        super::transport::Hosts::new(conf).await
3817    }
3818
3819    async fn build_with_tracing(
3820        conf: gaxi::options::ClientConfig,
3821    ) -> crate::ClientBuilderResult<impl super::stub::Hosts> {
3822        Self::build_transport(conf)
3823            .await
3824            .map(super::tracing::Hosts::new)
3825    }
3826
3827    /// Retrieves information about the specified host.
3828    pub fn get(&self) -> super::builder::hosts::Get {
3829        super::builder::hosts::Get::new(self.inner.clone())
3830    }
3831
3832    /// Allows customers to get SBOM versions of a host.
3833    pub fn get_version(&self) -> super::builder::hosts::GetVersion {
3834        super::builder::hosts::GetVersion::new(self.inner.clone())
3835    }
3836
3837    /// Retrieves a list of hosts.
3838    pub fn list(&self) -> super::builder::hosts::List {
3839        super::builder::hosts::List::new(self.inner.clone())
3840    }
3841
3842    /// Retrieves the specified zone-specific Operations resource.
3843    pub fn get_operation(&self) -> super::builder::hosts::GetOperation {
3844        super::builder::hosts::GetOperation::new(self.inner.clone())
3845    }
3846}
3847
3848/// Implements a client for the Compute Engine API.
3849///
3850/// # Example
3851/// ```
3852/// # use google_cloud_compute_v1::client::HttpHealthChecks;
3853/// async fn sample(
3854/// ) -> anyhow::Result<()> {
3855///     let client = HttpHealthChecks::builder().build().await?;
3856///     // use `client` to make requests to the Compute Engine API.
3857///     Ok(())
3858/// }
3859/// ```
3860///
3861/// # Service Description
3862///
3863/// Service for the `httpHealthChecks` resource.
3864///
3865/// The client library was generated with API version 2026-09-01.
3866///
3867/// # Configuration
3868///
3869/// To configure `HttpHealthChecks` use the `with_*` methods in the type returned
3870/// by [builder()][HttpHealthChecks::builder]. The default configuration should
3871/// work for most applications. Common configuration changes include
3872///
3873/// * [with_endpoint()]: by default this client uses the global default endpoint
3874///   (`https://compute.googleapis.com`). Applications using regional
3875///   endpoints or running in restricted networks (e.g. a network configured
3876///   with [Private Google Access with VPC Service Controls]) may want to
3877///   override this default.
3878/// * [with_credentials()]: by default this client uses
3879///   [Application Default Credentials]. Applications using custom
3880///   authentication may need to override this default.
3881///
3882/// [with_endpoint()]: super::builder::http_health_checks::ClientBuilder::with_endpoint
3883/// [with_credentials()]: super::builder::http_health_checks::ClientBuilder::with_credentials
3884/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
3885/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
3886///
3887/// # Pooling and Cloning
3888///
3889/// `HttpHealthChecks` holds a connection pool internally, it is advised to
3890/// create one and reuse it. You do not need to wrap `HttpHealthChecks` in
3891/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
3892/// already uses an `Arc` internally.
3893#[cfg(feature = "http-health-checks")]
3894#[cfg_attr(docsrs, doc(cfg(feature = "http-health-checks")))]
3895#[derive(Clone, Debug)]
3896pub struct HttpHealthChecks {
3897    inner: std::sync::Arc<dyn super::stub::dynamic::HttpHealthChecks>,
3898}
3899
3900#[cfg(feature = "http-health-checks")]
3901impl HttpHealthChecks {
3902    /// Returns a builder for [HttpHealthChecks].
3903    ///
3904    /// ```
3905    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
3906    /// # use google_cloud_compute_v1::client::HttpHealthChecks;
3907    /// let client = HttpHealthChecks::builder().build().await?;
3908    /// # Ok(()) }
3909    /// ```
3910    pub fn builder() -> super::builder::http_health_checks::ClientBuilder {
3911        crate::new_client_builder(super::builder::http_health_checks::client::Factory)
3912    }
3913
3914    /// Creates a new client from the provided stub.
3915    ///
3916    /// The most common case for calling this function is in tests mocking the
3917    /// client's behavior.
3918    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
3919    where
3920        T: super::stub::HttpHealthChecks + 'static,
3921    {
3922        Self { inner: stub.into() }
3923    }
3924
3925    pub(crate) async fn new(
3926        config: gaxi::options::ClientConfig,
3927    ) -> crate::ClientBuilderResult<Self> {
3928        let inner = Self::build_inner(config).await?;
3929        Ok(Self { inner })
3930    }
3931
3932    async fn build_inner(
3933        conf: gaxi::options::ClientConfig,
3934    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::HttpHealthChecks>>
3935    {
3936        if gaxi::options::tracing_enabled(&conf) {
3937            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
3938        }
3939        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
3940    }
3941
3942    async fn build_transport(
3943        conf: gaxi::options::ClientConfig,
3944    ) -> crate::ClientBuilderResult<impl super::stub::HttpHealthChecks> {
3945        super::transport::HttpHealthChecks::new(conf).await
3946    }
3947
3948    async fn build_with_tracing(
3949        conf: gaxi::options::ClientConfig,
3950    ) -> crate::ClientBuilderResult<impl super::stub::HttpHealthChecks> {
3951        Self::build_transport(conf)
3952            .await
3953            .map(super::tracing::HttpHealthChecks::new)
3954    }
3955
3956    /// Deletes the specified HttpHealthCheck resource.
3957    pub fn delete(&self) -> super::builder::http_health_checks::Delete {
3958        super::builder::http_health_checks::Delete::new(self.inner.clone())
3959    }
3960
3961    /// Returns the specified HttpHealthCheck resource.
3962    pub fn get(&self) -> super::builder::http_health_checks::Get {
3963        super::builder::http_health_checks::Get::new(self.inner.clone())
3964    }
3965
3966    /// Creates a HttpHealthCheck resource in the specified project using the data
3967    /// included in the request.
3968    pub fn insert(&self) -> super::builder::http_health_checks::Insert {
3969        super::builder::http_health_checks::Insert::new(self.inner.clone())
3970    }
3971
3972    /// Retrieves the list of HttpHealthCheck resources available to the specified
3973    /// project.
3974    pub fn list(&self) -> super::builder::http_health_checks::List {
3975        super::builder::http_health_checks::List::new(self.inner.clone())
3976    }
3977
3978    /// Updates a HttpHealthCheck resource in the specified project using the data
3979    /// included in the request. This method supportsPATCH
3980    /// semantics and uses theJSON merge
3981    /// patch format and processing rules.
3982    pub fn patch(&self) -> super::builder::http_health_checks::Patch {
3983        super::builder::http_health_checks::Patch::new(self.inner.clone())
3984    }
3985
3986    /// Returns permissions that a caller has on the specified resource.
3987    pub fn test_iam_permissions(&self) -> super::builder::http_health_checks::TestIamPermissions {
3988        super::builder::http_health_checks::TestIamPermissions::new(self.inner.clone())
3989    }
3990
3991    /// Updates a HttpHealthCheck resource in the specified project using the data
3992    /// included in the request.
3993    pub fn update(&self) -> super::builder::http_health_checks::Update {
3994        super::builder::http_health_checks::Update::new(self.inner.clone())
3995    }
3996
3997    /// Retrieves the specified Operations resource.
3998    pub fn get_operation(&self) -> super::builder::http_health_checks::GetOperation {
3999        super::builder::http_health_checks::GetOperation::new(self.inner.clone())
4000    }
4001}
4002
4003/// Implements a client for the Compute Engine API.
4004///
4005/// # Example
4006/// ```
4007/// # use google_cloud_compute_v1::client::HttpsHealthChecks;
4008/// async fn sample(
4009/// ) -> anyhow::Result<()> {
4010///     let client = HttpsHealthChecks::builder().build().await?;
4011///     // use `client` to make requests to the Compute Engine API.
4012///     Ok(())
4013/// }
4014/// ```
4015///
4016/// # Service Description
4017///
4018/// Service for the `httpsHealthChecks` resource.
4019///
4020/// The client library was generated with API version 2026-09-01.
4021///
4022/// # Configuration
4023///
4024/// To configure `HttpsHealthChecks` use the `with_*` methods in the type returned
4025/// by [builder()][HttpsHealthChecks::builder]. The default configuration should
4026/// work for most applications. Common configuration changes include
4027///
4028/// * [with_endpoint()]: by default this client uses the global default endpoint
4029///   (`https://compute.googleapis.com`). Applications using regional
4030///   endpoints or running in restricted networks (e.g. a network configured
4031///   with [Private Google Access with VPC Service Controls]) may want to
4032///   override this default.
4033/// * [with_credentials()]: by default this client uses
4034///   [Application Default Credentials]. Applications using custom
4035///   authentication may need to override this default.
4036///
4037/// [with_endpoint()]: super::builder::https_health_checks::ClientBuilder::with_endpoint
4038/// [with_credentials()]: super::builder::https_health_checks::ClientBuilder::with_credentials
4039/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
4040/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
4041///
4042/// # Pooling and Cloning
4043///
4044/// `HttpsHealthChecks` holds a connection pool internally, it is advised to
4045/// create one and reuse it. You do not need to wrap `HttpsHealthChecks` in
4046/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
4047/// already uses an `Arc` internally.
4048#[cfg(feature = "https-health-checks")]
4049#[cfg_attr(docsrs, doc(cfg(feature = "https-health-checks")))]
4050#[derive(Clone, Debug)]
4051pub struct HttpsHealthChecks {
4052    inner: std::sync::Arc<dyn super::stub::dynamic::HttpsHealthChecks>,
4053}
4054
4055#[cfg(feature = "https-health-checks")]
4056impl HttpsHealthChecks {
4057    /// Returns a builder for [HttpsHealthChecks].
4058    ///
4059    /// ```
4060    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
4061    /// # use google_cloud_compute_v1::client::HttpsHealthChecks;
4062    /// let client = HttpsHealthChecks::builder().build().await?;
4063    /// # Ok(()) }
4064    /// ```
4065    pub fn builder() -> super::builder::https_health_checks::ClientBuilder {
4066        crate::new_client_builder(super::builder::https_health_checks::client::Factory)
4067    }
4068
4069    /// Creates a new client from the provided stub.
4070    ///
4071    /// The most common case for calling this function is in tests mocking the
4072    /// client's behavior.
4073    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
4074    where
4075        T: super::stub::HttpsHealthChecks + 'static,
4076    {
4077        Self { inner: stub.into() }
4078    }
4079
4080    pub(crate) async fn new(
4081        config: gaxi::options::ClientConfig,
4082    ) -> crate::ClientBuilderResult<Self> {
4083        let inner = Self::build_inner(config).await?;
4084        Ok(Self { inner })
4085    }
4086
4087    async fn build_inner(
4088        conf: gaxi::options::ClientConfig,
4089    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::HttpsHealthChecks>>
4090    {
4091        if gaxi::options::tracing_enabled(&conf) {
4092            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
4093        }
4094        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
4095    }
4096
4097    async fn build_transport(
4098        conf: gaxi::options::ClientConfig,
4099    ) -> crate::ClientBuilderResult<impl super::stub::HttpsHealthChecks> {
4100        super::transport::HttpsHealthChecks::new(conf).await
4101    }
4102
4103    async fn build_with_tracing(
4104        conf: gaxi::options::ClientConfig,
4105    ) -> crate::ClientBuilderResult<impl super::stub::HttpsHealthChecks> {
4106        Self::build_transport(conf)
4107            .await
4108            .map(super::tracing::HttpsHealthChecks::new)
4109    }
4110
4111    /// Deletes the specified HttpsHealthCheck resource.
4112    pub fn delete(&self) -> super::builder::https_health_checks::Delete {
4113        super::builder::https_health_checks::Delete::new(self.inner.clone())
4114    }
4115
4116    /// Returns the specified HttpsHealthCheck resource.
4117    pub fn get(&self) -> super::builder::https_health_checks::Get {
4118        super::builder::https_health_checks::Get::new(self.inner.clone())
4119    }
4120
4121    /// Creates a HttpsHealthCheck resource in the specified project using the data
4122    /// included in the request.
4123    pub fn insert(&self) -> super::builder::https_health_checks::Insert {
4124        super::builder::https_health_checks::Insert::new(self.inner.clone())
4125    }
4126
4127    /// Retrieves the list of HttpsHealthCheck resources available to the specified
4128    /// project.
4129    pub fn list(&self) -> super::builder::https_health_checks::List {
4130        super::builder::https_health_checks::List::new(self.inner.clone())
4131    }
4132
4133    /// Updates a HttpsHealthCheck resource in the specified project using the data
4134    /// included in the request. This method supportsPATCH
4135    /// semantics and uses theJSON merge
4136    /// patch format and processing rules.
4137    pub fn patch(&self) -> super::builder::https_health_checks::Patch {
4138        super::builder::https_health_checks::Patch::new(self.inner.clone())
4139    }
4140
4141    /// Returns permissions that a caller has on the specified resource.
4142    pub fn test_iam_permissions(&self) -> super::builder::https_health_checks::TestIamPermissions {
4143        super::builder::https_health_checks::TestIamPermissions::new(self.inner.clone())
4144    }
4145
4146    /// Updates a HttpsHealthCheck resource in the specified project using the data
4147    /// included in the request.
4148    pub fn update(&self) -> super::builder::https_health_checks::Update {
4149        super::builder::https_health_checks::Update::new(self.inner.clone())
4150    }
4151
4152    /// Retrieves the specified Operations resource.
4153    pub fn get_operation(&self) -> super::builder::https_health_checks::GetOperation {
4154        super::builder::https_health_checks::GetOperation::new(self.inner.clone())
4155    }
4156}
4157
4158/// Implements a client for the Compute Engine API.
4159///
4160/// # Example
4161/// ```
4162/// # use google_cloud_compute_v1::client::ImageFamilyViews;
4163/// async fn sample(
4164/// ) -> anyhow::Result<()> {
4165///     let client = ImageFamilyViews::builder().build().await?;
4166///     // use `client` to make requests to the Compute Engine API.
4167///     Ok(())
4168/// }
4169/// ```
4170///
4171/// # Service Description
4172///
4173/// Service for the `imageFamilyViews` resource.
4174///
4175/// The client library was generated with API version 2026-09-01.
4176///
4177/// # Configuration
4178///
4179/// To configure `ImageFamilyViews` use the `with_*` methods in the type returned
4180/// by [builder()][ImageFamilyViews::builder]. The default configuration should
4181/// work for most applications. Common configuration changes include
4182///
4183/// * [with_endpoint()]: by default this client uses the global default endpoint
4184///   (`https://compute.googleapis.com`). Applications using regional
4185///   endpoints or running in restricted networks (e.g. a network configured
4186///   with [Private Google Access with VPC Service Controls]) may want to
4187///   override this default.
4188/// * [with_credentials()]: by default this client uses
4189///   [Application Default Credentials]. Applications using custom
4190///   authentication may need to override this default.
4191///
4192/// [with_endpoint()]: super::builder::image_family_views::ClientBuilder::with_endpoint
4193/// [with_credentials()]: super::builder::image_family_views::ClientBuilder::with_credentials
4194/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
4195/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
4196///
4197/// # Pooling and Cloning
4198///
4199/// `ImageFamilyViews` holds a connection pool internally, it is advised to
4200/// create one and reuse it. You do not need to wrap `ImageFamilyViews` in
4201/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
4202/// already uses an `Arc` internally.
4203#[cfg(feature = "image-family-views")]
4204#[cfg_attr(docsrs, doc(cfg(feature = "image-family-views")))]
4205#[derive(Clone, Debug)]
4206pub struct ImageFamilyViews {
4207    inner: std::sync::Arc<dyn super::stub::dynamic::ImageFamilyViews>,
4208}
4209
4210#[cfg(feature = "image-family-views")]
4211impl ImageFamilyViews {
4212    /// Returns a builder for [ImageFamilyViews].
4213    ///
4214    /// ```
4215    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
4216    /// # use google_cloud_compute_v1::client::ImageFamilyViews;
4217    /// let client = ImageFamilyViews::builder().build().await?;
4218    /// # Ok(()) }
4219    /// ```
4220    pub fn builder() -> super::builder::image_family_views::ClientBuilder {
4221        crate::new_client_builder(super::builder::image_family_views::client::Factory)
4222    }
4223
4224    /// Creates a new client from the provided stub.
4225    ///
4226    /// The most common case for calling this function is in tests mocking the
4227    /// client's behavior.
4228    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
4229    where
4230        T: super::stub::ImageFamilyViews + 'static,
4231    {
4232        Self { inner: stub.into() }
4233    }
4234
4235    pub(crate) async fn new(
4236        config: gaxi::options::ClientConfig,
4237    ) -> crate::ClientBuilderResult<Self> {
4238        let inner = Self::build_inner(config).await?;
4239        Ok(Self { inner })
4240    }
4241
4242    async fn build_inner(
4243        conf: gaxi::options::ClientConfig,
4244    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::ImageFamilyViews>>
4245    {
4246        if gaxi::options::tracing_enabled(&conf) {
4247            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
4248        }
4249        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
4250    }
4251
4252    async fn build_transport(
4253        conf: gaxi::options::ClientConfig,
4254    ) -> crate::ClientBuilderResult<impl super::stub::ImageFamilyViews> {
4255        super::transport::ImageFamilyViews::new(conf).await
4256    }
4257
4258    async fn build_with_tracing(
4259        conf: gaxi::options::ClientConfig,
4260    ) -> crate::ClientBuilderResult<impl super::stub::ImageFamilyViews> {
4261        Self::build_transport(conf)
4262            .await
4263            .map(super::tracing::ImageFamilyViews::new)
4264    }
4265
4266    /// Returns the latest image that is part of an image family, is not
4267    /// deprecated and is rolled out in the specified zone.
4268    pub fn get(&self) -> super::builder::image_family_views::Get {
4269        super::builder::image_family_views::Get::new(self.inner.clone())
4270    }
4271}
4272
4273/// Implements a client for the Compute Engine API.
4274///
4275/// # Example
4276/// ```
4277/// # use google_cloud_compute_v1::client::ImageViews;
4278/// async fn sample(
4279/// ) -> anyhow::Result<()> {
4280///     let client = ImageViews::builder().build().await?;
4281///     // use `client` to make requests to the Compute Engine API.
4282///     Ok(())
4283/// }
4284/// ```
4285///
4286/// # Service Description
4287///
4288/// Service for the `imageViews` resource.
4289///
4290/// The client library was generated with API version 2026-09-01.
4291///
4292/// # Configuration
4293///
4294/// To configure `ImageViews` use the `with_*` methods in the type returned
4295/// by [builder()][ImageViews::builder]. The default configuration should
4296/// work for most applications. Common configuration changes include
4297///
4298/// * [with_endpoint()]: by default this client uses the global default endpoint
4299///   (`https://compute.googleapis.com`). Applications using regional
4300///   endpoints or running in restricted networks (e.g. a network configured
4301///   with [Private Google Access with VPC Service Controls]) may want to
4302///   override this default.
4303/// * [with_credentials()]: by default this client uses
4304///   [Application Default Credentials]. Applications using custom
4305///   authentication may need to override this default.
4306///
4307/// [with_endpoint()]: super::builder::image_views::ClientBuilder::with_endpoint
4308/// [with_credentials()]: super::builder::image_views::ClientBuilder::with_credentials
4309/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
4310/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
4311///
4312/// # Pooling and Cloning
4313///
4314/// `ImageViews` holds a connection pool internally, it is advised to
4315/// create one and reuse it. You do not need to wrap `ImageViews` in
4316/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
4317/// already uses an `Arc` internally.
4318#[cfg(feature = "image-views")]
4319#[cfg_attr(docsrs, doc(cfg(feature = "image-views")))]
4320#[derive(Clone, Debug)]
4321pub struct ImageViews {
4322    inner: std::sync::Arc<dyn super::stub::dynamic::ImageViews>,
4323}
4324
4325#[cfg(feature = "image-views")]
4326impl ImageViews {
4327    /// Returns a builder for [ImageViews].
4328    ///
4329    /// ```
4330    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
4331    /// # use google_cloud_compute_v1::client::ImageViews;
4332    /// let client = ImageViews::builder().build().await?;
4333    /// # Ok(()) }
4334    /// ```
4335    pub fn builder() -> super::builder::image_views::ClientBuilder {
4336        crate::new_client_builder(super::builder::image_views::client::Factory)
4337    }
4338
4339    /// Creates a new client from the provided stub.
4340    ///
4341    /// The most common case for calling this function is in tests mocking the
4342    /// client's behavior.
4343    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
4344    where
4345        T: super::stub::ImageViews + 'static,
4346    {
4347        Self { inner: stub.into() }
4348    }
4349
4350    pub(crate) async fn new(
4351        config: gaxi::options::ClientConfig,
4352    ) -> crate::ClientBuilderResult<Self> {
4353        let inner = Self::build_inner(config).await?;
4354        Ok(Self { inner })
4355    }
4356
4357    async fn build_inner(
4358        conf: gaxi::options::ClientConfig,
4359    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::ImageViews>> {
4360        if gaxi::options::tracing_enabled(&conf) {
4361            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
4362        }
4363        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
4364    }
4365
4366    async fn build_transport(
4367        conf: gaxi::options::ClientConfig,
4368    ) -> crate::ClientBuilderResult<impl super::stub::ImageViews> {
4369        super::transport::ImageViews::new(conf).await
4370    }
4371
4372    async fn build_with_tracing(
4373        conf: gaxi::options::ClientConfig,
4374    ) -> crate::ClientBuilderResult<impl super::stub::ImageViews> {
4375        Self::build_transport(conf)
4376            .await
4377            .map(super::tracing::ImageViews::new)
4378    }
4379
4380    /// Returns the specified global ImageView resource, with a regional
4381    /// context.
4382    pub fn get(&self) -> super::builder::image_views::Get {
4383        super::builder::image_views::Get::new(self.inner.clone())
4384    }
4385
4386    /// Returns a list of global ImageView resources, with a regional
4387    /// context.
4388    pub fn list(&self) -> super::builder::image_views::List {
4389        super::builder::image_views::List::new(self.inner.clone())
4390    }
4391}
4392
4393/// Implements a client for the Compute Engine API.
4394///
4395/// # Example
4396/// ```
4397/// # use google_cloud_compute_v1::client::Images;
4398/// async fn sample(
4399/// ) -> anyhow::Result<()> {
4400///     let client = Images::builder().build().await?;
4401///     // use `client` to make requests to the Compute Engine API.
4402///     Ok(())
4403/// }
4404/// ```
4405///
4406/// # Service Description
4407///
4408/// Service for the `images` resource.
4409///
4410/// The client library was generated with API version 2026-09-01.
4411///
4412/// # Configuration
4413///
4414/// To configure `Images` use the `with_*` methods in the type returned
4415/// by [builder()][Images::builder]. The default configuration should
4416/// work for most applications. Common configuration changes include
4417///
4418/// * [with_endpoint()]: by default this client uses the global default endpoint
4419///   (`https://compute.googleapis.com`). Applications using regional
4420///   endpoints or running in restricted networks (e.g. a network configured
4421///   with [Private Google Access with VPC Service Controls]) may want to
4422///   override this default.
4423/// * [with_credentials()]: by default this client uses
4424///   [Application Default Credentials]. Applications using custom
4425///   authentication may need to override this default.
4426///
4427/// [with_endpoint()]: super::builder::images::ClientBuilder::with_endpoint
4428/// [with_credentials()]: super::builder::images::ClientBuilder::with_credentials
4429/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
4430/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
4431///
4432/// # Pooling and Cloning
4433///
4434/// `Images` holds a connection pool internally, it is advised to
4435/// create one and reuse it. You do not need to wrap `Images` in
4436/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
4437/// already uses an `Arc` internally.
4438#[cfg(feature = "images")]
4439#[cfg_attr(docsrs, doc(cfg(feature = "images")))]
4440#[derive(Clone, Debug)]
4441pub struct Images {
4442    inner: std::sync::Arc<dyn super::stub::dynamic::Images>,
4443}
4444
4445#[cfg(feature = "images")]
4446impl Images {
4447    /// Returns a builder for [Images].
4448    ///
4449    /// ```
4450    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
4451    /// # use google_cloud_compute_v1::client::Images;
4452    /// let client = Images::builder().build().await?;
4453    /// # Ok(()) }
4454    /// ```
4455    pub fn builder() -> super::builder::images::ClientBuilder {
4456        crate::new_client_builder(super::builder::images::client::Factory)
4457    }
4458
4459    /// Creates a new client from the provided stub.
4460    ///
4461    /// The most common case for calling this function is in tests mocking the
4462    /// client's behavior.
4463    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
4464    where
4465        T: super::stub::Images + 'static,
4466    {
4467        Self { inner: stub.into() }
4468    }
4469
4470    pub(crate) async fn new(
4471        config: gaxi::options::ClientConfig,
4472    ) -> crate::ClientBuilderResult<Self> {
4473        let inner = Self::build_inner(config).await?;
4474        Ok(Self { inner })
4475    }
4476
4477    async fn build_inner(
4478        conf: gaxi::options::ClientConfig,
4479    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::Images>> {
4480        if gaxi::options::tracing_enabled(&conf) {
4481            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
4482        }
4483        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
4484    }
4485
4486    async fn build_transport(
4487        conf: gaxi::options::ClientConfig,
4488    ) -> crate::ClientBuilderResult<impl super::stub::Images> {
4489        super::transport::Images::new(conf).await
4490    }
4491
4492    async fn build_with_tracing(
4493        conf: gaxi::options::ClientConfig,
4494    ) -> crate::ClientBuilderResult<impl super::stub::Images> {
4495        Self::build_transport(conf)
4496            .await
4497            .map(super::tracing::Images::new)
4498    }
4499
4500    /// Deletes the specified image.
4501    pub fn delete(&self) -> super::builder::images::Delete {
4502        super::builder::images::Delete::new(self.inner.clone())
4503    }
4504
4505    /// Sets the deprecation status of an image.
4506    ///
4507    /// If an empty request body is given, clears the deprecation status instead.
4508    pub fn deprecate(&self) -> super::builder::images::Deprecate {
4509        super::builder::images::Deprecate::new(self.inner.clone())
4510    }
4511
4512    /// Returns the specified image.
4513    pub fn get(&self) -> super::builder::images::Get {
4514        super::builder::images::Get::new(self.inner.clone())
4515    }
4516
4517    /// Returns the latest image that is part of an image family and is not
4518    /// deprecated. For more information on image families, seePublic
4519    /// image families documentation.
4520    pub fn get_from_family(&self) -> super::builder::images::GetFromFamily {
4521        super::builder::images::GetFromFamily::new(self.inner.clone())
4522    }
4523
4524    /// Gets the access control policy for a resource. May be empty if no such
4525    /// policy or resource exists.
4526    pub fn get_iam_policy(&self) -> super::builder::images::GetIamPolicy {
4527        super::builder::images::GetIamPolicy::new(self.inner.clone())
4528    }
4529
4530    /// Creates an image in the specified project using the data included
4531    /// in the request.
4532    pub fn insert(&self) -> super::builder::images::Insert {
4533        super::builder::images::Insert::new(self.inner.clone())
4534    }
4535
4536    /// Retrieves the list of custom images
4537    /// available to the specified project. Custom images are images you
4538    /// create that belong to your project. This method does not
4539    /// get any images that belong to other projects, including publicly-available
4540    /// images, like Debian 8. If you want to get a list of publicly-available
4541    /// images, use this method to make a request to the respective image project,
4542    /// such as debian-cloud or windows-cloud.
4543    pub fn list(&self) -> super::builder::images::List {
4544        super::builder::images::List::new(self.inner.clone())
4545    }
4546
4547    /// Patches the specified image with the data included in the request.
4548    /// Only the following fields can be modified: family, description,
4549    /// deprecation status.
4550    pub fn patch(&self) -> super::builder::images::Patch {
4551        super::builder::images::Patch::new(self.inner.clone())
4552    }
4553
4554    /// Sets the access control policy on the specified resource.
4555    /// Replaces any existing policy.
4556    pub fn set_iam_policy(&self) -> super::builder::images::SetIamPolicy {
4557        super::builder::images::SetIamPolicy::new(self.inner.clone())
4558    }
4559
4560    /// Sets the labels on an image. To learn more about labels, read theLabeling
4561    /// Resources documentation.
4562    pub fn set_labels(&self) -> super::builder::images::SetLabels {
4563        super::builder::images::SetLabels::new(self.inner.clone())
4564    }
4565
4566    /// Returns permissions that a caller has on the specified resource.
4567    pub fn test_iam_permissions(&self) -> super::builder::images::TestIamPermissions {
4568        super::builder::images::TestIamPermissions::new(self.inner.clone())
4569    }
4570
4571    /// Retrieves the specified Operations resource.
4572    pub fn get_operation(&self) -> super::builder::images::GetOperation {
4573        super::builder::images::GetOperation::new(self.inner.clone())
4574    }
4575}
4576
4577/// Implements a client for the Compute Engine API.
4578///
4579/// # Example
4580/// ```
4581/// # use google_cloud_compute_v1::client::InstanceGroupManagerResizeRequests;
4582/// async fn sample(
4583/// ) -> anyhow::Result<()> {
4584///     let client = InstanceGroupManagerResizeRequests::builder().build().await?;
4585///     // use `client` to make requests to the Compute Engine API.
4586///     Ok(())
4587/// }
4588/// ```
4589///
4590/// # Service Description
4591///
4592/// Service for the `instanceGroupManagerResizeRequests` resource.
4593///
4594/// The client library was generated with API version 2026-09-01.
4595///
4596/// # Configuration
4597///
4598/// To configure `InstanceGroupManagerResizeRequests` use the `with_*` methods in the type returned
4599/// by [builder()][InstanceGroupManagerResizeRequests::builder]. The default configuration should
4600/// work for most applications. Common configuration changes include
4601///
4602/// * [with_endpoint()]: by default this client uses the global default endpoint
4603///   (`https://compute.googleapis.com`). Applications using regional
4604///   endpoints or running in restricted networks (e.g. a network configured
4605///   with [Private Google Access with VPC Service Controls]) may want to
4606///   override this default.
4607/// * [with_credentials()]: by default this client uses
4608///   [Application Default Credentials]. Applications using custom
4609///   authentication may need to override this default.
4610///
4611/// [with_endpoint()]: super::builder::instance_group_manager_resize_requests::ClientBuilder::with_endpoint
4612/// [with_credentials()]: super::builder::instance_group_manager_resize_requests::ClientBuilder::with_credentials
4613/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
4614/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
4615///
4616/// # Pooling and Cloning
4617///
4618/// `InstanceGroupManagerResizeRequests` holds a connection pool internally, it is advised to
4619/// create one and reuse it. You do not need to wrap `InstanceGroupManagerResizeRequests` in
4620/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
4621/// already uses an `Arc` internally.
4622#[cfg(feature = "instance-group-manager-resize-requests")]
4623#[cfg_attr(docsrs, doc(cfg(feature = "instance-group-manager-resize-requests")))]
4624#[derive(Clone, Debug)]
4625pub struct InstanceGroupManagerResizeRequests {
4626    inner: std::sync::Arc<dyn super::stub::dynamic::InstanceGroupManagerResizeRequests>,
4627}
4628
4629#[cfg(feature = "instance-group-manager-resize-requests")]
4630impl InstanceGroupManagerResizeRequests {
4631    /// Returns a builder for [InstanceGroupManagerResizeRequests].
4632    ///
4633    /// ```
4634    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
4635    /// # use google_cloud_compute_v1::client::InstanceGroupManagerResizeRequests;
4636    /// let client = InstanceGroupManagerResizeRequests::builder().build().await?;
4637    /// # Ok(()) }
4638    /// ```
4639    pub fn builder() -> super::builder::instance_group_manager_resize_requests::ClientBuilder {
4640        crate::new_client_builder(
4641            super::builder::instance_group_manager_resize_requests::client::Factory,
4642        )
4643    }
4644
4645    /// Creates a new client from the provided stub.
4646    ///
4647    /// The most common case for calling this function is in tests mocking the
4648    /// client's behavior.
4649    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
4650    where
4651        T: super::stub::InstanceGroupManagerResizeRequests + 'static,
4652    {
4653        Self { inner: stub.into() }
4654    }
4655
4656    pub(crate) async fn new(
4657        config: gaxi::options::ClientConfig,
4658    ) -> crate::ClientBuilderResult<Self> {
4659        let inner = Self::build_inner(config).await?;
4660        Ok(Self { inner })
4661    }
4662
4663    async fn build_inner(
4664        conf: gaxi::options::ClientConfig,
4665    ) -> crate::ClientBuilderResult<
4666        std::sync::Arc<dyn super::stub::dynamic::InstanceGroupManagerResizeRequests>,
4667    > {
4668        if gaxi::options::tracing_enabled(&conf) {
4669            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
4670        }
4671        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
4672    }
4673
4674    async fn build_transport(
4675        conf: gaxi::options::ClientConfig,
4676    ) -> crate::ClientBuilderResult<impl super::stub::InstanceGroupManagerResizeRequests> {
4677        super::transport::InstanceGroupManagerResizeRequests::new(conf).await
4678    }
4679
4680    async fn build_with_tracing(
4681        conf: gaxi::options::ClientConfig,
4682    ) -> crate::ClientBuilderResult<impl super::stub::InstanceGroupManagerResizeRequests> {
4683        Self::build_transport(conf)
4684            .await
4685            .map(super::tracing::InstanceGroupManagerResizeRequests::new)
4686    }
4687
4688    /// Cancels the specified resize request and removes it from the queue.
4689    /// Cancelled resize request does no longer wait for the resources to be
4690    /// provisioned. Cancel is only possible for requests that are accepted in the
4691    /// queue.
4692    pub fn cancel(&self) -> super::builder::instance_group_manager_resize_requests::Cancel {
4693        super::builder::instance_group_manager_resize_requests::Cancel::new(self.inner.clone())
4694    }
4695
4696    /// Deletes the specified, inactive resize request. Requests that are still
4697    /// active cannot be deleted. Deleting request does not delete instances that
4698    /// were provisioned previously.
4699    pub fn delete(&self) -> super::builder::instance_group_manager_resize_requests::Delete {
4700        super::builder::instance_group_manager_resize_requests::Delete::new(self.inner.clone())
4701    }
4702
4703    /// Returns all of the details about the specified resize request.
4704    pub fn get(&self) -> super::builder::instance_group_manager_resize_requests::Get {
4705        super::builder::instance_group_manager_resize_requests::Get::new(self.inner.clone())
4706    }
4707
4708    /// Creates a new resize request that starts provisioning VMs immediately
4709    /// or queues VM creation.
4710    pub fn insert(&self) -> super::builder::instance_group_manager_resize_requests::Insert {
4711        super::builder::instance_group_manager_resize_requests::Insert::new(self.inner.clone())
4712    }
4713
4714    /// Retrieves a list of resize requests that are contained in the
4715    /// managed instance group.
4716    pub fn list(&self) -> super::builder::instance_group_manager_resize_requests::List {
4717        super::builder::instance_group_manager_resize_requests::List::new(self.inner.clone())
4718    }
4719
4720    /// Retrieves the specified zone-specific Operations resource.
4721    pub fn get_operation(
4722        &self,
4723    ) -> super::builder::instance_group_manager_resize_requests::GetOperation {
4724        super::builder::instance_group_manager_resize_requests::GetOperation::new(
4725            self.inner.clone(),
4726        )
4727    }
4728}
4729
4730/// Implements a client for the Compute Engine API.
4731///
4732/// # Example
4733/// ```
4734/// # use google_cloud_compute_v1::client::InstanceGroupManagers;
4735/// async fn sample(
4736/// ) -> anyhow::Result<()> {
4737///     let client = InstanceGroupManagers::builder().build().await?;
4738///     // use `client` to make requests to the Compute Engine API.
4739///     Ok(())
4740/// }
4741/// ```
4742///
4743/// # Service Description
4744///
4745/// Service for the `instanceGroupManagers` resource.
4746///
4747/// The client library was generated with API version 2026-09-01.
4748///
4749/// # Configuration
4750///
4751/// To configure `InstanceGroupManagers` use the `with_*` methods in the type returned
4752/// by [builder()][InstanceGroupManagers::builder]. The default configuration should
4753/// work for most applications. Common configuration changes include
4754///
4755/// * [with_endpoint()]: by default this client uses the global default endpoint
4756///   (`https://compute.googleapis.com`). Applications using regional
4757///   endpoints or running in restricted networks (e.g. a network configured
4758///   with [Private Google Access with VPC Service Controls]) may want to
4759///   override this default.
4760/// * [with_credentials()]: by default this client uses
4761///   [Application Default Credentials]. Applications using custom
4762///   authentication may need to override this default.
4763///
4764/// [with_endpoint()]: super::builder::instance_group_managers::ClientBuilder::with_endpoint
4765/// [with_credentials()]: super::builder::instance_group_managers::ClientBuilder::with_credentials
4766/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
4767/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
4768///
4769/// # Pooling and Cloning
4770///
4771/// `InstanceGroupManagers` holds a connection pool internally, it is advised to
4772/// create one and reuse it. You do not need to wrap `InstanceGroupManagers` in
4773/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
4774/// already uses an `Arc` internally.
4775#[cfg(feature = "instance-group-managers")]
4776#[cfg_attr(docsrs, doc(cfg(feature = "instance-group-managers")))]
4777#[derive(Clone, Debug)]
4778pub struct InstanceGroupManagers {
4779    inner: std::sync::Arc<dyn super::stub::dynamic::InstanceGroupManagers>,
4780}
4781
4782#[cfg(feature = "instance-group-managers")]
4783impl InstanceGroupManagers {
4784    /// Returns a builder for [InstanceGroupManagers].
4785    ///
4786    /// ```
4787    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
4788    /// # use google_cloud_compute_v1::client::InstanceGroupManagers;
4789    /// let client = InstanceGroupManagers::builder().build().await?;
4790    /// # Ok(()) }
4791    /// ```
4792    pub fn builder() -> super::builder::instance_group_managers::ClientBuilder {
4793        crate::new_client_builder(super::builder::instance_group_managers::client::Factory)
4794    }
4795
4796    /// Creates a new client from the provided stub.
4797    ///
4798    /// The most common case for calling this function is in tests mocking the
4799    /// client's behavior.
4800    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
4801    where
4802        T: super::stub::InstanceGroupManagers + 'static,
4803    {
4804        Self { inner: stub.into() }
4805    }
4806
4807    pub(crate) async fn new(
4808        config: gaxi::options::ClientConfig,
4809    ) -> crate::ClientBuilderResult<Self> {
4810        let inner = Self::build_inner(config).await?;
4811        Ok(Self { inner })
4812    }
4813
4814    async fn build_inner(
4815        conf: gaxi::options::ClientConfig,
4816    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::InstanceGroupManagers>>
4817    {
4818        if gaxi::options::tracing_enabled(&conf) {
4819            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
4820        }
4821        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
4822    }
4823
4824    async fn build_transport(
4825        conf: gaxi::options::ClientConfig,
4826    ) -> crate::ClientBuilderResult<impl super::stub::InstanceGroupManagers> {
4827        super::transport::InstanceGroupManagers::new(conf).await
4828    }
4829
4830    async fn build_with_tracing(
4831        conf: gaxi::options::ClientConfig,
4832    ) -> crate::ClientBuilderResult<impl super::stub::InstanceGroupManagers> {
4833        Self::build_transport(conf)
4834            .await
4835            .map(super::tracing::InstanceGroupManagers::new)
4836    }
4837
4838    /// Flags the specified instances to be removed from the
4839    /// managed instance group. Abandoning an instance does not delete the
4840    /// instance, but it does remove the instance from any target pools that are
4841    /// applied by the managed instance group. This method reduces thetargetSize of the managed instance group by the
4842    /// number of instances that you abandon. This operation is marked asDONE when the action is scheduled even if the instances have
4843    /// not yet been removed from the group. You must separately verify the
4844    /// status of the abandoning action with thelistmanagedinstances
4845    /// method.
4846    ///
4847    /// If the group is part of a backend
4848    /// service that has enabled
4849    /// connection draining, it can take up to 60 seconds after the connection
4850    /// draining duration has elapsed before the VM instance is removed or deleted.
4851    ///
4852    /// You can specify a maximum of 1000 instances with this method per request.
4853    pub fn abandon_instances(&self) -> super::builder::instance_group_managers::AbandonInstances {
4854        super::builder::instance_group_managers::AbandonInstances::new(self.inner.clone())
4855    }
4856
4857    /// Retrieves the list of managed instance groups and groups them by zone.
4858    ///
4859    /// To prevent failure, Google recommends that you set the
4860    /// `returnPartialSuccess` parameter to `true`.
4861    pub fn aggregated_list(&self) -> super::builder::instance_group_managers::AggregatedList {
4862        super::builder::instance_group_managers::AggregatedList::new(self.inner.clone())
4863    }
4864
4865    /// Applies changes to selected instances on the managed instance group.
4866    /// This method can be used to apply new overrides and/or new versions.
4867    pub fn apply_updates_to_instances(
4868        &self,
4869    ) -> super::builder::instance_group_managers::ApplyUpdatesToInstances {
4870        super::builder::instance_group_managers::ApplyUpdatesToInstances::new(self.inner.clone())
4871    }
4872
4873    /// Creates instances with per-instance configurations in this managed instance
4874    /// group. Instances are created using the current instance template. Thecreate instances operation is marked DONE if thecreateInstances request is successful. The underlying actions
4875    /// take additional time. You must separately verify the status of thecreating or actions with the listmanagedinstances
4876    /// method.
4877    pub fn create_instances(&self) -> super::builder::instance_group_managers::CreateInstances {
4878        super::builder::instance_group_managers::CreateInstances::new(self.inner.clone())
4879    }
4880
4881    /// Deletes the specified managed instance group and all of the instances
4882    /// in that group. Note that the instance group must not belong to a
4883    /// backend service. Read
4884    /// Deleting an instance group for more information.
4885    pub fn delete(&self) -> super::builder::instance_group_managers::Delete {
4886        super::builder::instance_group_managers::Delete::new(self.inner.clone())
4887    }
4888
4889    /// Flags the specified instances in the managed instance group for immediate
4890    /// deletion. The instances are also removed from any target
4891    /// pools of which they were a member. This method reduces thetargetSize of the managed instance group by the number of
4892    /// instances that you delete. This operation is marked as DONE
4893    /// when the action is scheduled even if the instances are still being deleted.
4894    /// You must separately verify the status of the deleting action
4895    /// with thelistmanagedinstances
4896    /// method.
4897    ///
4898    /// If the group is part of a backend
4899    /// service that has enabled
4900    /// connection draining, it can take up to 60 seconds after the connection
4901    /// draining duration has elapsed before the VM instance is removed or deleted.
4902    ///
4903    /// You can specify a maximum of 1000 instances with this method per request.
4904    pub fn delete_instances(&self) -> super::builder::instance_group_managers::DeleteInstances {
4905        super::builder::instance_group_managers::DeleteInstances::new(self.inner.clone())
4906    }
4907
4908    /// Deletes selected per-instance configurations for the managed instance
4909    /// group.
4910    pub fn delete_per_instance_configs(
4911        &self,
4912    ) -> super::builder::instance_group_managers::DeletePerInstanceConfigs {
4913        super::builder::instance_group_managers::DeletePerInstanceConfigs::new(self.inner.clone())
4914    }
4915
4916    /// Returns all of the details about the specified managed instance group.
4917    pub fn get(&self) -> super::builder::instance_group_managers::Get {
4918        super::builder::instance_group_managers::Get::new(self.inner.clone())
4919    }
4920
4921    /// Creates a managed instance group using the information that you specify
4922    /// in the request. After the group is created, instances in the group are
4923    /// created using the specified instance template.
4924    /// This operation is marked as DONE when the group is created
4925    /// even if the instances in the group have not yet been created. You
4926    /// must separately verify the status of the individual instances with thelistmanagedinstances
4927    /// method.
4928    ///
4929    /// A managed instance group can have up to 1000 VM instances per group. Please
4930    /// contact Cloud Support if you need an increase in
4931    /// this limit.
4932    pub fn insert(&self) -> super::builder::instance_group_managers::Insert {
4933        super::builder::instance_group_managers::Insert::new(self.inner.clone())
4934    }
4935
4936    /// Retrieves a list of managed instance groups that are contained within the
4937    /// specified project and zone.
4938    pub fn list(&self) -> super::builder::instance_group_managers::List {
4939        super::builder::instance_group_managers::List::new(self.inner.clone())
4940    }
4941
4942    /// Lists all errors thrown by actions on instances for a given managed
4943    /// instance group. The filter and orderBy query
4944    /// parameters are not supported.
4945    pub fn list_errors(&self) -> super::builder::instance_group_managers::ListErrors {
4946        super::builder::instance_group_managers::ListErrors::new(self.inner.clone())
4947    }
4948
4949    /// Lists all of the instances in the managed instance group. Each instance
4950    /// in the list has a currentAction, which indicates the action
4951    /// that the managed instance group is performing on the instance. For example,
4952    /// if the group is still creating an instance, the currentAction
4953    /// is CREATING. If a previous action failed, the
4954    /// list displays the errors for that failed action. The orderBy
4955    /// query parameter is not supported. The `pageToken` query parameter is
4956    /// supported only if the group's `listManagedInstancesResults` field is set
4957    /// to `PAGINATED`.
4958    pub fn list_managed_instances(
4959        &self,
4960    ) -> super::builder::instance_group_managers::ListManagedInstances {
4961        super::builder::instance_group_managers::ListManagedInstances::new(self.inner.clone())
4962    }
4963
4964    /// Lists all of the per-instance configurations defined for the managed
4965    /// instance group. The orderBy query parameter is not supported.
4966    pub fn list_per_instance_configs(
4967        &self,
4968    ) -> super::builder::instance_group_managers::ListPerInstanceConfigs {
4969        super::builder::instance_group_managers::ListPerInstanceConfigs::new(self.inner.clone())
4970    }
4971
4972    /// Updates a managed instance group using the information that you specify
4973    /// in the request.
4974    /// This operation is marked as DONE when the group is patched
4975    /// even if the instances in the group are still in the process of being
4976    /// patched. You must separately verify the status of the individual instances
4977    /// with thelistManagedInstances
4978    /// method. This method supportsPATCH
4979    /// semantics and uses theJSON merge
4980    /// patch format and processing rules.
4981    ///
4982    /// If you update your group to specify a new template or instance
4983    /// configuration, it's possible that your intended specification for each VM
4984    /// in the group is different from the current state of that VM. To learn how
4985    /// to apply an updated configuration to the VMs in a MIG, seeUpdating instances in
4986    /// a MIG.
4987    pub fn patch(&self) -> super::builder::instance_group_managers::Patch {
4988        super::builder::instance_group_managers::Patch::new(self.inner.clone())
4989    }
4990
4991    /// Inserts or patches per-instance configurations for the managed instance
4992    /// group. perInstanceConfig.name serves as a key used to
4993    /// distinguish whether to perform insert or patch.
4994    pub fn patch_per_instance_configs(
4995        &self,
4996    ) -> super::builder::instance_group_managers::PatchPerInstanceConfigs {
4997        super::builder::instance_group_managers::PatchPerInstanceConfigs::new(self.inner.clone())
4998    }
4999
5000    /// Flags the specified VM instances in the managed instance group to be
5001    /// immediately recreated. Each instance is recreated using the group's current
5002    /// configuration. This operation is marked as DONE when the flag
5003    /// is set even if the instances have not yet been recreated. You must
5004    /// separately verify the status of each instance by checking itscurrentAction field; for more information, see Checking
5005    /// the status of managed instances.
5006    ///
5007    /// If the group is part of a backend
5008    /// service that has enabled
5009    /// connection draining, it can take up to 60 seconds after the connection
5010    /// draining duration has elapsed before the VM instance is removed or deleted.
5011    ///
5012    /// You can specify a maximum of 1000 instances with this method per request.
5013    pub fn recreate_instances(&self) -> super::builder::instance_group_managers::RecreateInstances {
5014        super::builder::instance_group_managers::RecreateInstances::new(self.inner.clone())
5015    }
5016
5017    /// Resizes the managed instance group. If you increase the size, the group
5018    /// creates new instances using the current instance template. If you decrease
5019    /// the size, the group deletes instances. The resize operation is markedDONE when the resize actions are scheduled even if the group
5020    /// has not yet added or deleted any instances. You must separately
5021    /// verify the status of the creating or deleting
5022    /// actions with thelistmanagedinstances
5023    /// method.
5024    ///
5025    /// When resizing down, the instance group arbitrarily chooses the order in
5026    /// which VMs are deleted. The group takes into account some VM attributes when
5027    /// making the selection including:
5028    ///
5029    /// + The status of the VM instance.
5030    /// + The health of the VM instance.
5031    /// + The instance template version the VM is based on.
5032    /// + For regional managed instance groups, the location of the VM instance.
5033    ///
5034    /// This list is subject to change.
5035    ///
5036    /// If the group is part of a backend
5037    /// service that has enabled
5038    /// connection draining, it can take up to 60 seconds after the connection
5039    /// draining duration has elapsed before the VM instance is removed or deleted.
5040    pub fn resize(&self) -> super::builder::instance_group_managers::Resize {
5041        super::builder::instance_group_managers::Resize::new(self.inner.clone())
5042    }
5043
5044    /// Flags the specified instances in the managed instance group to be
5045    /// resumed. This method increases thetargetSize and decreases the targetSuspendedSize
5046    /// of the managed instance group by the number of instances that you resume.
5047    /// The resumeInstances operation is marked DONE if
5048    /// the resumeInstances request is successful. The underlying
5049    /// actions take additional time. You must separately verify the status of theRESUMING action with thelistmanagedinstances
5050    /// method.
5051    ///
5052    /// In this request, you can only specify instances that are suspended. For
5053    /// example, if an instance was previously suspended using the suspendInstances
5054    /// method, it can be resumed using the resumeInstances method.
5055    ///
5056    /// If a health check is attached to the managed instance group, the specified
5057    /// instances will be verified as healthy after they are resumed.
5058    ///
5059    /// You can specify a maximum of 1000 instances with this method per request.
5060    pub fn resume_instances(&self) -> super::builder::instance_group_managers::ResumeInstances {
5061        super::builder::instance_group_managers::ResumeInstances::new(self.inner.clone())
5062    }
5063
5064    /// Specifies the instance template to use when creating new instances in this
5065    /// group. The templates for existing instances in the group do not change
5066    /// unless you run recreateInstances, runapplyUpdatesToInstances, or set the group'supdatePolicy.type to PROACTIVE.
5067    pub fn set_instance_template(
5068        &self,
5069    ) -> super::builder::instance_group_managers::SetInstanceTemplate {
5070        super::builder::instance_group_managers::SetInstanceTemplate::new(self.inner.clone())
5071    }
5072
5073    /// Modifies the target pools to which all instances in this managed instance
5074    /// group are assigned. The target pools automatically apply to all of the
5075    /// instances in the managed instance group. This operation is markedDONE when you make the request even if the instances have not
5076    /// yet been added to their target pools. The change might take some time to
5077    /// apply to all of the instances in the group depending on the size of the
5078    /// group.
5079    pub fn set_target_pools(&self) -> super::builder::instance_group_managers::SetTargetPools {
5080        super::builder::instance_group_managers::SetTargetPools::new(self.inner.clone())
5081    }
5082
5083    /// Flags the specified instances in the managed instance group to be
5084    /// started. This method increases thetargetSize and decreases the targetStoppedSize
5085    /// of the managed instance group by the number of instances that you start.
5086    /// The startInstances operation is marked DONE if
5087    /// the startInstances request is successful. The underlying
5088    /// actions take additional time. You must separately verify the status of theSTARTING action with thelistmanagedinstances
5089    /// method.
5090    ///
5091    /// In this request, you can only specify instances that are stopped. For
5092    /// example, if an instance was previously stopped using the stopInstances
5093    /// method, it can be started using the startInstances method.
5094    ///
5095    /// If a health check is attached to the managed instance group, the specified
5096    /// instances will be verified as healthy after they are started.
5097    ///
5098    /// You can specify a maximum of 1000 instances with this method per request.
5099    pub fn start_instances(&self) -> super::builder::instance_group_managers::StartInstances {
5100        super::builder::instance_group_managers::StartInstances::new(self.inner.clone())
5101    }
5102
5103    /// Flags the specified instances in the managed instance group to be
5104    /// immediately stopped. You can only specify instances that are running in
5105    /// this request. This method reduces thetargetSize and increases the targetStoppedSize
5106    /// of the managed instance group by the number of instances that you stop.
5107    /// The stopInstances operation is marked DONE if
5108    /// the stopInstances request is successful. The underlying
5109    /// actions take additional time. You must separately verify the status of theSTOPPING action with thelistmanagedinstances
5110    /// method.
5111    ///
5112    /// If the standbyPolicy.initialDelaySec field is set, the group
5113    /// delays stopping the instances until initialDelaySec have
5114    /// passed from instance.creationTimestamp (that is, when the
5115    /// instance was created). This delay gives your application time to
5116    /// set itself up and initialize on the instance. If more thaninitialDelaySec seconds have passed sinceinstance.creationTimestamp when this method is called, there
5117    /// will be zero delay.
5118    ///
5119    /// If the group is part of a backend
5120    /// service that has enabled
5121    /// connection draining, it can take up to 60 seconds after the connection
5122    /// draining duration has elapsed before the VM instance is stopped.
5123    ///
5124    /// Stopped instances can be started using the startInstances
5125    /// method.
5126    ///
5127    /// You can specify a maximum of 1000 instances with this method per request.
5128    pub fn stop_instances(&self) -> super::builder::instance_group_managers::StopInstances {
5129        super::builder::instance_group_managers::StopInstances::new(self.inner.clone())
5130    }
5131
5132    /// Flags the specified instances in the managed instance group to be
5133    /// immediately suspended. You can only specify instances that are running in
5134    /// this request. This method reduces thetargetSize and increases the targetSuspendedSize
5135    /// of the managed instance group by the number of instances that you suspend.
5136    /// The suspendInstances operation is marked DONE if
5137    /// the suspendInstances request is successful. The underlying
5138    /// actions take additional time. You must separately verify the status of theSUSPENDING action with thelistmanagedinstances
5139    /// method.
5140    ///
5141    /// If the standbyPolicy.initialDelaySec field is set, the group
5142    /// delays suspension of the instances until initialDelaySec have
5143    /// passed from instance.creationTimestamp (that is, when the
5144    /// instance was created). This delay gives your application time to
5145    /// set itself up and initialize on the instance. If more thaninitialDelaySec seconds have passed sinceinstance.creationTimestamp when this method is called, there
5146    /// will be zero delay.
5147    ///
5148    /// If the group is part of a backend
5149    /// service that has enabled
5150    /// connection draining, it can take up to 60 seconds after the connection
5151    /// draining duration has elapsed before the VM instance is suspended.
5152    ///
5153    /// Suspended instances can be resumed using the resumeInstances
5154    /// method.
5155    ///
5156    /// You can specify a maximum of 1000 instances with this method per request.
5157    pub fn suspend_instances(&self) -> super::builder::instance_group_managers::SuspendInstances {
5158        super::builder::instance_group_managers::SuspendInstances::new(self.inner.clone())
5159    }
5160
5161    /// Inserts or updates per-instance configurations for the managed instance
5162    /// group. perInstanceConfig.name serves as a key used to
5163    /// distinguish whether to perform insert or patch.
5164    pub fn update_per_instance_configs(
5165        &self,
5166    ) -> super::builder::instance_group_managers::UpdatePerInstanceConfigs {
5167        super::builder::instance_group_managers::UpdatePerInstanceConfigs::new(self.inner.clone())
5168    }
5169
5170    /// Retrieves the specified zone-specific Operations resource.
5171    pub fn get_operation(&self) -> super::builder::instance_group_managers::GetOperation {
5172        super::builder::instance_group_managers::GetOperation::new(self.inner.clone())
5173    }
5174}
5175
5176/// Implements a client for the Compute Engine API.
5177///
5178/// # Example
5179/// ```
5180/// # use google_cloud_compute_v1::client::InstanceGroups;
5181/// async fn sample(
5182/// ) -> anyhow::Result<()> {
5183///     let client = InstanceGroups::builder().build().await?;
5184///     // use `client` to make requests to the Compute Engine API.
5185///     Ok(())
5186/// }
5187/// ```
5188///
5189/// # Service Description
5190///
5191/// Service for the `instanceGroups` resource.
5192///
5193/// The client library was generated with API version 2026-09-01.
5194///
5195/// # Configuration
5196///
5197/// To configure `InstanceGroups` use the `with_*` methods in the type returned
5198/// by [builder()][InstanceGroups::builder]. The default configuration should
5199/// work for most applications. Common configuration changes include
5200///
5201/// * [with_endpoint()]: by default this client uses the global default endpoint
5202///   (`https://compute.googleapis.com`). Applications using regional
5203///   endpoints or running in restricted networks (e.g. a network configured
5204///   with [Private Google Access with VPC Service Controls]) may want to
5205///   override this default.
5206/// * [with_credentials()]: by default this client uses
5207///   [Application Default Credentials]. Applications using custom
5208///   authentication may need to override this default.
5209///
5210/// [with_endpoint()]: super::builder::instance_groups::ClientBuilder::with_endpoint
5211/// [with_credentials()]: super::builder::instance_groups::ClientBuilder::with_credentials
5212/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
5213/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
5214///
5215/// # Pooling and Cloning
5216///
5217/// `InstanceGroups` holds a connection pool internally, it is advised to
5218/// create one and reuse it. You do not need to wrap `InstanceGroups` in
5219/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
5220/// already uses an `Arc` internally.
5221#[cfg(feature = "instance-groups")]
5222#[cfg_attr(docsrs, doc(cfg(feature = "instance-groups")))]
5223#[derive(Clone, Debug)]
5224pub struct InstanceGroups {
5225    inner: std::sync::Arc<dyn super::stub::dynamic::InstanceGroups>,
5226}
5227
5228#[cfg(feature = "instance-groups")]
5229impl InstanceGroups {
5230    /// Returns a builder for [InstanceGroups].
5231    ///
5232    /// ```
5233    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
5234    /// # use google_cloud_compute_v1::client::InstanceGroups;
5235    /// let client = InstanceGroups::builder().build().await?;
5236    /// # Ok(()) }
5237    /// ```
5238    pub fn builder() -> super::builder::instance_groups::ClientBuilder {
5239        crate::new_client_builder(super::builder::instance_groups::client::Factory)
5240    }
5241
5242    /// Creates a new client from the provided stub.
5243    ///
5244    /// The most common case for calling this function is in tests mocking the
5245    /// client's behavior.
5246    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
5247    where
5248        T: super::stub::InstanceGroups + 'static,
5249    {
5250        Self { inner: stub.into() }
5251    }
5252
5253    pub(crate) async fn new(
5254        config: gaxi::options::ClientConfig,
5255    ) -> crate::ClientBuilderResult<Self> {
5256        let inner = Self::build_inner(config).await?;
5257        Ok(Self { inner })
5258    }
5259
5260    async fn build_inner(
5261        conf: gaxi::options::ClientConfig,
5262    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::InstanceGroups>> {
5263        if gaxi::options::tracing_enabled(&conf) {
5264            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
5265        }
5266        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
5267    }
5268
5269    async fn build_transport(
5270        conf: gaxi::options::ClientConfig,
5271    ) -> crate::ClientBuilderResult<impl super::stub::InstanceGroups> {
5272        super::transport::InstanceGroups::new(conf).await
5273    }
5274
5275    async fn build_with_tracing(
5276        conf: gaxi::options::ClientConfig,
5277    ) -> crate::ClientBuilderResult<impl super::stub::InstanceGroups> {
5278        Self::build_transport(conf)
5279            .await
5280            .map(super::tracing::InstanceGroups::new)
5281    }
5282
5283    /// Adds a list of instances to the specified instance group.  All of the
5284    /// instances in the instance group must be in the same network/subnetwork.
5285    /// Read
5286    /// Adding instances for more information.
5287    pub fn add_instances(&self) -> super::builder::instance_groups::AddInstances {
5288        super::builder::instance_groups::AddInstances::new(self.inner.clone())
5289    }
5290
5291    /// Retrieves the list of instance groups and sorts them by zone.
5292    ///
5293    /// To prevent failure, Google recommends that you set the
5294    /// `returnPartialSuccess` parameter to `true`.
5295    pub fn aggregated_list(&self) -> super::builder::instance_groups::AggregatedList {
5296        super::builder::instance_groups::AggregatedList::new(self.inner.clone())
5297    }
5298
5299    /// Deletes the specified instance group. The instances in the group are not
5300    /// deleted. Note that instance group must not belong to a backend service.
5301    /// Read
5302    /// Deleting an instance group for more information.
5303    pub fn delete(&self) -> super::builder::instance_groups::Delete {
5304        super::builder::instance_groups::Delete::new(self.inner.clone())
5305    }
5306
5307    /// Returns the specified zonal instance group. Get a list of available zonal
5308    /// instance groups by making a list() request.
5309    ///
5310    /// For managed instance groups, use theinstanceGroupManagers
5311    /// or regionInstanceGroupManagers
5312    /// methods instead.
5313    pub fn get(&self) -> super::builder::instance_groups::Get {
5314        super::builder::instance_groups::Get::new(self.inner.clone())
5315    }
5316
5317    /// Creates an instance group in the specified project using the
5318    /// parameters that are included in the request.
5319    pub fn insert(&self) -> super::builder::instance_groups::Insert {
5320        super::builder::instance_groups::Insert::new(self.inner.clone())
5321    }
5322
5323    /// Retrieves the list of zonal instance group resources contained within the
5324    /// specified zone.
5325    ///
5326    /// For managed instance groups, use theinstanceGroupManagers
5327    /// or regionInstanceGroupManagers
5328    /// methods instead.
5329    pub fn list(&self) -> super::builder::instance_groups::List {
5330        super::builder::instance_groups::List::new(self.inner.clone())
5331    }
5332
5333    /// Lists the instances in the specified instance group.
5334    /// The orderBy query parameter is not supported.
5335    /// The filter query parameter is supported, but only for
5336    /// expressions that use `eq` (equal) or `ne` (not equal) operators.
5337    pub fn list_instances(&self) -> super::builder::instance_groups::ListInstances {
5338        super::builder::instance_groups::ListInstances::new(self.inner.clone())
5339    }
5340
5341    /// Removes one or more instances from the specified instance group, but does
5342    /// not delete those instances.
5343    ///
5344    /// If the group is part of a backend
5345    /// service that has enabled
5346    /// connection draining, it can take up to 60 seconds after the connection
5347    /// draining duration before the VM instance is removed or deleted.
5348    pub fn remove_instances(&self) -> super::builder::instance_groups::RemoveInstances {
5349        super::builder::instance_groups::RemoveInstances::new(self.inner.clone())
5350    }
5351
5352    /// Sets the named ports for the specified instance group.
5353    pub fn set_named_ports(&self) -> super::builder::instance_groups::SetNamedPorts {
5354        super::builder::instance_groups::SetNamedPorts::new(self.inner.clone())
5355    }
5356
5357    /// Returns permissions that a caller has on the specified resource.
5358    pub fn test_iam_permissions(&self) -> super::builder::instance_groups::TestIamPermissions {
5359        super::builder::instance_groups::TestIamPermissions::new(self.inner.clone())
5360    }
5361
5362    /// Retrieves the specified zone-specific Operations resource.
5363    pub fn get_operation(&self) -> super::builder::instance_groups::GetOperation {
5364        super::builder::instance_groups::GetOperation::new(self.inner.clone())
5365    }
5366}
5367
5368/// Implements a client for the Compute Engine API.
5369///
5370/// # Example
5371/// ```
5372/// # use google_cloud_compute_v1::client::InstanceSettings;
5373/// async fn sample(
5374/// ) -> anyhow::Result<()> {
5375///     let client = InstanceSettings::builder().build().await?;
5376///     // use `client` to make requests to the Compute Engine API.
5377///     Ok(())
5378/// }
5379/// ```
5380///
5381/// # Service Description
5382///
5383/// Service for the `instanceSettings` resource.
5384///
5385/// The client library was generated with API version 2026-09-01.
5386///
5387/// # Configuration
5388///
5389/// To configure `InstanceSettings` use the `with_*` methods in the type returned
5390/// by [builder()][InstanceSettings::builder]. The default configuration should
5391/// work for most applications. Common configuration changes include
5392///
5393/// * [with_endpoint()]: by default this client uses the global default endpoint
5394///   (`https://compute.googleapis.com`). Applications using regional
5395///   endpoints or running in restricted networks (e.g. a network configured
5396///   with [Private Google Access with VPC Service Controls]) may want to
5397///   override this default.
5398/// * [with_credentials()]: by default this client uses
5399///   [Application Default Credentials]. Applications using custom
5400///   authentication may need to override this default.
5401///
5402/// [with_endpoint()]: super::builder::instance_settings::ClientBuilder::with_endpoint
5403/// [with_credentials()]: super::builder::instance_settings::ClientBuilder::with_credentials
5404/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
5405/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
5406///
5407/// # Pooling and Cloning
5408///
5409/// `InstanceSettings` holds a connection pool internally, it is advised to
5410/// create one and reuse it. You do not need to wrap `InstanceSettings` in
5411/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
5412/// already uses an `Arc` internally.
5413#[cfg(feature = "instance-settings")]
5414#[cfg_attr(docsrs, doc(cfg(feature = "instance-settings")))]
5415#[derive(Clone, Debug)]
5416pub struct InstanceSettings {
5417    inner: std::sync::Arc<dyn super::stub::dynamic::InstanceSettings>,
5418}
5419
5420#[cfg(feature = "instance-settings")]
5421impl InstanceSettings {
5422    /// Returns a builder for [InstanceSettings].
5423    ///
5424    /// ```
5425    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
5426    /// # use google_cloud_compute_v1::client::InstanceSettings;
5427    /// let client = InstanceSettings::builder().build().await?;
5428    /// # Ok(()) }
5429    /// ```
5430    pub fn builder() -> super::builder::instance_settings::ClientBuilder {
5431        crate::new_client_builder(super::builder::instance_settings::client::Factory)
5432    }
5433
5434    /// Creates a new client from the provided stub.
5435    ///
5436    /// The most common case for calling this function is in tests mocking the
5437    /// client's behavior.
5438    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
5439    where
5440        T: super::stub::InstanceSettings + 'static,
5441    {
5442        Self { inner: stub.into() }
5443    }
5444
5445    pub(crate) async fn new(
5446        config: gaxi::options::ClientConfig,
5447    ) -> crate::ClientBuilderResult<Self> {
5448        let inner = Self::build_inner(config).await?;
5449        Ok(Self { inner })
5450    }
5451
5452    async fn build_inner(
5453        conf: gaxi::options::ClientConfig,
5454    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::InstanceSettings>>
5455    {
5456        if gaxi::options::tracing_enabled(&conf) {
5457            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
5458        }
5459        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
5460    }
5461
5462    async fn build_transport(
5463        conf: gaxi::options::ClientConfig,
5464    ) -> crate::ClientBuilderResult<impl super::stub::InstanceSettings> {
5465        super::transport::InstanceSettings::new(conf).await
5466    }
5467
5468    async fn build_with_tracing(
5469        conf: gaxi::options::ClientConfig,
5470    ) -> crate::ClientBuilderResult<impl super::stub::InstanceSettings> {
5471        Self::build_transport(conf)
5472            .await
5473            .map(super::tracing::InstanceSettings::new)
5474    }
5475
5476    /// Get Instance settings.
5477    pub fn get(&self) -> super::builder::instance_settings::Get {
5478        super::builder::instance_settings::Get::new(self.inner.clone())
5479    }
5480
5481    /// Patch Instance settings
5482    pub fn patch(&self) -> super::builder::instance_settings::Patch {
5483        super::builder::instance_settings::Patch::new(self.inner.clone())
5484    }
5485
5486    /// Retrieves the specified zone-specific Operations resource.
5487    pub fn get_operation(&self) -> super::builder::instance_settings::GetOperation {
5488        super::builder::instance_settings::GetOperation::new(self.inner.clone())
5489    }
5490}
5491
5492/// Implements a client for the Compute Engine API.
5493///
5494/// # Example
5495/// ```
5496/// # use google_cloud_compute_v1::client::InstanceTemplates;
5497/// async fn sample(
5498/// ) -> anyhow::Result<()> {
5499///     let client = InstanceTemplates::builder().build().await?;
5500///     // use `client` to make requests to the Compute Engine API.
5501///     Ok(())
5502/// }
5503/// ```
5504///
5505/// # Service Description
5506///
5507/// Service for the `instanceTemplates` resource.
5508///
5509/// The client library was generated with API version 2026-09-01.
5510///
5511/// # Configuration
5512///
5513/// To configure `InstanceTemplates` use the `with_*` methods in the type returned
5514/// by [builder()][InstanceTemplates::builder]. The default configuration should
5515/// work for most applications. Common configuration changes include
5516///
5517/// * [with_endpoint()]: by default this client uses the global default endpoint
5518///   (`https://compute.googleapis.com`). Applications using regional
5519///   endpoints or running in restricted networks (e.g. a network configured
5520///   with [Private Google Access with VPC Service Controls]) may want to
5521///   override this default.
5522/// * [with_credentials()]: by default this client uses
5523///   [Application Default Credentials]. Applications using custom
5524///   authentication may need to override this default.
5525///
5526/// [with_endpoint()]: super::builder::instance_templates::ClientBuilder::with_endpoint
5527/// [with_credentials()]: super::builder::instance_templates::ClientBuilder::with_credentials
5528/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
5529/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
5530///
5531/// # Pooling and Cloning
5532///
5533/// `InstanceTemplates` holds a connection pool internally, it is advised to
5534/// create one and reuse it. You do not need to wrap `InstanceTemplates` in
5535/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
5536/// already uses an `Arc` internally.
5537#[cfg(feature = "instance-templates")]
5538#[cfg_attr(docsrs, doc(cfg(feature = "instance-templates")))]
5539#[derive(Clone, Debug)]
5540pub struct InstanceTemplates {
5541    inner: std::sync::Arc<dyn super::stub::dynamic::InstanceTemplates>,
5542}
5543
5544#[cfg(feature = "instance-templates")]
5545impl InstanceTemplates {
5546    /// Returns a builder for [InstanceTemplates].
5547    ///
5548    /// ```
5549    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
5550    /// # use google_cloud_compute_v1::client::InstanceTemplates;
5551    /// let client = InstanceTemplates::builder().build().await?;
5552    /// # Ok(()) }
5553    /// ```
5554    pub fn builder() -> super::builder::instance_templates::ClientBuilder {
5555        crate::new_client_builder(super::builder::instance_templates::client::Factory)
5556    }
5557
5558    /// Creates a new client from the provided stub.
5559    ///
5560    /// The most common case for calling this function is in tests mocking the
5561    /// client's behavior.
5562    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
5563    where
5564        T: super::stub::InstanceTemplates + 'static,
5565    {
5566        Self { inner: stub.into() }
5567    }
5568
5569    pub(crate) async fn new(
5570        config: gaxi::options::ClientConfig,
5571    ) -> crate::ClientBuilderResult<Self> {
5572        let inner = Self::build_inner(config).await?;
5573        Ok(Self { inner })
5574    }
5575
5576    async fn build_inner(
5577        conf: gaxi::options::ClientConfig,
5578    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::InstanceTemplates>>
5579    {
5580        if gaxi::options::tracing_enabled(&conf) {
5581            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
5582        }
5583        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
5584    }
5585
5586    async fn build_transport(
5587        conf: gaxi::options::ClientConfig,
5588    ) -> crate::ClientBuilderResult<impl super::stub::InstanceTemplates> {
5589        super::transport::InstanceTemplates::new(conf).await
5590    }
5591
5592    async fn build_with_tracing(
5593        conf: gaxi::options::ClientConfig,
5594    ) -> crate::ClientBuilderResult<impl super::stub::InstanceTemplates> {
5595        Self::build_transport(conf)
5596            .await
5597            .map(super::tracing::InstanceTemplates::new)
5598    }
5599
5600    /// Retrieves the list of all InstanceTemplates resources, regional and global,
5601    /// available to the specified project.
5602    ///
5603    /// To prevent failure, Google recommends that you set the
5604    /// `returnPartialSuccess` parameter to `true`.
5605    pub fn aggregated_list(&self) -> super::builder::instance_templates::AggregatedList {
5606        super::builder::instance_templates::AggregatedList::new(self.inner.clone())
5607    }
5608
5609    /// Deletes the specified instance template. Deleting an instance template is
5610    /// permanent and cannot be undone. It is not possible to delete templates
5611    /// that are already in use by a managed instance group.
5612    pub fn delete(&self) -> super::builder::instance_templates::Delete {
5613        super::builder::instance_templates::Delete::new(self.inner.clone())
5614    }
5615
5616    /// Returns the specified instance template.
5617    pub fn get(&self) -> super::builder::instance_templates::Get {
5618        super::builder::instance_templates::Get::new(self.inner.clone())
5619    }
5620
5621    /// Gets the access control policy for a resource. May be empty if no such
5622    /// policy or resource exists.
5623    pub fn get_iam_policy(&self) -> super::builder::instance_templates::GetIamPolicy {
5624        super::builder::instance_templates::GetIamPolicy::new(self.inner.clone())
5625    }
5626
5627    /// Creates an instance template in the specified project using the
5628    /// data that is included in the request. If you are creating a new template to
5629    /// update an existing instance group, your new instance template must use the
5630    /// same network or, if applicable, the same subnetwork as the original
5631    /// template.
5632    pub fn insert(&self) -> super::builder::instance_templates::Insert {
5633        super::builder::instance_templates::Insert::new(self.inner.clone())
5634    }
5635
5636    /// Retrieves a list of instance templates that are contained within
5637    /// the specified project.
5638    pub fn list(&self) -> super::builder::instance_templates::List {
5639        super::builder::instance_templates::List::new(self.inner.clone())
5640    }
5641
5642    /// Sets the access control policy on the specified resource.
5643    /// Replaces any existing policy.
5644    pub fn set_iam_policy(&self) -> super::builder::instance_templates::SetIamPolicy {
5645        super::builder::instance_templates::SetIamPolicy::new(self.inner.clone())
5646    }
5647
5648    /// Returns permissions that a caller has on the specified resource.
5649    pub fn test_iam_permissions(&self) -> super::builder::instance_templates::TestIamPermissions {
5650        super::builder::instance_templates::TestIamPermissions::new(self.inner.clone())
5651    }
5652
5653    /// Retrieves the specified Operations resource.
5654    pub fn get_operation(&self) -> super::builder::instance_templates::GetOperation {
5655        super::builder::instance_templates::GetOperation::new(self.inner.clone())
5656    }
5657}
5658
5659/// Implements a client for the Compute Engine API.
5660///
5661/// # Example
5662/// ```
5663/// # use google_cloud_compute_v1::client::Instances;
5664/// async fn sample(
5665/// ) -> anyhow::Result<()> {
5666///     let client = Instances::builder().build().await?;
5667///     // use `client` to make requests to the Compute Engine API.
5668///     Ok(())
5669/// }
5670/// ```
5671///
5672/// # Service Description
5673///
5674/// Service for the `instances` resource.
5675///
5676/// The client library was generated with API version 2026-09-01.
5677///
5678/// # Configuration
5679///
5680/// To configure `Instances` use the `with_*` methods in the type returned
5681/// by [builder()][Instances::builder]. The default configuration should
5682/// work for most applications. Common configuration changes include
5683///
5684/// * [with_endpoint()]: by default this client uses the global default endpoint
5685///   (`https://compute.googleapis.com`). Applications using regional
5686///   endpoints or running in restricted networks (e.g. a network configured
5687///   with [Private Google Access with VPC Service Controls]) may want to
5688///   override this default.
5689/// * [with_credentials()]: by default this client uses
5690///   [Application Default Credentials]. Applications using custom
5691///   authentication may need to override this default.
5692///
5693/// [with_endpoint()]: super::builder::instances::ClientBuilder::with_endpoint
5694/// [with_credentials()]: super::builder::instances::ClientBuilder::with_credentials
5695/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
5696/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
5697///
5698/// # Pooling and Cloning
5699///
5700/// `Instances` holds a connection pool internally, it is advised to
5701/// create one and reuse it. You do not need to wrap `Instances` in
5702/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
5703/// already uses an `Arc` internally.
5704#[cfg(feature = "instances")]
5705#[cfg_attr(docsrs, doc(cfg(feature = "instances")))]
5706#[derive(Clone, Debug)]
5707pub struct Instances {
5708    inner: std::sync::Arc<dyn super::stub::dynamic::Instances>,
5709}
5710
5711#[cfg(feature = "instances")]
5712impl Instances {
5713    /// Returns a builder for [Instances].
5714    ///
5715    /// ```
5716    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
5717    /// # use google_cloud_compute_v1::client::Instances;
5718    /// let client = Instances::builder().build().await?;
5719    /// # Ok(()) }
5720    /// ```
5721    pub fn builder() -> super::builder::instances::ClientBuilder {
5722        crate::new_client_builder(super::builder::instances::client::Factory)
5723    }
5724
5725    /// Creates a new client from the provided stub.
5726    ///
5727    /// The most common case for calling this function is in tests mocking the
5728    /// client's behavior.
5729    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
5730    where
5731        T: super::stub::Instances + 'static,
5732    {
5733        Self { inner: stub.into() }
5734    }
5735
5736    pub(crate) async fn new(
5737        config: gaxi::options::ClientConfig,
5738    ) -> crate::ClientBuilderResult<Self> {
5739        let inner = Self::build_inner(config).await?;
5740        Ok(Self { inner })
5741    }
5742
5743    async fn build_inner(
5744        conf: gaxi::options::ClientConfig,
5745    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::Instances>> {
5746        if gaxi::options::tracing_enabled(&conf) {
5747            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
5748        }
5749        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
5750    }
5751
5752    async fn build_transport(
5753        conf: gaxi::options::ClientConfig,
5754    ) -> crate::ClientBuilderResult<impl super::stub::Instances> {
5755        super::transport::Instances::new(conf).await
5756    }
5757
5758    async fn build_with_tracing(
5759        conf: gaxi::options::ClientConfig,
5760    ) -> crate::ClientBuilderResult<impl super::stub::Instances> {
5761        Self::build_transport(conf)
5762            .await
5763            .map(super::tracing::Instances::new)
5764    }
5765
5766    /// Adds an access config to an instance's network interface.
5767    pub fn add_access_config(&self) -> super::builder::instances::AddAccessConfig {
5768        super::builder::instances::AddAccessConfig::new(self.inner.clone())
5769    }
5770
5771    /// Adds one dynamic network interface to an active instance.
5772    pub fn add_network_interface(&self) -> super::builder::instances::AddNetworkInterface {
5773        super::builder::instances::AddNetworkInterface::new(self.inner.clone())
5774    }
5775
5776    /// Adds existing resource policies to an instance. You can only add one
5777    /// policy right now which will be applied to this instance for scheduling live
5778    /// migrations.
5779    pub fn add_resource_policies(&self) -> super::builder::instances::AddResourcePolicies {
5780        super::builder::instances::AddResourcePolicies::new(self.inner.clone())
5781    }
5782
5783    /// Retrieves an aggregated list of all of the instances in your project
5784    /// across all regions and zones.
5785    ///
5786    /// The performance of this method degrades when a filter is specified on a
5787    /// project that has a very large number of instances.
5788    ///
5789    /// To prevent failure, Google recommends that you set the
5790    /// `returnPartialSuccess` parameter to `true`.
5791    pub fn aggregated_list(&self) -> super::builder::instances::AggregatedList {
5792        super::builder::instances::AggregatedList::new(self.inner.clone())
5793    }
5794
5795    /// Attaches an existing Disk resource to an instance. You must first
5796    /// create the disk before you can attach it. It is not possible to create
5797    /// and attach a disk at the same time. For more information, readAdding a
5798    /// persistent disk to your instance.
5799    pub fn attach_disk(&self) -> super::builder::instances::AttachDisk {
5800        super::builder::instances::AttachDisk::new(self.inner.clone())
5801    }
5802
5803    /// Creates multiple instances. Count specifies the number of instances to
5804    /// create. For more information, seeAbout bulk
5805    /// creation of VMs.
5806    pub fn bulk_insert(&self) -> super::builder::instances::BulkInsert {
5807        super::builder::instances::BulkInsert::new(self.inner.clone())
5808    }
5809
5810    /// Deletes the specified Instance resource. For more information, seeDeleting
5811    /// an instance.
5812    pub fn delete(&self) -> super::builder::instances::Delete {
5813        super::builder::instances::Delete::new(self.inner.clone())
5814    }
5815
5816    /// Deletes an access config from an instance's network interface.
5817    pub fn delete_access_config(&self) -> super::builder::instances::DeleteAccessConfig {
5818        super::builder::instances::DeleteAccessConfig::new(self.inner.clone())
5819    }
5820
5821    /// Deletes one dynamic network interface from an active instance.
5822    /// InstancesDeleteNetworkInterfaceRequest indicates:
5823    ///
5824    /// - instance from which to delete, using project+zone+resource_id fields;
5825    /// - dynamic network interface to be deleted, using network_interface_name
5826    ///   field;
5827    pub fn delete_network_interface(&self) -> super::builder::instances::DeleteNetworkInterface {
5828        super::builder::instances::DeleteNetworkInterface::new(self.inner.clone())
5829    }
5830
5831    /// Detaches a disk from an instance.
5832    pub fn detach_disk(&self) -> super::builder::instances::DetachDisk {
5833        super::builder::instances::DetachDisk::new(self.inner.clone())
5834    }
5835
5836    /// Returns the specified Instance resource.
5837    pub fn get(&self) -> super::builder::instances::Get {
5838        super::builder::instances::Get::new(self.inner.clone())
5839    }
5840
5841    /// Returns effective firewalls applied to an interface of the instance.
5842    pub fn get_effective_firewalls(&self) -> super::builder::instances::GetEffectiveFirewalls {
5843        super::builder::instances::GetEffectiveFirewalls::new(self.inner.clone())
5844    }
5845
5846    /// Returns the specified guest attributes entry.
5847    pub fn get_guest_attributes(&self) -> super::builder::instances::GetGuestAttributes {
5848        super::builder::instances::GetGuestAttributes::new(self.inner.clone())
5849    }
5850
5851    /// Gets the access control policy for a resource. May be empty if no such
5852    /// policy or resource exists.
5853    pub fn get_iam_policy(&self) -> super::builder::instances::GetIamPolicy {
5854        super::builder::instances::GetIamPolicy::new(self.inner.clone())
5855    }
5856
5857    /// Returns the screenshot from the specified instance.
5858    pub fn get_screenshot(&self) -> super::builder::instances::GetScreenshot {
5859        super::builder::instances::GetScreenshot::new(self.inner.clone())
5860    }
5861
5862    /// Returns the last 1 MB of serial port output from the specified instance.
5863    pub fn get_serial_port_output(&self) -> super::builder::instances::GetSerialPortOutput {
5864        super::builder::instances::GetSerialPortOutput::new(self.inner.clone())
5865    }
5866
5867    /// Returns the Shielded Instance Identity of an instance
5868    pub fn get_shielded_instance_identity(
5869        &self,
5870    ) -> super::builder::instances::GetShieldedInstanceIdentity {
5871        super::builder::instances::GetShieldedInstanceIdentity::new(self.inner.clone())
5872    }
5873
5874    /// Creates an instance resource in the specified project using the data
5875    /// included in the request.
5876    pub fn insert(&self) -> super::builder::instances::Insert {
5877        super::builder::instances::Insert::new(self.inner.clone())
5878    }
5879
5880    /// Retrieves the list of instances contained within
5881    /// the specified zone.
5882    pub fn list(&self) -> super::builder::instances::List {
5883        super::builder::instances::List::new(self.inner.clone())
5884    }
5885
5886    /// Retrieves a list of resources that refer to the VM instance specified in
5887    /// the request. For example, if the VM instance is part of a managed or
5888    /// unmanaged instance group, the referrers list includes the instance group.
5889    /// For more information, readViewing
5890    /// referrers to VM instances.
5891    pub fn list_referrers(&self) -> super::builder::instances::ListReferrers {
5892        super::builder::instances::ListReferrers::new(self.inner.clone())
5893    }
5894
5895    /// Perform a manual maintenance on the instance.
5896    pub fn perform_maintenance(&self) -> super::builder::instances::PerformMaintenance {
5897        super::builder::instances::PerformMaintenance::new(self.inner.clone())
5898    }
5899
5900    /// Removes resource policies from an instance.
5901    pub fn remove_resource_policies(&self) -> super::builder::instances::RemoveResourcePolicies {
5902        super::builder::instances::RemoveResourcePolicies::new(self.inner.clone())
5903    }
5904
5905    /// Mark the host as faulty and try to restart the instance on a new host.
5906    pub fn report_host_as_faulty(&self) -> super::builder::instances::ReportHostAsFaulty {
5907        super::builder::instances::ReportHostAsFaulty::new(self.inner.clone())
5908    }
5909
5910    /// Performs a reset on the instance. This is a hard reset. The VM
5911    /// does not do a graceful shutdown. For more information, seeResetting
5912    /// an instance.
5913    pub fn reset(&self) -> super::builder::instances::Reset {
5914        super::builder::instances::Reset::new(self.inner.clone())
5915    }
5916
5917    /// Resumes an instance that was suspended using theinstances().suspend
5918    /// method.
5919    pub fn resume(&self) -> super::builder::instances::Resume {
5920        super::builder::instances::Resume::new(self.inner.clone())
5921    }
5922
5923    /// Sends diagnostic interrupt to the instance.
5924    pub fn send_diagnostic_interrupt(&self) -> super::builder::instances::SendDiagnosticInterrupt {
5925        super::builder::instances::SendDiagnosticInterrupt::new(self.inner.clone())
5926    }
5927
5928    /// Sets deletion protection on the instance.
5929    pub fn set_deletion_protection(&self) -> super::builder::instances::SetDeletionProtection {
5930        super::builder::instances::SetDeletionProtection::new(self.inner.clone())
5931    }
5932
5933    /// Sets the auto-delete flag for a disk attached to an instance.
5934    pub fn set_disk_auto_delete(&self) -> super::builder::instances::SetDiskAutoDelete {
5935        super::builder::instances::SetDiskAutoDelete::new(self.inner.clone())
5936    }
5937
5938    /// Sets the access control policy on the specified resource.
5939    /// Replaces any existing policy.
5940    pub fn set_iam_policy(&self) -> super::builder::instances::SetIamPolicy {
5941        super::builder::instances::SetIamPolicy::new(self.inner.clone())
5942    }
5943
5944    /// Sets labels on an instance.  To learn more about labels, read theLabeling
5945    /// Resources documentation.
5946    pub fn set_labels(&self) -> super::builder::instances::SetLabels {
5947        super::builder::instances::SetLabels::new(self.inner.clone())
5948    }
5949
5950    /// Changes the number and/or type of accelerator for a stopped instance to the
5951    /// values specified in the request.
5952    pub fn set_machine_resources(&self) -> super::builder::instances::SetMachineResources {
5953        super::builder::instances::SetMachineResources::new(self.inner.clone())
5954    }
5955
5956    /// Changes the machine type for a stopped instance to the machine
5957    /// type specified in the request.
5958    pub fn set_machine_type(&self) -> super::builder::instances::SetMachineType {
5959        super::builder::instances::SetMachineType::new(self.inner.clone())
5960    }
5961
5962    /// Sets metadata for the specified instance to the data included
5963    /// in the request.
5964    pub fn set_metadata(&self) -> super::builder::instances::SetMetadata {
5965        super::builder::instances::SetMetadata::new(self.inner.clone())
5966    }
5967
5968    /// Changes the minimum CPU platform that this instance should use.
5969    /// This method can only
5970    /// be called on a stopped instance. For more information, readSpecifying a
5971    /// Minimum CPU Platform.
5972    pub fn set_min_cpu_platform(&self) -> super::builder::instances::SetMinCpuPlatform {
5973        super::builder::instances::SetMinCpuPlatform::new(self.inner.clone())
5974    }
5975
5976    /// Sets name of an instance.
5977    pub fn set_name(&self) -> super::builder::instances::SetName {
5978        super::builder::instances::SetName::new(self.inner.clone())
5979    }
5980
5981    /// Sets an instance's scheduling options. You can only call this method on astopped instance,
5982    /// that is, a VM instance that is in a `TERMINATED` state. SeeInstance Life
5983    /// Cycle for more information on the possible instance states.
5984    /// For more information about setting scheduling options for a VM, seeSet
5985    /// VM host maintenance policy.
5986    pub fn set_scheduling(&self) -> super::builder::instances::SetScheduling {
5987        super::builder::instances::SetScheduling::new(self.inner.clone())
5988    }
5989
5990    /// Sets the Google Cloud Armor security policy for the specified instance.
5991    /// For more information, seeGoogle
5992    /// Cloud Armor Overview
5993    pub fn set_security_policy(&self) -> super::builder::instances::SetSecurityPolicy {
5994        super::builder::instances::SetSecurityPolicy::new(self.inner.clone())
5995    }
5996
5997    /// Sets the service account on the instance. For more information,
5998    /// readChanging
5999    /// the service account and access scopes for an instance.
6000    pub fn set_service_account(&self) -> super::builder::instances::SetServiceAccount {
6001        super::builder::instances::SetServiceAccount::new(self.inner.clone())
6002    }
6003
6004    /// Sets the Shielded Instance integrity policy for an instance. You can
6005    /// only use this method on a running instance. This method
6006    /// supports PATCH semantics and uses the JSON merge
6007    /// patch format and processing rules.
6008    pub fn set_shielded_instance_integrity_policy(
6009        &self,
6010    ) -> super::builder::instances::SetShieldedInstanceIntegrityPolicy {
6011        super::builder::instances::SetShieldedInstanceIntegrityPolicy::new(self.inner.clone())
6012    }
6013
6014    /// Sets network tags
6015    /// for the specified instance to the data included in the request.
6016    pub fn set_tags(&self) -> super::builder::instances::SetTags {
6017        super::builder::instances::SetTags::new(self.inner.clone())
6018    }
6019
6020    /// Simulates a host maintenance event on a VM. For more information, see
6021    /// Simulate a host maintenance event.
6022    pub fn simulate_maintenance_event(
6023        &self,
6024    ) -> super::builder::instances::SimulateMaintenanceEvent {
6025        super::builder::instances::SimulateMaintenanceEvent::new(self.inner.clone())
6026    }
6027
6028    /// Starts an instance that was stopped using theinstances().stop
6029    /// method. For more information, seeRestart an
6030    /// instance.
6031    pub fn start(&self) -> super::builder::instances::Start {
6032        super::builder::instances::Start::new(self.inner.clone())
6033    }
6034
6035    /// Starts an instance that was stopped using theinstances().stop
6036    /// method. For more information, seeRestart an
6037    /// instance.
6038    pub fn start_with_encryption_key(&self) -> super::builder::instances::StartWithEncryptionKey {
6039        super::builder::instances::StartWithEncryptionKey::new(self.inner.clone())
6040    }
6041
6042    /// Stops a running instance, shutting it down cleanly, and allows
6043    /// you to restart the instance at a later time. Stopped instances do not incur
6044    /// VM usage charges while they are stopped. However, resources that the VM is
6045    /// using, such as persistent disks and static IP addresses, will continue to
6046    /// be charged until they are deleted. For more information, seeStopping
6047    /// an instance.
6048    pub fn stop(&self) -> super::builder::instances::Stop {
6049        super::builder::instances::Stop::new(self.inner.clone())
6050    }
6051
6052    /// This method suspends a running instance, saving its state to persistent
6053    /// storage, and allows you to resume the instance at a later time. Suspended
6054    /// instances have no compute costs (cores or RAM), and incur only storage
6055    /// charges for the saved VM memory and localSSD data. Any charged resources
6056    /// the virtual machine was using, such as persistent disks and static IP
6057    /// addresses, will continue to be charged while the instance is suspended.
6058    /// For more information, see
6059    /// Suspending and resuming an instance.
6060    pub fn suspend(&self) -> super::builder::instances::Suspend {
6061        super::builder::instances::Suspend::new(self.inner.clone())
6062    }
6063
6064    /// Returns permissions that a caller has on the specified resource.
6065    pub fn test_iam_permissions(&self) -> super::builder::instances::TestIamPermissions {
6066        super::builder::instances::TestIamPermissions::new(self.inner.clone())
6067    }
6068
6069    /// Updates an instance only if the necessary resources are available. This
6070    /// method can update only a specific set of instance properties. See
6071    /// Updating a running instance for a list of updatable instance
6072    /// properties.
6073    pub fn update(&self) -> super::builder::instances::Update {
6074        super::builder::instances::Update::new(self.inner.clone())
6075    }
6076
6077    /// Updates the specified access config from an instance's network interface
6078    /// with the data included in the request. This method supportsPATCH
6079    /// semantics and uses theJSON merge
6080    /// patch format and processing rules.
6081    pub fn update_access_config(&self) -> super::builder::instances::UpdateAccessConfig {
6082        super::builder::instances::UpdateAccessConfig::new(self.inner.clone())
6083    }
6084
6085    /// Updates the Display config for a VM instance. You can
6086    /// only use this method on a stopped VM instance. This method supportsPATCH
6087    /// semantics and uses theJSON merge
6088    /// patch format and processing rules.
6089    pub fn update_display_device(&self) -> super::builder::instances::UpdateDisplayDevice {
6090        super::builder::instances::UpdateDisplayDevice::new(self.inner.clone())
6091    }
6092
6093    /// Updates an instance's network interface. This method can only update an
6094    /// interface's alias IP range and attached network. See Modifying
6095    /// alias IP ranges for an existing instance for instructions on
6096    /// changing alias IP ranges. See Migrating
6097    /// a VM between networks for instructions on migrating an interface.
6098    /// This method follows PATCH semantics.
6099    pub fn update_network_interface(&self) -> super::builder::instances::UpdateNetworkInterface {
6100        super::builder::instances::UpdateNetworkInterface::new(self.inner.clone())
6101    }
6102
6103    /// Updates the Shielded Instance config for an instance. You can
6104    /// only use this method on a stopped instance. This method supportsPATCH
6105    /// semantics and uses theJSON merge
6106    /// patch format and processing rules.
6107    pub fn update_shielded_instance_config(
6108        &self,
6109    ) -> super::builder::instances::UpdateShieldedInstanceConfig {
6110        super::builder::instances::UpdateShieldedInstanceConfig::new(self.inner.clone())
6111    }
6112
6113    /// Retrieves the specified zone-specific Operations resource.
6114    pub fn get_operation(&self) -> super::builder::instances::GetOperation {
6115        super::builder::instances::GetOperation::new(self.inner.clone())
6116    }
6117}
6118
6119/// Implements a client for the Compute Engine API.
6120///
6121/// # Example
6122/// ```
6123/// # use google_cloud_compute_v1::client::InstantSnapshotGroups;
6124/// async fn sample(
6125/// ) -> anyhow::Result<()> {
6126///     let client = InstantSnapshotGroups::builder().build().await?;
6127///     // use `client` to make requests to the Compute Engine API.
6128///     Ok(())
6129/// }
6130/// ```
6131///
6132/// # Service Description
6133///
6134/// Service for the `instantSnapshotGroups` resource.
6135///
6136/// The client library was generated with API version 2026-09-01.
6137///
6138/// # Configuration
6139///
6140/// To configure `InstantSnapshotGroups` use the `with_*` methods in the type returned
6141/// by [builder()][InstantSnapshotGroups::builder]. The default configuration should
6142/// work for most applications. Common configuration changes include
6143///
6144/// * [with_endpoint()]: by default this client uses the global default endpoint
6145///   (`https://compute.googleapis.com`). Applications using regional
6146///   endpoints or running in restricted networks (e.g. a network configured
6147///   with [Private Google Access with VPC Service Controls]) may want to
6148///   override this default.
6149/// * [with_credentials()]: by default this client uses
6150///   [Application Default Credentials]. Applications using custom
6151///   authentication may need to override this default.
6152///
6153/// [with_endpoint()]: super::builder::instant_snapshot_groups::ClientBuilder::with_endpoint
6154/// [with_credentials()]: super::builder::instant_snapshot_groups::ClientBuilder::with_credentials
6155/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
6156/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
6157///
6158/// # Pooling and Cloning
6159///
6160/// `InstantSnapshotGroups` holds a connection pool internally, it is advised to
6161/// create one and reuse it. You do not need to wrap `InstantSnapshotGroups` in
6162/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
6163/// already uses an `Arc` internally.
6164#[cfg(feature = "instant-snapshot-groups")]
6165#[cfg_attr(docsrs, doc(cfg(feature = "instant-snapshot-groups")))]
6166#[derive(Clone, Debug)]
6167pub struct InstantSnapshotGroups {
6168    inner: std::sync::Arc<dyn super::stub::dynamic::InstantSnapshotGroups>,
6169}
6170
6171#[cfg(feature = "instant-snapshot-groups")]
6172impl InstantSnapshotGroups {
6173    /// Returns a builder for [InstantSnapshotGroups].
6174    ///
6175    /// ```
6176    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
6177    /// # use google_cloud_compute_v1::client::InstantSnapshotGroups;
6178    /// let client = InstantSnapshotGroups::builder().build().await?;
6179    /// # Ok(()) }
6180    /// ```
6181    pub fn builder() -> super::builder::instant_snapshot_groups::ClientBuilder {
6182        crate::new_client_builder(super::builder::instant_snapshot_groups::client::Factory)
6183    }
6184
6185    /// Creates a new client from the provided stub.
6186    ///
6187    /// The most common case for calling this function is in tests mocking the
6188    /// client's behavior.
6189    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
6190    where
6191        T: super::stub::InstantSnapshotGroups + 'static,
6192    {
6193        Self { inner: stub.into() }
6194    }
6195
6196    pub(crate) async fn new(
6197        config: gaxi::options::ClientConfig,
6198    ) -> crate::ClientBuilderResult<Self> {
6199        let inner = Self::build_inner(config).await?;
6200        Ok(Self { inner })
6201    }
6202
6203    async fn build_inner(
6204        conf: gaxi::options::ClientConfig,
6205    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::InstantSnapshotGroups>>
6206    {
6207        if gaxi::options::tracing_enabled(&conf) {
6208            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
6209        }
6210        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
6211    }
6212
6213    async fn build_transport(
6214        conf: gaxi::options::ClientConfig,
6215    ) -> crate::ClientBuilderResult<impl super::stub::InstantSnapshotGroups> {
6216        super::transport::InstantSnapshotGroups::new(conf).await
6217    }
6218
6219    async fn build_with_tracing(
6220        conf: gaxi::options::ClientConfig,
6221    ) -> crate::ClientBuilderResult<impl super::stub::InstantSnapshotGroups> {
6222        Self::build_transport(conf)
6223            .await
6224            .map(super::tracing::InstantSnapshotGroups::new)
6225    }
6226
6227    /// deletes a Zonal InstantSnapshotGroup resource
6228    pub fn delete(&self) -> super::builder::instant_snapshot_groups::Delete {
6229        super::builder::instant_snapshot_groups::Delete::new(self.inner.clone())
6230    }
6231
6232    /// returns the specified InstantSnapshotGroup resource in the specified zone.
6233    pub fn get(&self) -> super::builder::instant_snapshot_groups::Get {
6234        super::builder::instant_snapshot_groups::Get::new(self.inner.clone())
6235    }
6236
6237    /// Gets the access control policy for a resource. May be empty if no such
6238    /// policy or resource exists.
6239    pub fn get_iam_policy(&self) -> super::builder::instant_snapshot_groups::GetIamPolicy {
6240        super::builder::instant_snapshot_groups::GetIamPolicy::new(self.inner.clone())
6241    }
6242
6243    /// inserts a Zonal InstantSnapshotGroup resource
6244    pub fn insert(&self) -> super::builder::instant_snapshot_groups::Insert {
6245        super::builder::instant_snapshot_groups::Insert::new(self.inner.clone())
6246    }
6247
6248    /// retrieves the list of InstantSnapshotGroup resources contained within
6249    /// the specified zone.
6250    pub fn list(&self) -> super::builder::instant_snapshot_groups::List {
6251        super::builder::instant_snapshot_groups::List::new(self.inner.clone())
6252    }
6253
6254    /// Sets the access control policy on the specified resource.
6255    /// Replaces any existing policy.
6256    pub fn set_iam_policy(&self) -> super::builder::instant_snapshot_groups::SetIamPolicy {
6257        super::builder::instant_snapshot_groups::SetIamPolicy::new(self.inner.clone())
6258    }
6259
6260    /// Returns permissions that a caller has on the specified resource.
6261    pub fn test_iam_permissions(
6262        &self,
6263    ) -> super::builder::instant_snapshot_groups::TestIamPermissions {
6264        super::builder::instant_snapshot_groups::TestIamPermissions::new(self.inner.clone())
6265    }
6266
6267    /// Retrieves the specified zone-specific Operations resource.
6268    pub fn get_operation(&self) -> super::builder::instant_snapshot_groups::GetOperation {
6269        super::builder::instant_snapshot_groups::GetOperation::new(self.inner.clone())
6270    }
6271}
6272
6273/// Implements a client for the Compute Engine API.
6274///
6275/// # Example
6276/// ```
6277/// # use google_cloud_compute_v1::client::InstantSnapshots;
6278/// async fn sample(
6279/// ) -> anyhow::Result<()> {
6280///     let client = InstantSnapshots::builder().build().await?;
6281///     // use `client` to make requests to the Compute Engine API.
6282///     Ok(())
6283/// }
6284/// ```
6285///
6286/// # Service Description
6287///
6288/// Service for the `instantSnapshots` resource.
6289///
6290/// The client library was generated with API version 2026-09-01.
6291///
6292/// # Configuration
6293///
6294/// To configure `InstantSnapshots` use the `with_*` methods in the type returned
6295/// by [builder()][InstantSnapshots::builder]. The default configuration should
6296/// work for most applications. Common configuration changes include
6297///
6298/// * [with_endpoint()]: by default this client uses the global default endpoint
6299///   (`https://compute.googleapis.com`). Applications using regional
6300///   endpoints or running in restricted networks (e.g. a network configured
6301///   with [Private Google Access with VPC Service Controls]) may want to
6302///   override this default.
6303/// * [with_credentials()]: by default this client uses
6304///   [Application Default Credentials]. Applications using custom
6305///   authentication may need to override this default.
6306///
6307/// [with_endpoint()]: super::builder::instant_snapshots::ClientBuilder::with_endpoint
6308/// [with_credentials()]: super::builder::instant_snapshots::ClientBuilder::with_credentials
6309/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
6310/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
6311///
6312/// # Pooling and Cloning
6313///
6314/// `InstantSnapshots` holds a connection pool internally, it is advised to
6315/// create one and reuse it. You do not need to wrap `InstantSnapshots` in
6316/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
6317/// already uses an `Arc` internally.
6318#[cfg(feature = "instant-snapshots")]
6319#[cfg_attr(docsrs, doc(cfg(feature = "instant-snapshots")))]
6320#[derive(Clone, Debug)]
6321pub struct InstantSnapshots {
6322    inner: std::sync::Arc<dyn super::stub::dynamic::InstantSnapshots>,
6323}
6324
6325#[cfg(feature = "instant-snapshots")]
6326impl InstantSnapshots {
6327    /// Returns a builder for [InstantSnapshots].
6328    ///
6329    /// ```
6330    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
6331    /// # use google_cloud_compute_v1::client::InstantSnapshots;
6332    /// let client = InstantSnapshots::builder().build().await?;
6333    /// # Ok(()) }
6334    /// ```
6335    pub fn builder() -> super::builder::instant_snapshots::ClientBuilder {
6336        crate::new_client_builder(super::builder::instant_snapshots::client::Factory)
6337    }
6338
6339    /// Creates a new client from the provided stub.
6340    ///
6341    /// The most common case for calling this function is in tests mocking the
6342    /// client's behavior.
6343    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
6344    where
6345        T: super::stub::InstantSnapshots + 'static,
6346    {
6347        Self { inner: stub.into() }
6348    }
6349
6350    pub(crate) async fn new(
6351        config: gaxi::options::ClientConfig,
6352    ) -> crate::ClientBuilderResult<Self> {
6353        let inner = Self::build_inner(config).await?;
6354        Ok(Self { inner })
6355    }
6356
6357    async fn build_inner(
6358        conf: gaxi::options::ClientConfig,
6359    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::InstantSnapshots>>
6360    {
6361        if gaxi::options::tracing_enabled(&conf) {
6362            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
6363        }
6364        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
6365    }
6366
6367    async fn build_transport(
6368        conf: gaxi::options::ClientConfig,
6369    ) -> crate::ClientBuilderResult<impl super::stub::InstantSnapshots> {
6370        super::transport::InstantSnapshots::new(conf).await
6371    }
6372
6373    async fn build_with_tracing(
6374        conf: gaxi::options::ClientConfig,
6375    ) -> crate::ClientBuilderResult<impl super::stub::InstantSnapshots> {
6376        Self::build_transport(conf)
6377            .await
6378            .map(super::tracing::InstantSnapshots::new)
6379    }
6380
6381    /// Retrieves an aggregated list of instantSnapshots.
6382    ///
6383    /// To prevent failure, Google recommends that you set the
6384    /// `returnPartialSuccess` parameter to `true`.
6385    pub fn aggregated_list(&self) -> super::builder::instant_snapshots::AggregatedList {
6386        super::builder::instant_snapshots::AggregatedList::new(self.inner.clone())
6387    }
6388
6389    /// Deletes the specified InstantSnapshot resource. Keep in mind that deleting
6390    /// a single instantSnapshot might not necessarily delete all the data on that
6391    /// instantSnapshot. If any data on the instantSnapshot that is marked for
6392    /// deletion is needed for subsequent instantSnapshots, the data will be moved
6393    /// to the next corresponding instantSnapshot.
6394    ///
6395    /// For more information, seeDeleting
6396    /// instantSnapshots.
6397    pub fn delete(&self) -> super::builder::instant_snapshots::Delete {
6398        super::builder::instant_snapshots::Delete::new(self.inner.clone())
6399    }
6400
6401    /// Returns the specified InstantSnapshot resource in the specified zone.
6402    pub fn get(&self) -> super::builder::instant_snapshots::Get {
6403        super::builder::instant_snapshots::Get::new(self.inner.clone())
6404    }
6405
6406    /// Gets the access control policy for a resource. May be empty if no such
6407    /// policy or resource exists.
6408    pub fn get_iam_policy(&self) -> super::builder::instant_snapshots::GetIamPolicy {
6409        super::builder::instant_snapshots::GetIamPolicy::new(self.inner.clone())
6410    }
6411
6412    /// Creates an instant snapshot in the specified zone.
6413    pub fn insert(&self) -> super::builder::instant_snapshots::Insert {
6414        super::builder::instant_snapshots::Insert::new(self.inner.clone())
6415    }
6416
6417    /// Retrieves the list of InstantSnapshot resources contained within
6418    /// the specified zone.
6419    pub fn list(&self) -> super::builder::instant_snapshots::List {
6420        super::builder::instant_snapshots::List::new(self.inner.clone())
6421    }
6422
6423    /// Sets the access control policy on the specified resource.
6424    /// Replaces any existing policy.
6425    pub fn set_iam_policy(&self) -> super::builder::instant_snapshots::SetIamPolicy {
6426        super::builder::instant_snapshots::SetIamPolicy::new(self.inner.clone())
6427    }
6428
6429    /// Sets the labels on a instantSnapshot in the given zone. To learn more about
6430    /// labels, read the Labeling
6431    /// Resources documentation.
6432    pub fn set_labels(&self) -> super::builder::instant_snapshots::SetLabels {
6433        super::builder::instant_snapshots::SetLabels::new(self.inner.clone())
6434    }
6435
6436    /// Returns permissions that a caller has on the specified resource.
6437    pub fn test_iam_permissions(&self) -> super::builder::instant_snapshots::TestIamPermissions {
6438        super::builder::instant_snapshots::TestIamPermissions::new(self.inner.clone())
6439    }
6440
6441    /// Retrieves the specified zone-specific Operations resource.
6442    pub fn get_operation(&self) -> super::builder::instant_snapshots::GetOperation {
6443        super::builder::instant_snapshots::GetOperation::new(self.inner.clone())
6444    }
6445}
6446
6447/// Implements a client for the Compute Engine API.
6448///
6449/// # Example
6450/// ```
6451/// # use google_cloud_compute_v1::client::InterconnectAttachmentGroups;
6452/// async fn sample(
6453/// ) -> anyhow::Result<()> {
6454///     let client = InterconnectAttachmentGroups::builder().build().await?;
6455///     // use `client` to make requests to the Compute Engine API.
6456///     Ok(())
6457/// }
6458/// ```
6459///
6460/// # Service Description
6461///
6462/// Service for the `interconnectAttachmentGroups` resource.
6463///
6464/// The client library was generated with API version 2026-09-01.
6465///
6466/// # Configuration
6467///
6468/// To configure `InterconnectAttachmentGroups` use the `with_*` methods in the type returned
6469/// by [builder()][InterconnectAttachmentGroups::builder]. The default configuration should
6470/// work for most applications. Common configuration changes include
6471///
6472/// * [with_endpoint()]: by default this client uses the global default endpoint
6473///   (`https://compute.googleapis.com`). Applications using regional
6474///   endpoints or running in restricted networks (e.g. a network configured
6475///   with [Private Google Access with VPC Service Controls]) may want to
6476///   override this default.
6477/// * [with_credentials()]: by default this client uses
6478///   [Application Default Credentials]. Applications using custom
6479///   authentication may need to override this default.
6480///
6481/// [with_endpoint()]: super::builder::interconnect_attachment_groups::ClientBuilder::with_endpoint
6482/// [with_credentials()]: super::builder::interconnect_attachment_groups::ClientBuilder::with_credentials
6483/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
6484/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
6485///
6486/// # Pooling and Cloning
6487///
6488/// `InterconnectAttachmentGroups` holds a connection pool internally, it is advised to
6489/// create one and reuse it. You do not need to wrap `InterconnectAttachmentGroups` in
6490/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
6491/// already uses an `Arc` internally.
6492#[cfg(feature = "interconnect-attachment-groups")]
6493#[cfg_attr(docsrs, doc(cfg(feature = "interconnect-attachment-groups")))]
6494#[derive(Clone, Debug)]
6495pub struct InterconnectAttachmentGroups {
6496    inner: std::sync::Arc<dyn super::stub::dynamic::InterconnectAttachmentGroups>,
6497}
6498
6499#[cfg(feature = "interconnect-attachment-groups")]
6500impl InterconnectAttachmentGroups {
6501    /// Returns a builder for [InterconnectAttachmentGroups].
6502    ///
6503    /// ```
6504    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
6505    /// # use google_cloud_compute_v1::client::InterconnectAttachmentGroups;
6506    /// let client = InterconnectAttachmentGroups::builder().build().await?;
6507    /// # Ok(()) }
6508    /// ```
6509    pub fn builder() -> super::builder::interconnect_attachment_groups::ClientBuilder {
6510        crate::new_client_builder(super::builder::interconnect_attachment_groups::client::Factory)
6511    }
6512
6513    /// Creates a new client from the provided stub.
6514    ///
6515    /// The most common case for calling this function is in tests mocking the
6516    /// client's behavior.
6517    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
6518    where
6519        T: super::stub::InterconnectAttachmentGroups + 'static,
6520    {
6521        Self { inner: stub.into() }
6522    }
6523
6524    pub(crate) async fn new(
6525        config: gaxi::options::ClientConfig,
6526    ) -> crate::ClientBuilderResult<Self> {
6527        let inner = Self::build_inner(config).await?;
6528        Ok(Self { inner })
6529    }
6530
6531    async fn build_inner(
6532        conf: gaxi::options::ClientConfig,
6533    ) -> crate::ClientBuilderResult<
6534        std::sync::Arc<dyn super::stub::dynamic::InterconnectAttachmentGroups>,
6535    > {
6536        if gaxi::options::tracing_enabled(&conf) {
6537            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
6538        }
6539        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
6540    }
6541
6542    async fn build_transport(
6543        conf: gaxi::options::ClientConfig,
6544    ) -> crate::ClientBuilderResult<impl super::stub::InterconnectAttachmentGroups> {
6545        super::transport::InterconnectAttachmentGroups::new(conf).await
6546    }
6547
6548    async fn build_with_tracing(
6549        conf: gaxi::options::ClientConfig,
6550    ) -> crate::ClientBuilderResult<impl super::stub::InterconnectAttachmentGroups> {
6551        Self::build_transport(conf)
6552            .await
6553            .map(super::tracing::InterconnectAttachmentGroups::new)
6554    }
6555
6556    /// Deletes the specified InterconnectAttachmentGroup in the given scope
6557    pub fn delete(&self) -> super::builder::interconnect_attachment_groups::Delete {
6558        super::builder::interconnect_attachment_groups::Delete::new(self.inner.clone())
6559    }
6560
6561    /// Returns the specified InterconnectAttachmentGroup resource in the given
6562    /// scope.
6563    pub fn get(&self) -> super::builder::interconnect_attachment_groups::Get {
6564        super::builder::interconnect_attachment_groups::Get::new(self.inner.clone())
6565    }
6566
6567    /// Gets the access control policy for a resource. May be empty if no such
6568    /// policy or resource exists.
6569    pub fn get_iam_policy(&self) -> super::builder::interconnect_attachment_groups::GetIamPolicy {
6570        super::builder::interconnect_attachment_groups::GetIamPolicy::new(self.inner.clone())
6571    }
6572
6573    /// Returns the InterconnectAttachmentStatuses for the specified
6574    /// InterconnectAttachmentGroup resource.
6575    pub fn get_operational_status(
6576        &self,
6577    ) -> super::builder::interconnect_attachment_groups::GetOperationalStatus {
6578        super::builder::interconnect_attachment_groups::GetOperationalStatus::new(
6579            self.inner.clone(),
6580        )
6581    }
6582
6583    /// Creates a InterconnectAttachmentGroup in the specified project in the given
6584    /// scope using the parameters that are included in the request.
6585    pub fn insert(&self) -> super::builder::interconnect_attachment_groups::Insert {
6586        super::builder::interconnect_attachment_groups::Insert::new(self.inner.clone())
6587    }
6588
6589    /// Lists the InterconnectAttachmentGroups for a project in the given scope.
6590    pub fn list(&self) -> super::builder::interconnect_attachment_groups::List {
6591        super::builder::interconnect_attachment_groups::List::new(self.inner.clone())
6592    }
6593
6594    /// Patches the specified InterconnectAttachmentGroup resource with the data
6595    /// included in the request. This method supports PATCH
6596    /// semantics and usesJSON merge
6597    /// patch format and processing rules.
6598    pub fn patch(&self) -> super::builder::interconnect_attachment_groups::Patch {
6599        super::builder::interconnect_attachment_groups::Patch::new(self.inner.clone())
6600    }
6601
6602    /// Sets the access control policy on the specified resource.
6603    /// Replaces any existing policy.
6604    pub fn set_iam_policy(&self) -> super::builder::interconnect_attachment_groups::SetIamPolicy {
6605        super::builder::interconnect_attachment_groups::SetIamPolicy::new(self.inner.clone())
6606    }
6607
6608    /// Returns permissions that a caller has on the specified resource.
6609    pub fn test_iam_permissions(
6610        &self,
6611    ) -> super::builder::interconnect_attachment_groups::TestIamPermissions {
6612        super::builder::interconnect_attachment_groups::TestIamPermissions::new(self.inner.clone())
6613    }
6614
6615    /// Retrieves the specified Operations resource.
6616    pub fn get_operation(&self) -> super::builder::interconnect_attachment_groups::GetOperation {
6617        super::builder::interconnect_attachment_groups::GetOperation::new(self.inner.clone())
6618    }
6619}
6620
6621/// Implements a client for the Compute Engine API.
6622///
6623/// # Example
6624/// ```
6625/// # use google_cloud_compute_v1::client::InterconnectAttachments;
6626/// async fn sample(
6627/// ) -> anyhow::Result<()> {
6628///     let client = InterconnectAttachments::builder().build().await?;
6629///     // use `client` to make requests to the Compute Engine API.
6630///     Ok(())
6631/// }
6632/// ```
6633///
6634/// # Service Description
6635///
6636/// Service for the `interconnectAttachments` resource.
6637///
6638/// The client library was generated with API version 2026-09-01.
6639///
6640/// # Configuration
6641///
6642/// To configure `InterconnectAttachments` use the `with_*` methods in the type returned
6643/// by [builder()][InterconnectAttachments::builder]. The default configuration should
6644/// work for most applications. Common configuration changes include
6645///
6646/// * [with_endpoint()]: by default this client uses the global default endpoint
6647///   (`https://compute.googleapis.com`). Applications using regional
6648///   endpoints or running in restricted networks (e.g. a network configured
6649///   with [Private Google Access with VPC Service Controls]) may want to
6650///   override this default.
6651/// * [with_credentials()]: by default this client uses
6652///   [Application Default Credentials]. Applications using custom
6653///   authentication may need to override this default.
6654///
6655/// [with_endpoint()]: super::builder::interconnect_attachments::ClientBuilder::with_endpoint
6656/// [with_credentials()]: super::builder::interconnect_attachments::ClientBuilder::with_credentials
6657/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
6658/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
6659///
6660/// # Pooling and Cloning
6661///
6662/// `InterconnectAttachments` holds a connection pool internally, it is advised to
6663/// create one and reuse it. You do not need to wrap `InterconnectAttachments` in
6664/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
6665/// already uses an `Arc` internally.
6666#[cfg(feature = "interconnect-attachments")]
6667#[cfg_attr(docsrs, doc(cfg(feature = "interconnect-attachments")))]
6668#[derive(Clone, Debug)]
6669pub struct InterconnectAttachments {
6670    inner: std::sync::Arc<dyn super::stub::dynamic::InterconnectAttachments>,
6671}
6672
6673#[cfg(feature = "interconnect-attachments")]
6674impl InterconnectAttachments {
6675    /// Returns a builder for [InterconnectAttachments].
6676    ///
6677    /// ```
6678    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
6679    /// # use google_cloud_compute_v1::client::InterconnectAttachments;
6680    /// let client = InterconnectAttachments::builder().build().await?;
6681    /// # Ok(()) }
6682    /// ```
6683    pub fn builder() -> super::builder::interconnect_attachments::ClientBuilder {
6684        crate::new_client_builder(super::builder::interconnect_attachments::client::Factory)
6685    }
6686
6687    /// Creates a new client from the provided stub.
6688    ///
6689    /// The most common case for calling this function is in tests mocking the
6690    /// client's behavior.
6691    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
6692    where
6693        T: super::stub::InterconnectAttachments + 'static,
6694    {
6695        Self { inner: stub.into() }
6696    }
6697
6698    pub(crate) async fn new(
6699        config: gaxi::options::ClientConfig,
6700    ) -> crate::ClientBuilderResult<Self> {
6701        let inner = Self::build_inner(config).await?;
6702        Ok(Self { inner })
6703    }
6704
6705    async fn build_inner(
6706        conf: gaxi::options::ClientConfig,
6707    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::InterconnectAttachments>>
6708    {
6709        if gaxi::options::tracing_enabled(&conf) {
6710            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
6711        }
6712        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
6713    }
6714
6715    async fn build_transport(
6716        conf: gaxi::options::ClientConfig,
6717    ) -> crate::ClientBuilderResult<impl super::stub::InterconnectAttachments> {
6718        super::transport::InterconnectAttachments::new(conf).await
6719    }
6720
6721    async fn build_with_tracing(
6722        conf: gaxi::options::ClientConfig,
6723    ) -> crate::ClientBuilderResult<impl super::stub::InterconnectAttachments> {
6724        Self::build_transport(conf)
6725            .await
6726            .map(super::tracing::InterconnectAttachments::new)
6727    }
6728
6729    /// Retrieves an aggregated list of interconnect attachments.
6730    ///
6731    /// To prevent failure, Google recommends that you set the
6732    /// `returnPartialSuccess` parameter to `true`.
6733    pub fn aggregated_list(&self) -> super::builder::interconnect_attachments::AggregatedList {
6734        super::builder::interconnect_attachments::AggregatedList::new(self.inner.clone())
6735    }
6736
6737    /// Deletes the specified interconnect attachment.
6738    pub fn delete(&self) -> super::builder::interconnect_attachments::Delete {
6739        super::builder::interconnect_attachments::Delete::new(self.inner.clone())
6740    }
6741
6742    /// Returns the specified interconnect attachment.
6743    pub fn get(&self) -> super::builder::interconnect_attachments::Get {
6744        super::builder::interconnect_attachments::Get::new(self.inner.clone())
6745    }
6746
6747    /// Creates an InterconnectAttachment in the specified project using the data
6748    /// included in the request.
6749    pub fn insert(&self) -> super::builder::interconnect_attachments::Insert {
6750        super::builder::interconnect_attachments::Insert::new(self.inner.clone())
6751    }
6752
6753    /// Retrieves the list of interconnect attachments contained within
6754    /// the specified region.
6755    pub fn list(&self) -> super::builder::interconnect_attachments::List {
6756        super::builder::interconnect_attachments::List::new(self.inner.clone())
6757    }
6758
6759    /// Updates the specified interconnect attachment with the data included in the
6760    /// request. This method supportsPATCH
6761    /// semantics and uses theJSON merge
6762    /// patch format and processing rules.
6763    pub fn patch(&self) -> super::builder::interconnect_attachments::Patch {
6764        super::builder::interconnect_attachments::Patch::new(self.inner.clone())
6765    }
6766
6767    /// Sets the labels on an InterconnectAttachment. To learn more about labels,
6768    /// read the Labeling
6769    /// Resources documentation.
6770    pub fn set_labels(&self) -> super::builder::interconnect_attachments::SetLabels {
6771        super::builder::interconnect_attachments::SetLabels::new(self.inner.clone())
6772    }
6773
6774    /// Retrieves the specified region-specific Operations resource.
6775    pub fn get_operation(&self) -> super::builder::interconnect_attachments::GetOperation {
6776        super::builder::interconnect_attachments::GetOperation::new(self.inner.clone())
6777    }
6778}
6779
6780/// Implements a client for the Compute Engine API.
6781///
6782/// # Example
6783/// ```
6784/// # use google_cloud_compute_v1::client::InterconnectGroups;
6785/// async fn sample(
6786/// ) -> anyhow::Result<()> {
6787///     let client = InterconnectGroups::builder().build().await?;
6788///     // use `client` to make requests to the Compute Engine API.
6789///     Ok(())
6790/// }
6791/// ```
6792///
6793/// # Service Description
6794///
6795/// Service for the `interconnectGroups` resource.
6796///
6797/// The client library was generated with API version 2026-09-01.
6798///
6799/// # Configuration
6800///
6801/// To configure `InterconnectGroups` use the `with_*` methods in the type returned
6802/// by [builder()][InterconnectGroups::builder]. The default configuration should
6803/// work for most applications. Common configuration changes include
6804///
6805/// * [with_endpoint()]: by default this client uses the global default endpoint
6806///   (`https://compute.googleapis.com`). Applications using regional
6807///   endpoints or running in restricted networks (e.g. a network configured
6808///   with [Private Google Access with VPC Service Controls]) may want to
6809///   override this default.
6810/// * [with_credentials()]: by default this client uses
6811///   [Application Default Credentials]. Applications using custom
6812///   authentication may need to override this default.
6813///
6814/// [with_endpoint()]: super::builder::interconnect_groups::ClientBuilder::with_endpoint
6815/// [with_credentials()]: super::builder::interconnect_groups::ClientBuilder::with_credentials
6816/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
6817/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
6818///
6819/// # Pooling and Cloning
6820///
6821/// `InterconnectGroups` holds a connection pool internally, it is advised to
6822/// create one and reuse it. You do not need to wrap `InterconnectGroups` in
6823/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
6824/// already uses an `Arc` internally.
6825#[cfg(feature = "interconnect-groups")]
6826#[cfg_attr(docsrs, doc(cfg(feature = "interconnect-groups")))]
6827#[derive(Clone, Debug)]
6828pub struct InterconnectGroups {
6829    inner: std::sync::Arc<dyn super::stub::dynamic::InterconnectGroups>,
6830}
6831
6832#[cfg(feature = "interconnect-groups")]
6833impl InterconnectGroups {
6834    /// Returns a builder for [InterconnectGroups].
6835    ///
6836    /// ```
6837    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
6838    /// # use google_cloud_compute_v1::client::InterconnectGroups;
6839    /// let client = InterconnectGroups::builder().build().await?;
6840    /// # Ok(()) }
6841    /// ```
6842    pub fn builder() -> super::builder::interconnect_groups::ClientBuilder {
6843        crate::new_client_builder(super::builder::interconnect_groups::client::Factory)
6844    }
6845
6846    /// Creates a new client from the provided stub.
6847    ///
6848    /// The most common case for calling this function is in tests mocking the
6849    /// client's behavior.
6850    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
6851    where
6852        T: super::stub::InterconnectGroups + 'static,
6853    {
6854        Self { inner: stub.into() }
6855    }
6856
6857    pub(crate) async fn new(
6858        config: gaxi::options::ClientConfig,
6859    ) -> crate::ClientBuilderResult<Self> {
6860        let inner = Self::build_inner(config).await?;
6861        Ok(Self { inner })
6862    }
6863
6864    async fn build_inner(
6865        conf: gaxi::options::ClientConfig,
6866    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::InterconnectGroups>>
6867    {
6868        if gaxi::options::tracing_enabled(&conf) {
6869            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
6870        }
6871        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
6872    }
6873
6874    async fn build_transport(
6875        conf: gaxi::options::ClientConfig,
6876    ) -> crate::ClientBuilderResult<impl super::stub::InterconnectGroups> {
6877        super::transport::InterconnectGroups::new(conf).await
6878    }
6879
6880    async fn build_with_tracing(
6881        conf: gaxi::options::ClientConfig,
6882    ) -> crate::ClientBuilderResult<impl super::stub::InterconnectGroups> {
6883        Self::build_transport(conf)
6884            .await
6885            .map(super::tracing::InterconnectGroups::new)
6886    }
6887
6888    /// Create Interconnects with redundancy by creating them in a specified
6889    /// interconnect group.
6890    pub fn create_members(&self) -> super::builder::interconnect_groups::CreateMembers {
6891        super::builder::interconnect_groups::CreateMembers::new(self.inner.clone())
6892    }
6893
6894    /// Deletes the specified InterconnectGroup in the given scope
6895    pub fn delete(&self) -> super::builder::interconnect_groups::Delete {
6896        super::builder::interconnect_groups::Delete::new(self.inner.clone())
6897    }
6898
6899    /// Returns the specified InterconnectGroup resource in the given scope.
6900    pub fn get(&self) -> super::builder::interconnect_groups::Get {
6901        super::builder::interconnect_groups::Get::new(self.inner.clone())
6902    }
6903
6904    /// Gets the access control policy for a resource. May be empty if no such
6905    /// policy or resource exists.
6906    pub fn get_iam_policy(&self) -> super::builder::interconnect_groups::GetIamPolicy {
6907        super::builder::interconnect_groups::GetIamPolicy::new(self.inner.clone())
6908    }
6909
6910    /// Returns the interconnectStatuses for the specified
6911    /// InterconnectGroup.
6912    pub fn get_operational_status(
6913        &self,
6914    ) -> super::builder::interconnect_groups::GetOperationalStatus {
6915        super::builder::interconnect_groups::GetOperationalStatus::new(self.inner.clone())
6916    }
6917
6918    /// Creates a InterconnectGroup in the specified project in the given scope
6919    /// using the parameters that are included in the request.
6920    pub fn insert(&self) -> super::builder::interconnect_groups::Insert {
6921        super::builder::interconnect_groups::Insert::new(self.inner.clone())
6922    }
6923
6924    /// Lists the InterconnectGroups for a project in the given scope.
6925    pub fn list(&self) -> super::builder::interconnect_groups::List {
6926        super::builder::interconnect_groups::List::new(self.inner.clone())
6927    }
6928
6929    /// Patches the specified InterconnectGroup resource with the data included in
6930    /// the request. This method supports PATCH
6931    /// semantics and usesJSON merge
6932    /// patch format and processing rules.
6933    pub fn patch(&self) -> super::builder::interconnect_groups::Patch {
6934        super::builder::interconnect_groups::Patch::new(self.inner.clone())
6935    }
6936
6937    /// Sets the access control policy on the specified resource.
6938    /// Replaces any existing policy.
6939    pub fn set_iam_policy(&self) -> super::builder::interconnect_groups::SetIamPolicy {
6940        super::builder::interconnect_groups::SetIamPolicy::new(self.inner.clone())
6941    }
6942
6943    /// Returns permissions that a caller has on the specified resource.
6944    pub fn test_iam_permissions(&self) -> super::builder::interconnect_groups::TestIamPermissions {
6945        super::builder::interconnect_groups::TestIamPermissions::new(self.inner.clone())
6946    }
6947
6948    /// Retrieves the specified Operations resource.
6949    pub fn get_operation(&self) -> super::builder::interconnect_groups::GetOperation {
6950        super::builder::interconnect_groups::GetOperation::new(self.inner.clone())
6951    }
6952}
6953
6954/// Implements a client for the Compute Engine API.
6955///
6956/// # Example
6957/// ```
6958/// # use google_cloud_compute_v1::client::InterconnectLocations;
6959/// async fn sample(
6960/// ) -> anyhow::Result<()> {
6961///     let client = InterconnectLocations::builder().build().await?;
6962///     // use `client` to make requests to the Compute Engine API.
6963///     Ok(())
6964/// }
6965/// ```
6966///
6967/// # Service Description
6968///
6969/// Service for the `interconnectLocations` resource.
6970///
6971/// The client library was generated with API version 2026-09-01.
6972///
6973/// # Configuration
6974///
6975/// To configure `InterconnectLocations` use the `with_*` methods in the type returned
6976/// by [builder()][InterconnectLocations::builder]. The default configuration should
6977/// work for most applications. Common configuration changes include
6978///
6979/// * [with_endpoint()]: by default this client uses the global default endpoint
6980///   (`https://compute.googleapis.com`). Applications using regional
6981///   endpoints or running in restricted networks (e.g. a network configured
6982///   with [Private Google Access with VPC Service Controls]) may want to
6983///   override this default.
6984/// * [with_credentials()]: by default this client uses
6985///   [Application Default Credentials]. Applications using custom
6986///   authentication may need to override this default.
6987///
6988/// [with_endpoint()]: super::builder::interconnect_locations::ClientBuilder::with_endpoint
6989/// [with_credentials()]: super::builder::interconnect_locations::ClientBuilder::with_credentials
6990/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
6991/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
6992///
6993/// # Pooling and Cloning
6994///
6995/// `InterconnectLocations` holds a connection pool internally, it is advised to
6996/// create one and reuse it. You do not need to wrap `InterconnectLocations` in
6997/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
6998/// already uses an `Arc` internally.
6999#[cfg(feature = "interconnect-locations")]
7000#[cfg_attr(docsrs, doc(cfg(feature = "interconnect-locations")))]
7001#[derive(Clone, Debug)]
7002pub struct InterconnectLocations {
7003    inner: std::sync::Arc<dyn super::stub::dynamic::InterconnectLocations>,
7004}
7005
7006#[cfg(feature = "interconnect-locations")]
7007impl InterconnectLocations {
7008    /// Returns a builder for [InterconnectLocations].
7009    ///
7010    /// ```
7011    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
7012    /// # use google_cloud_compute_v1::client::InterconnectLocations;
7013    /// let client = InterconnectLocations::builder().build().await?;
7014    /// # Ok(()) }
7015    /// ```
7016    pub fn builder() -> super::builder::interconnect_locations::ClientBuilder {
7017        crate::new_client_builder(super::builder::interconnect_locations::client::Factory)
7018    }
7019
7020    /// Creates a new client from the provided stub.
7021    ///
7022    /// The most common case for calling this function is in tests mocking the
7023    /// client's behavior.
7024    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
7025    where
7026        T: super::stub::InterconnectLocations + 'static,
7027    {
7028        Self { inner: stub.into() }
7029    }
7030
7031    pub(crate) async fn new(
7032        config: gaxi::options::ClientConfig,
7033    ) -> crate::ClientBuilderResult<Self> {
7034        let inner = Self::build_inner(config).await?;
7035        Ok(Self { inner })
7036    }
7037
7038    async fn build_inner(
7039        conf: gaxi::options::ClientConfig,
7040    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::InterconnectLocations>>
7041    {
7042        if gaxi::options::tracing_enabled(&conf) {
7043            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
7044        }
7045        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
7046    }
7047
7048    async fn build_transport(
7049        conf: gaxi::options::ClientConfig,
7050    ) -> crate::ClientBuilderResult<impl super::stub::InterconnectLocations> {
7051        super::transport::InterconnectLocations::new(conf).await
7052    }
7053
7054    async fn build_with_tracing(
7055        conf: gaxi::options::ClientConfig,
7056    ) -> crate::ClientBuilderResult<impl super::stub::InterconnectLocations> {
7057        Self::build_transport(conf)
7058            .await
7059            .map(super::tracing::InterconnectLocations::new)
7060    }
7061
7062    /// Returns the details for the specified interconnect location. Gets a list of
7063    /// available interconnect locations by making a list() request.
7064    pub fn get(&self) -> super::builder::interconnect_locations::Get {
7065        super::builder::interconnect_locations::Get::new(self.inner.clone())
7066    }
7067
7068    /// Retrieves the list of interconnect locations available to the specified
7069    /// project.
7070    pub fn list(&self) -> super::builder::interconnect_locations::List {
7071        super::builder::interconnect_locations::List::new(self.inner.clone())
7072    }
7073}
7074
7075/// Implements a client for the Compute Engine API.
7076///
7077/// # Example
7078/// ```
7079/// # use google_cloud_compute_v1::client::InterconnectRemoteLocations;
7080/// async fn sample(
7081/// ) -> anyhow::Result<()> {
7082///     let client = InterconnectRemoteLocations::builder().build().await?;
7083///     // use `client` to make requests to the Compute Engine API.
7084///     Ok(())
7085/// }
7086/// ```
7087///
7088/// # Service Description
7089///
7090/// Service for the `interconnectRemoteLocations` resource.
7091///
7092/// The client library was generated with API version 2026-09-01.
7093///
7094/// # Configuration
7095///
7096/// To configure `InterconnectRemoteLocations` use the `with_*` methods in the type returned
7097/// by [builder()][InterconnectRemoteLocations::builder]. The default configuration should
7098/// work for most applications. Common configuration changes include
7099///
7100/// * [with_endpoint()]: by default this client uses the global default endpoint
7101///   (`https://compute.googleapis.com`). Applications using regional
7102///   endpoints or running in restricted networks (e.g. a network configured
7103///   with [Private Google Access with VPC Service Controls]) may want to
7104///   override this default.
7105/// * [with_credentials()]: by default this client uses
7106///   [Application Default Credentials]. Applications using custom
7107///   authentication may need to override this default.
7108///
7109/// [with_endpoint()]: super::builder::interconnect_remote_locations::ClientBuilder::with_endpoint
7110/// [with_credentials()]: super::builder::interconnect_remote_locations::ClientBuilder::with_credentials
7111/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
7112/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
7113///
7114/// # Pooling and Cloning
7115///
7116/// `InterconnectRemoteLocations` holds a connection pool internally, it is advised to
7117/// create one and reuse it. You do not need to wrap `InterconnectRemoteLocations` in
7118/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
7119/// already uses an `Arc` internally.
7120#[cfg(feature = "interconnect-remote-locations")]
7121#[cfg_attr(docsrs, doc(cfg(feature = "interconnect-remote-locations")))]
7122#[derive(Clone, Debug)]
7123pub struct InterconnectRemoteLocations {
7124    inner: std::sync::Arc<dyn super::stub::dynamic::InterconnectRemoteLocations>,
7125}
7126
7127#[cfg(feature = "interconnect-remote-locations")]
7128impl InterconnectRemoteLocations {
7129    /// Returns a builder for [InterconnectRemoteLocations].
7130    ///
7131    /// ```
7132    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
7133    /// # use google_cloud_compute_v1::client::InterconnectRemoteLocations;
7134    /// let client = InterconnectRemoteLocations::builder().build().await?;
7135    /// # Ok(()) }
7136    /// ```
7137    pub fn builder() -> super::builder::interconnect_remote_locations::ClientBuilder {
7138        crate::new_client_builder(super::builder::interconnect_remote_locations::client::Factory)
7139    }
7140
7141    /// Creates a new client from the provided stub.
7142    ///
7143    /// The most common case for calling this function is in tests mocking the
7144    /// client's behavior.
7145    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
7146    where
7147        T: super::stub::InterconnectRemoteLocations + 'static,
7148    {
7149        Self { inner: stub.into() }
7150    }
7151
7152    pub(crate) async fn new(
7153        config: gaxi::options::ClientConfig,
7154    ) -> crate::ClientBuilderResult<Self> {
7155        let inner = Self::build_inner(config).await?;
7156        Ok(Self { inner })
7157    }
7158
7159    async fn build_inner(
7160        conf: gaxi::options::ClientConfig,
7161    ) -> crate::ClientBuilderResult<
7162        std::sync::Arc<dyn super::stub::dynamic::InterconnectRemoteLocations>,
7163    > {
7164        if gaxi::options::tracing_enabled(&conf) {
7165            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
7166        }
7167        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
7168    }
7169
7170    async fn build_transport(
7171        conf: gaxi::options::ClientConfig,
7172    ) -> crate::ClientBuilderResult<impl super::stub::InterconnectRemoteLocations> {
7173        super::transport::InterconnectRemoteLocations::new(conf).await
7174    }
7175
7176    async fn build_with_tracing(
7177        conf: gaxi::options::ClientConfig,
7178    ) -> crate::ClientBuilderResult<impl super::stub::InterconnectRemoteLocations> {
7179        Self::build_transport(conf)
7180            .await
7181            .map(super::tracing::InterconnectRemoteLocations::new)
7182    }
7183
7184    /// Returns the details for the specified interconnect remote location. Gets a
7185    /// list of available interconnect remote locations by making alist() request.
7186    pub fn get(&self) -> super::builder::interconnect_remote_locations::Get {
7187        super::builder::interconnect_remote_locations::Get::new(self.inner.clone())
7188    }
7189
7190    /// Retrieves the list of interconnect remote locations available to the
7191    /// specified project.
7192    pub fn list(&self) -> super::builder::interconnect_remote_locations::List {
7193        super::builder::interconnect_remote_locations::List::new(self.inner.clone())
7194    }
7195}
7196
7197/// Implements a client for the Compute Engine API.
7198///
7199/// # Example
7200/// ```
7201/// # use google_cloud_compute_v1::client::Interconnects;
7202/// async fn sample(
7203/// ) -> anyhow::Result<()> {
7204///     let client = Interconnects::builder().build().await?;
7205///     // use `client` to make requests to the Compute Engine API.
7206///     Ok(())
7207/// }
7208/// ```
7209///
7210/// # Service Description
7211///
7212/// Service for the `interconnects` resource.
7213///
7214/// The client library was generated with API version 2026-09-01.
7215///
7216/// # Configuration
7217///
7218/// To configure `Interconnects` use the `with_*` methods in the type returned
7219/// by [builder()][Interconnects::builder]. The default configuration should
7220/// work for most applications. Common configuration changes include
7221///
7222/// * [with_endpoint()]: by default this client uses the global default endpoint
7223///   (`https://compute.googleapis.com`). Applications using regional
7224///   endpoints or running in restricted networks (e.g. a network configured
7225///   with [Private Google Access with VPC Service Controls]) may want to
7226///   override this default.
7227/// * [with_credentials()]: by default this client uses
7228///   [Application Default Credentials]. Applications using custom
7229///   authentication may need to override this default.
7230///
7231/// [with_endpoint()]: super::builder::interconnects::ClientBuilder::with_endpoint
7232/// [with_credentials()]: super::builder::interconnects::ClientBuilder::with_credentials
7233/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
7234/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
7235///
7236/// # Pooling and Cloning
7237///
7238/// `Interconnects` holds a connection pool internally, it is advised to
7239/// create one and reuse it. You do not need to wrap `Interconnects` in
7240/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
7241/// already uses an `Arc` internally.
7242#[cfg(feature = "interconnects")]
7243#[cfg_attr(docsrs, doc(cfg(feature = "interconnects")))]
7244#[derive(Clone, Debug)]
7245pub struct Interconnects {
7246    inner: std::sync::Arc<dyn super::stub::dynamic::Interconnects>,
7247}
7248
7249#[cfg(feature = "interconnects")]
7250impl Interconnects {
7251    /// Returns a builder for [Interconnects].
7252    ///
7253    /// ```
7254    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
7255    /// # use google_cloud_compute_v1::client::Interconnects;
7256    /// let client = Interconnects::builder().build().await?;
7257    /// # Ok(()) }
7258    /// ```
7259    pub fn builder() -> super::builder::interconnects::ClientBuilder {
7260        crate::new_client_builder(super::builder::interconnects::client::Factory)
7261    }
7262
7263    /// Creates a new client from the provided stub.
7264    ///
7265    /// The most common case for calling this function is in tests mocking the
7266    /// client's behavior.
7267    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
7268    where
7269        T: super::stub::Interconnects + 'static,
7270    {
7271        Self { inner: stub.into() }
7272    }
7273
7274    pub(crate) async fn new(
7275        config: gaxi::options::ClientConfig,
7276    ) -> crate::ClientBuilderResult<Self> {
7277        let inner = Self::build_inner(config).await?;
7278        Ok(Self { inner })
7279    }
7280
7281    async fn build_inner(
7282        conf: gaxi::options::ClientConfig,
7283    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::Interconnects>> {
7284        if gaxi::options::tracing_enabled(&conf) {
7285            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
7286        }
7287        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
7288    }
7289
7290    async fn build_transport(
7291        conf: gaxi::options::ClientConfig,
7292    ) -> crate::ClientBuilderResult<impl super::stub::Interconnects> {
7293        super::transport::Interconnects::new(conf).await
7294    }
7295
7296    async fn build_with_tracing(
7297        conf: gaxi::options::ClientConfig,
7298    ) -> crate::ClientBuilderResult<impl super::stub::Interconnects> {
7299        Self::build_transport(conf)
7300            .await
7301            .map(super::tracing::Interconnects::new)
7302    }
7303
7304    /// Deletes the specified Interconnect.
7305    pub fn delete(&self) -> super::builder::interconnects::Delete {
7306        super::builder::interconnects::Delete::new(self.inner.clone())
7307    }
7308
7309    /// Returns the specified Interconnect. Get a list of available Interconnects
7310    /// by making a list() request.
7311    pub fn get(&self) -> super::builder::interconnects::Get {
7312        super::builder::interconnects::Get::new(self.inner.clone())
7313    }
7314
7315    /// Returns the interconnectDiagnostics for the specified
7316    /// Interconnect.
7317    ///
7318    /// In the event of a
7319    /// global outage, do not use this API to make decisions about where to
7320    /// redirect your network traffic.
7321    ///
7322    /// Unlike a VLAN attachment, which is regional, a Cloud Interconnect
7323    /// connection is a global resource. A global outage can prevent this
7324    /// API from functioning properly.
7325    pub fn get_diagnostics(&self) -> super::builder::interconnects::GetDiagnostics {
7326        super::builder::interconnects::GetDiagnostics::new(self.inner.clone())
7327    }
7328
7329    /// Returns the interconnectMacsecConfig for the specified
7330    /// Interconnect.
7331    pub fn get_macsec_config(&self) -> super::builder::interconnects::GetMacsecConfig {
7332        super::builder::interconnects::GetMacsecConfig::new(self.inner.clone())
7333    }
7334
7335    /// Creates an Interconnect in the specified project using
7336    /// the data included in the request.
7337    pub fn insert(&self) -> super::builder::interconnects::Insert {
7338        super::builder::interconnects::Insert::new(self.inner.clone())
7339    }
7340
7341    /// Retrieves the list of Interconnects available to the specified project.
7342    pub fn list(&self) -> super::builder::interconnects::List {
7343        super::builder::interconnects::List::new(self.inner.clone())
7344    }
7345
7346    /// Updates the specified Interconnect with the data included in the request.
7347    /// This method supportsPATCH
7348    /// semantics and uses theJSON merge
7349    /// patch format and processing rules.
7350    pub fn patch(&self) -> super::builder::interconnects::Patch {
7351        super::builder::interconnects::Patch::new(self.inner.clone())
7352    }
7353
7354    /// Sets the labels on an Interconnect. To learn more about labels,
7355    /// read the Labeling
7356    /// Resources documentation.
7357    pub fn set_labels(&self) -> super::builder::interconnects::SetLabels {
7358        super::builder::interconnects::SetLabels::new(self.inner.clone())
7359    }
7360
7361    /// Sets name of an interconnect.
7362    pub fn set_name(&self) -> super::builder::interconnects::SetName {
7363        super::builder::interconnects::SetName::new(self.inner.clone())
7364    }
7365
7366    /// Retrieves the specified Operations resource.
7367    pub fn get_operation(&self) -> super::builder::interconnects::GetOperation {
7368        super::builder::interconnects::GetOperation::new(self.inner.clone())
7369    }
7370}
7371
7372/// Implements a client for the Compute Engine API.
7373///
7374/// # Example
7375/// ```
7376/// # use google_cloud_compute_v1::client::LicenseCodes;
7377/// async fn sample(
7378/// ) -> anyhow::Result<()> {
7379///     let client = LicenseCodes::builder().build().await?;
7380///     // use `client` to make requests to the Compute Engine API.
7381///     Ok(())
7382/// }
7383/// ```
7384///
7385/// # Service Description
7386///
7387/// Service for the `licenseCodes` resource.
7388///
7389/// The client library was generated with API version 2026-09-01.
7390///
7391/// # Configuration
7392///
7393/// To configure `LicenseCodes` use the `with_*` methods in the type returned
7394/// by [builder()][LicenseCodes::builder]. The default configuration should
7395/// work for most applications. Common configuration changes include
7396///
7397/// * [with_endpoint()]: by default this client uses the global default endpoint
7398///   (`https://compute.googleapis.com`). Applications using regional
7399///   endpoints or running in restricted networks (e.g. a network configured
7400///   with [Private Google Access with VPC Service Controls]) may want to
7401///   override this default.
7402/// * [with_credentials()]: by default this client uses
7403///   [Application Default Credentials]. Applications using custom
7404///   authentication may need to override this default.
7405///
7406/// [with_endpoint()]: super::builder::license_codes::ClientBuilder::with_endpoint
7407/// [with_credentials()]: super::builder::license_codes::ClientBuilder::with_credentials
7408/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
7409/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
7410///
7411/// # Pooling and Cloning
7412///
7413/// `LicenseCodes` holds a connection pool internally, it is advised to
7414/// create one and reuse it. You do not need to wrap `LicenseCodes` in
7415/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
7416/// already uses an `Arc` internally.
7417#[cfg(feature = "license-codes")]
7418#[cfg_attr(docsrs, doc(cfg(feature = "license-codes")))]
7419#[derive(Clone, Debug)]
7420pub struct LicenseCodes {
7421    inner: std::sync::Arc<dyn super::stub::dynamic::LicenseCodes>,
7422}
7423
7424#[cfg(feature = "license-codes")]
7425impl LicenseCodes {
7426    /// Returns a builder for [LicenseCodes].
7427    ///
7428    /// ```
7429    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
7430    /// # use google_cloud_compute_v1::client::LicenseCodes;
7431    /// let client = LicenseCodes::builder().build().await?;
7432    /// # Ok(()) }
7433    /// ```
7434    pub fn builder() -> super::builder::license_codes::ClientBuilder {
7435        crate::new_client_builder(super::builder::license_codes::client::Factory)
7436    }
7437
7438    /// Creates a new client from the provided stub.
7439    ///
7440    /// The most common case for calling this function is in tests mocking the
7441    /// client's behavior.
7442    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
7443    where
7444        T: super::stub::LicenseCodes + 'static,
7445    {
7446        Self { inner: stub.into() }
7447    }
7448
7449    pub(crate) async fn new(
7450        config: gaxi::options::ClientConfig,
7451    ) -> crate::ClientBuilderResult<Self> {
7452        let inner = Self::build_inner(config).await?;
7453        Ok(Self { inner })
7454    }
7455
7456    async fn build_inner(
7457        conf: gaxi::options::ClientConfig,
7458    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::LicenseCodes>> {
7459        if gaxi::options::tracing_enabled(&conf) {
7460            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
7461        }
7462        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
7463    }
7464
7465    async fn build_transport(
7466        conf: gaxi::options::ClientConfig,
7467    ) -> crate::ClientBuilderResult<impl super::stub::LicenseCodes> {
7468        super::transport::LicenseCodes::new(conf).await
7469    }
7470
7471    async fn build_with_tracing(
7472        conf: gaxi::options::ClientConfig,
7473    ) -> crate::ClientBuilderResult<impl super::stub::LicenseCodes> {
7474        Self::build_transport(conf)
7475            .await
7476            .map(super::tracing::LicenseCodes::new)
7477    }
7478
7479    /// Return a specified license code. License codes are mirrored across
7480    /// all projects that have permissions to read the License Code.
7481    /// *Caution* This resource is intended
7482    /// for use only by third-party partners who are creatingCloud Marketplace
7483    /// images.
7484    pub fn get(&self) -> super::builder::license_codes::Get {
7485        super::builder::license_codes::Get::new(self.inner.clone())
7486    }
7487
7488    /// Gets the access control policy for a resource. May be empty if no such
7489    /// policy or resource exists.
7490    /// *Caution* This resource is intended
7491    /// for use only by third-party partners who are creatingCloud Marketplace
7492    /// images.
7493    pub fn get_iam_policy(&self) -> super::builder::license_codes::GetIamPolicy {
7494        super::builder::license_codes::GetIamPolicy::new(self.inner.clone())
7495    }
7496
7497    /// Sets the access control policy on the specified resource.
7498    /// Replaces any existing policy.
7499    /// *Caution* This resource is intended
7500    /// for use only by third-party partners who are creatingCloud Marketplace
7501    /// images.
7502    pub fn set_iam_policy(&self) -> super::builder::license_codes::SetIamPolicy {
7503        super::builder::license_codes::SetIamPolicy::new(self.inner.clone())
7504    }
7505
7506    /// Returns permissions that a caller has on the specified resource.
7507    /// *Caution* This resource is intended
7508    /// for use only by third-party partners who are creatingCloud Marketplace
7509    /// images.
7510    pub fn test_iam_permissions(&self) -> super::builder::license_codes::TestIamPermissions {
7511        super::builder::license_codes::TestIamPermissions::new(self.inner.clone())
7512    }
7513}
7514
7515/// Implements a client for the Compute Engine API.
7516///
7517/// # Example
7518/// ```
7519/// # use google_cloud_compute_v1::client::Licenses;
7520/// async fn sample(
7521/// ) -> anyhow::Result<()> {
7522///     let client = Licenses::builder().build().await?;
7523///     // use `client` to make requests to the Compute Engine API.
7524///     Ok(())
7525/// }
7526/// ```
7527///
7528/// # Service Description
7529///
7530/// Service for the `licenses` resource.
7531///
7532/// The client library was generated with API version 2026-09-01.
7533///
7534/// # Configuration
7535///
7536/// To configure `Licenses` use the `with_*` methods in the type returned
7537/// by [builder()][Licenses::builder]. The default configuration should
7538/// work for most applications. Common configuration changes include
7539///
7540/// * [with_endpoint()]: by default this client uses the global default endpoint
7541///   (`https://compute.googleapis.com`). Applications using regional
7542///   endpoints or running in restricted networks (e.g. a network configured
7543///   with [Private Google Access with VPC Service Controls]) may want to
7544///   override this default.
7545/// * [with_credentials()]: by default this client uses
7546///   [Application Default Credentials]. Applications using custom
7547///   authentication may need to override this default.
7548///
7549/// [with_endpoint()]: super::builder::licenses::ClientBuilder::with_endpoint
7550/// [with_credentials()]: super::builder::licenses::ClientBuilder::with_credentials
7551/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
7552/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
7553///
7554/// # Pooling and Cloning
7555///
7556/// `Licenses` holds a connection pool internally, it is advised to
7557/// create one and reuse it. You do not need to wrap `Licenses` in
7558/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
7559/// already uses an `Arc` internally.
7560#[cfg(feature = "licenses")]
7561#[cfg_attr(docsrs, doc(cfg(feature = "licenses")))]
7562#[derive(Clone, Debug)]
7563pub struct Licenses {
7564    inner: std::sync::Arc<dyn super::stub::dynamic::Licenses>,
7565}
7566
7567#[cfg(feature = "licenses")]
7568impl Licenses {
7569    /// Returns a builder for [Licenses].
7570    ///
7571    /// ```
7572    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
7573    /// # use google_cloud_compute_v1::client::Licenses;
7574    /// let client = Licenses::builder().build().await?;
7575    /// # Ok(()) }
7576    /// ```
7577    pub fn builder() -> super::builder::licenses::ClientBuilder {
7578        crate::new_client_builder(super::builder::licenses::client::Factory)
7579    }
7580
7581    /// Creates a new client from the provided stub.
7582    ///
7583    /// The most common case for calling this function is in tests mocking the
7584    /// client's behavior.
7585    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
7586    where
7587        T: super::stub::Licenses + 'static,
7588    {
7589        Self { inner: stub.into() }
7590    }
7591
7592    pub(crate) async fn new(
7593        config: gaxi::options::ClientConfig,
7594    ) -> crate::ClientBuilderResult<Self> {
7595        let inner = Self::build_inner(config).await?;
7596        Ok(Self { inner })
7597    }
7598
7599    async fn build_inner(
7600        conf: gaxi::options::ClientConfig,
7601    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::Licenses>> {
7602        if gaxi::options::tracing_enabled(&conf) {
7603            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
7604        }
7605        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
7606    }
7607
7608    async fn build_transport(
7609        conf: gaxi::options::ClientConfig,
7610    ) -> crate::ClientBuilderResult<impl super::stub::Licenses> {
7611        super::transport::Licenses::new(conf).await
7612    }
7613
7614    async fn build_with_tracing(
7615        conf: gaxi::options::ClientConfig,
7616    ) -> crate::ClientBuilderResult<impl super::stub::Licenses> {
7617        Self::build_transport(conf)
7618            .await
7619            .map(super::tracing::Licenses::new)
7620    }
7621
7622    /// Deletes the specified license.
7623    /// *Caution* This resource is intended
7624    /// for use only by third-party partners who are creatingCloud Marketplace
7625    /// images.
7626    pub fn delete(&self) -> super::builder::licenses::Delete {
7627        super::builder::licenses::Delete::new(self.inner.clone())
7628    }
7629
7630    /// Returns the specified License resource.
7631    /// *Caution* This resource is intended
7632    /// for use only by third-party partners who are creatingCloud Marketplace
7633    /// images.
7634    pub fn get(&self) -> super::builder::licenses::Get {
7635        super::builder::licenses::Get::new(self.inner.clone())
7636    }
7637
7638    /// Gets the access control policy for a resource. May be empty if no such
7639    /// policy or resource exists.
7640    /// *Caution* This resource is intended
7641    /// for use only by third-party partners who are creatingCloud Marketplace
7642    /// images.
7643    pub fn get_iam_policy(&self) -> super::builder::licenses::GetIamPolicy {
7644        super::builder::licenses::GetIamPolicy::new(self.inner.clone())
7645    }
7646
7647    /// Create a License resource in the specified project.
7648    /// *Caution* This resource is intended
7649    /// for use only by third-party partners who are creatingCloud Marketplace
7650    /// images.
7651    pub fn insert(&self) -> super::builder::licenses::Insert {
7652        super::builder::licenses::Insert::new(self.inner.clone())
7653    }
7654
7655    /// Retrieves the list of licenses
7656    /// available in the specified project. This method does not
7657    /// get any licenses that belong to other projects, including licenses attached
7658    /// to publicly-available images, like Debian 9. If you want to get a list of
7659    /// publicly-available licenses, use this method to make a request to the
7660    /// respective image project, such as debian-cloud orwindows-cloud.
7661    /// *Caution* This resource is intended
7662    /// for use only by third-party partners who are creatingCloud Marketplace
7663    /// images.
7664    pub fn list(&self) -> super::builder::licenses::List {
7665        super::builder::licenses::List::new(self.inner.clone())
7666    }
7667
7668    /// Sets the access control policy on the specified resource.
7669    /// Replaces any existing policy.
7670    /// *Caution* This resource is intended
7671    /// for use only by third-party partners who are creatingCloud Marketplace
7672    /// images.
7673    pub fn set_iam_policy(&self) -> super::builder::licenses::SetIamPolicy {
7674        super::builder::licenses::SetIamPolicy::new(self.inner.clone())
7675    }
7676
7677    /// Returns permissions that a caller has on the specified resource.
7678    /// *Caution* This resource is intended
7679    /// for use only by third-party partners who are creatingCloud Marketplace
7680    /// images.
7681    pub fn test_iam_permissions(&self) -> super::builder::licenses::TestIamPermissions {
7682        super::builder::licenses::TestIamPermissions::new(self.inner.clone())
7683    }
7684
7685    /// Updates a License resource in the specified project.
7686    /// *Caution* This resource is intended
7687    /// for use only by third-party partners who are creatingCloud Marketplace
7688    /// images.
7689    pub fn update(&self) -> super::builder::licenses::Update {
7690        super::builder::licenses::Update::new(self.inner.clone())
7691    }
7692
7693    /// Retrieves the specified Operations resource.
7694    pub fn get_operation(&self) -> super::builder::licenses::GetOperation {
7695        super::builder::licenses::GetOperation::new(self.inner.clone())
7696    }
7697}
7698
7699/// Implements a client for the Compute Engine API.
7700///
7701/// # Example
7702/// ```
7703/// # use google_cloud_compute_v1::client::MachineImages;
7704/// async fn sample(
7705/// ) -> anyhow::Result<()> {
7706///     let client = MachineImages::builder().build().await?;
7707///     // use `client` to make requests to the Compute Engine API.
7708///     Ok(())
7709/// }
7710/// ```
7711///
7712/// # Service Description
7713///
7714/// Service for the `machineImages` resource.
7715///
7716/// The client library was generated with API version 2026-09-01.
7717///
7718/// # Configuration
7719///
7720/// To configure `MachineImages` use the `with_*` methods in the type returned
7721/// by [builder()][MachineImages::builder]. The default configuration should
7722/// work for most applications. Common configuration changes include
7723///
7724/// * [with_endpoint()]: by default this client uses the global default endpoint
7725///   (`https://compute.googleapis.com`). Applications using regional
7726///   endpoints or running in restricted networks (e.g. a network configured
7727///   with [Private Google Access with VPC Service Controls]) may want to
7728///   override this default.
7729/// * [with_credentials()]: by default this client uses
7730///   [Application Default Credentials]. Applications using custom
7731///   authentication may need to override this default.
7732///
7733/// [with_endpoint()]: super::builder::machine_images::ClientBuilder::with_endpoint
7734/// [with_credentials()]: super::builder::machine_images::ClientBuilder::with_credentials
7735/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
7736/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
7737///
7738/// # Pooling and Cloning
7739///
7740/// `MachineImages` holds a connection pool internally, it is advised to
7741/// create one and reuse it. You do not need to wrap `MachineImages` in
7742/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
7743/// already uses an `Arc` internally.
7744#[cfg(feature = "machine-images")]
7745#[cfg_attr(docsrs, doc(cfg(feature = "machine-images")))]
7746#[derive(Clone, Debug)]
7747pub struct MachineImages {
7748    inner: std::sync::Arc<dyn super::stub::dynamic::MachineImages>,
7749}
7750
7751#[cfg(feature = "machine-images")]
7752impl MachineImages {
7753    /// Returns a builder for [MachineImages].
7754    ///
7755    /// ```
7756    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
7757    /// # use google_cloud_compute_v1::client::MachineImages;
7758    /// let client = MachineImages::builder().build().await?;
7759    /// # Ok(()) }
7760    /// ```
7761    pub fn builder() -> super::builder::machine_images::ClientBuilder {
7762        crate::new_client_builder(super::builder::machine_images::client::Factory)
7763    }
7764
7765    /// Creates a new client from the provided stub.
7766    ///
7767    /// The most common case for calling this function is in tests mocking the
7768    /// client's behavior.
7769    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
7770    where
7771        T: super::stub::MachineImages + 'static,
7772    {
7773        Self { inner: stub.into() }
7774    }
7775
7776    pub(crate) async fn new(
7777        config: gaxi::options::ClientConfig,
7778    ) -> crate::ClientBuilderResult<Self> {
7779        let inner = Self::build_inner(config).await?;
7780        Ok(Self { inner })
7781    }
7782
7783    async fn build_inner(
7784        conf: gaxi::options::ClientConfig,
7785    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::MachineImages>> {
7786        if gaxi::options::tracing_enabled(&conf) {
7787            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
7788        }
7789        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
7790    }
7791
7792    async fn build_transport(
7793        conf: gaxi::options::ClientConfig,
7794    ) -> crate::ClientBuilderResult<impl super::stub::MachineImages> {
7795        super::transport::MachineImages::new(conf).await
7796    }
7797
7798    async fn build_with_tracing(
7799        conf: gaxi::options::ClientConfig,
7800    ) -> crate::ClientBuilderResult<impl super::stub::MachineImages> {
7801        Self::build_transport(conf)
7802            .await
7803            .map(super::tracing::MachineImages::new)
7804    }
7805
7806    /// Deletes the specified machine image. Deleting a machine image is permanent
7807    /// and cannot be undone.
7808    pub fn delete(&self) -> super::builder::machine_images::Delete {
7809        super::builder::machine_images::Delete::new(self.inner.clone())
7810    }
7811
7812    /// Returns the specified machine image.
7813    pub fn get(&self) -> super::builder::machine_images::Get {
7814        super::builder::machine_images::Get::new(self.inner.clone())
7815    }
7816
7817    /// Gets the access control policy for a resource. May be empty if no such
7818    /// policy or resource exists.
7819    pub fn get_iam_policy(&self) -> super::builder::machine_images::GetIamPolicy {
7820        super::builder::machine_images::GetIamPolicy::new(self.inner.clone())
7821    }
7822
7823    /// Creates a machine image in the specified project using the
7824    /// data that is included in the request. If you are creating a new machine
7825    /// image to update an existing instance, your new machine image should use the
7826    /// same network or, if applicable, the same subnetwork as the original
7827    /// instance.
7828    pub fn insert(&self) -> super::builder::machine_images::Insert {
7829        super::builder::machine_images::Insert::new(self.inner.clone())
7830    }
7831
7832    /// Retrieves a list of machine images that are contained within
7833    /// the specified project.
7834    pub fn list(&self) -> super::builder::machine_images::List {
7835        super::builder::machine_images::List::new(self.inner.clone())
7836    }
7837
7838    /// Sets the access control policy on the specified resource.
7839    /// Replaces any existing policy.
7840    pub fn set_iam_policy(&self) -> super::builder::machine_images::SetIamPolicy {
7841        super::builder::machine_images::SetIamPolicy::new(self.inner.clone())
7842    }
7843
7844    /// Sets the labels on a machine image. To learn more about labels, read theLabeling
7845    /// Resources documentation.
7846    pub fn set_labels(&self) -> super::builder::machine_images::SetLabels {
7847        super::builder::machine_images::SetLabels::new(self.inner.clone())
7848    }
7849
7850    /// Returns permissions that a caller has on the specified resource.
7851    pub fn test_iam_permissions(&self) -> super::builder::machine_images::TestIamPermissions {
7852        super::builder::machine_images::TestIamPermissions::new(self.inner.clone())
7853    }
7854
7855    /// Retrieves the specified Operations resource.
7856    pub fn get_operation(&self) -> super::builder::machine_images::GetOperation {
7857        super::builder::machine_images::GetOperation::new(self.inner.clone())
7858    }
7859}
7860
7861/// Implements a client for the Compute Engine API.
7862///
7863/// # Example
7864/// ```
7865/// # use google_cloud_compute_v1::client::MachineTypes;
7866/// async fn sample(
7867/// ) -> anyhow::Result<()> {
7868///     let client = MachineTypes::builder().build().await?;
7869///     // use `client` to make requests to the Compute Engine API.
7870///     Ok(())
7871/// }
7872/// ```
7873///
7874/// # Service Description
7875///
7876/// Service for the `machineTypes` resource.
7877///
7878/// The client library was generated with API version 2026-09-01.
7879///
7880/// # Configuration
7881///
7882/// To configure `MachineTypes` use the `with_*` methods in the type returned
7883/// by [builder()][MachineTypes::builder]. The default configuration should
7884/// work for most applications. Common configuration changes include
7885///
7886/// * [with_endpoint()]: by default this client uses the global default endpoint
7887///   (`https://compute.googleapis.com`). Applications using regional
7888///   endpoints or running in restricted networks (e.g. a network configured
7889///   with [Private Google Access with VPC Service Controls]) may want to
7890///   override this default.
7891/// * [with_credentials()]: by default this client uses
7892///   [Application Default Credentials]. Applications using custom
7893///   authentication may need to override this default.
7894///
7895/// [with_endpoint()]: super::builder::machine_types::ClientBuilder::with_endpoint
7896/// [with_credentials()]: super::builder::machine_types::ClientBuilder::with_credentials
7897/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
7898/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
7899///
7900/// # Pooling and Cloning
7901///
7902/// `MachineTypes` holds a connection pool internally, it is advised to
7903/// create one and reuse it. You do not need to wrap `MachineTypes` in
7904/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
7905/// already uses an `Arc` internally.
7906#[cfg(feature = "machine-types")]
7907#[cfg_attr(docsrs, doc(cfg(feature = "machine-types")))]
7908#[derive(Clone, Debug)]
7909pub struct MachineTypes {
7910    inner: std::sync::Arc<dyn super::stub::dynamic::MachineTypes>,
7911}
7912
7913#[cfg(feature = "machine-types")]
7914impl MachineTypes {
7915    /// Returns a builder for [MachineTypes].
7916    ///
7917    /// ```
7918    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
7919    /// # use google_cloud_compute_v1::client::MachineTypes;
7920    /// let client = MachineTypes::builder().build().await?;
7921    /// # Ok(()) }
7922    /// ```
7923    pub fn builder() -> super::builder::machine_types::ClientBuilder {
7924        crate::new_client_builder(super::builder::machine_types::client::Factory)
7925    }
7926
7927    /// Creates a new client from the provided stub.
7928    ///
7929    /// The most common case for calling this function is in tests mocking the
7930    /// client's behavior.
7931    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
7932    where
7933        T: super::stub::MachineTypes + 'static,
7934    {
7935        Self { inner: stub.into() }
7936    }
7937
7938    pub(crate) async fn new(
7939        config: gaxi::options::ClientConfig,
7940    ) -> crate::ClientBuilderResult<Self> {
7941        let inner = Self::build_inner(config).await?;
7942        Ok(Self { inner })
7943    }
7944
7945    async fn build_inner(
7946        conf: gaxi::options::ClientConfig,
7947    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::MachineTypes>> {
7948        if gaxi::options::tracing_enabled(&conf) {
7949            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
7950        }
7951        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
7952    }
7953
7954    async fn build_transport(
7955        conf: gaxi::options::ClientConfig,
7956    ) -> crate::ClientBuilderResult<impl super::stub::MachineTypes> {
7957        super::transport::MachineTypes::new(conf).await
7958    }
7959
7960    async fn build_with_tracing(
7961        conf: gaxi::options::ClientConfig,
7962    ) -> crate::ClientBuilderResult<impl super::stub::MachineTypes> {
7963        Self::build_transport(conf)
7964            .await
7965            .map(super::tracing::MachineTypes::new)
7966    }
7967
7968    /// Retrieves an aggregated list of machine types.
7969    ///
7970    /// To prevent failure, Google recommends that you set the
7971    /// `returnPartialSuccess` parameter to `true`.
7972    pub fn aggregated_list(&self) -> super::builder::machine_types::AggregatedList {
7973        super::builder::machine_types::AggregatedList::new(self.inner.clone())
7974    }
7975
7976    /// Returns the specified machine type.
7977    pub fn get(&self) -> super::builder::machine_types::Get {
7978        super::builder::machine_types::Get::new(self.inner.clone())
7979    }
7980
7981    /// Retrieves a list of machine types available to the specified
7982    /// project.
7983    pub fn list(&self) -> super::builder::machine_types::List {
7984        super::builder::machine_types::List::new(self.inner.clone())
7985    }
7986}
7987
7988/// Implements a client for the Compute Engine API.
7989///
7990/// # Example
7991/// ```
7992/// # use google_cloud_compute_v1::client::ManagedRulesets;
7993/// async fn sample(
7994/// ) -> anyhow::Result<()> {
7995///     let client = ManagedRulesets::builder().build().await?;
7996///     // use `client` to make requests to the Compute Engine API.
7997///     Ok(())
7998/// }
7999/// ```
8000///
8001/// # Service Description
8002///
8003/// Service for the `managedRulesets` resource.
8004///
8005/// The client library was generated with API version 2026-09-01.
8006///
8007/// # Configuration
8008///
8009/// To configure `ManagedRulesets` use the `with_*` methods in the type returned
8010/// by [builder()][ManagedRulesets::builder]. The default configuration should
8011/// work for most applications. Common configuration changes include
8012///
8013/// * [with_endpoint()]: by default this client uses the global default endpoint
8014///   (`https://compute.googleapis.com`). Applications using regional
8015///   endpoints or running in restricted networks (e.g. a network configured
8016///   with [Private Google Access with VPC Service Controls]) may want to
8017///   override this default.
8018/// * [with_credentials()]: by default this client uses
8019///   [Application Default Credentials]. Applications using custom
8020///   authentication may need to override this default.
8021///
8022/// [with_endpoint()]: super::builder::managed_rulesets::ClientBuilder::with_endpoint
8023/// [with_credentials()]: super::builder::managed_rulesets::ClientBuilder::with_credentials
8024/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
8025/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
8026///
8027/// # Pooling and Cloning
8028///
8029/// `ManagedRulesets` holds a connection pool internally, it is advised to
8030/// create one and reuse it. You do not need to wrap `ManagedRulesets` in
8031/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
8032/// already uses an `Arc` internally.
8033#[cfg(feature = "managed-rulesets")]
8034#[cfg_attr(docsrs, doc(cfg(feature = "managed-rulesets")))]
8035#[derive(Clone, Debug)]
8036pub struct ManagedRulesets {
8037    inner: std::sync::Arc<dyn super::stub::dynamic::ManagedRulesets>,
8038}
8039
8040#[cfg(feature = "managed-rulesets")]
8041impl ManagedRulesets {
8042    /// Returns a builder for [ManagedRulesets].
8043    ///
8044    /// ```
8045    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
8046    /// # use google_cloud_compute_v1::client::ManagedRulesets;
8047    /// let client = ManagedRulesets::builder().build().await?;
8048    /// # Ok(()) }
8049    /// ```
8050    pub fn builder() -> super::builder::managed_rulesets::ClientBuilder {
8051        crate::new_client_builder(super::builder::managed_rulesets::client::Factory)
8052    }
8053
8054    /// Creates a new client from the provided stub.
8055    ///
8056    /// The most common case for calling this function is in tests mocking the
8057    /// client's behavior.
8058    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
8059    where
8060        T: super::stub::ManagedRulesets + 'static,
8061    {
8062        Self { inner: stub.into() }
8063    }
8064
8065    pub(crate) async fn new(
8066        config: gaxi::options::ClientConfig,
8067    ) -> crate::ClientBuilderResult<Self> {
8068        let inner = Self::build_inner(config).await?;
8069        Ok(Self { inner })
8070    }
8071
8072    async fn build_inner(
8073        conf: gaxi::options::ClientConfig,
8074    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::ManagedRulesets>> {
8075        if gaxi::options::tracing_enabled(&conf) {
8076            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
8077        }
8078        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
8079    }
8080
8081    async fn build_transport(
8082        conf: gaxi::options::ClientConfig,
8083    ) -> crate::ClientBuilderResult<impl super::stub::ManagedRulesets> {
8084        super::transport::ManagedRulesets::new(conf).await
8085    }
8086
8087    async fn build_with_tracing(
8088        conf: gaxi::options::ClientConfig,
8089    ) -> crate::ClientBuilderResult<impl super::stub::ManagedRulesets> {
8090        Self::build_transport(conf)
8091            .await
8092            .map(super::tracing::ManagedRulesets::new)
8093    }
8094
8095    /// Gets the details for the specified managed ruleset name.
8096    pub fn get(&self) -> super::builder::managed_rulesets::Get {
8097        super::builder::managed_rulesets::Get::new(self.inner.clone())
8098    }
8099
8100    /// Retrieves the list of all the managed rulesets available.
8101    pub fn list(&self) -> super::builder::managed_rulesets::List {
8102        super::builder::managed_rulesets::List::new(self.inner.clone())
8103    }
8104}
8105
8106/// Implements a client for the Compute Engine API.
8107///
8108/// # Example
8109/// ```
8110/// # use google_cloud_compute_v1::client::NetworkAttachments;
8111/// async fn sample(
8112/// ) -> anyhow::Result<()> {
8113///     let client = NetworkAttachments::builder().build().await?;
8114///     // use `client` to make requests to the Compute Engine API.
8115///     Ok(())
8116/// }
8117/// ```
8118///
8119/// # Service Description
8120///
8121/// Service for the `networkAttachments` resource.
8122///
8123/// The client library was generated with API version 2026-09-01.
8124///
8125/// # Configuration
8126///
8127/// To configure `NetworkAttachments` use the `with_*` methods in the type returned
8128/// by [builder()][NetworkAttachments::builder]. The default configuration should
8129/// work for most applications. Common configuration changes include
8130///
8131/// * [with_endpoint()]: by default this client uses the global default endpoint
8132///   (`https://compute.googleapis.com`). Applications using regional
8133///   endpoints or running in restricted networks (e.g. a network configured
8134///   with [Private Google Access with VPC Service Controls]) may want to
8135///   override this default.
8136/// * [with_credentials()]: by default this client uses
8137///   [Application Default Credentials]. Applications using custom
8138///   authentication may need to override this default.
8139///
8140/// [with_endpoint()]: super::builder::network_attachments::ClientBuilder::with_endpoint
8141/// [with_credentials()]: super::builder::network_attachments::ClientBuilder::with_credentials
8142/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
8143/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
8144///
8145/// # Pooling and Cloning
8146///
8147/// `NetworkAttachments` holds a connection pool internally, it is advised to
8148/// create one and reuse it. You do not need to wrap `NetworkAttachments` in
8149/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
8150/// already uses an `Arc` internally.
8151#[cfg(feature = "network-attachments")]
8152#[cfg_attr(docsrs, doc(cfg(feature = "network-attachments")))]
8153#[derive(Clone, Debug)]
8154pub struct NetworkAttachments {
8155    inner: std::sync::Arc<dyn super::stub::dynamic::NetworkAttachments>,
8156}
8157
8158#[cfg(feature = "network-attachments")]
8159impl NetworkAttachments {
8160    /// Returns a builder for [NetworkAttachments].
8161    ///
8162    /// ```
8163    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
8164    /// # use google_cloud_compute_v1::client::NetworkAttachments;
8165    /// let client = NetworkAttachments::builder().build().await?;
8166    /// # Ok(()) }
8167    /// ```
8168    pub fn builder() -> super::builder::network_attachments::ClientBuilder {
8169        crate::new_client_builder(super::builder::network_attachments::client::Factory)
8170    }
8171
8172    /// Creates a new client from the provided stub.
8173    ///
8174    /// The most common case for calling this function is in tests mocking the
8175    /// client's behavior.
8176    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
8177    where
8178        T: super::stub::NetworkAttachments + 'static,
8179    {
8180        Self { inner: stub.into() }
8181    }
8182
8183    pub(crate) async fn new(
8184        config: gaxi::options::ClientConfig,
8185    ) -> crate::ClientBuilderResult<Self> {
8186        let inner = Self::build_inner(config).await?;
8187        Ok(Self { inner })
8188    }
8189
8190    async fn build_inner(
8191        conf: gaxi::options::ClientConfig,
8192    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::NetworkAttachments>>
8193    {
8194        if gaxi::options::tracing_enabled(&conf) {
8195            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
8196        }
8197        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
8198    }
8199
8200    async fn build_transport(
8201        conf: gaxi::options::ClientConfig,
8202    ) -> crate::ClientBuilderResult<impl super::stub::NetworkAttachments> {
8203        super::transport::NetworkAttachments::new(conf).await
8204    }
8205
8206    async fn build_with_tracing(
8207        conf: gaxi::options::ClientConfig,
8208    ) -> crate::ClientBuilderResult<impl super::stub::NetworkAttachments> {
8209        Self::build_transport(conf)
8210            .await
8211            .map(super::tracing::NetworkAttachments::new)
8212    }
8213
8214    /// Retrieves the list of all NetworkAttachment resources,
8215    /// regional and global, available to the specified project.
8216    ///
8217    /// To prevent failure, Google recommends that you set the
8218    /// `returnPartialSuccess` parameter to `true`.
8219    pub fn aggregated_list(&self) -> super::builder::network_attachments::AggregatedList {
8220        super::builder::network_attachments::AggregatedList::new(self.inner.clone())
8221    }
8222
8223    /// Deletes the specified NetworkAttachment in the given scope
8224    pub fn delete(&self) -> super::builder::network_attachments::Delete {
8225        super::builder::network_attachments::Delete::new(self.inner.clone())
8226    }
8227
8228    /// Returns the specified NetworkAttachment resource in the given scope.
8229    pub fn get(&self) -> super::builder::network_attachments::Get {
8230        super::builder::network_attachments::Get::new(self.inner.clone())
8231    }
8232
8233    /// Gets the access control policy for a resource. May be empty if no such
8234    /// policy or resource exists.
8235    pub fn get_iam_policy(&self) -> super::builder::network_attachments::GetIamPolicy {
8236        super::builder::network_attachments::GetIamPolicy::new(self.inner.clone())
8237    }
8238
8239    /// Creates a NetworkAttachment in the specified project in the given scope
8240    /// using the parameters that are included in the request.
8241    pub fn insert(&self) -> super::builder::network_attachments::Insert {
8242        super::builder::network_attachments::Insert::new(self.inner.clone())
8243    }
8244
8245    /// Lists the NetworkAttachments for a project in the given scope.
8246    pub fn list(&self) -> super::builder::network_attachments::List {
8247        super::builder::network_attachments::List::new(self.inner.clone())
8248    }
8249
8250    /// Patches the specified NetworkAttachment resource with the data included in
8251    /// the request. This method supports PATCH
8252    /// semantics and usesJSON merge
8253    /// patch format and processing rules.
8254    pub fn patch(&self) -> super::builder::network_attachments::Patch {
8255        super::builder::network_attachments::Patch::new(self.inner.clone())
8256    }
8257
8258    /// Sets the access control policy on the specified resource.
8259    /// Replaces any existing policy.
8260    pub fn set_iam_policy(&self) -> super::builder::network_attachments::SetIamPolicy {
8261        super::builder::network_attachments::SetIamPolicy::new(self.inner.clone())
8262    }
8263
8264    /// Returns permissions that a caller has on the specified resource.
8265    pub fn test_iam_permissions(&self) -> super::builder::network_attachments::TestIamPermissions {
8266        super::builder::network_attachments::TestIamPermissions::new(self.inner.clone())
8267    }
8268
8269    /// Retrieves the specified region-specific Operations resource.
8270    pub fn get_operation(&self) -> super::builder::network_attachments::GetOperation {
8271        super::builder::network_attachments::GetOperation::new(self.inner.clone())
8272    }
8273}
8274
8275/// Implements a client for the Compute Engine API.
8276///
8277/// # Example
8278/// ```
8279/// # use google_cloud_compute_v1::client::NetworkEdgeSecurityServices;
8280/// async fn sample(
8281/// ) -> anyhow::Result<()> {
8282///     let client = NetworkEdgeSecurityServices::builder().build().await?;
8283///     // use `client` to make requests to the Compute Engine API.
8284///     Ok(())
8285/// }
8286/// ```
8287///
8288/// # Service Description
8289///
8290/// Service for the `networkEdgeSecurityServices` resource.
8291///
8292/// The client library was generated with API version 2026-09-01.
8293///
8294/// # Configuration
8295///
8296/// To configure `NetworkEdgeSecurityServices` use the `with_*` methods in the type returned
8297/// by [builder()][NetworkEdgeSecurityServices::builder]. The default configuration should
8298/// work for most applications. Common configuration changes include
8299///
8300/// * [with_endpoint()]: by default this client uses the global default endpoint
8301///   (`https://compute.googleapis.com`). Applications using regional
8302///   endpoints or running in restricted networks (e.g. a network configured
8303///   with [Private Google Access with VPC Service Controls]) may want to
8304///   override this default.
8305/// * [with_credentials()]: by default this client uses
8306///   [Application Default Credentials]. Applications using custom
8307///   authentication may need to override this default.
8308///
8309/// [with_endpoint()]: super::builder::network_edge_security_services::ClientBuilder::with_endpoint
8310/// [with_credentials()]: super::builder::network_edge_security_services::ClientBuilder::with_credentials
8311/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
8312/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
8313///
8314/// # Pooling and Cloning
8315///
8316/// `NetworkEdgeSecurityServices` holds a connection pool internally, it is advised to
8317/// create one and reuse it. You do not need to wrap `NetworkEdgeSecurityServices` in
8318/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
8319/// already uses an `Arc` internally.
8320#[cfg(feature = "network-edge-security-services")]
8321#[cfg_attr(docsrs, doc(cfg(feature = "network-edge-security-services")))]
8322#[derive(Clone, Debug)]
8323pub struct NetworkEdgeSecurityServices {
8324    inner: std::sync::Arc<dyn super::stub::dynamic::NetworkEdgeSecurityServices>,
8325}
8326
8327#[cfg(feature = "network-edge-security-services")]
8328impl NetworkEdgeSecurityServices {
8329    /// Returns a builder for [NetworkEdgeSecurityServices].
8330    ///
8331    /// ```
8332    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
8333    /// # use google_cloud_compute_v1::client::NetworkEdgeSecurityServices;
8334    /// let client = NetworkEdgeSecurityServices::builder().build().await?;
8335    /// # Ok(()) }
8336    /// ```
8337    pub fn builder() -> super::builder::network_edge_security_services::ClientBuilder {
8338        crate::new_client_builder(super::builder::network_edge_security_services::client::Factory)
8339    }
8340
8341    /// Creates a new client from the provided stub.
8342    ///
8343    /// The most common case for calling this function is in tests mocking the
8344    /// client's behavior.
8345    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
8346    where
8347        T: super::stub::NetworkEdgeSecurityServices + 'static,
8348    {
8349        Self { inner: stub.into() }
8350    }
8351
8352    pub(crate) async fn new(
8353        config: gaxi::options::ClientConfig,
8354    ) -> crate::ClientBuilderResult<Self> {
8355        let inner = Self::build_inner(config).await?;
8356        Ok(Self { inner })
8357    }
8358
8359    async fn build_inner(
8360        conf: gaxi::options::ClientConfig,
8361    ) -> crate::ClientBuilderResult<
8362        std::sync::Arc<dyn super::stub::dynamic::NetworkEdgeSecurityServices>,
8363    > {
8364        if gaxi::options::tracing_enabled(&conf) {
8365            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
8366        }
8367        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
8368    }
8369
8370    async fn build_transport(
8371        conf: gaxi::options::ClientConfig,
8372    ) -> crate::ClientBuilderResult<impl super::stub::NetworkEdgeSecurityServices> {
8373        super::transport::NetworkEdgeSecurityServices::new(conf).await
8374    }
8375
8376    async fn build_with_tracing(
8377        conf: gaxi::options::ClientConfig,
8378    ) -> crate::ClientBuilderResult<impl super::stub::NetworkEdgeSecurityServices> {
8379        Self::build_transport(conf)
8380            .await
8381            .map(super::tracing::NetworkEdgeSecurityServices::new)
8382    }
8383
8384    /// Retrieves the list of all NetworkEdgeSecurityService resources available to
8385    /// the specified project.
8386    ///
8387    /// To prevent failure, Google recommends that you set the
8388    /// `returnPartialSuccess` parameter to `true`.
8389    pub fn aggregated_list(
8390        &self,
8391    ) -> super::builder::network_edge_security_services::AggregatedList {
8392        super::builder::network_edge_security_services::AggregatedList::new(self.inner.clone())
8393    }
8394
8395    /// Deletes the specified service.
8396    pub fn delete(&self) -> super::builder::network_edge_security_services::Delete {
8397        super::builder::network_edge_security_services::Delete::new(self.inner.clone())
8398    }
8399
8400    /// Gets a specified NetworkEdgeSecurityService.
8401    pub fn get(&self) -> super::builder::network_edge_security_services::Get {
8402        super::builder::network_edge_security_services::Get::new(self.inner.clone())
8403    }
8404
8405    /// Creates a new service in the specified project using the data included in
8406    /// the request.
8407    pub fn insert(&self) -> super::builder::network_edge_security_services::Insert {
8408        super::builder::network_edge_security_services::Insert::new(self.inner.clone())
8409    }
8410
8411    /// Patches the specified policy with the data included in the request.
8412    pub fn patch(&self) -> super::builder::network_edge_security_services::Patch {
8413        super::builder::network_edge_security_services::Patch::new(self.inner.clone())
8414    }
8415
8416    /// Retrieves the specified region-specific Operations resource.
8417    pub fn get_operation(&self) -> super::builder::network_edge_security_services::GetOperation {
8418        super::builder::network_edge_security_services::GetOperation::new(self.inner.clone())
8419    }
8420}
8421
8422/// Implements a client for the Compute Engine API.
8423///
8424/// # Example
8425/// ```
8426/// # use google_cloud_compute_v1::client::NetworkEndpointGroups;
8427/// async fn sample(
8428/// ) -> anyhow::Result<()> {
8429///     let client = NetworkEndpointGroups::builder().build().await?;
8430///     // use `client` to make requests to the Compute Engine API.
8431///     Ok(())
8432/// }
8433/// ```
8434///
8435/// # Service Description
8436///
8437/// Service for the `networkEndpointGroups` resource.
8438///
8439/// The client library was generated with API version 2026-09-01.
8440///
8441/// # Configuration
8442///
8443/// To configure `NetworkEndpointGroups` use the `with_*` methods in the type returned
8444/// by [builder()][NetworkEndpointGroups::builder]. The default configuration should
8445/// work for most applications. Common configuration changes include
8446///
8447/// * [with_endpoint()]: by default this client uses the global default endpoint
8448///   (`https://compute.googleapis.com`). Applications using regional
8449///   endpoints or running in restricted networks (e.g. a network configured
8450///   with [Private Google Access with VPC Service Controls]) may want to
8451///   override this default.
8452/// * [with_credentials()]: by default this client uses
8453///   [Application Default Credentials]. Applications using custom
8454///   authentication may need to override this default.
8455///
8456/// [with_endpoint()]: super::builder::network_endpoint_groups::ClientBuilder::with_endpoint
8457/// [with_credentials()]: super::builder::network_endpoint_groups::ClientBuilder::with_credentials
8458/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
8459/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
8460///
8461/// # Pooling and Cloning
8462///
8463/// `NetworkEndpointGroups` holds a connection pool internally, it is advised to
8464/// create one and reuse it. You do not need to wrap `NetworkEndpointGroups` in
8465/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
8466/// already uses an `Arc` internally.
8467#[cfg(feature = "network-endpoint-groups")]
8468#[cfg_attr(docsrs, doc(cfg(feature = "network-endpoint-groups")))]
8469#[derive(Clone, Debug)]
8470pub struct NetworkEndpointGroups {
8471    inner: std::sync::Arc<dyn super::stub::dynamic::NetworkEndpointGroups>,
8472}
8473
8474#[cfg(feature = "network-endpoint-groups")]
8475impl NetworkEndpointGroups {
8476    /// Returns a builder for [NetworkEndpointGroups].
8477    ///
8478    /// ```
8479    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
8480    /// # use google_cloud_compute_v1::client::NetworkEndpointGroups;
8481    /// let client = NetworkEndpointGroups::builder().build().await?;
8482    /// # Ok(()) }
8483    /// ```
8484    pub fn builder() -> super::builder::network_endpoint_groups::ClientBuilder {
8485        crate::new_client_builder(super::builder::network_endpoint_groups::client::Factory)
8486    }
8487
8488    /// Creates a new client from the provided stub.
8489    ///
8490    /// The most common case for calling this function is in tests mocking the
8491    /// client's behavior.
8492    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
8493    where
8494        T: super::stub::NetworkEndpointGroups + 'static,
8495    {
8496        Self { inner: stub.into() }
8497    }
8498
8499    pub(crate) async fn new(
8500        config: gaxi::options::ClientConfig,
8501    ) -> crate::ClientBuilderResult<Self> {
8502        let inner = Self::build_inner(config).await?;
8503        Ok(Self { inner })
8504    }
8505
8506    async fn build_inner(
8507        conf: gaxi::options::ClientConfig,
8508    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::NetworkEndpointGroups>>
8509    {
8510        if gaxi::options::tracing_enabled(&conf) {
8511            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
8512        }
8513        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
8514    }
8515
8516    async fn build_transport(
8517        conf: gaxi::options::ClientConfig,
8518    ) -> crate::ClientBuilderResult<impl super::stub::NetworkEndpointGroups> {
8519        super::transport::NetworkEndpointGroups::new(conf).await
8520    }
8521
8522    async fn build_with_tracing(
8523        conf: gaxi::options::ClientConfig,
8524    ) -> crate::ClientBuilderResult<impl super::stub::NetworkEndpointGroups> {
8525        Self::build_transport(conf)
8526            .await
8527            .map(super::tracing::NetworkEndpointGroups::new)
8528    }
8529
8530    /// Retrieves the list of network endpoint groups and sorts them by zone.
8531    ///
8532    /// To prevent failure, Google recommends that you set the
8533    /// `returnPartialSuccess` parameter to `true`.
8534    pub fn aggregated_list(&self) -> super::builder::network_endpoint_groups::AggregatedList {
8535        super::builder::network_endpoint_groups::AggregatedList::new(self.inner.clone())
8536    }
8537
8538    /// Attach a list of network endpoints to the specified network endpoint group.
8539    pub fn attach_network_endpoints(
8540        &self,
8541    ) -> super::builder::network_endpoint_groups::AttachNetworkEndpoints {
8542        super::builder::network_endpoint_groups::AttachNetworkEndpoints::new(self.inner.clone())
8543    }
8544
8545    /// Deletes the specified network endpoint group. The network endpoints in the
8546    /// NEG and the VM instances they belong to are not terminated when the NEG is
8547    /// deleted. Note that the NEG cannot be deleted if there are backend services
8548    /// referencing it.
8549    pub fn delete(&self) -> super::builder::network_endpoint_groups::Delete {
8550        super::builder::network_endpoint_groups::Delete::new(self.inner.clone())
8551    }
8552
8553    /// Detach a list of network endpoints from the specified network endpoint
8554    /// group.
8555    pub fn detach_network_endpoints(
8556        &self,
8557    ) -> super::builder::network_endpoint_groups::DetachNetworkEndpoints {
8558        super::builder::network_endpoint_groups::DetachNetworkEndpoints::new(self.inner.clone())
8559    }
8560
8561    /// Returns the specified network endpoint group.
8562    pub fn get(&self) -> super::builder::network_endpoint_groups::Get {
8563        super::builder::network_endpoint_groups::Get::new(self.inner.clone())
8564    }
8565
8566    /// Creates a network endpoint group in the specified project using the
8567    /// parameters that are included in the request.
8568    ///
8569    /// Note: Use the following APIs to manage network endpoint groups:
8570    ///
8571    /// - To manage NEGs with zonal scope (such as zonal NEGs, hybrid connectivity
8572    ///   NEGs): zonal
8573    ///   API
8574    /// - To manage NEGs with regional scope (such as regional internet NEGs,
8575    ///   serverless NEGs, Private Service Connect NEGs): regional
8576    ///   API
8577    /// - To manage NEGs with global scope (such as global internet NEGs):global
8578    ///   API
8579    pub fn insert(&self) -> super::builder::network_endpoint_groups::Insert {
8580        super::builder::network_endpoint_groups::Insert::new(self.inner.clone())
8581    }
8582
8583    /// Retrieves the list of network endpoint groups that are located in the
8584    /// specified project and zone.
8585    pub fn list(&self) -> super::builder::network_endpoint_groups::List {
8586        super::builder::network_endpoint_groups::List::new(self.inner.clone())
8587    }
8588
8589    /// Lists the network endpoints in the specified network endpoint group.
8590    pub fn list_network_endpoints(
8591        &self,
8592    ) -> super::builder::network_endpoint_groups::ListNetworkEndpoints {
8593        super::builder::network_endpoint_groups::ListNetworkEndpoints::new(self.inner.clone())
8594    }
8595
8596    /// Returns permissions that a caller has on the specified resource.
8597    pub fn test_iam_permissions(
8598        &self,
8599    ) -> super::builder::network_endpoint_groups::TestIamPermissions {
8600        super::builder::network_endpoint_groups::TestIamPermissions::new(self.inner.clone())
8601    }
8602
8603    /// Retrieves the specified zone-specific Operations resource.
8604    pub fn get_operation(&self) -> super::builder::network_endpoint_groups::GetOperation {
8605        super::builder::network_endpoint_groups::GetOperation::new(self.inner.clone())
8606    }
8607}
8608
8609/// Implements a client for the Compute Engine API.
8610///
8611/// # Example
8612/// ```
8613/// # use google_cloud_compute_v1::client::NetworkFirewallPolicies;
8614/// async fn sample(
8615/// ) -> anyhow::Result<()> {
8616///     let client = NetworkFirewallPolicies::builder().build().await?;
8617///     // use `client` to make requests to the Compute Engine API.
8618///     Ok(())
8619/// }
8620/// ```
8621///
8622/// # Service Description
8623///
8624/// Service for the `networkFirewallPolicies` resource.
8625///
8626/// The client library was generated with API version 2026-09-01.
8627///
8628/// # Configuration
8629///
8630/// To configure `NetworkFirewallPolicies` use the `with_*` methods in the type returned
8631/// by [builder()][NetworkFirewallPolicies::builder]. The default configuration should
8632/// work for most applications. Common configuration changes include
8633///
8634/// * [with_endpoint()]: by default this client uses the global default endpoint
8635///   (`https://compute.googleapis.com`). Applications using regional
8636///   endpoints or running in restricted networks (e.g. a network configured
8637///   with [Private Google Access with VPC Service Controls]) may want to
8638///   override this default.
8639/// * [with_credentials()]: by default this client uses
8640///   [Application Default Credentials]. Applications using custom
8641///   authentication may need to override this default.
8642///
8643/// [with_endpoint()]: super::builder::network_firewall_policies::ClientBuilder::with_endpoint
8644/// [with_credentials()]: super::builder::network_firewall_policies::ClientBuilder::with_credentials
8645/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
8646/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
8647///
8648/// # Pooling and Cloning
8649///
8650/// `NetworkFirewallPolicies` holds a connection pool internally, it is advised to
8651/// create one and reuse it. You do not need to wrap `NetworkFirewallPolicies` in
8652/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
8653/// already uses an `Arc` internally.
8654#[cfg(feature = "network-firewall-policies")]
8655#[cfg_attr(docsrs, doc(cfg(feature = "network-firewall-policies")))]
8656#[derive(Clone, Debug)]
8657pub struct NetworkFirewallPolicies {
8658    inner: std::sync::Arc<dyn super::stub::dynamic::NetworkFirewallPolicies>,
8659}
8660
8661#[cfg(feature = "network-firewall-policies")]
8662impl NetworkFirewallPolicies {
8663    /// Returns a builder for [NetworkFirewallPolicies].
8664    ///
8665    /// ```
8666    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
8667    /// # use google_cloud_compute_v1::client::NetworkFirewallPolicies;
8668    /// let client = NetworkFirewallPolicies::builder().build().await?;
8669    /// # Ok(()) }
8670    /// ```
8671    pub fn builder() -> super::builder::network_firewall_policies::ClientBuilder {
8672        crate::new_client_builder(super::builder::network_firewall_policies::client::Factory)
8673    }
8674
8675    /// Creates a new client from the provided stub.
8676    ///
8677    /// The most common case for calling this function is in tests mocking the
8678    /// client's behavior.
8679    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
8680    where
8681        T: super::stub::NetworkFirewallPolicies + 'static,
8682    {
8683        Self { inner: stub.into() }
8684    }
8685
8686    pub(crate) async fn new(
8687        config: gaxi::options::ClientConfig,
8688    ) -> crate::ClientBuilderResult<Self> {
8689        let inner = Self::build_inner(config).await?;
8690        Ok(Self { inner })
8691    }
8692
8693    async fn build_inner(
8694        conf: gaxi::options::ClientConfig,
8695    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::NetworkFirewallPolicies>>
8696    {
8697        if gaxi::options::tracing_enabled(&conf) {
8698            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
8699        }
8700        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
8701    }
8702
8703    async fn build_transport(
8704        conf: gaxi::options::ClientConfig,
8705    ) -> crate::ClientBuilderResult<impl super::stub::NetworkFirewallPolicies> {
8706        super::transport::NetworkFirewallPolicies::new(conf).await
8707    }
8708
8709    async fn build_with_tracing(
8710        conf: gaxi::options::ClientConfig,
8711    ) -> crate::ClientBuilderResult<impl super::stub::NetworkFirewallPolicies> {
8712        Self::build_transport(conf)
8713            .await
8714            .map(super::tracing::NetworkFirewallPolicies::new)
8715    }
8716
8717    /// Inserts an association for the specified firewall policy.
8718    pub fn add_association(&self) -> super::builder::network_firewall_policies::AddAssociation {
8719        super::builder::network_firewall_policies::AddAssociation::new(self.inner.clone())
8720    }
8721
8722    /// Inserts a packet mirroring rule into a firewall policy.
8723    pub fn add_packet_mirroring_rule(
8724        &self,
8725    ) -> super::builder::network_firewall_policies::AddPacketMirroringRule {
8726        super::builder::network_firewall_policies::AddPacketMirroringRule::new(self.inner.clone())
8727    }
8728
8729    /// Inserts a rule into a firewall policy.
8730    pub fn add_rule(&self) -> super::builder::network_firewall_policies::AddRule {
8731        super::builder::network_firewall_policies::AddRule::new(self.inner.clone())
8732    }
8733
8734    /// Retrieves an aggregated list of network firewall policies, listing network
8735    /// firewall policies from all applicable scopes (global and regional) and
8736    /// grouping the results per scope.
8737    ///
8738    /// To prevent failure, it is recommended that you set the
8739    /// `returnPartialSuccess` parameter to `true`.
8740    pub fn aggregated_list(&self) -> super::builder::network_firewall_policies::AggregatedList {
8741        super::builder::network_firewall_policies::AggregatedList::new(self.inner.clone())
8742    }
8743
8744    /// Copies rules to the specified firewall policy.
8745    pub fn clone_rules(&self) -> super::builder::network_firewall_policies::CloneRules {
8746        super::builder::network_firewall_policies::CloneRules::new(self.inner.clone())
8747    }
8748
8749    /// Deletes the specified policy.
8750    pub fn delete(&self) -> super::builder::network_firewall_policies::Delete {
8751        super::builder::network_firewall_policies::Delete::new(self.inner.clone())
8752    }
8753
8754    /// Returns the specified network firewall policy.
8755    pub fn get(&self) -> super::builder::network_firewall_policies::Get {
8756        super::builder::network_firewall_policies::Get::new(self.inner.clone())
8757    }
8758
8759    /// Gets an association with the specified name.
8760    pub fn get_association(&self) -> super::builder::network_firewall_policies::GetAssociation {
8761        super::builder::network_firewall_policies::GetAssociation::new(self.inner.clone())
8762    }
8763
8764    /// Gets the access control policy for a resource. May be empty if no such
8765    /// policy or resource exists.
8766    pub fn get_iam_policy(&self) -> super::builder::network_firewall_policies::GetIamPolicy {
8767        super::builder::network_firewall_policies::GetIamPolicy::new(self.inner.clone())
8768    }
8769
8770    /// Gets a packet mirroring rule of the specified priority.
8771    pub fn get_packet_mirroring_rule(
8772        &self,
8773    ) -> super::builder::network_firewall_policies::GetPacketMirroringRule {
8774        super::builder::network_firewall_policies::GetPacketMirroringRule::new(self.inner.clone())
8775    }
8776
8777    /// Gets a rule of the specified priority.
8778    pub fn get_rule(&self) -> super::builder::network_firewall_policies::GetRule {
8779        super::builder::network_firewall_policies::GetRule::new(self.inner.clone())
8780    }
8781
8782    /// Creates a new policy in the specified project using the data included in
8783    /// the request.
8784    pub fn insert(&self) -> super::builder::network_firewall_policies::Insert {
8785        super::builder::network_firewall_policies::Insert::new(self.inner.clone())
8786    }
8787
8788    /// Lists all the policies that have been configured for the specified project.
8789    pub fn list(&self) -> super::builder::network_firewall_policies::List {
8790        super::builder::network_firewall_policies::List::new(self.inner.clone())
8791    }
8792
8793    /// Patches the specified policy with the data included in the request.
8794    pub fn patch(&self) -> super::builder::network_firewall_policies::Patch {
8795        super::builder::network_firewall_policies::Patch::new(self.inner.clone())
8796    }
8797
8798    /// Patches a packet mirroring rule of the specified priority.
8799    pub fn patch_packet_mirroring_rule(
8800        &self,
8801    ) -> super::builder::network_firewall_policies::PatchPacketMirroringRule {
8802        super::builder::network_firewall_policies::PatchPacketMirroringRule::new(self.inner.clone())
8803    }
8804
8805    /// Patches a rule of the specified priority.
8806    pub fn patch_rule(&self) -> super::builder::network_firewall_policies::PatchRule {
8807        super::builder::network_firewall_policies::PatchRule::new(self.inner.clone())
8808    }
8809
8810    /// Removes an association for the specified firewall policy.
8811    pub fn remove_association(
8812        &self,
8813    ) -> super::builder::network_firewall_policies::RemoveAssociation {
8814        super::builder::network_firewall_policies::RemoveAssociation::new(self.inner.clone())
8815    }
8816
8817    /// Deletes a packet mirroring rule of the specified priority.
8818    pub fn remove_packet_mirroring_rule(
8819        &self,
8820    ) -> super::builder::network_firewall_policies::RemovePacketMirroringRule {
8821        super::builder::network_firewall_policies::RemovePacketMirroringRule::new(
8822            self.inner.clone(),
8823        )
8824    }
8825
8826    /// Deletes a rule of the specified priority.
8827    pub fn remove_rule(&self) -> super::builder::network_firewall_policies::RemoveRule {
8828        super::builder::network_firewall_policies::RemoveRule::new(self.inner.clone())
8829    }
8830
8831    /// Sets the access control policy on the specified resource.
8832    /// Replaces any existing policy.
8833    pub fn set_iam_policy(&self) -> super::builder::network_firewall_policies::SetIamPolicy {
8834        super::builder::network_firewall_policies::SetIamPolicy::new(self.inner.clone())
8835    }
8836
8837    /// Returns permissions that a caller has on the specified resource.
8838    pub fn test_iam_permissions(
8839        &self,
8840    ) -> super::builder::network_firewall_policies::TestIamPermissions {
8841        super::builder::network_firewall_policies::TestIamPermissions::new(self.inner.clone())
8842    }
8843
8844    /// Retrieves the specified Operations resource.
8845    pub fn get_operation(&self) -> super::builder::network_firewall_policies::GetOperation {
8846        super::builder::network_firewall_policies::GetOperation::new(self.inner.clone())
8847    }
8848}
8849
8850/// Implements a client for the Compute Engine API.
8851///
8852/// # Example
8853/// ```
8854/// # use google_cloud_compute_v1::client::NetworkProfiles;
8855/// async fn sample(
8856/// ) -> anyhow::Result<()> {
8857///     let client = NetworkProfiles::builder().build().await?;
8858///     // use `client` to make requests to the Compute Engine API.
8859///     Ok(())
8860/// }
8861/// ```
8862///
8863/// # Service Description
8864///
8865/// Service for the `networkProfiles` resource.
8866///
8867/// The client library was generated with API version 2026-09-01.
8868///
8869/// # Configuration
8870///
8871/// To configure `NetworkProfiles` use the `with_*` methods in the type returned
8872/// by [builder()][NetworkProfiles::builder]. The default configuration should
8873/// work for most applications. Common configuration changes include
8874///
8875/// * [with_endpoint()]: by default this client uses the global default endpoint
8876///   (`https://compute.googleapis.com`). Applications using regional
8877///   endpoints or running in restricted networks (e.g. a network configured
8878///   with [Private Google Access with VPC Service Controls]) may want to
8879///   override this default.
8880/// * [with_credentials()]: by default this client uses
8881///   [Application Default Credentials]. Applications using custom
8882///   authentication may need to override this default.
8883///
8884/// [with_endpoint()]: super::builder::network_profiles::ClientBuilder::with_endpoint
8885/// [with_credentials()]: super::builder::network_profiles::ClientBuilder::with_credentials
8886/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
8887/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
8888///
8889/// # Pooling and Cloning
8890///
8891/// `NetworkProfiles` holds a connection pool internally, it is advised to
8892/// create one and reuse it. You do not need to wrap `NetworkProfiles` in
8893/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
8894/// already uses an `Arc` internally.
8895#[cfg(feature = "network-profiles")]
8896#[cfg_attr(docsrs, doc(cfg(feature = "network-profiles")))]
8897#[derive(Clone, Debug)]
8898pub struct NetworkProfiles {
8899    inner: std::sync::Arc<dyn super::stub::dynamic::NetworkProfiles>,
8900}
8901
8902#[cfg(feature = "network-profiles")]
8903impl NetworkProfiles {
8904    /// Returns a builder for [NetworkProfiles].
8905    ///
8906    /// ```
8907    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
8908    /// # use google_cloud_compute_v1::client::NetworkProfiles;
8909    /// let client = NetworkProfiles::builder().build().await?;
8910    /// # Ok(()) }
8911    /// ```
8912    pub fn builder() -> super::builder::network_profiles::ClientBuilder {
8913        crate::new_client_builder(super::builder::network_profiles::client::Factory)
8914    }
8915
8916    /// Creates a new client from the provided stub.
8917    ///
8918    /// The most common case for calling this function is in tests mocking the
8919    /// client's behavior.
8920    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
8921    where
8922        T: super::stub::NetworkProfiles + 'static,
8923    {
8924        Self { inner: stub.into() }
8925    }
8926
8927    pub(crate) async fn new(
8928        config: gaxi::options::ClientConfig,
8929    ) -> crate::ClientBuilderResult<Self> {
8930        let inner = Self::build_inner(config).await?;
8931        Ok(Self { inner })
8932    }
8933
8934    async fn build_inner(
8935        conf: gaxi::options::ClientConfig,
8936    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::NetworkProfiles>> {
8937        if gaxi::options::tracing_enabled(&conf) {
8938            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
8939        }
8940        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
8941    }
8942
8943    async fn build_transport(
8944        conf: gaxi::options::ClientConfig,
8945    ) -> crate::ClientBuilderResult<impl super::stub::NetworkProfiles> {
8946        super::transport::NetworkProfiles::new(conf).await
8947    }
8948
8949    async fn build_with_tracing(
8950        conf: gaxi::options::ClientConfig,
8951    ) -> crate::ClientBuilderResult<impl super::stub::NetworkProfiles> {
8952        Self::build_transport(conf)
8953            .await
8954            .map(super::tracing::NetworkProfiles::new)
8955    }
8956
8957    /// Returns the specified network profile.
8958    pub fn get(&self) -> super::builder::network_profiles::Get {
8959        super::builder::network_profiles::Get::new(self.inner.clone())
8960    }
8961
8962    /// Retrieves a list of network profiles available to the specified
8963    /// project.
8964    pub fn list(&self) -> super::builder::network_profiles::List {
8965        super::builder::network_profiles::List::new(self.inner.clone())
8966    }
8967}
8968
8969/// Implements a client for the Compute Engine API.
8970///
8971/// # Example
8972/// ```
8973/// # use google_cloud_compute_v1::client::Networks;
8974/// async fn sample(
8975/// ) -> anyhow::Result<()> {
8976///     let client = Networks::builder().build().await?;
8977///     // use `client` to make requests to the Compute Engine API.
8978///     Ok(())
8979/// }
8980/// ```
8981///
8982/// # Service Description
8983///
8984/// Service for the `networks` resource.
8985///
8986/// The client library was generated with API version 2026-09-01.
8987///
8988/// # Configuration
8989///
8990/// To configure `Networks` use the `with_*` methods in the type returned
8991/// by [builder()][Networks::builder]. The default configuration should
8992/// work for most applications. Common configuration changes include
8993///
8994/// * [with_endpoint()]: by default this client uses the global default endpoint
8995///   (`https://compute.googleapis.com`). Applications using regional
8996///   endpoints or running in restricted networks (e.g. a network configured
8997///   with [Private Google Access with VPC Service Controls]) may want to
8998///   override this default.
8999/// * [with_credentials()]: by default this client uses
9000///   [Application Default Credentials]. Applications using custom
9001///   authentication may need to override this default.
9002///
9003/// [with_endpoint()]: super::builder::networks::ClientBuilder::with_endpoint
9004/// [with_credentials()]: super::builder::networks::ClientBuilder::with_credentials
9005/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
9006/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
9007///
9008/// # Pooling and Cloning
9009///
9010/// `Networks` holds a connection pool internally, it is advised to
9011/// create one and reuse it. You do not need to wrap `Networks` in
9012/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
9013/// already uses an `Arc` internally.
9014#[cfg(feature = "networks")]
9015#[cfg_attr(docsrs, doc(cfg(feature = "networks")))]
9016#[derive(Clone, Debug)]
9017pub struct Networks {
9018    inner: std::sync::Arc<dyn super::stub::dynamic::Networks>,
9019}
9020
9021#[cfg(feature = "networks")]
9022impl Networks {
9023    /// Returns a builder for [Networks].
9024    ///
9025    /// ```
9026    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
9027    /// # use google_cloud_compute_v1::client::Networks;
9028    /// let client = Networks::builder().build().await?;
9029    /// # Ok(()) }
9030    /// ```
9031    pub fn builder() -> super::builder::networks::ClientBuilder {
9032        crate::new_client_builder(super::builder::networks::client::Factory)
9033    }
9034
9035    /// Creates a new client from the provided stub.
9036    ///
9037    /// The most common case for calling this function is in tests mocking the
9038    /// client's behavior.
9039    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
9040    where
9041        T: super::stub::Networks + 'static,
9042    {
9043        Self { inner: stub.into() }
9044    }
9045
9046    pub(crate) async fn new(
9047        config: gaxi::options::ClientConfig,
9048    ) -> crate::ClientBuilderResult<Self> {
9049        let inner = Self::build_inner(config).await?;
9050        Ok(Self { inner })
9051    }
9052
9053    async fn build_inner(
9054        conf: gaxi::options::ClientConfig,
9055    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::Networks>> {
9056        if gaxi::options::tracing_enabled(&conf) {
9057            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
9058        }
9059        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
9060    }
9061
9062    async fn build_transport(
9063        conf: gaxi::options::ClientConfig,
9064    ) -> crate::ClientBuilderResult<impl super::stub::Networks> {
9065        super::transport::Networks::new(conf).await
9066    }
9067
9068    async fn build_with_tracing(
9069        conf: gaxi::options::ClientConfig,
9070    ) -> crate::ClientBuilderResult<impl super::stub::Networks> {
9071        Self::build_transport(conf)
9072            .await
9073            .map(super::tracing::Networks::new)
9074    }
9075
9076    /// Adds a peering to the specified network.
9077    pub fn add_peering(&self) -> super::builder::networks::AddPeering {
9078        super::builder::networks::AddPeering::new(self.inner.clone())
9079    }
9080
9081    /// Cancel requests to remove a peering from the specified network. Applicable
9082    /// only for PeeringConnection with update_strategy=CONSENSUS.  Cancels a
9083    /// request to remove a peering from the specified network.
9084    pub fn cancel_request_remove_peering(
9085        &self,
9086    ) -> super::builder::networks::CancelRequestRemovePeering {
9087        super::builder::networks::CancelRequestRemovePeering::new(self.inner.clone())
9088    }
9089
9090    /// Deletes the specified network.
9091    pub fn delete(&self) -> super::builder::networks::Delete {
9092        super::builder::networks::Delete::new(self.inner.clone())
9093    }
9094
9095    /// Returns the specified network.
9096    pub fn get(&self) -> super::builder::networks::Get {
9097        super::builder::networks::Get::new(self.inner.clone())
9098    }
9099
9100    /// Returns the effective firewalls on a given network.
9101    pub fn get_effective_firewalls(&self) -> super::builder::networks::GetEffectiveFirewalls {
9102        super::builder::networks::GetEffectiveFirewalls::new(self.inner.clone())
9103    }
9104
9105    /// Creates a network in the specified project using the data included
9106    /// in the request.
9107    pub fn insert(&self) -> super::builder::networks::Insert {
9108        super::builder::networks::Insert::new(self.inner.clone())
9109    }
9110
9111    /// Retrieves the list of networks available to the specified project.
9112    pub fn list(&self) -> super::builder::networks::List {
9113        super::builder::networks::List::new(self.inner.clone())
9114    }
9115
9116    /// Lists the peering routes exchanged over peering connection.
9117    pub fn list_peering_routes(&self) -> super::builder::networks::ListPeeringRoutes {
9118        super::builder::networks::ListPeeringRoutes::new(self.inner.clone())
9119    }
9120
9121    /// Patches the specified network with the data included in the request.
9122    /// Only routingConfig can be modified.
9123    pub fn patch(&self) -> super::builder::networks::Patch {
9124        super::builder::networks::Patch::new(self.inner.clone())
9125    }
9126
9127    /// Removes a peering from the specified network.
9128    pub fn remove_peering(&self) -> super::builder::networks::RemovePeering {
9129        super::builder::networks::RemovePeering::new(self.inner.clone())
9130    }
9131
9132    /// Requests to remove a peering from the specified network. Applicable only
9133    /// for PeeringConnection with update_strategy=CONSENSUS.
9134    pub fn request_remove_peering(&self) -> super::builder::networks::RequestRemovePeering {
9135        super::builder::networks::RequestRemovePeering::new(self.inner.clone())
9136    }
9137
9138    /// Switches the network mode from auto subnet mode to custom subnet mode.
9139    pub fn switch_to_custom_mode(&self) -> super::builder::networks::SwitchToCustomMode {
9140        super::builder::networks::SwitchToCustomMode::new(self.inner.clone())
9141    }
9142
9143    /// Updates the specified network peering with the data included in the
9144    /// request. You can only modify the NetworkPeering.export_custom_routes field
9145    /// and the NetworkPeering.import_custom_routes field.
9146    pub fn update_peering(&self) -> super::builder::networks::UpdatePeering {
9147        super::builder::networks::UpdatePeering::new(self.inner.clone())
9148    }
9149
9150    /// Retrieves the specified Operations resource.
9151    pub fn get_operation(&self) -> super::builder::networks::GetOperation {
9152        super::builder::networks::GetOperation::new(self.inner.clone())
9153    }
9154}
9155
9156/// Implements a client for the Compute Engine API.
9157///
9158/// # Example
9159/// ```
9160/// # use google_cloud_compute_v1::client::NodeGroups;
9161/// async fn sample(
9162/// ) -> anyhow::Result<()> {
9163///     let client = NodeGroups::builder().build().await?;
9164///     // use `client` to make requests to the Compute Engine API.
9165///     Ok(())
9166/// }
9167/// ```
9168///
9169/// # Service Description
9170///
9171/// Service for the `nodeGroups` resource.
9172///
9173/// The client library was generated with API version 2026-09-01.
9174///
9175/// # Configuration
9176///
9177/// To configure `NodeGroups` use the `with_*` methods in the type returned
9178/// by [builder()][NodeGroups::builder]. The default configuration should
9179/// work for most applications. Common configuration changes include
9180///
9181/// * [with_endpoint()]: by default this client uses the global default endpoint
9182///   (`https://compute.googleapis.com`). Applications using regional
9183///   endpoints or running in restricted networks (e.g. a network configured
9184///   with [Private Google Access with VPC Service Controls]) may want to
9185///   override this default.
9186/// * [with_credentials()]: by default this client uses
9187///   [Application Default Credentials]. Applications using custom
9188///   authentication may need to override this default.
9189///
9190/// [with_endpoint()]: super::builder::node_groups::ClientBuilder::with_endpoint
9191/// [with_credentials()]: super::builder::node_groups::ClientBuilder::with_credentials
9192/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
9193/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
9194///
9195/// # Pooling and Cloning
9196///
9197/// `NodeGroups` holds a connection pool internally, it is advised to
9198/// create one and reuse it. You do not need to wrap `NodeGroups` in
9199/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
9200/// already uses an `Arc` internally.
9201#[cfg(feature = "node-groups")]
9202#[cfg_attr(docsrs, doc(cfg(feature = "node-groups")))]
9203#[derive(Clone, Debug)]
9204pub struct NodeGroups {
9205    inner: std::sync::Arc<dyn super::stub::dynamic::NodeGroups>,
9206}
9207
9208#[cfg(feature = "node-groups")]
9209impl NodeGroups {
9210    /// Returns a builder for [NodeGroups].
9211    ///
9212    /// ```
9213    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
9214    /// # use google_cloud_compute_v1::client::NodeGroups;
9215    /// let client = NodeGroups::builder().build().await?;
9216    /// # Ok(()) }
9217    /// ```
9218    pub fn builder() -> super::builder::node_groups::ClientBuilder {
9219        crate::new_client_builder(super::builder::node_groups::client::Factory)
9220    }
9221
9222    /// Creates a new client from the provided stub.
9223    ///
9224    /// The most common case for calling this function is in tests mocking the
9225    /// client's behavior.
9226    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
9227    where
9228        T: super::stub::NodeGroups + 'static,
9229    {
9230        Self { inner: stub.into() }
9231    }
9232
9233    pub(crate) async fn new(
9234        config: gaxi::options::ClientConfig,
9235    ) -> crate::ClientBuilderResult<Self> {
9236        let inner = Self::build_inner(config).await?;
9237        Ok(Self { inner })
9238    }
9239
9240    async fn build_inner(
9241        conf: gaxi::options::ClientConfig,
9242    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::NodeGroups>> {
9243        if gaxi::options::tracing_enabled(&conf) {
9244            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
9245        }
9246        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
9247    }
9248
9249    async fn build_transport(
9250        conf: gaxi::options::ClientConfig,
9251    ) -> crate::ClientBuilderResult<impl super::stub::NodeGroups> {
9252        super::transport::NodeGroups::new(conf).await
9253    }
9254
9255    async fn build_with_tracing(
9256        conf: gaxi::options::ClientConfig,
9257    ) -> crate::ClientBuilderResult<impl super::stub::NodeGroups> {
9258        Self::build_transport(conf)
9259            .await
9260            .map(super::tracing::NodeGroups::new)
9261    }
9262
9263    /// Adds specified number of nodes to the node group.
9264    pub fn add_nodes(&self) -> super::builder::node_groups::AddNodes {
9265        super::builder::node_groups::AddNodes::new(self.inner.clone())
9266    }
9267
9268    /// Retrieves an aggregated list of node groups.
9269    /// Note: use nodeGroups.listNodes for more details about each group.
9270    ///
9271    /// To prevent failure, Google recommends that you set the
9272    /// `returnPartialSuccess` parameter to `true`.
9273    pub fn aggregated_list(&self) -> super::builder::node_groups::AggregatedList {
9274        super::builder::node_groups::AggregatedList::new(self.inner.clone())
9275    }
9276
9277    /// Deletes the specified NodeGroup resource.
9278    pub fn delete(&self) -> super::builder::node_groups::Delete {
9279        super::builder::node_groups::Delete::new(self.inner.clone())
9280    }
9281
9282    /// Deletes specified nodes from the node group.
9283    pub fn delete_nodes(&self) -> super::builder::node_groups::DeleteNodes {
9284        super::builder::node_groups::DeleteNodes::new(self.inner.clone())
9285    }
9286
9287    /// Returns the specified NodeGroup. Get a list of available NodeGroups
9288    /// by making a list() request.
9289    /// Note: the "nodes" field should not be used. Use nodeGroups.listNodes
9290    /// instead.
9291    pub fn get(&self) -> super::builder::node_groups::Get {
9292        super::builder::node_groups::Get::new(self.inner.clone())
9293    }
9294
9295    /// Gets the access control policy for a resource. May be empty if no such
9296    /// policy or resource exists.
9297    pub fn get_iam_policy(&self) -> super::builder::node_groups::GetIamPolicy {
9298        super::builder::node_groups::GetIamPolicy::new(self.inner.clone())
9299    }
9300
9301    /// Creates a NodeGroup resource in the specified project using the data
9302    /// included in the request.
9303    pub fn insert(&self) -> super::builder::node_groups::Insert {
9304        super::builder::node_groups::Insert::new(self.inner.clone())
9305    }
9306
9307    /// Retrieves a list of node groups available to the specified project.
9308    /// Note: use nodeGroups.listNodes for more details about each group.
9309    pub fn list(&self) -> super::builder::node_groups::List {
9310        super::builder::node_groups::List::new(self.inner.clone())
9311    }
9312
9313    /// Lists nodes in the node group.
9314    pub fn list_nodes(&self) -> super::builder::node_groups::ListNodes {
9315        super::builder::node_groups::ListNodes::new(self.inner.clone())
9316    }
9317
9318    /// Updates the specified node group.
9319    pub fn patch(&self) -> super::builder::node_groups::Patch {
9320        super::builder::node_groups::Patch::new(self.inner.clone())
9321    }
9322
9323    /// Perform maintenance on a subset of nodes in the node group.
9324    pub fn perform_maintenance(&self) -> super::builder::node_groups::PerformMaintenance {
9325        super::builder::node_groups::PerformMaintenance::new(self.inner.clone())
9326    }
9327
9328    /// Sets the access control policy on the specified resource.
9329    /// Replaces any existing policy.
9330    pub fn set_iam_policy(&self) -> super::builder::node_groups::SetIamPolicy {
9331        super::builder::node_groups::SetIamPolicy::new(self.inner.clone())
9332    }
9333
9334    /// Updates the node template of the node group.
9335    pub fn set_node_template(&self) -> super::builder::node_groups::SetNodeTemplate {
9336        super::builder::node_groups::SetNodeTemplate::new(self.inner.clone())
9337    }
9338
9339    /// Simulates maintenance event on specified nodes from the node group.
9340    pub fn simulate_maintenance_event(
9341        &self,
9342    ) -> super::builder::node_groups::SimulateMaintenanceEvent {
9343        super::builder::node_groups::SimulateMaintenanceEvent::new(self.inner.clone())
9344    }
9345
9346    /// Returns permissions that a caller has on the specified resource.
9347    pub fn test_iam_permissions(&self) -> super::builder::node_groups::TestIamPermissions {
9348        super::builder::node_groups::TestIamPermissions::new(self.inner.clone())
9349    }
9350
9351    /// Retrieves the specified zone-specific Operations resource.
9352    pub fn get_operation(&self) -> super::builder::node_groups::GetOperation {
9353        super::builder::node_groups::GetOperation::new(self.inner.clone())
9354    }
9355}
9356
9357/// Implements a client for the Compute Engine API.
9358///
9359/// # Example
9360/// ```
9361/// # use google_cloud_compute_v1::client::NodeTemplates;
9362/// async fn sample(
9363/// ) -> anyhow::Result<()> {
9364///     let client = NodeTemplates::builder().build().await?;
9365///     // use `client` to make requests to the Compute Engine API.
9366///     Ok(())
9367/// }
9368/// ```
9369///
9370/// # Service Description
9371///
9372/// Service for the `nodeTemplates` resource.
9373///
9374/// The client library was generated with API version 2026-09-01.
9375///
9376/// # Configuration
9377///
9378/// To configure `NodeTemplates` use the `with_*` methods in the type returned
9379/// by [builder()][NodeTemplates::builder]. The default configuration should
9380/// work for most applications. Common configuration changes include
9381///
9382/// * [with_endpoint()]: by default this client uses the global default endpoint
9383///   (`https://compute.googleapis.com`). Applications using regional
9384///   endpoints or running in restricted networks (e.g. a network configured
9385///   with [Private Google Access with VPC Service Controls]) may want to
9386///   override this default.
9387/// * [with_credentials()]: by default this client uses
9388///   [Application Default Credentials]. Applications using custom
9389///   authentication may need to override this default.
9390///
9391/// [with_endpoint()]: super::builder::node_templates::ClientBuilder::with_endpoint
9392/// [with_credentials()]: super::builder::node_templates::ClientBuilder::with_credentials
9393/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
9394/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
9395///
9396/// # Pooling and Cloning
9397///
9398/// `NodeTemplates` holds a connection pool internally, it is advised to
9399/// create one and reuse it. You do not need to wrap `NodeTemplates` in
9400/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
9401/// already uses an `Arc` internally.
9402#[cfg(feature = "node-templates")]
9403#[cfg_attr(docsrs, doc(cfg(feature = "node-templates")))]
9404#[derive(Clone, Debug)]
9405pub struct NodeTemplates {
9406    inner: std::sync::Arc<dyn super::stub::dynamic::NodeTemplates>,
9407}
9408
9409#[cfg(feature = "node-templates")]
9410impl NodeTemplates {
9411    /// Returns a builder for [NodeTemplates].
9412    ///
9413    /// ```
9414    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
9415    /// # use google_cloud_compute_v1::client::NodeTemplates;
9416    /// let client = NodeTemplates::builder().build().await?;
9417    /// # Ok(()) }
9418    /// ```
9419    pub fn builder() -> super::builder::node_templates::ClientBuilder {
9420        crate::new_client_builder(super::builder::node_templates::client::Factory)
9421    }
9422
9423    /// Creates a new client from the provided stub.
9424    ///
9425    /// The most common case for calling this function is in tests mocking the
9426    /// client's behavior.
9427    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
9428    where
9429        T: super::stub::NodeTemplates + 'static,
9430    {
9431        Self { inner: stub.into() }
9432    }
9433
9434    pub(crate) async fn new(
9435        config: gaxi::options::ClientConfig,
9436    ) -> crate::ClientBuilderResult<Self> {
9437        let inner = Self::build_inner(config).await?;
9438        Ok(Self { inner })
9439    }
9440
9441    async fn build_inner(
9442        conf: gaxi::options::ClientConfig,
9443    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::NodeTemplates>> {
9444        if gaxi::options::tracing_enabled(&conf) {
9445            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
9446        }
9447        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
9448    }
9449
9450    async fn build_transport(
9451        conf: gaxi::options::ClientConfig,
9452    ) -> crate::ClientBuilderResult<impl super::stub::NodeTemplates> {
9453        super::transport::NodeTemplates::new(conf).await
9454    }
9455
9456    async fn build_with_tracing(
9457        conf: gaxi::options::ClientConfig,
9458    ) -> crate::ClientBuilderResult<impl super::stub::NodeTemplates> {
9459        Self::build_transport(conf)
9460            .await
9461            .map(super::tracing::NodeTemplates::new)
9462    }
9463
9464    /// Retrieves an aggregated list of node templates.
9465    ///
9466    /// To prevent failure, Google recommends that you set the
9467    /// `returnPartialSuccess` parameter to `true`.
9468    pub fn aggregated_list(&self) -> super::builder::node_templates::AggregatedList {
9469        super::builder::node_templates::AggregatedList::new(self.inner.clone())
9470    }
9471
9472    /// Deletes the specified NodeTemplate resource.
9473    pub fn delete(&self) -> super::builder::node_templates::Delete {
9474        super::builder::node_templates::Delete::new(self.inner.clone())
9475    }
9476
9477    /// Returns the specified node template.
9478    pub fn get(&self) -> super::builder::node_templates::Get {
9479        super::builder::node_templates::Get::new(self.inner.clone())
9480    }
9481
9482    /// Gets the access control policy for a resource. May be empty if no such
9483    /// policy or resource exists.
9484    pub fn get_iam_policy(&self) -> super::builder::node_templates::GetIamPolicy {
9485        super::builder::node_templates::GetIamPolicy::new(self.inner.clone())
9486    }
9487
9488    /// Creates a NodeTemplate resource in the specified project using the data
9489    /// included in the request.
9490    pub fn insert(&self) -> super::builder::node_templates::Insert {
9491        super::builder::node_templates::Insert::new(self.inner.clone())
9492    }
9493
9494    /// Retrieves a list of node templates available to the specified
9495    /// project.
9496    pub fn list(&self) -> super::builder::node_templates::List {
9497        super::builder::node_templates::List::new(self.inner.clone())
9498    }
9499
9500    /// Sets the access control policy on the specified resource.
9501    /// Replaces any existing policy.
9502    pub fn set_iam_policy(&self) -> super::builder::node_templates::SetIamPolicy {
9503        super::builder::node_templates::SetIamPolicy::new(self.inner.clone())
9504    }
9505
9506    /// Returns permissions that a caller has on the specified resource.
9507    pub fn test_iam_permissions(&self) -> super::builder::node_templates::TestIamPermissions {
9508        super::builder::node_templates::TestIamPermissions::new(self.inner.clone())
9509    }
9510
9511    /// Retrieves the specified region-specific Operations resource.
9512    pub fn get_operation(&self) -> super::builder::node_templates::GetOperation {
9513        super::builder::node_templates::GetOperation::new(self.inner.clone())
9514    }
9515}
9516
9517/// Implements a client for the Compute Engine API.
9518///
9519/// # Example
9520/// ```
9521/// # use google_cloud_compute_v1::client::NodeTypes;
9522/// async fn sample(
9523/// ) -> anyhow::Result<()> {
9524///     let client = NodeTypes::builder().build().await?;
9525///     // use `client` to make requests to the Compute Engine API.
9526///     Ok(())
9527/// }
9528/// ```
9529///
9530/// # Service Description
9531///
9532/// Service for the `nodeTypes` resource.
9533///
9534/// The client library was generated with API version 2026-09-01.
9535///
9536/// # Configuration
9537///
9538/// To configure `NodeTypes` use the `with_*` methods in the type returned
9539/// by [builder()][NodeTypes::builder]. The default configuration should
9540/// work for most applications. Common configuration changes include
9541///
9542/// * [with_endpoint()]: by default this client uses the global default endpoint
9543///   (`https://compute.googleapis.com`). Applications using regional
9544///   endpoints or running in restricted networks (e.g. a network configured
9545///   with [Private Google Access with VPC Service Controls]) may want to
9546///   override this default.
9547/// * [with_credentials()]: by default this client uses
9548///   [Application Default Credentials]. Applications using custom
9549///   authentication may need to override this default.
9550///
9551/// [with_endpoint()]: super::builder::node_types::ClientBuilder::with_endpoint
9552/// [with_credentials()]: super::builder::node_types::ClientBuilder::with_credentials
9553/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
9554/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
9555///
9556/// # Pooling and Cloning
9557///
9558/// `NodeTypes` holds a connection pool internally, it is advised to
9559/// create one and reuse it. You do not need to wrap `NodeTypes` in
9560/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
9561/// already uses an `Arc` internally.
9562#[cfg(feature = "node-types")]
9563#[cfg_attr(docsrs, doc(cfg(feature = "node-types")))]
9564#[derive(Clone, Debug)]
9565pub struct NodeTypes {
9566    inner: std::sync::Arc<dyn super::stub::dynamic::NodeTypes>,
9567}
9568
9569#[cfg(feature = "node-types")]
9570impl NodeTypes {
9571    /// Returns a builder for [NodeTypes].
9572    ///
9573    /// ```
9574    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
9575    /// # use google_cloud_compute_v1::client::NodeTypes;
9576    /// let client = NodeTypes::builder().build().await?;
9577    /// # Ok(()) }
9578    /// ```
9579    pub fn builder() -> super::builder::node_types::ClientBuilder {
9580        crate::new_client_builder(super::builder::node_types::client::Factory)
9581    }
9582
9583    /// Creates a new client from the provided stub.
9584    ///
9585    /// The most common case for calling this function is in tests mocking the
9586    /// client's behavior.
9587    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
9588    where
9589        T: super::stub::NodeTypes + 'static,
9590    {
9591        Self { inner: stub.into() }
9592    }
9593
9594    pub(crate) async fn new(
9595        config: gaxi::options::ClientConfig,
9596    ) -> crate::ClientBuilderResult<Self> {
9597        let inner = Self::build_inner(config).await?;
9598        Ok(Self { inner })
9599    }
9600
9601    async fn build_inner(
9602        conf: gaxi::options::ClientConfig,
9603    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::NodeTypes>> {
9604        if gaxi::options::tracing_enabled(&conf) {
9605            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
9606        }
9607        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
9608    }
9609
9610    async fn build_transport(
9611        conf: gaxi::options::ClientConfig,
9612    ) -> crate::ClientBuilderResult<impl super::stub::NodeTypes> {
9613        super::transport::NodeTypes::new(conf).await
9614    }
9615
9616    async fn build_with_tracing(
9617        conf: gaxi::options::ClientConfig,
9618    ) -> crate::ClientBuilderResult<impl super::stub::NodeTypes> {
9619        Self::build_transport(conf)
9620            .await
9621            .map(super::tracing::NodeTypes::new)
9622    }
9623
9624    /// Retrieves an aggregated list of node types.
9625    ///
9626    /// To prevent failure, Google recommends that you set the
9627    /// `returnPartialSuccess` parameter to `true`.
9628    pub fn aggregated_list(&self) -> super::builder::node_types::AggregatedList {
9629        super::builder::node_types::AggregatedList::new(self.inner.clone())
9630    }
9631
9632    /// Returns the specified node type.
9633    pub fn get(&self) -> super::builder::node_types::Get {
9634        super::builder::node_types::Get::new(self.inner.clone())
9635    }
9636
9637    /// Retrieves a list of node types available to the specified
9638    /// project.
9639    pub fn list(&self) -> super::builder::node_types::List {
9640        super::builder::node_types::List::new(self.inner.clone())
9641    }
9642}
9643
9644/// Implements a client for the Compute Engine API.
9645///
9646/// # Example
9647/// ```
9648/// # use google_cloud_compute_v1::client::OrganizationSecurityPolicies;
9649/// async fn sample(
9650/// ) -> anyhow::Result<()> {
9651///     let client = OrganizationSecurityPolicies::builder().build().await?;
9652///     // use `client` to make requests to the Compute Engine API.
9653///     Ok(())
9654/// }
9655/// ```
9656///
9657/// # Service Description
9658///
9659/// Service for the `organizationSecurityPolicies` resource.
9660///
9661/// The client library was generated with API version 2026-09-01.
9662///
9663/// # Configuration
9664///
9665/// To configure `OrganizationSecurityPolicies` use the `with_*` methods in the type returned
9666/// by [builder()][OrganizationSecurityPolicies::builder]. The default configuration should
9667/// work for most applications. Common configuration changes include
9668///
9669/// * [with_endpoint()]: by default this client uses the global default endpoint
9670///   (`https://compute.googleapis.com`). Applications using regional
9671///   endpoints or running in restricted networks (e.g. a network configured
9672///   with [Private Google Access with VPC Service Controls]) may want to
9673///   override this default.
9674/// * [with_credentials()]: by default this client uses
9675///   [Application Default Credentials]. Applications using custom
9676///   authentication may need to override this default.
9677///
9678/// [with_endpoint()]: super::builder::organization_security_policies::ClientBuilder::with_endpoint
9679/// [with_credentials()]: super::builder::organization_security_policies::ClientBuilder::with_credentials
9680/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
9681/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
9682///
9683/// # Pooling and Cloning
9684///
9685/// `OrganizationSecurityPolicies` holds a connection pool internally, it is advised to
9686/// create one and reuse it. You do not need to wrap `OrganizationSecurityPolicies` in
9687/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
9688/// already uses an `Arc` internally.
9689#[cfg(feature = "organization-security-policies")]
9690#[cfg_attr(docsrs, doc(cfg(feature = "organization-security-policies")))]
9691#[derive(Clone, Debug)]
9692pub struct OrganizationSecurityPolicies {
9693    inner: std::sync::Arc<dyn super::stub::dynamic::OrganizationSecurityPolicies>,
9694}
9695
9696#[cfg(feature = "organization-security-policies")]
9697impl OrganizationSecurityPolicies {
9698    /// Returns a builder for [OrganizationSecurityPolicies].
9699    ///
9700    /// ```
9701    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
9702    /// # use google_cloud_compute_v1::client::OrganizationSecurityPolicies;
9703    /// let client = OrganizationSecurityPolicies::builder().build().await?;
9704    /// # Ok(()) }
9705    /// ```
9706    pub fn builder() -> super::builder::organization_security_policies::ClientBuilder {
9707        crate::new_client_builder(super::builder::organization_security_policies::client::Factory)
9708    }
9709
9710    /// Creates a new client from the provided stub.
9711    ///
9712    /// The most common case for calling this function is in tests mocking the
9713    /// client's behavior.
9714    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
9715    where
9716        T: super::stub::OrganizationSecurityPolicies + 'static,
9717    {
9718        Self { inner: stub.into() }
9719    }
9720
9721    pub(crate) async fn new(
9722        config: gaxi::options::ClientConfig,
9723    ) -> crate::ClientBuilderResult<Self> {
9724        let inner = Self::build_inner(config).await?;
9725        Ok(Self { inner })
9726    }
9727
9728    async fn build_inner(
9729        conf: gaxi::options::ClientConfig,
9730    ) -> crate::ClientBuilderResult<
9731        std::sync::Arc<dyn super::stub::dynamic::OrganizationSecurityPolicies>,
9732    > {
9733        if gaxi::options::tracing_enabled(&conf) {
9734            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
9735        }
9736        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
9737    }
9738
9739    async fn build_transport(
9740        conf: gaxi::options::ClientConfig,
9741    ) -> crate::ClientBuilderResult<impl super::stub::OrganizationSecurityPolicies> {
9742        super::transport::OrganizationSecurityPolicies::new(conf).await
9743    }
9744
9745    async fn build_with_tracing(
9746        conf: gaxi::options::ClientConfig,
9747    ) -> crate::ClientBuilderResult<impl super::stub::OrganizationSecurityPolicies> {
9748        Self::build_transport(conf)
9749            .await
9750            .map(super::tracing::OrganizationSecurityPolicies::new)
9751    }
9752
9753    /// Inserts an association for the specified security policy.
9754    ///
9755    /// This has billing implications.  Projects in the hierarchy with effective
9756    /// hierarchical security policies will be automatically enrolled into Cloud
9757    /// Armor Enterprise if not already enrolled.
9758    ///
9759    /// Use this API to modify Cloud Armor policies. Previously, alpha and beta
9760    /// versions of this API were used to modify firewall policies. This usage is
9761    /// now disabled for most organizations. Use firewallPolicies.addAssociation
9762    /// instead.
9763    pub fn add_association(
9764        &self,
9765    ) -> super::builder::organization_security_policies::AddAssociation {
9766        super::builder::organization_security_policies::AddAssociation::new(self.inner.clone())
9767    }
9768
9769    /// Inserts a rule into a security policy.
9770    ///
9771    /// Use this API to modify Cloud Armor policies. Previously, alpha and beta
9772    /// versions of this API were used to modify firewall policies. This usage is
9773    /// now disabled for most organizations. Use firewallPolicies.addRule instead.
9774    pub fn add_rule(&self) -> super::builder::organization_security_policies::AddRule {
9775        super::builder::organization_security_policies::AddRule::new(self.inner.clone())
9776    }
9777
9778    /// Copies rules to the specified security policy.
9779    ///
9780    /// Use this API to modify Cloud Armor policies. Previously, alpha and beta
9781    /// versions of this API were used to modify firewall policies. This usage is
9782    /// now disabled for most organizations. Use firewallPolicies.cloneRules
9783    /// instead.
9784    pub fn copy_rules(&self) -> super::builder::organization_security_policies::CopyRules {
9785        super::builder::organization_security_policies::CopyRules::new(self.inner.clone())
9786    }
9787
9788    /// Deletes the specified policy.
9789    ///
9790    /// Use this API to remove Cloud Armor policies. Previously, alpha and beta
9791    /// versions of this API were used to remove firewall policies. This usage is
9792    /// now disabled for most organizations. Use firewallPolicies.delete instead.
9793    pub fn delete(&self) -> super::builder::organization_security_policies::Delete {
9794        super::builder::organization_security_policies::Delete::new(self.inner.clone())
9795    }
9796
9797    /// List all of the ordered rules present in a single specified policy.
9798    ///
9799    /// Use this API to read Cloud Armor policies. Previously, alpha and beta
9800    /// versions of this API were used to read firewall policies. This usage is now
9801    /// disabled for most organizations. Use firewallPolicies.get instead.
9802    pub fn get(&self) -> super::builder::organization_security_policies::Get {
9803        super::builder::organization_security_policies::Get::new(self.inner.clone())
9804    }
9805
9806    /// Gets an association with the specified name.
9807    ///
9808    /// Use this API to read Cloud Armor policies. Previously, alpha and beta
9809    /// versions of this API were used to read firewall policies. This usage is
9810    /// now disabled for most organizations. Use firewallPolicies.getAssociation
9811    /// instead.
9812    pub fn get_association(
9813        &self,
9814    ) -> super::builder::organization_security_policies::GetAssociation {
9815        super::builder::organization_security_policies::GetAssociation::new(self.inner.clone())
9816    }
9817
9818    /// Gets a rule at the specified priority.
9819    ///
9820    /// Use this API to read Cloud Armor policies. Previously, alpha and beta
9821    /// versions of this API were used to read firewall policies. This usage is now
9822    /// disabled for most organizations. Use firewallPolicies.getRule instead.
9823    pub fn get_rule(&self) -> super::builder::organization_security_policies::GetRule {
9824        super::builder::organization_security_policies::GetRule::new(self.inner.clone())
9825    }
9826
9827    /// Creates a new policy in the specified organization using the data included
9828    /// in the request.
9829    ///
9830    /// Use this API to add Cloud Armor policies. Previously, alpha and beta
9831    /// versions of this API were used to add firewall policies. This usage is now
9832    /// disabled for most organizations. Use firewallPolicies.insert instead.
9833    pub fn insert(&self) -> super::builder::organization_security_policies::Insert {
9834        super::builder::organization_security_policies::Insert::new(self.inner.clone())
9835    }
9836
9837    /// List all the policies that have been configured for the specified
9838    /// organization.
9839    ///
9840    /// Use this API to read Cloud Armor policies. Previously, alpha and beta
9841    /// versions of this API were used to read firewall policies. This usage is now
9842    /// disabled for most organizations. Use firewallPolicies.list instead.
9843    pub fn list(&self) -> super::builder::organization_security_policies::List {
9844        super::builder::organization_security_policies::List::new(self.inner.clone())
9845    }
9846
9847    /// Lists associations of a specified target, i.e., organization or folder.
9848    ///
9849    /// Use this API to read Cloud Armor policies. Previously, alpha and beta
9850    /// versions of this API were used to read firewall policies. This usage is
9851    /// now disabled for most organizations. Use firewallPolicies.listAssociations
9852    /// instead.
9853    pub fn list_associations(
9854        &self,
9855    ) -> super::builder::organization_security_policies::ListAssociations {
9856        super::builder::organization_security_policies::ListAssociations::new(self.inner.clone())
9857    }
9858
9859    /// Gets the current list of preconfigured Web Application Firewall (WAF)
9860    /// expressions.
9861    pub fn list_preconfigured_expression_sets(
9862        &self,
9863    ) -> super::builder::organization_security_policies::ListPreconfiguredExpressionSets {
9864        super::builder::organization_security_policies::ListPreconfiguredExpressionSets::new(
9865            self.inner.clone(),
9866        )
9867    }
9868
9869    /// Moves the specified security policy.
9870    ///
9871    /// Use this API to modify Cloud Armor policies. Previously, alpha and beta
9872    /// versions of this API were used to modify firewall policies. This usage is
9873    /// now disabled for most organizations. Use firewallPolicies.move instead.
9874    pub fn r#move(&self) -> super::builder::organization_security_policies::Move {
9875        super::builder::organization_security_policies::Move::new(self.inner.clone())
9876    }
9877
9878    /// Patches the specified policy with the data included in the request.
9879    ///
9880    /// Use this API to modify Cloud Armor policies. Previously, alpha and beta
9881    /// versions of this API were used to modify firewall policies. This usage is
9882    /// now disabled for most organizations. Use firewallPolicies.patch instead.
9883    pub fn patch(&self) -> super::builder::organization_security_policies::Patch {
9884        super::builder::organization_security_policies::Patch::new(self.inner.clone())
9885    }
9886
9887    /// Patches a rule at the specified priority.
9888    ///
9889    /// Use this API to modify Cloud Armor policies. Previously, alpha and beta
9890    /// versions of this API were used to modify firewall policies. This usage is
9891    /// now disabled for most organizations. Use firewallPolicies.patchRule
9892    /// instead.
9893    pub fn patch_rule(&self) -> super::builder::organization_security_policies::PatchRule {
9894        super::builder::organization_security_policies::PatchRule::new(self.inner.clone())
9895    }
9896
9897    /// Removes an association for the specified security policy.
9898    ///
9899    /// Use this API to modify Cloud Armor policies. Previously, alpha and beta
9900    /// versions of this API were used to modify firewall policies. This usage is
9901    /// now disabled for most organizations. Use firewallPolicies.removeAssociation
9902    /// instead.
9903    pub fn remove_association(
9904        &self,
9905    ) -> super::builder::organization_security_policies::RemoveAssociation {
9906        super::builder::organization_security_policies::RemoveAssociation::new(self.inner.clone())
9907    }
9908
9909    /// Deletes a rule at the specified priority.
9910    ///
9911    /// Use this API to modify Cloud Armor policies. Previously, alpha and beta
9912    /// versions of this API were used to modify firewall policies. This usage is
9913    /// now disabled for most organizations. Use firewallPolicies.removeRule
9914    /// instead.
9915    pub fn remove_rule(&self) -> super::builder::organization_security_policies::RemoveRule {
9916        super::builder::organization_security_policies::RemoveRule::new(self.inner.clone())
9917    }
9918
9919    /// Retrieves the specified Operations resource. Gets a list of operations
9920    /// by making a `list()` request.
9921    pub fn get_operation(&self) -> super::builder::organization_security_policies::GetOperation {
9922        super::builder::organization_security_policies::GetOperation::new(self.inner.clone())
9923    }
9924}
9925
9926/// Implements a client for the Compute Engine API.
9927///
9928/// # Example
9929/// ```
9930/// # use google_cloud_compute_v1::client::PacketMirrorings;
9931/// async fn sample(
9932/// ) -> anyhow::Result<()> {
9933///     let client = PacketMirrorings::builder().build().await?;
9934///     // use `client` to make requests to the Compute Engine API.
9935///     Ok(())
9936/// }
9937/// ```
9938///
9939/// # Service Description
9940///
9941/// Service for the `packetMirrorings` resource.
9942///
9943/// The client library was generated with API version 2026-09-01.
9944///
9945/// # Configuration
9946///
9947/// To configure `PacketMirrorings` use the `with_*` methods in the type returned
9948/// by [builder()][PacketMirrorings::builder]. The default configuration should
9949/// work for most applications. Common configuration changes include
9950///
9951/// * [with_endpoint()]: by default this client uses the global default endpoint
9952///   (`https://compute.googleapis.com`). Applications using regional
9953///   endpoints or running in restricted networks (e.g. a network configured
9954///   with [Private Google Access with VPC Service Controls]) may want to
9955///   override this default.
9956/// * [with_credentials()]: by default this client uses
9957///   [Application Default Credentials]. Applications using custom
9958///   authentication may need to override this default.
9959///
9960/// [with_endpoint()]: super::builder::packet_mirrorings::ClientBuilder::with_endpoint
9961/// [with_credentials()]: super::builder::packet_mirrorings::ClientBuilder::with_credentials
9962/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
9963/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
9964///
9965/// # Pooling and Cloning
9966///
9967/// `PacketMirrorings` holds a connection pool internally, it is advised to
9968/// create one and reuse it. You do not need to wrap `PacketMirrorings` in
9969/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
9970/// already uses an `Arc` internally.
9971#[cfg(feature = "packet-mirrorings")]
9972#[cfg_attr(docsrs, doc(cfg(feature = "packet-mirrorings")))]
9973#[derive(Clone, Debug)]
9974pub struct PacketMirrorings {
9975    inner: std::sync::Arc<dyn super::stub::dynamic::PacketMirrorings>,
9976}
9977
9978#[cfg(feature = "packet-mirrorings")]
9979impl PacketMirrorings {
9980    /// Returns a builder for [PacketMirrorings].
9981    ///
9982    /// ```
9983    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
9984    /// # use google_cloud_compute_v1::client::PacketMirrorings;
9985    /// let client = PacketMirrorings::builder().build().await?;
9986    /// # Ok(()) }
9987    /// ```
9988    pub fn builder() -> super::builder::packet_mirrorings::ClientBuilder {
9989        crate::new_client_builder(super::builder::packet_mirrorings::client::Factory)
9990    }
9991
9992    /// Creates a new client from the provided stub.
9993    ///
9994    /// The most common case for calling this function is in tests mocking the
9995    /// client's behavior.
9996    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
9997    where
9998        T: super::stub::PacketMirrorings + 'static,
9999    {
10000        Self { inner: stub.into() }
10001    }
10002
10003    pub(crate) async fn new(
10004        config: gaxi::options::ClientConfig,
10005    ) -> crate::ClientBuilderResult<Self> {
10006        let inner = Self::build_inner(config).await?;
10007        Ok(Self { inner })
10008    }
10009
10010    async fn build_inner(
10011        conf: gaxi::options::ClientConfig,
10012    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::PacketMirrorings>>
10013    {
10014        if gaxi::options::tracing_enabled(&conf) {
10015            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
10016        }
10017        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
10018    }
10019
10020    async fn build_transport(
10021        conf: gaxi::options::ClientConfig,
10022    ) -> crate::ClientBuilderResult<impl super::stub::PacketMirrorings> {
10023        super::transport::PacketMirrorings::new(conf).await
10024    }
10025
10026    async fn build_with_tracing(
10027        conf: gaxi::options::ClientConfig,
10028    ) -> crate::ClientBuilderResult<impl super::stub::PacketMirrorings> {
10029        Self::build_transport(conf)
10030            .await
10031            .map(super::tracing::PacketMirrorings::new)
10032    }
10033
10034    /// Retrieves an aggregated list of packetMirrorings.
10035    ///
10036    /// To prevent failure, Google recommends that you set the
10037    /// `returnPartialSuccess` parameter to `true`.
10038    pub fn aggregated_list(&self) -> super::builder::packet_mirrorings::AggregatedList {
10039        super::builder::packet_mirrorings::AggregatedList::new(self.inner.clone())
10040    }
10041
10042    /// Deletes the specified PacketMirroring resource.
10043    pub fn delete(&self) -> super::builder::packet_mirrorings::Delete {
10044        super::builder::packet_mirrorings::Delete::new(self.inner.clone())
10045    }
10046
10047    /// Returns the specified PacketMirroring resource.
10048    pub fn get(&self) -> super::builder::packet_mirrorings::Get {
10049        super::builder::packet_mirrorings::Get::new(self.inner.clone())
10050    }
10051
10052    /// Creates a PacketMirroring resource in the specified project and region
10053    /// using the data included in the request.
10054    pub fn insert(&self) -> super::builder::packet_mirrorings::Insert {
10055        super::builder::packet_mirrorings::Insert::new(self.inner.clone())
10056    }
10057
10058    /// Retrieves a list of PacketMirroring resources available to the specified
10059    /// project and region.
10060    pub fn list(&self) -> super::builder::packet_mirrorings::List {
10061        super::builder::packet_mirrorings::List::new(self.inner.clone())
10062    }
10063
10064    /// Patches the specified PacketMirroring resource with the data included in
10065    /// the request. This method supportsPATCH
10066    /// semantics and usesJSON merge
10067    /// patch format and processing rules.
10068    pub fn patch(&self) -> super::builder::packet_mirrorings::Patch {
10069        super::builder::packet_mirrorings::Patch::new(self.inner.clone())
10070    }
10071
10072    /// Returns permissions that a caller has on the specified resource.
10073    pub fn test_iam_permissions(&self) -> super::builder::packet_mirrorings::TestIamPermissions {
10074        super::builder::packet_mirrorings::TestIamPermissions::new(self.inner.clone())
10075    }
10076
10077    /// Retrieves the specified region-specific Operations resource.
10078    pub fn get_operation(&self) -> super::builder::packet_mirrorings::GetOperation {
10079        super::builder::packet_mirrorings::GetOperation::new(self.inner.clone())
10080    }
10081}
10082
10083/// Implements a client for the Compute Engine API.
10084///
10085/// # Example
10086/// ```
10087/// # use google_cloud_compute_v1::client::PreviewFeatures;
10088/// async fn sample(
10089/// ) -> anyhow::Result<()> {
10090///     let client = PreviewFeatures::builder().build().await?;
10091///     // use `client` to make requests to the Compute Engine API.
10092///     Ok(())
10093/// }
10094/// ```
10095///
10096/// # Service Description
10097///
10098/// Service for the `previewFeatures` resource.
10099///
10100/// The client library was generated with API version 2026-09-01.
10101///
10102/// # Configuration
10103///
10104/// To configure `PreviewFeatures` use the `with_*` methods in the type returned
10105/// by [builder()][PreviewFeatures::builder]. The default configuration should
10106/// work for most applications. Common configuration changes include
10107///
10108/// * [with_endpoint()]: by default this client uses the global default endpoint
10109///   (`https://compute.googleapis.com`). Applications using regional
10110///   endpoints or running in restricted networks (e.g. a network configured
10111///   with [Private Google Access with VPC Service Controls]) may want to
10112///   override this default.
10113/// * [with_credentials()]: by default this client uses
10114///   [Application Default Credentials]. Applications using custom
10115///   authentication may need to override this default.
10116///
10117/// [with_endpoint()]: super::builder::preview_features::ClientBuilder::with_endpoint
10118/// [with_credentials()]: super::builder::preview_features::ClientBuilder::with_credentials
10119/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
10120/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
10121///
10122/// # Pooling and Cloning
10123///
10124/// `PreviewFeatures` holds a connection pool internally, it is advised to
10125/// create one and reuse it. You do not need to wrap `PreviewFeatures` in
10126/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
10127/// already uses an `Arc` internally.
10128#[cfg(feature = "preview-features")]
10129#[cfg_attr(docsrs, doc(cfg(feature = "preview-features")))]
10130#[derive(Clone, Debug)]
10131pub struct PreviewFeatures {
10132    inner: std::sync::Arc<dyn super::stub::dynamic::PreviewFeatures>,
10133}
10134
10135#[cfg(feature = "preview-features")]
10136impl PreviewFeatures {
10137    /// Returns a builder for [PreviewFeatures].
10138    ///
10139    /// ```
10140    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
10141    /// # use google_cloud_compute_v1::client::PreviewFeatures;
10142    /// let client = PreviewFeatures::builder().build().await?;
10143    /// # Ok(()) }
10144    /// ```
10145    pub fn builder() -> super::builder::preview_features::ClientBuilder {
10146        crate::new_client_builder(super::builder::preview_features::client::Factory)
10147    }
10148
10149    /// Creates a new client from the provided stub.
10150    ///
10151    /// The most common case for calling this function is in tests mocking the
10152    /// client's behavior.
10153    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
10154    where
10155        T: super::stub::PreviewFeatures + 'static,
10156    {
10157        Self { inner: stub.into() }
10158    }
10159
10160    pub(crate) async fn new(
10161        config: gaxi::options::ClientConfig,
10162    ) -> crate::ClientBuilderResult<Self> {
10163        let inner = Self::build_inner(config).await?;
10164        Ok(Self { inner })
10165    }
10166
10167    async fn build_inner(
10168        conf: gaxi::options::ClientConfig,
10169    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::PreviewFeatures>> {
10170        if gaxi::options::tracing_enabled(&conf) {
10171            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
10172        }
10173        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
10174    }
10175
10176    async fn build_transport(
10177        conf: gaxi::options::ClientConfig,
10178    ) -> crate::ClientBuilderResult<impl super::stub::PreviewFeatures> {
10179        super::transport::PreviewFeatures::new(conf).await
10180    }
10181
10182    async fn build_with_tracing(
10183        conf: gaxi::options::ClientConfig,
10184    ) -> crate::ClientBuilderResult<impl super::stub::PreviewFeatures> {
10185        Self::build_transport(conf)
10186            .await
10187            .map(super::tracing::PreviewFeatures::new)
10188    }
10189
10190    /// Returns the details of the given PreviewFeature.
10191    pub fn get(&self) -> super::builder::preview_features::Get {
10192        super::builder::preview_features::Get::new(self.inner.clone())
10193    }
10194
10195    /// Returns the details of the given PreviewFeature.
10196    pub fn list(&self) -> super::builder::preview_features::List {
10197        super::builder::preview_features::List::new(self.inner.clone())
10198    }
10199
10200    /// Patches the given PreviewFeature. This method is used to enable or disable
10201    /// a PreviewFeature.
10202    pub fn update(&self) -> super::builder::preview_features::Update {
10203        super::builder::preview_features::Update::new(self.inner.clone())
10204    }
10205
10206    /// Retrieves the specified Operations resource.
10207    pub fn get_operation(&self) -> super::builder::preview_features::GetOperation {
10208        super::builder::preview_features::GetOperation::new(self.inner.clone())
10209    }
10210}
10211
10212/// Implements a client for the Compute Engine API.
10213///
10214/// # Example
10215/// ```
10216/// # use google_cloud_compute_v1::client::ProjectViews;
10217/// async fn sample(
10218/// ) -> anyhow::Result<()> {
10219///     let client = ProjectViews::builder().build().await?;
10220///     // use `client` to make requests to the Compute Engine API.
10221///     Ok(())
10222/// }
10223/// ```
10224///
10225/// # Service Description
10226///
10227/// Service for the `projectViews` resource.
10228///
10229/// The client library was generated with API version 2026-09-01.
10230///
10231/// # Configuration
10232///
10233/// To configure `ProjectViews` use the `with_*` methods in the type returned
10234/// by [builder()][ProjectViews::builder]. The default configuration should
10235/// work for most applications. Common configuration changes include
10236///
10237/// * [with_endpoint()]: by default this client uses the global default endpoint
10238///   (`https://compute.googleapis.com`). Applications using regional
10239///   endpoints or running in restricted networks (e.g. a network configured
10240///   with [Private Google Access with VPC Service Controls]) may want to
10241///   override this default.
10242/// * [with_credentials()]: by default this client uses
10243///   [Application Default Credentials]. Applications using custom
10244///   authentication may need to override this default.
10245///
10246/// [with_endpoint()]: super::builder::project_views::ClientBuilder::with_endpoint
10247/// [with_credentials()]: super::builder::project_views::ClientBuilder::with_credentials
10248/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
10249/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
10250///
10251/// # Pooling and Cloning
10252///
10253/// `ProjectViews` holds a connection pool internally, it is advised to
10254/// create one and reuse it. You do not need to wrap `ProjectViews` in
10255/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
10256/// already uses an `Arc` internally.
10257#[cfg(feature = "project-views")]
10258#[cfg_attr(docsrs, doc(cfg(feature = "project-views")))]
10259#[derive(Clone, Debug)]
10260pub struct ProjectViews {
10261    inner: std::sync::Arc<dyn super::stub::dynamic::ProjectViews>,
10262}
10263
10264#[cfg(feature = "project-views")]
10265impl ProjectViews {
10266    /// Returns a builder for [ProjectViews].
10267    ///
10268    /// ```
10269    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
10270    /// # use google_cloud_compute_v1::client::ProjectViews;
10271    /// let client = ProjectViews::builder().build().await?;
10272    /// # Ok(()) }
10273    /// ```
10274    pub fn builder() -> super::builder::project_views::ClientBuilder {
10275        crate::new_client_builder(super::builder::project_views::client::Factory)
10276    }
10277
10278    /// Creates a new client from the provided stub.
10279    ///
10280    /// The most common case for calling this function is in tests mocking the
10281    /// client's behavior.
10282    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
10283    where
10284        T: super::stub::ProjectViews + 'static,
10285    {
10286        Self { inner: stub.into() }
10287    }
10288
10289    pub(crate) async fn new(
10290        config: gaxi::options::ClientConfig,
10291    ) -> crate::ClientBuilderResult<Self> {
10292        let inner = Self::build_inner(config).await?;
10293        Ok(Self { inner })
10294    }
10295
10296    async fn build_inner(
10297        conf: gaxi::options::ClientConfig,
10298    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::ProjectViews>> {
10299        if gaxi::options::tracing_enabled(&conf) {
10300            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
10301        }
10302        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
10303    }
10304
10305    async fn build_transport(
10306        conf: gaxi::options::ClientConfig,
10307    ) -> crate::ClientBuilderResult<impl super::stub::ProjectViews> {
10308        super::transport::ProjectViews::new(conf).await
10309    }
10310
10311    async fn build_with_tracing(
10312        conf: gaxi::options::ClientConfig,
10313    ) -> crate::ClientBuilderResult<impl super::stub::ProjectViews> {
10314        Self::build_transport(conf)
10315            .await
10316            .map(super::tracing::ProjectViews::new)
10317    }
10318
10319    /// Returns the specified global ProjectViews resource, with a regional
10320    /// context.
10321    /// This regional API endpoint reads resource metadata from regional
10322    /// read-only replicas. Because changes are copied to these regional replicas
10323    /// asynchronously, for real-time resource reads or any write operations
10324    /// (creating, updating, or deleting resources), use the global
10325    /// [projects.get](https://cloud.google.com/compute/docs/reference/rest/v1/projects/get)
10326    /// endpoint.
10327    pub fn get(&self) -> super::builder::project_views::Get {
10328        super::builder::project_views::Get::new(self.inner.clone())
10329    }
10330}
10331
10332/// Implements a client for the Compute Engine API.
10333///
10334/// # Example
10335/// ```
10336/// # use google_cloud_compute_v1::client::Projects;
10337/// async fn sample(
10338/// ) -> anyhow::Result<()> {
10339///     let client = Projects::builder().build().await?;
10340///     // use `client` to make requests to the Compute Engine API.
10341///     Ok(())
10342/// }
10343/// ```
10344///
10345/// # Service Description
10346///
10347/// Service for the `projects` resource.
10348///
10349/// The client library was generated with API version 2026-09-01.
10350///
10351/// # Configuration
10352///
10353/// To configure `Projects` use the `with_*` methods in the type returned
10354/// by [builder()][Projects::builder]. The default configuration should
10355/// work for most applications. Common configuration changes include
10356///
10357/// * [with_endpoint()]: by default this client uses the global default endpoint
10358///   (`https://compute.googleapis.com`). Applications using regional
10359///   endpoints or running in restricted networks (e.g. a network configured
10360///   with [Private Google Access with VPC Service Controls]) may want to
10361///   override this default.
10362/// * [with_credentials()]: by default this client uses
10363///   [Application Default Credentials]. Applications using custom
10364///   authentication may need to override this default.
10365///
10366/// [with_endpoint()]: super::builder::projects::ClientBuilder::with_endpoint
10367/// [with_credentials()]: super::builder::projects::ClientBuilder::with_credentials
10368/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
10369/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
10370///
10371/// # Pooling and Cloning
10372///
10373/// `Projects` holds a connection pool internally, it is advised to
10374/// create one and reuse it. You do not need to wrap `Projects` in
10375/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
10376/// already uses an `Arc` internally.
10377#[cfg(feature = "projects")]
10378#[cfg_attr(docsrs, doc(cfg(feature = "projects")))]
10379#[derive(Clone, Debug)]
10380pub struct Projects {
10381    inner: std::sync::Arc<dyn super::stub::dynamic::Projects>,
10382}
10383
10384#[cfg(feature = "projects")]
10385impl Projects {
10386    /// Returns a builder for [Projects].
10387    ///
10388    /// ```
10389    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
10390    /// # use google_cloud_compute_v1::client::Projects;
10391    /// let client = Projects::builder().build().await?;
10392    /// # Ok(()) }
10393    /// ```
10394    pub fn builder() -> super::builder::projects::ClientBuilder {
10395        crate::new_client_builder(super::builder::projects::client::Factory)
10396    }
10397
10398    /// Creates a new client from the provided stub.
10399    ///
10400    /// The most common case for calling this function is in tests mocking the
10401    /// client's behavior.
10402    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
10403    where
10404        T: super::stub::Projects + 'static,
10405    {
10406        Self { inner: stub.into() }
10407    }
10408
10409    pub(crate) async fn new(
10410        config: gaxi::options::ClientConfig,
10411    ) -> crate::ClientBuilderResult<Self> {
10412        let inner = Self::build_inner(config).await?;
10413        Ok(Self { inner })
10414    }
10415
10416    async fn build_inner(
10417        conf: gaxi::options::ClientConfig,
10418    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::Projects>> {
10419        if gaxi::options::tracing_enabled(&conf) {
10420            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
10421        }
10422        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
10423    }
10424
10425    async fn build_transport(
10426        conf: gaxi::options::ClientConfig,
10427    ) -> crate::ClientBuilderResult<impl super::stub::Projects> {
10428        super::transport::Projects::new(conf).await
10429    }
10430
10431    async fn build_with_tracing(
10432        conf: gaxi::options::ClientConfig,
10433    ) -> crate::ClientBuilderResult<impl super::stub::Projects> {
10434        Self::build_transport(conf)
10435            .await
10436            .map(super::tracing::Projects::new)
10437    }
10438
10439    /// Disable this project as a shared VPC host project.
10440    pub fn disable_xpn_host(&self) -> super::builder::projects::DisableXpnHost {
10441        super::builder::projects::DisableXpnHost::new(self.inner.clone())
10442    }
10443
10444    /// Disable a service resource (also known as service project) associated with
10445    /// this host project.
10446    pub fn disable_xpn_resource(&self) -> super::builder::projects::DisableXpnResource {
10447        super::builder::projects::DisableXpnResource::new(self.inner.clone())
10448    }
10449
10450    /// Enable this project as a shared VPC host project.
10451    pub fn enable_xpn_host(&self) -> super::builder::projects::EnableXpnHost {
10452        super::builder::projects::EnableXpnHost::new(self.inner.clone())
10453    }
10454
10455    /// Enable service resource (a.k.a service project) for a host project, so that
10456    /// subnets in the host project can be used by instances in the service
10457    /// project.
10458    pub fn enable_xpn_resource(&self) -> super::builder::projects::EnableXpnResource {
10459        super::builder::projects::EnableXpnResource::new(self.inner.clone())
10460    }
10461
10462    /// Returns the specified Project resource.
10463    ///
10464    /// To decrease latency for this method, you can optionally omit any unneeded
10465    /// information from the response by using a field mask. This practice is
10466    /// especially recommended for unused quota information (the `quotas` field).
10467    /// To exclude one or more fields, set your request's `fields` query parameter
10468    /// to only include the fields you need. For example, to only include the `id`
10469    /// and `selfLink` fields, add the query parameter `?fields=id,selfLink` to
10470    /// your request.
10471    pub fn get(&self) -> super::builder::projects::Get {
10472        super::builder::projects::Get::new(self.inner.clone())
10473    }
10474
10475    /// Gets the shared VPC host project that this project links to. May be empty
10476    /// if no link exists.
10477    pub fn get_xpn_host(&self) -> super::builder::projects::GetXpnHost {
10478        super::builder::projects::GetXpnHost::new(self.inner.clone())
10479    }
10480
10481    /// Gets service resources (a.k.a service project) associated with this host
10482    /// project.
10483    pub fn get_xpn_resources(&self) -> super::builder::projects::GetXpnResources {
10484        super::builder::projects::GetXpnResources::new(self.inner.clone())
10485    }
10486
10487    /// Lists all shared VPC host projects visible to the user in an organization.
10488    pub fn list_xpn_hosts(&self) -> super::builder::projects::ListXpnHosts {
10489        super::builder::projects::ListXpnHosts::new(self.inner.clone())
10490    }
10491
10492    /// Moves a persistent disk from one zone to another.
10493    /// *Note*: The moveDisk API will be deprecated on September 29, 2026.
10494    ///
10495    /// Starting September 29, 2025, you can't use the moveDisk API on new
10496    /// projects. To move a disk to a different region or zone, follow the steps in
10497    /// [Change the location of a
10498    /// disk](https://cloud.google.com/compute/docs/disks/migrate-to-hyperdisk#migrate-to-hd).
10499    ///
10500    /// Projects that already use the moveDisk API can continue usage until
10501    /// September 29, 2026.
10502    ///
10503    /// Starting November 1, 2025, API responses will include a warning message in
10504    /// the response body about the upcoming deprecation. You can skip the message
10505    /// to continue using the service without interruption.
10506    #[deprecated]
10507    pub fn move_disk(&self) -> super::builder::projects::MoveDisk {
10508        super::builder::projects::MoveDisk::new(self.inner.clone())
10509    }
10510
10511    /// Moves an instance and its attached persistent disks from one zone to
10512    /// another.
10513    /// *Note*: Moving VMs or disks by using this method might
10514    /// cause unexpected behavior. For more information, see the [known
10515    /// issue](/compute/docs/troubleshooting/known-issues#moving_vms_or_disks_using_the_moveinstance_api_or_the_causes_unexpected_behavior).
10516    /// [Deprecated] This method is deprecated. See [moving instance across
10517    /// zones](/compute/docs/instances/moving-instance-across-zones) instead.
10518    #[deprecated]
10519    pub fn move_instance(&self) -> super::builder::projects::MoveInstance {
10520        super::builder::projects::MoveInstance::new(self.inner.clone())
10521    }
10522
10523    /// Sets the Cloud Armor tier of the project. To set ENTERPRISE or above the
10524    /// billing account of the project must be subscribed to Cloud Armor
10525    /// Enterprise. See Subscribing
10526    /// to Cloud Armor Enterprise for more information.
10527    pub fn set_cloud_armor_tier(&self) -> super::builder::projects::SetCloudArmorTier {
10528        super::builder::projects::SetCloudArmorTier::new(self.inner.clone())
10529    }
10530
10531    /// Sets metadata common to all instances within the specified project using
10532    /// the data included in the request.
10533    pub fn set_common_instance_metadata(
10534        &self,
10535    ) -> super::builder::projects::SetCommonInstanceMetadata {
10536        super::builder::projects::SetCommonInstanceMetadata::new(self.inner.clone())
10537    }
10538
10539    /// Sets the default network tier of the project. The default network tier is
10540    /// used when an address/forwardingRule/instance is created without specifying
10541    /// the network tier field.
10542    pub fn set_default_network_tier(&self) -> super::builder::projects::SetDefaultNetworkTier {
10543        super::builder::projects::SetDefaultNetworkTier::new(self.inner.clone())
10544    }
10545
10546    /// Enables the usage export feature and sets theusage export bucket
10547    /// where reports are stored. If you provide an empty request body using this
10548    /// method, the usage export feature will be disabled.
10549    pub fn set_usage_export_bucket(&self) -> super::builder::projects::SetUsageExportBucket {
10550        super::builder::projects::SetUsageExportBucket::new(self.inner.clone())
10551    }
10552
10553    /// Retrieves the specified Operations resource.
10554    pub fn get_operation(&self) -> super::builder::projects::GetOperation {
10555        super::builder::projects::GetOperation::new(self.inner.clone())
10556    }
10557}
10558
10559/// Implements a client for the Compute Engine API.
10560///
10561/// # Example
10562/// ```
10563/// # use google_cloud_compute_v1::client::PublicAdvertisedPrefixes;
10564/// async fn sample(
10565/// ) -> anyhow::Result<()> {
10566///     let client = PublicAdvertisedPrefixes::builder().build().await?;
10567///     // use `client` to make requests to the Compute Engine API.
10568///     Ok(())
10569/// }
10570/// ```
10571///
10572/// # Service Description
10573///
10574/// Service for the `publicAdvertisedPrefixes` resource.
10575///
10576/// The client library was generated with API version 2026-09-01.
10577///
10578/// # Configuration
10579///
10580/// To configure `PublicAdvertisedPrefixes` use the `with_*` methods in the type returned
10581/// by [builder()][PublicAdvertisedPrefixes::builder]. The default configuration should
10582/// work for most applications. Common configuration changes include
10583///
10584/// * [with_endpoint()]: by default this client uses the global default endpoint
10585///   (`https://compute.googleapis.com`). Applications using regional
10586///   endpoints or running in restricted networks (e.g. a network configured
10587///   with [Private Google Access with VPC Service Controls]) may want to
10588///   override this default.
10589/// * [with_credentials()]: by default this client uses
10590///   [Application Default Credentials]. Applications using custom
10591///   authentication may need to override this default.
10592///
10593/// [with_endpoint()]: super::builder::public_advertised_prefixes::ClientBuilder::with_endpoint
10594/// [with_credentials()]: super::builder::public_advertised_prefixes::ClientBuilder::with_credentials
10595/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
10596/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
10597///
10598/// # Pooling and Cloning
10599///
10600/// `PublicAdvertisedPrefixes` holds a connection pool internally, it is advised to
10601/// create one and reuse it. You do not need to wrap `PublicAdvertisedPrefixes` in
10602/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
10603/// already uses an `Arc` internally.
10604#[cfg(feature = "public-advertised-prefixes")]
10605#[cfg_attr(docsrs, doc(cfg(feature = "public-advertised-prefixes")))]
10606#[derive(Clone, Debug)]
10607pub struct PublicAdvertisedPrefixes {
10608    inner: std::sync::Arc<dyn super::stub::dynamic::PublicAdvertisedPrefixes>,
10609}
10610
10611#[cfg(feature = "public-advertised-prefixes")]
10612impl PublicAdvertisedPrefixes {
10613    /// Returns a builder for [PublicAdvertisedPrefixes].
10614    ///
10615    /// ```
10616    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
10617    /// # use google_cloud_compute_v1::client::PublicAdvertisedPrefixes;
10618    /// let client = PublicAdvertisedPrefixes::builder().build().await?;
10619    /// # Ok(()) }
10620    /// ```
10621    pub fn builder() -> super::builder::public_advertised_prefixes::ClientBuilder {
10622        crate::new_client_builder(super::builder::public_advertised_prefixes::client::Factory)
10623    }
10624
10625    /// Creates a new client from the provided stub.
10626    ///
10627    /// The most common case for calling this function is in tests mocking the
10628    /// client's behavior.
10629    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
10630    where
10631        T: super::stub::PublicAdvertisedPrefixes + 'static,
10632    {
10633        Self { inner: stub.into() }
10634    }
10635
10636    pub(crate) async fn new(
10637        config: gaxi::options::ClientConfig,
10638    ) -> crate::ClientBuilderResult<Self> {
10639        let inner = Self::build_inner(config).await?;
10640        Ok(Self { inner })
10641    }
10642
10643    async fn build_inner(
10644        conf: gaxi::options::ClientConfig,
10645    ) -> crate::ClientBuilderResult<
10646        std::sync::Arc<dyn super::stub::dynamic::PublicAdvertisedPrefixes>,
10647    > {
10648        if gaxi::options::tracing_enabled(&conf) {
10649            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
10650        }
10651        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
10652    }
10653
10654    async fn build_transport(
10655        conf: gaxi::options::ClientConfig,
10656    ) -> crate::ClientBuilderResult<impl super::stub::PublicAdvertisedPrefixes> {
10657        super::transport::PublicAdvertisedPrefixes::new(conf).await
10658    }
10659
10660    async fn build_with_tracing(
10661        conf: gaxi::options::ClientConfig,
10662    ) -> crate::ClientBuilderResult<impl super::stub::PublicAdvertisedPrefixes> {
10663        Self::build_transport(conf)
10664            .await
10665            .map(super::tracing::PublicAdvertisedPrefixes::new)
10666    }
10667
10668    /// Announces the specified PublicAdvertisedPrefix
10669    pub fn announce(&self) -> super::builder::public_advertised_prefixes::Announce {
10670        super::builder::public_advertised_prefixes::Announce::new(self.inner.clone())
10671    }
10672
10673    /// Deletes the specified PublicAdvertisedPrefix
10674    pub fn delete(&self) -> super::builder::public_advertised_prefixes::Delete {
10675        super::builder::public_advertised_prefixes::Delete::new(self.inner.clone())
10676    }
10677
10678    /// Returns the specified PublicAdvertisedPrefix resource.
10679    pub fn get(&self) -> super::builder::public_advertised_prefixes::Get {
10680        super::builder::public_advertised_prefixes::Get::new(self.inner.clone())
10681    }
10682
10683    /// Creates a PublicAdvertisedPrefix in the specified project
10684    /// using the parameters that are included in the request.
10685    pub fn insert(&self) -> super::builder::public_advertised_prefixes::Insert {
10686        super::builder::public_advertised_prefixes::Insert::new(self.inner.clone())
10687    }
10688
10689    /// Lists the PublicAdvertisedPrefixes for a project.
10690    pub fn list(&self) -> super::builder::public_advertised_prefixes::List {
10691        super::builder::public_advertised_prefixes::List::new(self.inner.clone())
10692    }
10693
10694    /// Patches the specified Router resource with the data included in the
10695    /// request. This method supportsPATCH
10696    /// semantics and usesJSON merge
10697    /// patch format and processing rules.
10698    pub fn patch(&self) -> super::builder::public_advertised_prefixes::Patch {
10699        super::builder::public_advertised_prefixes::Patch::new(self.inner.clone())
10700    }
10701
10702    /// Withdraws the specified PublicAdvertisedPrefix
10703    pub fn withdraw(&self) -> super::builder::public_advertised_prefixes::Withdraw {
10704        super::builder::public_advertised_prefixes::Withdraw::new(self.inner.clone())
10705    }
10706
10707    /// Retrieves the specified Operations resource.
10708    pub fn get_operation(&self) -> super::builder::public_advertised_prefixes::GetOperation {
10709        super::builder::public_advertised_prefixes::GetOperation::new(self.inner.clone())
10710    }
10711}
10712
10713/// Implements a client for the Compute Engine API.
10714///
10715/// # Example
10716/// ```
10717/// # use google_cloud_compute_v1::client::PublicDelegatedPrefixes;
10718/// async fn sample(
10719/// ) -> anyhow::Result<()> {
10720///     let client = PublicDelegatedPrefixes::builder().build().await?;
10721///     // use `client` to make requests to the Compute Engine API.
10722///     Ok(())
10723/// }
10724/// ```
10725///
10726/// # Service Description
10727///
10728/// Service for the `publicDelegatedPrefixes` resource.
10729///
10730/// The client library was generated with API version 2026-09-01.
10731///
10732/// # Configuration
10733///
10734/// To configure `PublicDelegatedPrefixes` use the `with_*` methods in the type returned
10735/// by [builder()][PublicDelegatedPrefixes::builder]. The default configuration should
10736/// work for most applications. Common configuration changes include
10737///
10738/// * [with_endpoint()]: by default this client uses the global default endpoint
10739///   (`https://compute.googleapis.com`). Applications using regional
10740///   endpoints or running in restricted networks (e.g. a network configured
10741///   with [Private Google Access with VPC Service Controls]) may want to
10742///   override this default.
10743/// * [with_credentials()]: by default this client uses
10744///   [Application Default Credentials]. Applications using custom
10745///   authentication may need to override this default.
10746///
10747/// [with_endpoint()]: super::builder::public_delegated_prefixes::ClientBuilder::with_endpoint
10748/// [with_credentials()]: super::builder::public_delegated_prefixes::ClientBuilder::with_credentials
10749/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
10750/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
10751///
10752/// # Pooling and Cloning
10753///
10754/// `PublicDelegatedPrefixes` holds a connection pool internally, it is advised to
10755/// create one and reuse it. You do not need to wrap `PublicDelegatedPrefixes` in
10756/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
10757/// already uses an `Arc` internally.
10758#[cfg(feature = "public-delegated-prefixes")]
10759#[cfg_attr(docsrs, doc(cfg(feature = "public-delegated-prefixes")))]
10760#[derive(Clone, Debug)]
10761pub struct PublicDelegatedPrefixes {
10762    inner: std::sync::Arc<dyn super::stub::dynamic::PublicDelegatedPrefixes>,
10763}
10764
10765#[cfg(feature = "public-delegated-prefixes")]
10766impl PublicDelegatedPrefixes {
10767    /// Returns a builder for [PublicDelegatedPrefixes].
10768    ///
10769    /// ```
10770    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
10771    /// # use google_cloud_compute_v1::client::PublicDelegatedPrefixes;
10772    /// let client = PublicDelegatedPrefixes::builder().build().await?;
10773    /// # Ok(()) }
10774    /// ```
10775    pub fn builder() -> super::builder::public_delegated_prefixes::ClientBuilder {
10776        crate::new_client_builder(super::builder::public_delegated_prefixes::client::Factory)
10777    }
10778
10779    /// Creates a new client from the provided stub.
10780    ///
10781    /// The most common case for calling this function is in tests mocking the
10782    /// client's behavior.
10783    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
10784    where
10785        T: super::stub::PublicDelegatedPrefixes + 'static,
10786    {
10787        Self { inner: stub.into() }
10788    }
10789
10790    pub(crate) async fn new(
10791        config: gaxi::options::ClientConfig,
10792    ) -> crate::ClientBuilderResult<Self> {
10793        let inner = Self::build_inner(config).await?;
10794        Ok(Self { inner })
10795    }
10796
10797    async fn build_inner(
10798        conf: gaxi::options::ClientConfig,
10799    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::PublicDelegatedPrefixes>>
10800    {
10801        if gaxi::options::tracing_enabled(&conf) {
10802            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
10803        }
10804        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
10805    }
10806
10807    async fn build_transport(
10808        conf: gaxi::options::ClientConfig,
10809    ) -> crate::ClientBuilderResult<impl super::stub::PublicDelegatedPrefixes> {
10810        super::transport::PublicDelegatedPrefixes::new(conf).await
10811    }
10812
10813    async fn build_with_tracing(
10814        conf: gaxi::options::ClientConfig,
10815    ) -> crate::ClientBuilderResult<impl super::stub::PublicDelegatedPrefixes> {
10816        Self::build_transport(conf)
10817            .await
10818            .map(super::tracing::PublicDelegatedPrefixes::new)
10819    }
10820
10821    /// Lists all PublicDelegatedPrefix resources owned by the specific project
10822    /// across all scopes.
10823    ///
10824    /// To prevent failure, Google recommends that you set the
10825    /// `returnPartialSuccess` parameter to `true`.
10826    pub fn aggregated_list(&self) -> super::builder::public_delegated_prefixes::AggregatedList {
10827        super::builder::public_delegated_prefixes::AggregatedList::new(self.inner.clone())
10828    }
10829
10830    /// Announces the specified PublicDelegatedPrefix in the given region.
10831    pub fn announce(&self) -> super::builder::public_delegated_prefixes::Announce {
10832        super::builder::public_delegated_prefixes::Announce::new(self.inner.clone())
10833    }
10834
10835    /// Deletes the specified PublicDelegatedPrefix in the given region.
10836    pub fn delete(&self) -> super::builder::public_delegated_prefixes::Delete {
10837        super::builder::public_delegated_prefixes::Delete::new(self.inner.clone())
10838    }
10839
10840    /// Returns the specified PublicDelegatedPrefix resource in the given region.
10841    pub fn get(&self) -> super::builder::public_delegated_prefixes::Get {
10842        super::builder::public_delegated_prefixes::Get::new(self.inner.clone())
10843    }
10844
10845    /// Creates a PublicDelegatedPrefix in the specified project in the given
10846    /// region using the parameters that are included in the request.
10847    pub fn insert(&self) -> super::builder::public_delegated_prefixes::Insert {
10848        super::builder::public_delegated_prefixes::Insert::new(self.inner.clone())
10849    }
10850
10851    /// Lists the PublicDelegatedPrefixes for a project in the given region.
10852    pub fn list(&self) -> super::builder::public_delegated_prefixes::List {
10853        super::builder::public_delegated_prefixes::List::new(self.inner.clone())
10854    }
10855
10856    /// Patches the specified PublicDelegatedPrefix resource with the data included
10857    /// in the request. This method supportsPATCH
10858    /// semantics and usesJSON merge
10859    /// patch format and processing rules.
10860    pub fn patch(&self) -> super::builder::public_delegated_prefixes::Patch {
10861        super::builder::public_delegated_prefixes::Patch::new(self.inner.clone())
10862    }
10863
10864    /// Withdraws the specified PublicDelegatedPrefix in the given region.
10865    pub fn withdraw(&self) -> super::builder::public_delegated_prefixes::Withdraw {
10866        super::builder::public_delegated_prefixes::Withdraw::new(self.inner.clone())
10867    }
10868
10869    /// Retrieves the specified region-specific Operations resource.
10870    pub fn get_operation(&self) -> super::builder::public_delegated_prefixes::GetOperation {
10871        super::builder::public_delegated_prefixes::GetOperation::new(self.inner.clone())
10872    }
10873}
10874
10875/// Implements a client for the Compute Engine API.
10876///
10877/// # Example
10878/// ```
10879/// # use google_cloud_compute_v1::client::RegionAutoscalers;
10880/// async fn sample(
10881/// ) -> anyhow::Result<()> {
10882///     let client = RegionAutoscalers::builder().build().await?;
10883///     // use `client` to make requests to the Compute Engine API.
10884///     Ok(())
10885/// }
10886/// ```
10887///
10888/// # Service Description
10889///
10890/// Service for the `regionAutoscalers` resource.
10891///
10892/// The client library was generated with API version 2026-09-01.
10893///
10894/// # Configuration
10895///
10896/// To configure `RegionAutoscalers` use the `with_*` methods in the type returned
10897/// by [builder()][RegionAutoscalers::builder]. The default configuration should
10898/// work for most applications. Common configuration changes include
10899///
10900/// * [with_endpoint()]: by default this client uses the global default endpoint
10901///   (`https://compute.googleapis.com`). Applications using regional
10902///   endpoints or running in restricted networks (e.g. a network configured
10903///   with [Private Google Access with VPC Service Controls]) may want to
10904///   override this default.
10905/// * [with_credentials()]: by default this client uses
10906///   [Application Default Credentials]. Applications using custom
10907///   authentication may need to override this default.
10908///
10909/// [with_endpoint()]: super::builder::region_autoscalers::ClientBuilder::with_endpoint
10910/// [with_credentials()]: super::builder::region_autoscalers::ClientBuilder::with_credentials
10911/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
10912/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
10913///
10914/// # Pooling and Cloning
10915///
10916/// `RegionAutoscalers` holds a connection pool internally, it is advised to
10917/// create one and reuse it. You do not need to wrap `RegionAutoscalers` in
10918/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
10919/// already uses an `Arc` internally.
10920#[cfg(feature = "region-autoscalers")]
10921#[cfg_attr(docsrs, doc(cfg(feature = "region-autoscalers")))]
10922#[derive(Clone, Debug)]
10923pub struct RegionAutoscalers {
10924    inner: std::sync::Arc<dyn super::stub::dynamic::RegionAutoscalers>,
10925}
10926
10927#[cfg(feature = "region-autoscalers")]
10928impl RegionAutoscalers {
10929    /// Returns a builder for [RegionAutoscalers].
10930    ///
10931    /// ```
10932    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
10933    /// # use google_cloud_compute_v1::client::RegionAutoscalers;
10934    /// let client = RegionAutoscalers::builder().build().await?;
10935    /// # Ok(()) }
10936    /// ```
10937    pub fn builder() -> super::builder::region_autoscalers::ClientBuilder {
10938        crate::new_client_builder(super::builder::region_autoscalers::client::Factory)
10939    }
10940
10941    /// Creates a new client from the provided stub.
10942    ///
10943    /// The most common case for calling this function is in tests mocking the
10944    /// client's behavior.
10945    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
10946    where
10947        T: super::stub::RegionAutoscalers + 'static,
10948    {
10949        Self { inner: stub.into() }
10950    }
10951
10952    pub(crate) async fn new(
10953        config: gaxi::options::ClientConfig,
10954    ) -> crate::ClientBuilderResult<Self> {
10955        let inner = Self::build_inner(config).await?;
10956        Ok(Self { inner })
10957    }
10958
10959    async fn build_inner(
10960        conf: gaxi::options::ClientConfig,
10961    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::RegionAutoscalers>>
10962    {
10963        if gaxi::options::tracing_enabled(&conf) {
10964            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
10965        }
10966        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
10967    }
10968
10969    async fn build_transport(
10970        conf: gaxi::options::ClientConfig,
10971    ) -> crate::ClientBuilderResult<impl super::stub::RegionAutoscalers> {
10972        super::transport::RegionAutoscalers::new(conf).await
10973    }
10974
10975    async fn build_with_tracing(
10976        conf: gaxi::options::ClientConfig,
10977    ) -> crate::ClientBuilderResult<impl super::stub::RegionAutoscalers> {
10978        Self::build_transport(conf)
10979            .await
10980            .map(super::tracing::RegionAutoscalers::new)
10981    }
10982
10983    /// Deletes the specified autoscaler.
10984    pub fn delete(&self) -> super::builder::region_autoscalers::Delete {
10985        super::builder::region_autoscalers::Delete::new(self.inner.clone())
10986    }
10987
10988    /// Returns the specified autoscaler.
10989    pub fn get(&self) -> super::builder::region_autoscalers::Get {
10990        super::builder::region_autoscalers::Get::new(self.inner.clone())
10991    }
10992
10993    /// Creates an autoscaler in the specified project using
10994    /// the data included in the request.
10995    pub fn insert(&self) -> super::builder::region_autoscalers::Insert {
10996        super::builder::region_autoscalers::Insert::new(self.inner.clone())
10997    }
10998
10999    /// Retrieves a list of autoscalers contained within
11000    /// the specified region.
11001    pub fn list(&self) -> super::builder::region_autoscalers::List {
11002        super::builder::region_autoscalers::List::new(self.inner.clone())
11003    }
11004
11005    /// Updates an autoscaler in the specified project using
11006    /// the data included in the request. This method supportsPATCH
11007    /// semantics and uses theJSON merge
11008    /// patch format and processing rules.
11009    pub fn patch(&self) -> super::builder::region_autoscalers::Patch {
11010        super::builder::region_autoscalers::Patch::new(self.inner.clone())
11011    }
11012
11013    /// Returns permissions that a caller has on the specified resource.
11014    pub fn test_iam_permissions(&self) -> super::builder::region_autoscalers::TestIamPermissions {
11015        super::builder::region_autoscalers::TestIamPermissions::new(self.inner.clone())
11016    }
11017
11018    /// Updates an autoscaler in the specified project using
11019    /// the data included in the request.
11020    pub fn update(&self) -> super::builder::region_autoscalers::Update {
11021        super::builder::region_autoscalers::Update::new(self.inner.clone())
11022    }
11023
11024    /// Retrieves the specified region-specific Operations resource.
11025    pub fn get_operation(&self) -> super::builder::region_autoscalers::GetOperation {
11026        super::builder::region_autoscalers::GetOperation::new(self.inner.clone())
11027    }
11028}
11029
11030/// Implements a client for the Compute Engine API.
11031///
11032/// # Example
11033/// ```
11034/// # use google_cloud_compute_v1::client::RegionBackendBuckets;
11035/// async fn sample(
11036/// ) -> anyhow::Result<()> {
11037///     let client = RegionBackendBuckets::builder().build().await?;
11038///     // use `client` to make requests to the Compute Engine API.
11039///     Ok(())
11040/// }
11041/// ```
11042///
11043/// # Service Description
11044///
11045/// Service for the `regionBackendBuckets` resource.
11046///
11047/// The client library was generated with API version 2026-09-01.
11048///
11049/// # Configuration
11050///
11051/// To configure `RegionBackendBuckets` use the `with_*` methods in the type returned
11052/// by [builder()][RegionBackendBuckets::builder]. The default configuration should
11053/// work for most applications. Common configuration changes include
11054///
11055/// * [with_endpoint()]: by default this client uses the global default endpoint
11056///   (`https://compute.googleapis.com`). Applications using regional
11057///   endpoints or running in restricted networks (e.g. a network configured
11058///   with [Private Google Access with VPC Service Controls]) may want to
11059///   override this default.
11060/// * [with_credentials()]: by default this client uses
11061///   [Application Default Credentials]. Applications using custom
11062///   authentication may need to override this default.
11063///
11064/// [with_endpoint()]: super::builder::region_backend_buckets::ClientBuilder::with_endpoint
11065/// [with_credentials()]: super::builder::region_backend_buckets::ClientBuilder::with_credentials
11066/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
11067/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
11068///
11069/// # Pooling and Cloning
11070///
11071/// `RegionBackendBuckets` holds a connection pool internally, it is advised to
11072/// create one and reuse it. You do not need to wrap `RegionBackendBuckets` in
11073/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
11074/// already uses an `Arc` internally.
11075#[cfg(feature = "region-backend-buckets")]
11076#[cfg_attr(docsrs, doc(cfg(feature = "region-backend-buckets")))]
11077#[derive(Clone, Debug)]
11078pub struct RegionBackendBuckets {
11079    inner: std::sync::Arc<dyn super::stub::dynamic::RegionBackendBuckets>,
11080}
11081
11082#[cfg(feature = "region-backend-buckets")]
11083impl RegionBackendBuckets {
11084    /// Returns a builder for [RegionBackendBuckets].
11085    ///
11086    /// ```
11087    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
11088    /// # use google_cloud_compute_v1::client::RegionBackendBuckets;
11089    /// let client = RegionBackendBuckets::builder().build().await?;
11090    /// # Ok(()) }
11091    /// ```
11092    pub fn builder() -> super::builder::region_backend_buckets::ClientBuilder {
11093        crate::new_client_builder(super::builder::region_backend_buckets::client::Factory)
11094    }
11095
11096    /// Creates a new client from the provided stub.
11097    ///
11098    /// The most common case for calling this function is in tests mocking the
11099    /// client's behavior.
11100    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
11101    where
11102        T: super::stub::RegionBackendBuckets + 'static,
11103    {
11104        Self { inner: stub.into() }
11105    }
11106
11107    pub(crate) async fn new(
11108        config: gaxi::options::ClientConfig,
11109    ) -> crate::ClientBuilderResult<Self> {
11110        let inner = Self::build_inner(config).await?;
11111        Ok(Self { inner })
11112    }
11113
11114    async fn build_inner(
11115        conf: gaxi::options::ClientConfig,
11116    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::RegionBackendBuckets>>
11117    {
11118        if gaxi::options::tracing_enabled(&conf) {
11119            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
11120        }
11121        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
11122    }
11123
11124    async fn build_transport(
11125        conf: gaxi::options::ClientConfig,
11126    ) -> crate::ClientBuilderResult<impl super::stub::RegionBackendBuckets> {
11127        super::transport::RegionBackendBuckets::new(conf).await
11128    }
11129
11130    async fn build_with_tracing(
11131        conf: gaxi::options::ClientConfig,
11132    ) -> crate::ClientBuilderResult<impl super::stub::RegionBackendBuckets> {
11133        Self::build_transport(conf)
11134            .await
11135            .map(super::tracing::RegionBackendBuckets::new)
11136    }
11137
11138    /// Deletes the specified regional BackendBucket resource.
11139    pub fn delete(&self) -> super::builder::region_backend_buckets::Delete {
11140        super::builder::region_backend_buckets::Delete::new(self.inner.clone())
11141    }
11142
11143    /// Returns the specified regional BackendBucket resource.
11144    pub fn get(&self) -> super::builder::region_backend_buckets::Get {
11145        super::builder::region_backend_buckets::Get::new(self.inner.clone())
11146    }
11147
11148    /// Gets the access control policy for a resource. May be empty if no such
11149    /// policy or resource exists.
11150    pub fn get_iam_policy(&self) -> super::builder::region_backend_buckets::GetIamPolicy {
11151        super::builder::region_backend_buckets::GetIamPolicy::new(self.inner.clone())
11152    }
11153
11154    /// Creates a RegionBackendBucket in the specified project in the given scope
11155    /// using the parameters that are included in the request.
11156    pub fn insert(&self) -> super::builder::region_backend_buckets::Insert {
11157        super::builder::region_backend_buckets::Insert::new(self.inner.clone())
11158    }
11159
11160    /// Retrieves the list of BackendBucket resources available to the specified
11161    /// project in the given region.
11162    pub fn list(&self) -> super::builder::region_backend_buckets::List {
11163        super::builder::region_backend_buckets::List::new(self.inner.clone())
11164    }
11165
11166    /// Retrieves a list of all usable backend buckets in the specified project in
11167    /// the given region.
11168    pub fn list_usable(&self) -> super::builder::region_backend_buckets::ListUsable {
11169        super::builder::region_backend_buckets::ListUsable::new(self.inner.clone())
11170    }
11171
11172    /// Updates the specified  BackendBucket resource with the data included in the
11173    /// request. This method supportsPATCH
11174    /// semantics and uses theJSON merge
11175    /// patch format and processing rules.
11176    pub fn patch(&self) -> super::builder::region_backend_buckets::Patch {
11177        super::builder::region_backend_buckets::Patch::new(self.inner.clone())
11178    }
11179
11180    /// Sets the access control policy on the specified resource.
11181    /// Replaces any existing policy.
11182    pub fn set_iam_policy(&self) -> super::builder::region_backend_buckets::SetIamPolicy {
11183        super::builder::region_backend_buckets::SetIamPolicy::new(self.inner.clone())
11184    }
11185
11186    /// Returns permissions that a caller has on the specified resource.
11187    pub fn test_iam_permissions(
11188        &self,
11189    ) -> super::builder::region_backend_buckets::TestIamPermissions {
11190        super::builder::region_backend_buckets::TestIamPermissions::new(self.inner.clone())
11191    }
11192
11193    /// Retrieves the specified region-specific Operations resource.
11194    pub fn get_operation(&self) -> super::builder::region_backend_buckets::GetOperation {
11195        super::builder::region_backend_buckets::GetOperation::new(self.inner.clone())
11196    }
11197}
11198
11199/// Implements a client for the Compute Engine API.
11200///
11201/// # Example
11202/// ```
11203/// # use google_cloud_compute_v1::client::RegionBackendServices;
11204/// async fn sample(
11205/// ) -> anyhow::Result<()> {
11206///     let client = RegionBackendServices::builder().build().await?;
11207///     // use `client` to make requests to the Compute Engine API.
11208///     Ok(())
11209/// }
11210/// ```
11211///
11212/// # Service Description
11213///
11214/// Service for the `regionBackendServices` resource.
11215///
11216/// The client library was generated with API version 2026-09-01.
11217///
11218/// # Configuration
11219///
11220/// To configure `RegionBackendServices` use the `with_*` methods in the type returned
11221/// by [builder()][RegionBackendServices::builder]. The default configuration should
11222/// work for most applications. Common configuration changes include
11223///
11224/// * [with_endpoint()]: by default this client uses the global default endpoint
11225///   (`https://compute.googleapis.com`). Applications using regional
11226///   endpoints or running in restricted networks (e.g. a network configured
11227///   with [Private Google Access with VPC Service Controls]) may want to
11228///   override this default.
11229/// * [with_credentials()]: by default this client uses
11230///   [Application Default Credentials]. Applications using custom
11231///   authentication may need to override this default.
11232///
11233/// [with_endpoint()]: super::builder::region_backend_services::ClientBuilder::with_endpoint
11234/// [with_credentials()]: super::builder::region_backend_services::ClientBuilder::with_credentials
11235/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
11236/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
11237///
11238/// # Pooling and Cloning
11239///
11240/// `RegionBackendServices` holds a connection pool internally, it is advised to
11241/// create one and reuse it. You do not need to wrap `RegionBackendServices` in
11242/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
11243/// already uses an `Arc` internally.
11244#[cfg(feature = "region-backend-services")]
11245#[cfg_attr(docsrs, doc(cfg(feature = "region-backend-services")))]
11246#[derive(Clone, Debug)]
11247pub struct RegionBackendServices {
11248    inner: std::sync::Arc<dyn super::stub::dynamic::RegionBackendServices>,
11249}
11250
11251#[cfg(feature = "region-backend-services")]
11252impl RegionBackendServices {
11253    /// Returns a builder for [RegionBackendServices].
11254    ///
11255    /// ```
11256    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
11257    /// # use google_cloud_compute_v1::client::RegionBackendServices;
11258    /// let client = RegionBackendServices::builder().build().await?;
11259    /// # Ok(()) }
11260    /// ```
11261    pub fn builder() -> super::builder::region_backend_services::ClientBuilder {
11262        crate::new_client_builder(super::builder::region_backend_services::client::Factory)
11263    }
11264
11265    /// Creates a new client from the provided stub.
11266    ///
11267    /// The most common case for calling this function is in tests mocking the
11268    /// client's behavior.
11269    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
11270    where
11271        T: super::stub::RegionBackendServices + 'static,
11272    {
11273        Self { inner: stub.into() }
11274    }
11275
11276    pub(crate) async fn new(
11277        config: gaxi::options::ClientConfig,
11278    ) -> crate::ClientBuilderResult<Self> {
11279        let inner = Self::build_inner(config).await?;
11280        Ok(Self { inner })
11281    }
11282
11283    async fn build_inner(
11284        conf: gaxi::options::ClientConfig,
11285    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::RegionBackendServices>>
11286    {
11287        if gaxi::options::tracing_enabled(&conf) {
11288            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
11289        }
11290        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
11291    }
11292
11293    async fn build_transport(
11294        conf: gaxi::options::ClientConfig,
11295    ) -> crate::ClientBuilderResult<impl super::stub::RegionBackendServices> {
11296        super::transport::RegionBackendServices::new(conf).await
11297    }
11298
11299    async fn build_with_tracing(
11300        conf: gaxi::options::ClientConfig,
11301    ) -> crate::ClientBuilderResult<impl super::stub::RegionBackendServices> {
11302        Self::build_transport(conf)
11303            .await
11304            .map(super::tracing::RegionBackendServices::new)
11305    }
11306
11307    /// Deletes the specified regional BackendService resource.
11308    pub fn delete(&self) -> super::builder::region_backend_services::Delete {
11309        super::builder::region_backend_services::Delete::new(self.inner.clone())
11310    }
11311
11312    /// Returns the specified regional BackendService resource.
11313    pub fn get(&self) -> super::builder::region_backend_services::Get {
11314        super::builder::region_backend_services::Get::new(self.inner.clone())
11315    }
11316
11317    /// Gets the most recent health check results for this
11318    /// regional BackendService.
11319    pub fn get_health(&self) -> super::builder::region_backend_services::GetHealth {
11320        super::builder::region_backend_services::GetHealth::new(self.inner.clone())
11321    }
11322
11323    /// Gets the access control policy for a resource. May be empty if no such
11324    /// policy or resource exists.
11325    pub fn get_iam_policy(&self) -> super::builder::region_backend_services::GetIamPolicy {
11326        super::builder::region_backend_services::GetIamPolicy::new(self.inner.clone())
11327    }
11328
11329    /// Creates a regional BackendService resource in the specified project using
11330    /// the data included in the request. For more information, see
11331    /// Backend services overview.
11332    pub fn insert(&self) -> super::builder::region_backend_services::Insert {
11333        super::builder::region_backend_services::Insert::new(self.inner.clone())
11334    }
11335
11336    /// Retrieves the list of regional BackendService resources available to the
11337    /// specified project in the given region.
11338    pub fn list(&self) -> super::builder::region_backend_services::List {
11339        super::builder::region_backend_services::List::new(self.inner.clone())
11340    }
11341
11342    /// Retrieves a list of all usable backend services for Application Load
11343    /// Balancers and Proxy Network Load Balancers in the specified project in the
11344    /// given region. Backend services for external and internal passthrough
11345    /// Network Load Balancers are not included in the response.
11346    pub fn list_usable(&self) -> super::builder::region_backend_services::ListUsable {
11347        super::builder::region_backend_services::ListUsable::new(self.inner.clone())
11348    }
11349
11350    /// Updates the specified regional BackendService resource with the data
11351    /// included in the request. For more information, see
11352    /// Understanding backend services This method
11353    /// supports PATCH semantics and uses the JSON merge
11354    /// patch format and processing rules.
11355    pub fn patch(&self) -> super::builder::region_backend_services::Patch {
11356        super::builder::region_backend_services::Patch::new(self.inner.clone())
11357    }
11358
11359    /// Sets the access control policy on the specified resource.
11360    /// Replaces any existing policy.
11361    pub fn set_iam_policy(&self) -> super::builder::region_backend_services::SetIamPolicy {
11362        super::builder::region_backend_services::SetIamPolicy::new(self.inner.clone())
11363    }
11364
11365    /// Sets the Google Cloud Armor security policy for the specified backend
11366    /// service. For more information, seeGoogle
11367    /// Cloud Armor Overview
11368    pub fn set_security_policy(
11369        &self,
11370    ) -> super::builder::region_backend_services::SetSecurityPolicy {
11371        super::builder::region_backend_services::SetSecurityPolicy::new(self.inner.clone())
11372    }
11373
11374    /// Returns permissions that a caller has on the specified resource.
11375    pub fn test_iam_permissions(
11376        &self,
11377    ) -> super::builder::region_backend_services::TestIamPermissions {
11378        super::builder::region_backend_services::TestIamPermissions::new(self.inner.clone())
11379    }
11380
11381    /// Updates the specified regional BackendService resource with the data
11382    /// included in the request. For more information,
11383    /// see
11384    /// Backend services overview.
11385    pub fn update(&self) -> super::builder::region_backend_services::Update {
11386        super::builder::region_backend_services::Update::new(self.inner.clone())
11387    }
11388
11389    /// Retrieves the specified region-specific Operations resource.
11390    pub fn get_operation(&self) -> super::builder::region_backend_services::GetOperation {
11391        super::builder::region_backend_services::GetOperation::new(self.inner.clone())
11392    }
11393}
11394
11395/// Implements a client for the Compute Engine API.
11396///
11397/// # Example
11398/// ```
11399/// # use google_cloud_compute_v1::client::RegionCommitments;
11400/// async fn sample(
11401/// ) -> anyhow::Result<()> {
11402///     let client = RegionCommitments::builder().build().await?;
11403///     // use `client` to make requests to the Compute Engine API.
11404///     Ok(())
11405/// }
11406/// ```
11407///
11408/// # Service Description
11409///
11410/// Service for the `regionCommitments` resource.
11411///
11412/// The client library was generated with API version 2026-09-01.
11413///
11414/// # Configuration
11415///
11416/// To configure `RegionCommitments` use the `with_*` methods in the type returned
11417/// by [builder()][RegionCommitments::builder]. The default configuration should
11418/// work for most applications. Common configuration changes include
11419///
11420/// * [with_endpoint()]: by default this client uses the global default endpoint
11421///   (`https://compute.googleapis.com`). Applications using regional
11422///   endpoints or running in restricted networks (e.g. a network configured
11423///   with [Private Google Access with VPC Service Controls]) may want to
11424///   override this default.
11425/// * [with_credentials()]: by default this client uses
11426///   [Application Default Credentials]. Applications using custom
11427///   authentication may need to override this default.
11428///
11429/// [with_endpoint()]: super::builder::region_commitments::ClientBuilder::with_endpoint
11430/// [with_credentials()]: super::builder::region_commitments::ClientBuilder::with_credentials
11431/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
11432/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
11433///
11434/// # Pooling and Cloning
11435///
11436/// `RegionCommitments` holds a connection pool internally, it is advised to
11437/// create one and reuse it. You do not need to wrap `RegionCommitments` in
11438/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
11439/// already uses an `Arc` internally.
11440#[cfg(feature = "region-commitments")]
11441#[cfg_attr(docsrs, doc(cfg(feature = "region-commitments")))]
11442#[derive(Clone, Debug)]
11443pub struct RegionCommitments {
11444    inner: std::sync::Arc<dyn super::stub::dynamic::RegionCommitments>,
11445}
11446
11447#[cfg(feature = "region-commitments")]
11448impl RegionCommitments {
11449    /// Returns a builder for [RegionCommitments].
11450    ///
11451    /// ```
11452    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
11453    /// # use google_cloud_compute_v1::client::RegionCommitments;
11454    /// let client = RegionCommitments::builder().build().await?;
11455    /// # Ok(()) }
11456    /// ```
11457    pub fn builder() -> super::builder::region_commitments::ClientBuilder {
11458        crate::new_client_builder(super::builder::region_commitments::client::Factory)
11459    }
11460
11461    /// Creates a new client from the provided stub.
11462    ///
11463    /// The most common case for calling this function is in tests mocking the
11464    /// client's behavior.
11465    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
11466    where
11467        T: super::stub::RegionCommitments + 'static,
11468    {
11469        Self { inner: stub.into() }
11470    }
11471
11472    pub(crate) async fn new(
11473        config: gaxi::options::ClientConfig,
11474    ) -> crate::ClientBuilderResult<Self> {
11475        let inner = Self::build_inner(config).await?;
11476        Ok(Self { inner })
11477    }
11478
11479    async fn build_inner(
11480        conf: gaxi::options::ClientConfig,
11481    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::RegionCommitments>>
11482    {
11483        if gaxi::options::tracing_enabled(&conf) {
11484            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
11485        }
11486        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
11487    }
11488
11489    async fn build_transport(
11490        conf: gaxi::options::ClientConfig,
11491    ) -> crate::ClientBuilderResult<impl super::stub::RegionCommitments> {
11492        super::transport::RegionCommitments::new(conf).await
11493    }
11494
11495    async fn build_with_tracing(
11496        conf: gaxi::options::ClientConfig,
11497    ) -> crate::ClientBuilderResult<impl super::stub::RegionCommitments> {
11498        Self::build_transport(conf)
11499            .await
11500            .map(super::tracing::RegionCommitments::new)
11501    }
11502
11503    /// Retrieves an aggregated list of commitments by region.
11504    ///
11505    /// To prevent failure, it is recommended that you set the
11506    /// `returnPartialSuccess` parameter to `true`.
11507    pub fn aggregated_list(&self) -> super::builder::region_commitments::AggregatedList {
11508        super::builder::region_commitments::AggregatedList::new(self.inner.clone())
11509    }
11510
11511    /// Returns the specified commitment resource.
11512    pub fn get(&self) -> super::builder::region_commitments::Get {
11513        super::builder::region_commitments::Get::new(self.inner.clone())
11514    }
11515
11516    /// Creates a commitment in the specified project using the data
11517    /// included in the request.
11518    pub fn insert(&self) -> super::builder::region_commitments::Insert {
11519        super::builder::region_commitments::Insert::new(self.inner.clone())
11520    }
11521
11522    /// Retrieves a list of commitments contained within
11523    /// the specified region.
11524    pub fn list(&self) -> super::builder::region_commitments::List {
11525        super::builder::region_commitments::List::new(self.inner.clone())
11526    }
11527
11528    /// Updates the specified commitment with the data included in the request.
11529    /// Update is performed only on selected fields included as part of
11530    /// update-mask. Only the following fields can be updated: auto_renew and plan.
11531    pub fn update(&self) -> super::builder::region_commitments::Update {
11532        super::builder::region_commitments::Update::new(self.inner.clone())
11533    }
11534
11535    /// Retrieves the specified region-specific Operations resource.
11536    pub fn get_operation(&self) -> super::builder::region_commitments::GetOperation {
11537        super::builder::region_commitments::GetOperation::new(self.inner.clone())
11538    }
11539}
11540
11541/// Implements a client for the Compute Engine API.
11542///
11543/// # Example
11544/// ```
11545/// # use google_cloud_compute_v1::client::RegionCompositeHealthChecks;
11546/// async fn sample(
11547/// ) -> anyhow::Result<()> {
11548///     let client = RegionCompositeHealthChecks::builder().build().await?;
11549///     // use `client` to make requests to the Compute Engine API.
11550///     Ok(())
11551/// }
11552/// ```
11553///
11554/// # Service Description
11555///
11556/// Service for the `regionCompositeHealthChecks` resource.
11557///
11558/// The client library was generated with API version 2026-09-01.
11559///
11560/// # Configuration
11561///
11562/// To configure `RegionCompositeHealthChecks` use the `with_*` methods in the type returned
11563/// by [builder()][RegionCompositeHealthChecks::builder]. The default configuration should
11564/// work for most applications. Common configuration changes include
11565///
11566/// * [with_endpoint()]: by default this client uses the global default endpoint
11567///   (`https://compute.googleapis.com`). Applications using regional
11568///   endpoints or running in restricted networks (e.g. a network configured
11569///   with [Private Google Access with VPC Service Controls]) may want to
11570///   override this default.
11571/// * [with_credentials()]: by default this client uses
11572///   [Application Default Credentials]. Applications using custom
11573///   authentication may need to override this default.
11574///
11575/// [with_endpoint()]: super::builder::region_composite_health_checks::ClientBuilder::with_endpoint
11576/// [with_credentials()]: super::builder::region_composite_health_checks::ClientBuilder::with_credentials
11577/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
11578/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
11579///
11580/// # Pooling and Cloning
11581///
11582/// `RegionCompositeHealthChecks` holds a connection pool internally, it is advised to
11583/// create one and reuse it. You do not need to wrap `RegionCompositeHealthChecks` in
11584/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
11585/// already uses an `Arc` internally.
11586#[cfg(feature = "region-composite-health-checks")]
11587#[cfg_attr(docsrs, doc(cfg(feature = "region-composite-health-checks")))]
11588#[derive(Clone, Debug)]
11589pub struct RegionCompositeHealthChecks {
11590    inner: std::sync::Arc<dyn super::stub::dynamic::RegionCompositeHealthChecks>,
11591}
11592
11593#[cfg(feature = "region-composite-health-checks")]
11594impl RegionCompositeHealthChecks {
11595    /// Returns a builder for [RegionCompositeHealthChecks].
11596    ///
11597    /// ```
11598    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
11599    /// # use google_cloud_compute_v1::client::RegionCompositeHealthChecks;
11600    /// let client = RegionCompositeHealthChecks::builder().build().await?;
11601    /// # Ok(()) }
11602    /// ```
11603    pub fn builder() -> super::builder::region_composite_health_checks::ClientBuilder {
11604        crate::new_client_builder(super::builder::region_composite_health_checks::client::Factory)
11605    }
11606
11607    /// Creates a new client from the provided stub.
11608    ///
11609    /// The most common case for calling this function is in tests mocking the
11610    /// client's behavior.
11611    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
11612    where
11613        T: super::stub::RegionCompositeHealthChecks + 'static,
11614    {
11615        Self { inner: stub.into() }
11616    }
11617
11618    pub(crate) async fn new(
11619        config: gaxi::options::ClientConfig,
11620    ) -> crate::ClientBuilderResult<Self> {
11621        let inner = Self::build_inner(config).await?;
11622        Ok(Self { inner })
11623    }
11624
11625    async fn build_inner(
11626        conf: gaxi::options::ClientConfig,
11627    ) -> crate::ClientBuilderResult<
11628        std::sync::Arc<dyn super::stub::dynamic::RegionCompositeHealthChecks>,
11629    > {
11630        if gaxi::options::tracing_enabled(&conf) {
11631            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
11632        }
11633        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
11634    }
11635
11636    async fn build_transport(
11637        conf: gaxi::options::ClientConfig,
11638    ) -> crate::ClientBuilderResult<impl super::stub::RegionCompositeHealthChecks> {
11639        super::transport::RegionCompositeHealthChecks::new(conf).await
11640    }
11641
11642    async fn build_with_tracing(
11643        conf: gaxi::options::ClientConfig,
11644    ) -> crate::ClientBuilderResult<impl super::stub::RegionCompositeHealthChecks> {
11645        Self::build_transport(conf)
11646            .await
11647            .map(super::tracing::RegionCompositeHealthChecks::new)
11648    }
11649
11650    /// Retrieves the list of all CompositeHealthCheck resources (all
11651    /// regional) available to the specified project.
11652    ///
11653    /// To prevent failure, it is recommended that you set the
11654    /// `returnPartialSuccess` parameter to `true`.
11655    pub fn aggregated_list(
11656        &self,
11657    ) -> super::builder::region_composite_health_checks::AggregatedList {
11658        super::builder::region_composite_health_checks::AggregatedList::new(self.inner.clone())
11659    }
11660
11661    /// Deletes the specified CompositeHealthCheck in the given region
11662    pub fn delete(&self) -> super::builder::region_composite_health_checks::Delete {
11663        super::builder::region_composite_health_checks::Delete::new(self.inner.clone())
11664    }
11665
11666    /// Returns the specified CompositeHealthCheck resource in the given region.
11667    pub fn get(&self) -> super::builder::region_composite_health_checks::Get {
11668        super::builder::region_composite_health_checks::Get::new(self.inner.clone())
11669    }
11670
11671    /// Gets the most recent health check results for this
11672    /// regional CompositeHealthCheck.
11673    pub fn get_health(&self) -> super::builder::region_composite_health_checks::GetHealth {
11674        super::builder::region_composite_health_checks::GetHealth::new(self.inner.clone())
11675    }
11676
11677    /// Create a CompositeHealthCheck in the specified project in the given region
11678    /// using the parameters that are included in the request.
11679    pub fn insert(&self) -> super::builder::region_composite_health_checks::Insert {
11680        super::builder::region_composite_health_checks::Insert::new(self.inner.clone())
11681    }
11682
11683    /// Lists the CompositeHealthChecks for a project in the given region.
11684    pub fn list(&self) -> super::builder::region_composite_health_checks::List {
11685        super::builder::region_composite_health_checks::List::new(self.inner.clone())
11686    }
11687
11688    /// Updates the specified regional CompositeHealthCheck resource
11689    /// with the data included in the request.  This method supportsPATCH
11690    /// semantics and uses theJSON merge
11691    /// patch format and processing rules.
11692    pub fn patch(&self) -> super::builder::region_composite_health_checks::Patch {
11693        super::builder::region_composite_health_checks::Patch::new(self.inner.clone())
11694    }
11695
11696    /// Returns permissions that a caller has on the specified resource.
11697    pub fn test_iam_permissions(
11698        &self,
11699    ) -> super::builder::region_composite_health_checks::TestIamPermissions {
11700        super::builder::region_composite_health_checks::TestIamPermissions::new(self.inner.clone())
11701    }
11702
11703    /// Retrieves the specified region-specific Operations resource.
11704    pub fn get_operation(&self) -> super::builder::region_composite_health_checks::GetOperation {
11705        super::builder::region_composite_health_checks::GetOperation::new(self.inner.clone())
11706    }
11707}
11708
11709/// Implements a client for the Compute Engine API.
11710///
11711/// # Example
11712/// ```
11713/// # use google_cloud_compute_v1::client::RegionDiskTypes;
11714/// async fn sample(
11715/// ) -> anyhow::Result<()> {
11716///     let client = RegionDiskTypes::builder().build().await?;
11717///     // use `client` to make requests to the Compute Engine API.
11718///     Ok(())
11719/// }
11720/// ```
11721///
11722/// # Service Description
11723///
11724/// Service for the `regionDiskTypes` resource.
11725///
11726/// The client library was generated with API version 2026-09-01.
11727///
11728/// # Configuration
11729///
11730/// To configure `RegionDiskTypes` use the `with_*` methods in the type returned
11731/// by [builder()][RegionDiskTypes::builder]. The default configuration should
11732/// work for most applications. Common configuration changes include
11733///
11734/// * [with_endpoint()]: by default this client uses the global default endpoint
11735///   (`https://compute.googleapis.com`). Applications using regional
11736///   endpoints or running in restricted networks (e.g. a network configured
11737///   with [Private Google Access with VPC Service Controls]) may want to
11738///   override this default.
11739/// * [with_credentials()]: by default this client uses
11740///   [Application Default Credentials]. Applications using custom
11741///   authentication may need to override this default.
11742///
11743/// [with_endpoint()]: super::builder::region_disk_types::ClientBuilder::with_endpoint
11744/// [with_credentials()]: super::builder::region_disk_types::ClientBuilder::with_credentials
11745/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
11746/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
11747///
11748/// # Pooling and Cloning
11749///
11750/// `RegionDiskTypes` holds a connection pool internally, it is advised to
11751/// create one and reuse it. You do not need to wrap `RegionDiskTypes` in
11752/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
11753/// already uses an `Arc` internally.
11754#[cfg(feature = "region-disk-types")]
11755#[cfg_attr(docsrs, doc(cfg(feature = "region-disk-types")))]
11756#[derive(Clone, Debug)]
11757pub struct RegionDiskTypes {
11758    inner: std::sync::Arc<dyn super::stub::dynamic::RegionDiskTypes>,
11759}
11760
11761#[cfg(feature = "region-disk-types")]
11762impl RegionDiskTypes {
11763    /// Returns a builder for [RegionDiskTypes].
11764    ///
11765    /// ```
11766    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
11767    /// # use google_cloud_compute_v1::client::RegionDiskTypes;
11768    /// let client = RegionDiskTypes::builder().build().await?;
11769    /// # Ok(()) }
11770    /// ```
11771    pub fn builder() -> super::builder::region_disk_types::ClientBuilder {
11772        crate::new_client_builder(super::builder::region_disk_types::client::Factory)
11773    }
11774
11775    /// Creates a new client from the provided stub.
11776    ///
11777    /// The most common case for calling this function is in tests mocking the
11778    /// client's behavior.
11779    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
11780    where
11781        T: super::stub::RegionDiskTypes + 'static,
11782    {
11783        Self { inner: stub.into() }
11784    }
11785
11786    pub(crate) async fn new(
11787        config: gaxi::options::ClientConfig,
11788    ) -> crate::ClientBuilderResult<Self> {
11789        let inner = Self::build_inner(config).await?;
11790        Ok(Self { inner })
11791    }
11792
11793    async fn build_inner(
11794        conf: gaxi::options::ClientConfig,
11795    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::RegionDiskTypes>> {
11796        if gaxi::options::tracing_enabled(&conf) {
11797            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
11798        }
11799        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
11800    }
11801
11802    async fn build_transport(
11803        conf: gaxi::options::ClientConfig,
11804    ) -> crate::ClientBuilderResult<impl super::stub::RegionDiskTypes> {
11805        super::transport::RegionDiskTypes::new(conf).await
11806    }
11807
11808    async fn build_with_tracing(
11809        conf: gaxi::options::ClientConfig,
11810    ) -> crate::ClientBuilderResult<impl super::stub::RegionDiskTypes> {
11811        Self::build_transport(conf)
11812            .await
11813            .map(super::tracing::RegionDiskTypes::new)
11814    }
11815
11816    /// Returns the specified regional disk type.
11817    pub fn get(&self) -> super::builder::region_disk_types::Get {
11818        super::builder::region_disk_types::Get::new(self.inner.clone())
11819    }
11820
11821    /// Retrieves a list of regional disk types available to the specified project.
11822    pub fn list(&self) -> super::builder::region_disk_types::List {
11823        super::builder::region_disk_types::List::new(self.inner.clone())
11824    }
11825}
11826
11827/// Implements a client for the Compute Engine API.
11828///
11829/// # Example
11830/// ```
11831/// # use google_cloud_compute_v1::client::RegionDisks;
11832/// async fn sample(
11833/// ) -> anyhow::Result<()> {
11834///     let client = RegionDisks::builder().build().await?;
11835///     // use `client` to make requests to the Compute Engine API.
11836///     Ok(())
11837/// }
11838/// ```
11839///
11840/// # Service Description
11841///
11842/// Service for the `regionDisks` resource.
11843///
11844/// The client library was generated with API version 2026-09-01.
11845///
11846/// # Configuration
11847///
11848/// To configure `RegionDisks` use the `with_*` methods in the type returned
11849/// by [builder()][RegionDisks::builder]. The default configuration should
11850/// work for most applications. Common configuration changes include
11851///
11852/// * [with_endpoint()]: by default this client uses the global default endpoint
11853///   (`https://compute.googleapis.com`). Applications using regional
11854///   endpoints or running in restricted networks (e.g. a network configured
11855///   with [Private Google Access with VPC Service Controls]) may want to
11856///   override this default.
11857/// * [with_credentials()]: by default this client uses
11858///   [Application Default Credentials]. Applications using custom
11859///   authentication may need to override this default.
11860///
11861/// [with_endpoint()]: super::builder::region_disks::ClientBuilder::with_endpoint
11862/// [with_credentials()]: super::builder::region_disks::ClientBuilder::with_credentials
11863/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
11864/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
11865///
11866/// # Pooling and Cloning
11867///
11868/// `RegionDisks` holds a connection pool internally, it is advised to
11869/// create one and reuse it. You do not need to wrap `RegionDisks` in
11870/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
11871/// already uses an `Arc` internally.
11872#[cfg(feature = "region-disks")]
11873#[cfg_attr(docsrs, doc(cfg(feature = "region-disks")))]
11874#[derive(Clone, Debug)]
11875pub struct RegionDisks {
11876    inner: std::sync::Arc<dyn super::stub::dynamic::RegionDisks>,
11877}
11878
11879#[cfg(feature = "region-disks")]
11880impl RegionDisks {
11881    /// Returns a builder for [RegionDisks].
11882    ///
11883    /// ```
11884    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
11885    /// # use google_cloud_compute_v1::client::RegionDisks;
11886    /// let client = RegionDisks::builder().build().await?;
11887    /// # Ok(()) }
11888    /// ```
11889    pub fn builder() -> super::builder::region_disks::ClientBuilder {
11890        crate::new_client_builder(super::builder::region_disks::client::Factory)
11891    }
11892
11893    /// Creates a new client from the provided stub.
11894    ///
11895    /// The most common case for calling this function is in tests mocking the
11896    /// client's behavior.
11897    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
11898    where
11899        T: super::stub::RegionDisks + 'static,
11900    {
11901        Self { inner: stub.into() }
11902    }
11903
11904    pub(crate) async fn new(
11905        config: gaxi::options::ClientConfig,
11906    ) -> crate::ClientBuilderResult<Self> {
11907        let inner = Self::build_inner(config).await?;
11908        Ok(Self { inner })
11909    }
11910
11911    async fn build_inner(
11912        conf: gaxi::options::ClientConfig,
11913    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::RegionDisks>> {
11914        if gaxi::options::tracing_enabled(&conf) {
11915            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
11916        }
11917        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
11918    }
11919
11920    async fn build_transport(
11921        conf: gaxi::options::ClientConfig,
11922    ) -> crate::ClientBuilderResult<impl super::stub::RegionDisks> {
11923        super::transport::RegionDisks::new(conf).await
11924    }
11925
11926    async fn build_with_tracing(
11927        conf: gaxi::options::ClientConfig,
11928    ) -> crate::ClientBuilderResult<impl super::stub::RegionDisks> {
11929        Self::build_transport(conf)
11930            .await
11931            .map(super::tracing::RegionDisks::new)
11932    }
11933
11934    /// Adds existing resource policies to a regional disk. You can only add one
11935    /// policy which will be applied to this disk for scheduling snapshot
11936    /// creation.
11937    pub fn add_resource_policies(&self) -> super::builder::region_disks::AddResourcePolicies {
11938        super::builder::region_disks::AddResourcePolicies::new(self.inner.clone())
11939    }
11940
11941    /// Bulk create a set of disks.
11942    pub fn bulk_insert(&self) -> super::builder::region_disks::BulkInsert {
11943        super::builder::region_disks::BulkInsert::new(self.inner.clone())
11944    }
11945
11946    /// Creates a snapshot of a specified persistent disk. For regular snapshot
11947    /// creation, consider using snapshots.insert
11948    /// instead, as that method supports more features, such as creating snapshots
11949    /// in a project different from the source disk project.
11950    pub fn create_snapshot(&self) -> super::builder::region_disks::CreateSnapshot {
11951        super::builder::region_disks::CreateSnapshot::new(self.inner.clone())
11952    }
11953
11954    /// Deletes the specified regional persistent disk. Deleting a regional disk
11955    /// removes all the replicas of its data permanently and is irreversible.
11956    /// However, deleting a disk does not delete anysnapshots
11957    /// previously made from the disk. You must separatelydelete
11958    /// snapshots.
11959    pub fn delete(&self) -> super::builder::region_disks::Delete {
11960        super::builder::region_disks::Delete::new(self.inner.clone())
11961    }
11962
11963    /// Returns a specified regional persistent disk.
11964    pub fn get(&self) -> super::builder::region_disks::Get {
11965        super::builder::region_disks::Get::new(self.inner.clone())
11966    }
11967
11968    /// Gets the access control policy for a resource. May be empty if no such
11969    /// policy or resource exists.
11970    pub fn get_iam_policy(&self) -> super::builder::region_disks::GetIamPolicy {
11971        super::builder::region_disks::GetIamPolicy::new(self.inner.clone())
11972    }
11973
11974    /// Creates a persistent regional disk in the specified project using the data
11975    /// included in the request.
11976    pub fn insert(&self) -> super::builder::region_disks::Insert {
11977        super::builder::region_disks::Insert::new(self.inner.clone())
11978    }
11979
11980    /// Retrieves the list of persistent disks contained within
11981    /// the specified region.
11982    pub fn list(&self) -> super::builder::region_disks::List {
11983        super::builder::region_disks::List::new(self.inner.clone())
11984    }
11985
11986    /// Removes resource policies from a regional disk.
11987    pub fn remove_resource_policies(&self) -> super::builder::region_disks::RemoveResourcePolicies {
11988        super::builder::region_disks::RemoveResourcePolicies::new(self.inner.clone())
11989    }
11990
11991    /// Resizes the specified regional persistent disk.
11992    pub fn resize(&self) -> super::builder::region_disks::Resize {
11993        super::builder::region_disks::Resize::new(self.inner.clone())
11994    }
11995
11996    /// Sets the access control policy on the specified resource.
11997    /// Replaces any existing policy.
11998    pub fn set_iam_policy(&self) -> super::builder::region_disks::SetIamPolicy {
11999        super::builder::region_disks::SetIamPolicy::new(self.inner.clone())
12000    }
12001
12002    /// Sets the labels on the target regional disk.
12003    pub fn set_labels(&self) -> super::builder::region_disks::SetLabels {
12004        super::builder::region_disks::SetLabels::new(self.inner.clone())
12005    }
12006
12007    /// Starts asynchronous replication.
12008    /// Must be invoked on the primary disk.
12009    pub fn start_async_replication(&self) -> super::builder::region_disks::StartAsyncReplication {
12010        super::builder::region_disks::StartAsyncReplication::new(self.inner.clone())
12011    }
12012
12013    /// Stops asynchronous replication.
12014    /// Can be invoked either on the primary or on the secondary disk.
12015    pub fn stop_async_replication(&self) -> super::builder::region_disks::StopAsyncReplication {
12016        super::builder::region_disks::StopAsyncReplication::new(self.inner.clone())
12017    }
12018
12019    /// Stops asynchronous replication for a consistency group of disks.
12020    /// Can be invoked either in the primary or secondary scope.
12021    pub fn stop_group_async_replication(
12022        &self,
12023    ) -> super::builder::region_disks::StopGroupAsyncReplication {
12024        super::builder::region_disks::StopGroupAsyncReplication::new(self.inner.clone())
12025    }
12026
12027    /// Returns permissions that a caller has on the specified resource.
12028    pub fn test_iam_permissions(&self) -> super::builder::region_disks::TestIamPermissions {
12029        super::builder::region_disks::TestIamPermissions::new(self.inner.clone())
12030    }
12031
12032    /// Update the specified disk with the data included in the request. Update is
12033    /// performed only on selected fields included as part of update-mask.
12034    pub fn update(&self) -> super::builder::region_disks::Update {
12035        super::builder::region_disks::Update::new(self.inner.clone())
12036    }
12037
12038    /// Rotates the customer-managed
12039    /// encryption key to the latest version for the specified persistent disk.
12040    pub fn update_kms_key(&self) -> super::builder::region_disks::UpdateKmsKey {
12041        super::builder::region_disks::UpdateKmsKey::new(self.inner.clone())
12042    }
12043
12044    /// Retrieves the specified region-specific Operations resource.
12045    pub fn get_operation(&self) -> super::builder::region_disks::GetOperation {
12046        super::builder::region_disks::GetOperation::new(self.inner.clone())
12047    }
12048}
12049
12050/// Implements a client for the Compute Engine API.
12051///
12052/// # Example
12053/// ```
12054/// # use google_cloud_compute_v1::client::RegionHealthAggregationPolicies;
12055/// async fn sample(
12056/// ) -> anyhow::Result<()> {
12057///     let client = RegionHealthAggregationPolicies::builder().build().await?;
12058///     // use `client` to make requests to the Compute Engine API.
12059///     Ok(())
12060/// }
12061/// ```
12062///
12063/// # Service Description
12064///
12065/// Service for the `regionHealthAggregationPolicies` resource.
12066///
12067/// The client library was generated with API version 2026-09-01.
12068///
12069/// # Configuration
12070///
12071/// To configure `RegionHealthAggregationPolicies` use the `with_*` methods in the type returned
12072/// by [builder()][RegionHealthAggregationPolicies::builder]. The default configuration should
12073/// work for most applications. Common configuration changes include
12074///
12075/// * [with_endpoint()]: by default this client uses the global default endpoint
12076///   (`https://compute.googleapis.com`). Applications using regional
12077///   endpoints or running in restricted networks (e.g. a network configured
12078///   with [Private Google Access with VPC Service Controls]) may want to
12079///   override this default.
12080/// * [with_credentials()]: by default this client uses
12081///   [Application Default Credentials]. Applications using custom
12082///   authentication may need to override this default.
12083///
12084/// [with_endpoint()]: super::builder::region_health_aggregation_policies::ClientBuilder::with_endpoint
12085/// [with_credentials()]: super::builder::region_health_aggregation_policies::ClientBuilder::with_credentials
12086/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
12087/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
12088///
12089/// # Pooling and Cloning
12090///
12091/// `RegionHealthAggregationPolicies` holds a connection pool internally, it is advised to
12092/// create one and reuse it. You do not need to wrap `RegionHealthAggregationPolicies` in
12093/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
12094/// already uses an `Arc` internally.
12095#[cfg(feature = "region-health-aggregation-policies")]
12096#[cfg_attr(docsrs, doc(cfg(feature = "region-health-aggregation-policies")))]
12097#[derive(Clone, Debug)]
12098pub struct RegionHealthAggregationPolicies {
12099    inner: std::sync::Arc<dyn super::stub::dynamic::RegionHealthAggregationPolicies>,
12100}
12101
12102#[cfg(feature = "region-health-aggregation-policies")]
12103impl RegionHealthAggregationPolicies {
12104    /// Returns a builder for [RegionHealthAggregationPolicies].
12105    ///
12106    /// ```
12107    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
12108    /// # use google_cloud_compute_v1::client::RegionHealthAggregationPolicies;
12109    /// let client = RegionHealthAggregationPolicies::builder().build().await?;
12110    /// # Ok(()) }
12111    /// ```
12112    pub fn builder() -> super::builder::region_health_aggregation_policies::ClientBuilder {
12113        crate::new_client_builder(
12114            super::builder::region_health_aggregation_policies::client::Factory,
12115        )
12116    }
12117
12118    /// Creates a new client from the provided stub.
12119    ///
12120    /// The most common case for calling this function is in tests mocking the
12121    /// client's behavior.
12122    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
12123    where
12124        T: super::stub::RegionHealthAggregationPolicies + 'static,
12125    {
12126        Self { inner: stub.into() }
12127    }
12128
12129    pub(crate) async fn new(
12130        config: gaxi::options::ClientConfig,
12131    ) -> crate::ClientBuilderResult<Self> {
12132        let inner = Self::build_inner(config).await?;
12133        Ok(Self { inner })
12134    }
12135
12136    async fn build_inner(
12137        conf: gaxi::options::ClientConfig,
12138    ) -> crate::ClientBuilderResult<
12139        std::sync::Arc<dyn super::stub::dynamic::RegionHealthAggregationPolicies>,
12140    > {
12141        if gaxi::options::tracing_enabled(&conf) {
12142            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
12143        }
12144        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
12145    }
12146
12147    async fn build_transport(
12148        conf: gaxi::options::ClientConfig,
12149    ) -> crate::ClientBuilderResult<impl super::stub::RegionHealthAggregationPolicies> {
12150        super::transport::RegionHealthAggregationPolicies::new(conf).await
12151    }
12152
12153    async fn build_with_tracing(
12154        conf: gaxi::options::ClientConfig,
12155    ) -> crate::ClientBuilderResult<impl super::stub::RegionHealthAggregationPolicies> {
12156        Self::build_transport(conf)
12157            .await
12158            .map(super::tracing::RegionHealthAggregationPolicies::new)
12159    }
12160
12161    /// Retrieves the list of all HealthAggregationPolicy resources,
12162    /// regional and global, available to the specified project.
12163    ///
12164    /// To prevent failure, it is recommended that you set the
12165    /// `returnPartialSuccess` parameter to `true`.
12166    pub fn aggregated_list(
12167        &self,
12168    ) -> super::builder::region_health_aggregation_policies::AggregatedList {
12169        super::builder::region_health_aggregation_policies::AggregatedList::new(self.inner.clone())
12170    }
12171
12172    /// Deletes the specified HealthAggregationPolicy in the given region.
12173    pub fn delete(&self) -> super::builder::region_health_aggregation_policies::Delete {
12174        super::builder::region_health_aggregation_policies::Delete::new(self.inner.clone())
12175    }
12176
12177    /// Returns the specified HealthAggregationPolicy resource in the given region.
12178    pub fn get(&self) -> super::builder::region_health_aggregation_policies::Get {
12179        super::builder::region_health_aggregation_policies::Get::new(self.inner.clone())
12180    }
12181
12182    /// Create a HealthAggregationPolicy in the specified project in the given
12183    /// region using the parameters that are included in the request.
12184    pub fn insert(&self) -> super::builder::region_health_aggregation_policies::Insert {
12185        super::builder::region_health_aggregation_policies::Insert::new(self.inner.clone())
12186    }
12187
12188    /// Lists the HealthAggregationPolicies for a project in the given region.
12189    pub fn list(&self) -> super::builder::region_health_aggregation_policies::List {
12190        super::builder::region_health_aggregation_policies::List::new(self.inner.clone())
12191    }
12192
12193    /// Updates the specified regional HealthAggregationPolicy
12194    /// resource with the data included in the request. This method supportsPATCH
12195    /// semantics and uses theJSON merge
12196    /// patch format and processing rules.
12197    pub fn patch(&self) -> super::builder::region_health_aggregation_policies::Patch {
12198        super::builder::region_health_aggregation_policies::Patch::new(self.inner.clone())
12199    }
12200
12201    /// Returns permissions that a caller has on the specified resource.
12202    pub fn test_iam_permissions(
12203        &self,
12204    ) -> super::builder::region_health_aggregation_policies::TestIamPermissions {
12205        super::builder::region_health_aggregation_policies::TestIamPermissions::new(
12206            self.inner.clone(),
12207        )
12208    }
12209
12210    /// Retrieves the specified region-specific Operations resource.
12211    pub fn get_operation(
12212        &self,
12213    ) -> super::builder::region_health_aggregation_policies::GetOperation {
12214        super::builder::region_health_aggregation_policies::GetOperation::new(self.inner.clone())
12215    }
12216}
12217
12218/// Implements a client for the Compute Engine API.
12219///
12220/// # Example
12221/// ```
12222/// # use google_cloud_compute_v1::client::RegionHealthCheckServices;
12223/// async fn sample(
12224/// ) -> anyhow::Result<()> {
12225///     let client = RegionHealthCheckServices::builder().build().await?;
12226///     // use `client` to make requests to the Compute Engine API.
12227///     Ok(())
12228/// }
12229/// ```
12230///
12231/// # Service Description
12232///
12233/// Service for the `regionHealthCheckServices` resource.
12234///
12235/// The client library was generated with API version 2026-09-01.
12236///
12237/// # Configuration
12238///
12239/// To configure `RegionHealthCheckServices` use the `with_*` methods in the type returned
12240/// by [builder()][RegionHealthCheckServices::builder]. The default configuration should
12241/// work for most applications. Common configuration changes include
12242///
12243/// * [with_endpoint()]: by default this client uses the global default endpoint
12244///   (`https://compute.googleapis.com`). Applications using regional
12245///   endpoints or running in restricted networks (e.g. a network configured
12246///   with [Private Google Access with VPC Service Controls]) may want to
12247///   override this default.
12248/// * [with_credentials()]: by default this client uses
12249///   [Application Default Credentials]. Applications using custom
12250///   authentication may need to override this default.
12251///
12252/// [with_endpoint()]: super::builder::region_health_check_services::ClientBuilder::with_endpoint
12253/// [with_credentials()]: super::builder::region_health_check_services::ClientBuilder::with_credentials
12254/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
12255/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
12256///
12257/// # Pooling and Cloning
12258///
12259/// `RegionHealthCheckServices` holds a connection pool internally, it is advised to
12260/// create one and reuse it. You do not need to wrap `RegionHealthCheckServices` in
12261/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
12262/// already uses an `Arc` internally.
12263#[cfg(feature = "region-health-check-services")]
12264#[cfg_attr(docsrs, doc(cfg(feature = "region-health-check-services")))]
12265#[derive(Clone, Debug)]
12266pub struct RegionHealthCheckServices {
12267    inner: std::sync::Arc<dyn super::stub::dynamic::RegionHealthCheckServices>,
12268}
12269
12270#[cfg(feature = "region-health-check-services")]
12271impl RegionHealthCheckServices {
12272    /// Returns a builder for [RegionHealthCheckServices].
12273    ///
12274    /// ```
12275    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
12276    /// # use google_cloud_compute_v1::client::RegionHealthCheckServices;
12277    /// let client = RegionHealthCheckServices::builder().build().await?;
12278    /// # Ok(()) }
12279    /// ```
12280    pub fn builder() -> super::builder::region_health_check_services::ClientBuilder {
12281        crate::new_client_builder(super::builder::region_health_check_services::client::Factory)
12282    }
12283
12284    /// Creates a new client from the provided stub.
12285    ///
12286    /// The most common case for calling this function is in tests mocking the
12287    /// client's behavior.
12288    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
12289    where
12290        T: super::stub::RegionHealthCheckServices + 'static,
12291    {
12292        Self { inner: stub.into() }
12293    }
12294
12295    pub(crate) async fn new(
12296        config: gaxi::options::ClientConfig,
12297    ) -> crate::ClientBuilderResult<Self> {
12298        let inner = Self::build_inner(config).await?;
12299        Ok(Self { inner })
12300    }
12301
12302    async fn build_inner(
12303        conf: gaxi::options::ClientConfig,
12304    ) -> crate::ClientBuilderResult<
12305        std::sync::Arc<dyn super::stub::dynamic::RegionHealthCheckServices>,
12306    > {
12307        if gaxi::options::tracing_enabled(&conf) {
12308            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
12309        }
12310        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
12311    }
12312
12313    async fn build_transport(
12314        conf: gaxi::options::ClientConfig,
12315    ) -> crate::ClientBuilderResult<impl super::stub::RegionHealthCheckServices> {
12316        super::transport::RegionHealthCheckServices::new(conf).await
12317    }
12318
12319    async fn build_with_tracing(
12320        conf: gaxi::options::ClientConfig,
12321    ) -> crate::ClientBuilderResult<impl super::stub::RegionHealthCheckServices> {
12322        Self::build_transport(conf)
12323            .await
12324            .map(super::tracing::RegionHealthCheckServices::new)
12325    }
12326
12327    /// Retrieves the list of all HealthCheckService resources,
12328    /// regional and global, available to the specified project.
12329    ///
12330    /// To prevent failure, it is recommended that you set the
12331    /// `returnPartialSuccess` parameter to `true`.
12332    pub fn aggregated_list(&self) -> super::builder::region_health_check_services::AggregatedList {
12333        super::builder::region_health_check_services::AggregatedList::new(self.inner.clone())
12334    }
12335
12336    /// Deletes the specified regional HealthCheckService.
12337    pub fn delete(&self) -> super::builder::region_health_check_services::Delete {
12338        super::builder::region_health_check_services::Delete::new(self.inner.clone())
12339    }
12340
12341    /// Returns the specified regional HealthCheckService resource.
12342    pub fn get(&self) -> super::builder::region_health_check_services::Get {
12343        super::builder::region_health_check_services::Get::new(self.inner.clone())
12344    }
12345
12346    /// Creates a regional HealthCheckService resource in the
12347    /// specified project and region using the data included in the request.
12348    pub fn insert(&self) -> super::builder::region_health_check_services::Insert {
12349        super::builder::region_health_check_services::Insert::new(self.inner.clone())
12350    }
12351
12352    /// Lists all the HealthCheckService resources that have been
12353    /// configured for the specified project in the given region.
12354    pub fn list(&self) -> super::builder::region_health_check_services::List {
12355        super::builder::region_health_check_services::List::new(self.inner.clone())
12356    }
12357
12358    /// Updates the specified regional HealthCheckService resource
12359    /// with the data included in the request.  This method supportsPATCH
12360    /// semantics and uses theJSON merge
12361    /// patch format and processing rules.
12362    pub fn patch(&self) -> super::builder::region_health_check_services::Patch {
12363        super::builder::region_health_check_services::Patch::new(self.inner.clone())
12364    }
12365
12366    /// Returns permissions that a caller has on the specified resource.
12367    pub fn test_iam_permissions(
12368        &self,
12369    ) -> super::builder::region_health_check_services::TestIamPermissions {
12370        super::builder::region_health_check_services::TestIamPermissions::new(self.inner.clone())
12371    }
12372
12373    /// Retrieves the specified region-specific Operations resource.
12374    pub fn get_operation(&self) -> super::builder::region_health_check_services::GetOperation {
12375        super::builder::region_health_check_services::GetOperation::new(self.inner.clone())
12376    }
12377}
12378
12379/// Implements a client for the Compute Engine API.
12380///
12381/// # Example
12382/// ```
12383/// # use google_cloud_compute_v1::client::RegionHealthChecks;
12384/// async fn sample(
12385/// ) -> anyhow::Result<()> {
12386///     let client = RegionHealthChecks::builder().build().await?;
12387///     // use `client` to make requests to the Compute Engine API.
12388///     Ok(())
12389/// }
12390/// ```
12391///
12392/// # Service Description
12393///
12394/// Service for the `regionHealthChecks` resource.
12395///
12396/// The client library was generated with API version 2026-09-01.
12397///
12398/// # Configuration
12399///
12400/// To configure `RegionHealthChecks` use the `with_*` methods in the type returned
12401/// by [builder()][RegionHealthChecks::builder]. The default configuration should
12402/// work for most applications. Common configuration changes include
12403///
12404/// * [with_endpoint()]: by default this client uses the global default endpoint
12405///   (`https://compute.googleapis.com`). Applications using regional
12406///   endpoints or running in restricted networks (e.g. a network configured
12407///   with [Private Google Access with VPC Service Controls]) may want to
12408///   override this default.
12409/// * [with_credentials()]: by default this client uses
12410///   [Application Default Credentials]. Applications using custom
12411///   authentication may need to override this default.
12412///
12413/// [with_endpoint()]: super::builder::region_health_checks::ClientBuilder::with_endpoint
12414/// [with_credentials()]: super::builder::region_health_checks::ClientBuilder::with_credentials
12415/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
12416/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
12417///
12418/// # Pooling and Cloning
12419///
12420/// `RegionHealthChecks` holds a connection pool internally, it is advised to
12421/// create one and reuse it. You do not need to wrap `RegionHealthChecks` in
12422/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
12423/// already uses an `Arc` internally.
12424#[cfg(feature = "region-health-checks")]
12425#[cfg_attr(docsrs, doc(cfg(feature = "region-health-checks")))]
12426#[derive(Clone, Debug)]
12427pub struct RegionHealthChecks {
12428    inner: std::sync::Arc<dyn super::stub::dynamic::RegionHealthChecks>,
12429}
12430
12431#[cfg(feature = "region-health-checks")]
12432impl RegionHealthChecks {
12433    /// Returns a builder for [RegionHealthChecks].
12434    ///
12435    /// ```
12436    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
12437    /// # use google_cloud_compute_v1::client::RegionHealthChecks;
12438    /// let client = RegionHealthChecks::builder().build().await?;
12439    /// # Ok(()) }
12440    /// ```
12441    pub fn builder() -> super::builder::region_health_checks::ClientBuilder {
12442        crate::new_client_builder(super::builder::region_health_checks::client::Factory)
12443    }
12444
12445    /// Creates a new client from the provided stub.
12446    ///
12447    /// The most common case for calling this function is in tests mocking the
12448    /// client's behavior.
12449    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
12450    where
12451        T: super::stub::RegionHealthChecks + 'static,
12452    {
12453        Self { inner: stub.into() }
12454    }
12455
12456    pub(crate) async fn new(
12457        config: gaxi::options::ClientConfig,
12458    ) -> crate::ClientBuilderResult<Self> {
12459        let inner = Self::build_inner(config).await?;
12460        Ok(Self { inner })
12461    }
12462
12463    async fn build_inner(
12464        conf: gaxi::options::ClientConfig,
12465    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::RegionHealthChecks>>
12466    {
12467        if gaxi::options::tracing_enabled(&conf) {
12468            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
12469        }
12470        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
12471    }
12472
12473    async fn build_transport(
12474        conf: gaxi::options::ClientConfig,
12475    ) -> crate::ClientBuilderResult<impl super::stub::RegionHealthChecks> {
12476        super::transport::RegionHealthChecks::new(conf).await
12477    }
12478
12479    async fn build_with_tracing(
12480        conf: gaxi::options::ClientConfig,
12481    ) -> crate::ClientBuilderResult<impl super::stub::RegionHealthChecks> {
12482        Self::build_transport(conf)
12483            .await
12484            .map(super::tracing::RegionHealthChecks::new)
12485    }
12486
12487    /// Deletes the specified HealthCheck resource.
12488    pub fn delete(&self) -> super::builder::region_health_checks::Delete {
12489        super::builder::region_health_checks::Delete::new(self.inner.clone())
12490    }
12491
12492    /// Returns the specified HealthCheck resource.
12493    pub fn get(&self) -> super::builder::region_health_checks::Get {
12494        super::builder::region_health_checks::Get::new(self.inner.clone())
12495    }
12496
12497    /// Creates a HealthCheck resource in the specified project using the data
12498    /// included in the request.
12499    pub fn insert(&self) -> super::builder::region_health_checks::Insert {
12500        super::builder::region_health_checks::Insert::new(self.inner.clone())
12501    }
12502
12503    /// Retrieves the list of HealthCheck resources available to the specified
12504    /// project.
12505    pub fn list(&self) -> super::builder::region_health_checks::List {
12506        super::builder::region_health_checks::List::new(self.inner.clone())
12507    }
12508
12509    /// Updates a HealthCheck resource in the specified project using the data
12510    /// included in the request. This method supportsPATCH
12511    /// semantics and uses theJSON merge
12512    /// patch format and processing rules.
12513    pub fn patch(&self) -> super::builder::region_health_checks::Patch {
12514        super::builder::region_health_checks::Patch::new(self.inner.clone())
12515    }
12516
12517    /// Returns permissions that a caller has on the specified resource.
12518    pub fn test_iam_permissions(&self) -> super::builder::region_health_checks::TestIamPermissions {
12519        super::builder::region_health_checks::TestIamPermissions::new(self.inner.clone())
12520    }
12521
12522    /// Updates a HealthCheck resource in the specified project using the data
12523    /// included in the request.
12524    pub fn update(&self) -> super::builder::region_health_checks::Update {
12525        super::builder::region_health_checks::Update::new(self.inner.clone())
12526    }
12527
12528    /// Retrieves the specified region-specific Operations resource.
12529    pub fn get_operation(&self) -> super::builder::region_health_checks::GetOperation {
12530        super::builder::region_health_checks::GetOperation::new(self.inner.clone())
12531    }
12532}
12533
12534/// Implements a client for the Compute Engine API.
12535///
12536/// # Example
12537/// ```
12538/// # use google_cloud_compute_v1::client::RegionHealthSources;
12539/// async fn sample(
12540/// ) -> anyhow::Result<()> {
12541///     let client = RegionHealthSources::builder().build().await?;
12542///     // use `client` to make requests to the Compute Engine API.
12543///     Ok(())
12544/// }
12545/// ```
12546///
12547/// # Service Description
12548///
12549/// Service for the `regionHealthSources` resource.
12550///
12551/// The client library was generated with API version 2026-09-01.
12552///
12553/// # Configuration
12554///
12555/// To configure `RegionHealthSources` use the `with_*` methods in the type returned
12556/// by [builder()][RegionHealthSources::builder]. The default configuration should
12557/// work for most applications. Common configuration changes include
12558///
12559/// * [with_endpoint()]: by default this client uses the global default endpoint
12560///   (`https://compute.googleapis.com`). Applications using regional
12561///   endpoints or running in restricted networks (e.g. a network configured
12562///   with [Private Google Access with VPC Service Controls]) may want to
12563///   override this default.
12564/// * [with_credentials()]: by default this client uses
12565///   [Application Default Credentials]. Applications using custom
12566///   authentication may need to override this default.
12567///
12568/// [with_endpoint()]: super::builder::region_health_sources::ClientBuilder::with_endpoint
12569/// [with_credentials()]: super::builder::region_health_sources::ClientBuilder::with_credentials
12570/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
12571/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
12572///
12573/// # Pooling and Cloning
12574///
12575/// `RegionHealthSources` holds a connection pool internally, it is advised to
12576/// create one and reuse it. You do not need to wrap `RegionHealthSources` in
12577/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
12578/// already uses an `Arc` internally.
12579#[cfg(feature = "region-health-sources")]
12580#[cfg_attr(docsrs, doc(cfg(feature = "region-health-sources")))]
12581#[derive(Clone, Debug)]
12582pub struct RegionHealthSources {
12583    inner: std::sync::Arc<dyn super::stub::dynamic::RegionHealthSources>,
12584}
12585
12586#[cfg(feature = "region-health-sources")]
12587impl RegionHealthSources {
12588    /// Returns a builder for [RegionHealthSources].
12589    ///
12590    /// ```
12591    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
12592    /// # use google_cloud_compute_v1::client::RegionHealthSources;
12593    /// let client = RegionHealthSources::builder().build().await?;
12594    /// # Ok(()) }
12595    /// ```
12596    pub fn builder() -> super::builder::region_health_sources::ClientBuilder {
12597        crate::new_client_builder(super::builder::region_health_sources::client::Factory)
12598    }
12599
12600    /// Creates a new client from the provided stub.
12601    ///
12602    /// The most common case for calling this function is in tests mocking the
12603    /// client's behavior.
12604    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
12605    where
12606        T: super::stub::RegionHealthSources + 'static,
12607    {
12608        Self { inner: stub.into() }
12609    }
12610
12611    pub(crate) async fn new(
12612        config: gaxi::options::ClientConfig,
12613    ) -> crate::ClientBuilderResult<Self> {
12614        let inner = Self::build_inner(config).await?;
12615        Ok(Self { inner })
12616    }
12617
12618    async fn build_inner(
12619        conf: gaxi::options::ClientConfig,
12620    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::RegionHealthSources>>
12621    {
12622        if gaxi::options::tracing_enabled(&conf) {
12623            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
12624        }
12625        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
12626    }
12627
12628    async fn build_transport(
12629        conf: gaxi::options::ClientConfig,
12630    ) -> crate::ClientBuilderResult<impl super::stub::RegionHealthSources> {
12631        super::transport::RegionHealthSources::new(conf).await
12632    }
12633
12634    async fn build_with_tracing(
12635        conf: gaxi::options::ClientConfig,
12636    ) -> crate::ClientBuilderResult<impl super::stub::RegionHealthSources> {
12637        Self::build_transport(conf)
12638            .await
12639            .map(super::tracing::RegionHealthSources::new)
12640    }
12641
12642    /// Retrieves the list of all HealthSource resources (all
12643    /// regional) available to the specified project.
12644    ///
12645    /// To prevent failure, Google recommends that you set the
12646    /// `returnPartialSuccess` parameter to `true`.
12647    pub fn aggregated_list(&self) -> super::builder::region_health_sources::AggregatedList {
12648        super::builder::region_health_sources::AggregatedList::new(self.inner.clone())
12649    }
12650
12651    /// Deletes the specified HealthSource in the given region
12652    pub fn delete(&self) -> super::builder::region_health_sources::Delete {
12653        super::builder::region_health_sources::Delete::new(self.inner.clone())
12654    }
12655
12656    /// Returns the specified HealthSource resource in the given region.
12657    pub fn get(&self) -> super::builder::region_health_sources::Get {
12658        super::builder::region_health_sources::Get::new(self.inner.clone())
12659    }
12660
12661    /// Gets the most recent health check results for this
12662    /// regional HealthSource.
12663    pub fn get_health(&self) -> super::builder::region_health_sources::GetHealth {
12664        super::builder::region_health_sources::GetHealth::new(self.inner.clone())
12665    }
12666
12667    /// Create a HealthSource in the specified project in the given region
12668    /// using the parameters that are included in the request.
12669    pub fn insert(&self) -> super::builder::region_health_sources::Insert {
12670        super::builder::region_health_sources::Insert::new(self.inner.clone())
12671    }
12672
12673    /// Lists the HealthSources for a project in the given region.
12674    pub fn list(&self) -> super::builder::region_health_sources::List {
12675        super::builder::region_health_sources::List::new(self.inner.clone())
12676    }
12677
12678    /// Updates the specified regional HealthSource resource
12679    /// with the data included in the request.  This method supportsPATCH
12680    /// semantics and uses theJSON merge
12681    /// patch format and processing rules.
12682    pub fn patch(&self) -> super::builder::region_health_sources::Patch {
12683        super::builder::region_health_sources::Patch::new(self.inner.clone())
12684    }
12685
12686    /// Returns permissions that a caller has on the specified resource.
12687    pub fn test_iam_permissions(
12688        &self,
12689    ) -> super::builder::region_health_sources::TestIamPermissions {
12690        super::builder::region_health_sources::TestIamPermissions::new(self.inner.clone())
12691    }
12692
12693    /// Retrieves the specified region-specific Operations resource.
12694    pub fn get_operation(&self) -> super::builder::region_health_sources::GetOperation {
12695        super::builder::region_health_sources::GetOperation::new(self.inner.clone())
12696    }
12697}
12698
12699/// Implements a client for the Compute Engine API.
12700///
12701/// # Example
12702/// ```
12703/// # use google_cloud_compute_v1::client::RegionInstanceGroupManagerResizeRequests;
12704/// async fn sample(
12705/// ) -> anyhow::Result<()> {
12706///     let client = RegionInstanceGroupManagerResizeRequests::builder().build().await?;
12707///     // use `client` to make requests to the Compute Engine API.
12708///     Ok(())
12709/// }
12710/// ```
12711///
12712/// # Service Description
12713///
12714/// Service for the `regionInstanceGroupManagerResizeRequests` resource.
12715///
12716/// The client library was generated with API version 2026-09-01.
12717///
12718/// # Configuration
12719///
12720/// To configure `RegionInstanceGroupManagerResizeRequests` use the `with_*` methods in the type returned
12721/// by [builder()][RegionInstanceGroupManagerResizeRequests::builder]. The default configuration should
12722/// work for most applications. Common configuration changes include
12723///
12724/// * [with_endpoint()]: by default this client uses the global default endpoint
12725///   (`https://compute.googleapis.com`). Applications using regional
12726///   endpoints or running in restricted networks (e.g. a network configured
12727///   with [Private Google Access with VPC Service Controls]) may want to
12728///   override this default.
12729/// * [with_credentials()]: by default this client uses
12730///   [Application Default Credentials]. Applications using custom
12731///   authentication may need to override this default.
12732///
12733/// [with_endpoint()]: super::builder::region_instance_group_manager_resize_requests::ClientBuilder::with_endpoint
12734/// [with_credentials()]: super::builder::region_instance_group_manager_resize_requests::ClientBuilder::with_credentials
12735/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
12736/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
12737///
12738/// # Pooling and Cloning
12739///
12740/// `RegionInstanceGroupManagerResizeRequests` holds a connection pool internally, it is advised to
12741/// create one and reuse it. You do not need to wrap `RegionInstanceGroupManagerResizeRequests` in
12742/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
12743/// already uses an `Arc` internally.
12744#[cfg(feature = "region-instance-group-manager-resize-requests")]
12745#[cfg_attr(
12746    docsrs,
12747    doc(cfg(feature = "region-instance-group-manager-resize-requests"))
12748)]
12749#[derive(Clone, Debug)]
12750pub struct RegionInstanceGroupManagerResizeRequests {
12751    inner: std::sync::Arc<dyn super::stub::dynamic::RegionInstanceGroupManagerResizeRequests>,
12752}
12753
12754#[cfg(feature = "region-instance-group-manager-resize-requests")]
12755impl RegionInstanceGroupManagerResizeRequests {
12756    /// Returns a builder for [RegionInstanceGroupManagerResizeRequests].
12757    ///
12758    /// ```
12759    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
12760    /// # use google_cloud_compute_v1::client::RegionInstanceGroupManagerResizeRequests;
12761    /// let client = RegionInstanceGroupManagerResizeRequests::builder().build().await?;
12762    /// # Ok(()) }
12763    /// ```
12764    pub fn builder() -> super::builder::region_instance_group_manager_resize_requests::ClientBuilder
12765    {
12766        crate::new_client_builder(
12767            super::builder::region_instance_group_manager_resize_requests::client::Factory,
12768        )
12769    }
12770
12771    /// Creates a new client from the provided stub.
12772    ///
12773    /// The most common case for calling this function is in tests mocking the
12774    /// client's behavior.
12775    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
12776    where
12777        T: super::stub::RegionInstanceGroupManagerResizeRequests + 'static,
12778    {
12779        Self { inner: stub.into() }
12780    }
12781
12782    pub(crate) async fn new(
12783        config: gaxi::options::ClientConfig,
12784    ) -> crate::ClientBuilderResult<Self> {
12785        let inner = Self::build_inner(config).await?;
12786        Ok(Self { inner })
12787    }
12788
12789    async fn build_inner(
12790        conf: gaxi::options::ClientConfig,
12791    ) -> crate::ClientBuilderResult<
12792        std::sync::Arc<dyn super::stub::dynamic::RegionInstanceGroupManagerResizeRequests>,
12793    > {
12794        if gaxi::options::tracing_enabled(&conf) {
12795            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
12796        }
12797        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
12798    }
12799
12800    async fn build_transport(
12801        conf: gaxi::options::ClientConfig,
12802    ) -> crate::ClientBuilderResult<impl super::stub::RegionInstanceGroupManagerResizeRequests>
12803    {
12804        super::transport::RegionInstanceGroupManagerResizeRequests::new(conf).await
12805    }
12806
12807    async fn build_with_tracing(
12808        conf: gaxi::options::ClientConfig,
12809    ) -> crate::ClientBuilderResult<impl super::stub::RegionInstanceGroupManagerResizeRequests>
12810    {
12811        Self::build_transport(conf)
12812            .await
12813            .map(super::tracing::RegionInstanceGroupManagerResizeRequests::new)
12814    }
12815
12816    /// Cancels the specified resize request.
12817    /// Cancelled resize request no longer waits for the resources to be
12818    /// provisioned. Cancel is only possible for requests that are in accepted
12819    /// state.
12820    pub fn cancel(&self) -> super::builder::region_instance_group_manager_resize_requests::Cancel {
12821        super::builder::region_instance_group_manager_resize_requests::Cancel::new(
12822            self.inner.clone(),
12823        )
12824    }
12825
12826    /// Deletes the specified, inactive resize request. Requests that are still
12827    /// active cannot be deleted. Deleting request does not delete instances that
12828    /// were provisioned previously.
12829    pub fn delete(&self) -> super::builder::region_instance_group_manager_resize_requests::Delete {
12830        super::builder::region_instance_group_manager_resize_requests::Delete::new(
12831            self.inner.clone(),
12832        )
12833    }
12834
12835    /// Returns all of the details about the specified resize request.
12836    pub fn get(&self) -> super::builder::region_instance_group_manager_resize_requests::Get {
12837        super::builder::region_instance_group_manager_resize_requests::Get::new(self.inner.clone())
12838    }
12839
12840    /// Creates a new Resize Request that starts provisioning VMs immediately
12841    /// or queues VM creation.
12842    pub fn insert(&self) -> super::builder::region_instance_group_manager_resize_requests::Insert {
12843        super::builder::region_instance_group_manager_resize_requests::Insert::new(
12844            self.inner.clone(),
12845        )
12846    }
12847
12848    /// Retrieves a list of Resize Requests that are contained in the
12849    /// managed instance group.
12850    pub fn list(&self) -> super::builder::region_instance_group_manager_resize_requests::List {
12851        super::builder::region_instance_group_manager_resize_requests::List::new(self.inner.clone())
12852    }
12853
12854    /// Retrieves the specified region-specific Operations resource.
12855    pub fn get_operation(
12856        &self,
12857    ) -> super::builder::region_instance_group_manager_resize_requests::GetOperation {
12858        super::builder::region_instance_group_manager_resize_requests::GetOperation::new(
12859            self.inner.clone(),
12860        )
12861    }
12862}
12863
12864/// Implements a client for the Compute Engine API.
12865///
12866/// # Example
12867/// ```
12868/// # use google_cloud_compute_v1::client::RegionInstanceGroupManagers;
12869/// async fn sample(
12870/// ) -> anyhow::Result<()> {
12871///     let client = RegionInstanceGroupManagers::builder().build().await?;
12872///     // use `client` to make requests to the Compute Engine API.
12873///     Ok(())
12874/// }
12875/// ```
12876///
12877/// # Service Description
12878///
12879/// Service for the `regionInstanceGroupManagers` resource.
12880///
12881/// The client library was generated with API version 2026-09-01.
12882///
12883/// # Configuration
12884///
12885/// To configure `RegionInstanceGroupManagers` use the `with_*` methods in the type returned
12886/// by [builder()][RegionInstanceGroupManagers::builder]. The default configuration should
12887/// work for most applications. Common configuration changes include
12888///
12889/// * [with_endpoint()]: by default this client uses the global default endpoint
12890///   (`https://compute.googleapis.com`). Applications using regional
12891///   endpoints or running in restricted networks (e.g. a network configured
12892///   with [Private Google Access with VPC Service Controls]) may want to
12893///   override this default.
12894/// * [with_credentials()]: by default this client uses
12895///   [Application Default Credentials]. Applications using custom
12896///   authentication may need to override this default.
12897///
12898/// [with_endpoint()]: super::builder::region_instance_group_managers::ClientBuilder::with_endpoint
12899/// [with_credentials()]: super::builder::region_instance_group_managers::ClientBuilder::with_credentials
12900/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
12901/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
12902///
12903/// # Pooling and Cloning
12904///
12905/// `RegionInstanceGroupManagers` holds a connection pool internally, it is advised to
12906/// create one and reuse it. You do not need to wrap `RegionInstanceGroupManagers` in
12907/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
12908/// already uses an `Arc` internally.
12909#[cfg(feature = "region-instance-group-managers")]
12910#[cfg_attr(docsrs, doc(cfg(feature = "region-instance-group-managers")))]
12911#[derive(Clone, Debug)]
12912pub struct RegionInstanceGroupManagers {
12913    inner: std::sync::Arc<dyn super::stub::dynamic::RegionInstanceGroupManagers>,
12914}
12915
12916#[cfg(feature = "region-instance-group-managers")]
12917impl RegionInstanceGroupManagers {
12918    /// Returns a builder for [RegionInstanceGroupManagers].
12919    ///
12920    /// ```
12921    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
12922    /// # use google_cloud_compute_v1::client::RegionInstanceGroupManagers;
12923    /// let client = RegionInstanceGroupManagers::builder().build().await?;
12924    /// # Ok(()) }
12925    /// ```
12926    pub fn builder() -> super::builder::region_instance_group_managers::ClientBuilder {
12927        crate::new_client_builder(super::builder::region_instance_group_managers::client::Factory)
12928    }
12929
12930    /// Creates a new client from the provided stub.
12931    ///
12932    /// The most common case for calling this function is in tests mocking the
12933    /// client's behavior.
12934    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
12935    where
12936        T: super::stub::RegionInstanceGroupManagers + 'static,
12937    {
12938        Self { inner: stub.into() }
12939    }
12940
12941    pub(crate) async fn new(
12942        config: gaxi::options::ClientConfig,
12943    ) -> crate::ClientBuilderResult<Self> {
12944        let inner = Self::build_inner(config).await?;
12945        Ok(Self { inner })
12946    }
12947
12948    async fn build_inner(
12949        conf: gaxi::options::ClientConfig,
12950    ) -> crate::ClientBuilderResult<
12951        std::sync::Arc<dyn super::stub::dynamic::RegionInstanceGroupManagers>,
12952    > {
12953        if gaxi::options::tracing_enabled(&conf) {
12954            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
12955        }
12956        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
12957    }
12958
12959    async fn build_transport(
12960        conf: gaxi::options::ClientConfig,
12961    ) -> crate::ClientBuilderResult<impl super::stub::RegionInstanceGroupManagers> {
12962        super::transport::RegionInstanceGroupManagers::new(conf).await
12963    }
12964
12965    async fn build_with_tracing(
12966        conf: gaxi::options::ClientConfig,
12967    ) -> crate::ClientBuilderResult<impl super::stub::RegionInstanceGroupManagers> {
12968        Self::build_transport(conf)
12969            .await
12970            .map(super::tracing::RegionInstanceGroupManagers::new)
12971    }
12972
12973    /// Flags the specified instances to be immediately removed from the managed
12974    /// instance group. Abandoning an instance does not delete the
12975    /// instance, but it does remove the instance from any target pools that are
12976    /// applied by the managed instance group. This method reduces thetargetSize of the managed instance group by the
12977    /// number of instances that you abandon. This operation is marked asDONE when the action is scheduled even if the instances have
12978    /// not yet been removed from the group. You must separately verify the
12979    /// status of the abandoning action with thelistmanagedinstances
12980    /// method.
12981    ///
12982    /// If the group is part of a backend
12983    /// service that has enabled
12984    /// connection draining, it can take up to 60 seconds after the connection
12985    /// draining duration has elapsed before the VM instance is removed or deleted.
12986    ///
12987    /// You can specify a maximum of 1000 instances with this method per request.
12988    pub fn abandon_instances(
12989        &self,
12990    ) -> super::builder::region_instance_group_managers::AbandonInstances {
12991        super::builder::region_instance_group_managers::AbandonInstances::new(self.inner.clone())
12992    }
12993
12994    /// Apply updates to selected instances the managed instance group.
12995    pub fn apply_updates_to_instances(
12996        &self,
12997    ) -> super::builder::region_instance_group_managers::ApplyUpdatesToInstances {
12998        super::builder::region_instance_group_managers::ApplyUpdatesToInstances::new(
12999            self.inner.clone(),
13000        )
13001    }
13002
13003    /// Creates instances with per-instance configurations in this regional managed
13004    /// instance group. Instances are created using the current instance template.
13005    /// The create instances operation is marked DONE if
13006    /// the createInstances request is successful. The underlying
13007    /// actions take additional time. You must separately verify the status of thecreating or actions with the listmanagedinstances
13008    /// method.
13009    pub fn create_instances(
13010        &self,
13011    ) -> super::builder::region_instance_group_managers::CreateInstances {
13012        super::builder::region_instance_group_managers::CreateInstances::new(self.inner.clone())
13013    }
13014
13015    /// Deletes the specified managed instance group and all of the instances
13016    /// in that group.
13017    pub fn delete(&self) -> super::builder::region_instance_group_managers::Delete {
13018        super::builder::region_instance_group_managers::Delete::new(self.inner.clone())
13019    }
13020
13021    /// Flags the specified instances in the managed instance group to be
13022    /// immediately deleted. The instances are also removed from any target
13023    /// pools of which they were a member. This method reduces thetargetSize of the managed instance group by the number of
13024    /// instances that you delete.
13025    /// The deleteInstances operation is marked DONE if
13026    /// the deleteInstances request is successful. The underlying
13027    /// actions take additional time. You must separately verify the status of thedeleting action with thelistmanagedinstances
13028    /// method.
13029    ///
13030    /// If the group is part of a backend
13031    /// service that has enabled
13032    /// connection draining, it can take up to 60 seconds after the connection
13033    /// draining duration has elapsed before the VM instance is removed or deleted.
13034    ///
13035    /// You can specify a maximum of 1000 instances with this method per request.
13036    pub fn delete_instances(
13037        &self,
13038    ) -> super::builder::region_instance_group_managers::DeleteInstances {
13039        super::builder::region_instance_group_managers::DeleteInstances::new(self.inner.clone())
13040    }
13041
13042    /// Deletes selected per-instance configurations for the managed instance
13043    /// group.
13044    pub fn delete_per_instance_configs(
13045        &self,
13046    ) -> super::builder::region_instance_group_managers::DeletePerInstanceConfigs {
13047        super::builder::region_instance_group_managers::DeletePerInstanceConfigs::new(
13048            self.inner.clone(),
13049        )
13050    }
13051
13052    /// Returns all of the details about the specified managed instance group.
13053    pub fn get(&self) -> super::builder::region_instance_group_managers::Get {
13054        super::builder::region_instance_group_managers::Get::new(self.inner.clone())
13055    }
13056
13057    /// Creates a managed instance group using the information that you specify
13058    /// in the request. After the group is created, instances in the group are
13059    /// created using the specified instance template.
13060    /// This operation is marked as DONE when the group is created
13061    /// even if the instances in the group have not yet been created. You must
13062    /// separately verify the status of the individual instances with thelistmanagedinstances
13063    /// method.
13064    ///
13065    /// A regional managed instance group can contain up to 2000 instances.
13066    pub fn insert(&self) -> super::builder::region_instance_group_managers::Insert {
13067        super::builder::region_instance_group_managers::Insert::new(self.inner.clone())
13068    }
13069
13070    /// Retrieves the list of managed instance groups that are contained
13071    /// within the specified region.
13072    pub fn list(&self) -> super::builder::region_instance_group_managers::List {
13073        super::builder::region_instance_group_managers::List::new(self.inner.clone())
13074    }
13075
13076    /// Lists all errors thrown by actions on instances for a given regional
13077    /// managed instance group. The filter andorderBy query parameters are not supported.
13078    pub fn list_errors(&self) -> super::builder::region_instance_group_managers::ListErrors {
13079        super::builder::region_instance_group_managers::ListErrors::new(self.inner.clone())
13080    }
13081
13082    /// Lists the instances in the managed instance group and instances that are
13083    /// scheduled to be created. The list includes any current actions
13084    /// that the group has scheduled for its instances. The orderBy
13085    /// query parameter is not supported.   The `pageToken` query parameter is
13086    /// supported only if the group's `listManagedInstancesResults` field is set
13087    /// to `PAGINATED`.
13088    pub fn list_managed_instances(
13089        &self,
13090    ) -> super::builder::region_instance_group_managers::ListManagedInstances {
13091        super::builder::region_instance_group_managers::ListManagedInstances::new(
13092            self.inner.clone(),
13093        )
13094    }
13095
13096    /// Lists all of the per-instance configurations defined for the managed
13097    /// instance group. The orderBy query parameter is not supported.
13098    pub fn list_per_instance_configs(
13099        &self,
13100    ) -> super::builder::region_instance_group_managers::ListPerInstanceConfigs {
13101        super::builder::region_instance_group_managers::ListPerInstanceConfigs::new(
13102            self.inner.clone(),
13103        )
13104    }
13105
13106    /// Updates a managed instance group using the information that you specify
13107    /// in the request.
13108    /// This operation is marked as DONE when the group is patched
13109    /// even if the instances in the group are still in the process of being
13110    /// patched. You must separately verify the status of the individual instances
13111    /// with the listmanagedinstances
13112    /// method. This method supportsPATCH
13113    /// semantics and uses theJSON merge
13114    /// patch format and processing rules.
13115    ///
13116    /// If you update your group to specify a new template or instance
13117    /// configuration, it's possible that your intended specification for each VM
13118    /// in the group is different from the current state of that VM. To learn how
13119    /// to apply an updated configuration to the VMs in a MIG, seeUpdating instances in
13120    /// a MIG.
13121    pub fn patch(&self) -> super::builder::region_instance_group_managers::Patch {
13122        super::builder::region_instance_group_managers::Patch::new(self.inner.clone())
13123    }
13124
13125    /// Inserts or patches per-instance configurations for the managed instance
13126    /// group. perInstanceConfig.name serves as a key used to
13127    /// distinguish whether to perform insert or patch.
13128    pub fn patch_per_instance_configs(
13129        &self,
13130    ) -> super::builder::region_instance_group_managers::PatchPerInstanceConfigs {
13131        super::builder::region_instance_group_managers::PatchPerInstanceConfigs::new(
13132            self.inner.clone(),
13133        )
13134    }
13135
13136    /// Flags the specified VM instances in the managed instance group to be
13137    /// immediately recreated. Each instance is recreated using the group's current
13138    /// configuration. This operation is marked as DONE when the flag
13139    /// is set even if the instances have not yet been recreated. You must
13140    /// separately verify the status of each instance by checking itscurrentAction field; for more information, see Checking
13141    /// the status of managed instances.
13142    ///
13143    /// If the group is part of a backend
13144    /// service that has enabled
13145    /// connection draining, it can take up to 60 seconds after the connection
13146    /// draining duration has elapsed before the VM instance is removed or deleted.
13147    ///
13148    /// You can specify a maximum of 1000 instances with this method per request.
13149    pub fn recreate_instances(
13150        &self,
13151    ) -> super::builder::region_instance_group_managers::RecreateInstances {
13152        super::builder::region_instance_group_managers::RecreateInstances::new(self.inner.clone())
13153    }
13154
13155    /// Changes the intended size of the managed instance group. If you increase
13156    /// the size, the group creates new instances using the current instance
13157    /// template. If you decrease the size, the group deletes one or more
13158    /// instances.
13159    ///
13160    /// The resize operation is marked DONE if theresize request is successful. The underlying actions take
13161    /// additional time. You must separately verify the status of thecreating or deleting actions with thelistmanagedinstances
13162    /// method.
13163    ///
13164    /// If the group is part of a backend
13165    /// service that has enabled
13166    /// connection draining, it can take up to 60 seconds after the connection
13167    /// draining duration has elapsed before the VM instance is removed or deleted.
13168    pub fn resize(&self) -> super::builder::region_instance_group_managers::Resize {
13169        super::builder::region_instance_group_managers::Resize::new(self.inner.clone())
13170    }
13171
13172    /// Flags the specified instances in the managed instance group to be
13173    /// resumed. This method increases thetargetSize and decreases the targetSuspendedSize
13174    /// of the managed instance group by the number of instances that you resume.
13175    /// The resumeInstances operation is marked DONE if
13176    /// the resumeInstances request is successful. The underlying
13177    /// actions take additional time. You must separately verify the status of theRESUMING action with thelistmanagedinstances
13178    /// method.
13179    ///
13180    /// In this request, you can only specify instances that are suspended. For
13181    /// example, if an instance was previously suspended using the suspendInstances
13182    /// method, it can be resumed using the resumeInstances method.
13183    ///
13184    /// If a health check is attached to the managed instance group, the specified
13185    /// instances will be verified as healthy after they are resumed.
13186    ///
13187    /// You can specify a maximum of 1000 instances with this method per request.
13188    pub fn resume_instances(
13189        &self,
13190    ) -> super::builder::region_instance_group_managers::ResumeInstances {
13191        super::builder::region_instance_group_managers::ResumeInstances::new(self.inner.clone())
13192    }
13193
13194    /// Sets the instance template to use when creating new instances or recreating
13195    /// instances in this group. Existing instances are not affected.
13196    pub fn set_instance_template(
13197        &self,
13198    ) -> super::builder::region_instance_group_managers::SetInstanceTemplate {
13199        super::builder::region_instance_group_managers::SetInstanceTemplate::new(self.inner.clone())
13200    }
13201
13202    /// Modifies the target pools to which all new instances in this group are
13203    /// assigned. Existing instances in the group are not affected.
13204    pub fn set_target_pools(
13205        &self,
13206    ) -> super::builder::region_instance_group_managers::SetTargetPools {
13207        super::builder::region_instance_group_managers::SetTargetPools::new(self.inner.clone())
13208    }
13209
13210    /// Flags the specified instances in the managed instance group to be
13211    /// started. This method increases thetargetSize and decreases the targetStoppedSize
13212    /// of the managed instance group by the number of instances that you start.
13213    /// The startInstances operation is marked DONE if
13214    /// the startInstances request is successful. The underlying
13215    /// actions take additional time. You must separately verify the status of theSTARTING action with thelistmanagedinstances
13216    /// method.
13217    ///
13218    /// In this request, you can only specify instances that are stopped. For
13219    /// example, if an instance was previously stopped using the stopInstances
13220    /// method, it can be started using the startInstances method.
13221    ///
13222    /// If a health check is attached to the managed instance group, the specified
13223    /// instances will be verified as healthy after they are started.
13224    ///
13225    /// You can specify a maximum of 1000 instances with this method per request.
13226    pub fn start_instances(
13227        &self,
13228    ) -> super::builder::region_instance_group_managers::StartInstances {
13229        super::builder::region_instance_group_managers::StartInstances::new(self.inner.clone())
13230    }
13231
13232    /// Flags the specified instances in the managed instance group to be
13233    /// immediately stopped. You can only specify instances that are running in
13234    /// this request. This method reduces thetargetSize and increases the targetStoppedSize
13235    /// of the managed instance group by the number of instances that you stop.
13236    /// The stopInstances operation is marked DONE if
13237    /// the stopInstances request is successful. The underlying
13238    /// actions take additional time. You must separately verify the status of theSTOPPING action with thelistmanagedinstances
13239    /// method.
13240    ///
13241    /// If the standbyPolicy.initialDelaySec field is set, the group
13242    /// delays stopping the instances until initialDelaySec have
13243    /// passed from instance.creationTimestamp (that is, when the
13244    /// instance was created). This delay gives your application time to
13245    /// set itself up and initialize on the instance. If more thaninitialDelaySec seconds have passed sinceinstance.creationTimestamp when this method is called, there
13246    /// will be zero delay.
13247    ///
13248    /// If the group is part of a backend
13249    /// service that has enabled
13250    /// connection draining, it can take up to 60 seconds after the connection
13251    /// draining duration has elapsed before the VM instance is stopped.
13252    ///
13253    /// Stopped instances can be started using the startInstances
13254    /// method.
13255    ///
13256    /// You can specify a maximum of 1000 instances with this method per request.
13257    pub fn stop_instances(&self) -> super::builder::region_instance_group_managers::StopInstances {
13258        super::builder::region_instance_group_managers::StopInstances::new(self.inner.clone())
13259    }
13260
13261    /// Flags the specified instances in the managed instance group to be
13262    /// immediately suspended. You can only specify instances that are running in
13263    /// this request. This method reduces thetargetSize and increases the targetSuspendedSize
13264    /// of the managed instance group by the number of instances that you suspend.
13265    /// The suspendInstances operation is marked DONE if
13266    /// the suspendInstances request is successful. The underlying
13267    /// actions take additional time. You must separately verify the status of theSUSPENDING action with thelistmanagedinstances
13268    /// method.
13269    ///
13270    /// If the standbyPolicy.initialDelaySec field is set, the group
13271    /// delays suspension of the instances until initialDelaySec have
13272    /// passed from instance.creationTimestamp (that is, when the
13273    /// instance was created). This delay gives your application time to
13274    /// set itself up and initialize on the instance. If more thaninitialDelaySec seconds have passed sinceinstance.creationTimestamp when this method is called, there
13275    /// will be zero delay.
13276    ///
13277    /// If the group is part of a backend
13278    /// service that has enabled
13279    /// connection draining, it can take up to 60 seconds after the connection
13280    /// draining duration has elapsed before the VM instance is suspended.
13281    ///
13282    /// Suspended instances can be resumed using the resumeInstances
13283    /// method.
13284    ///
13285    /// You can specify a maximum of 1000 instances with this method per request.
13286    pub fn suspend_instances(
13287        &self,
13288    ) -> super::builder::region_instance_group_managers::SuspendInstances {
13289        super::builder::region_instance_group_managers::SuspendInstances::new(self.inner.clone())
13290    }
13291
13292    /// Inserts or updates per-instance configurations for the managed instance
13293    /// group. perInstanceConfig.name serves as a key used to
13294    /// distinguish whether to perform insert or patch.
13295    pub fn update_per_instance_configs(
13296        &self,
13297    ) -> super::builder::region_instance_group_managers::UpdatePerInstanceConfigs {
13298        super::builder::region_instance_group_managers::UpdatePerInstanceConfigs::new(
13299            self.inner.clone(),
13300        )
13301    }
13302
13303    /// Retrieves the specified region-specific Operations resource.
13304    pub fn get_operation(&self) -> super::builder::region_instance_group_managers::GetOperation {
13305        super::builder::region_instance_group_managers::GetOperation::new(self.inner.clone())
13306    }
13307}
13308
13309/// Implements a client for the Compute Engine API.
13310///
13311/// # Example
13312/// ```
13313/// # use google_cloud_compute_v1::client::RegionInstanceGroups;
13314/// async fn sample(
13315/// ) -> anyhow::Result<()> {
13316///     let client = RegionInstanceGroups::builder().build().await?;
13317///     // use `client` to make requests to the Compute Engine API.
13318///     Ok(())
13319/// }
13320/// ```
13321///
13322/// # Service Description
13323///
13324/// Service for the `regionInstanceGroups` resource.
13325///
13326/// The client library was generated with API version 2026-09-01.
13327///
13328/// # Configuration
13329///
13330/// To configure `RegionInstanceGroups` use the `with_*` methods in the type returned
13331/// by [builder()][RegionInstanceGroups::builder]. The default configuration should
13332/// work for most applications. Common configuration changes include
13333///
13334/// * [with_endpoint()]: by default this client uses the global default endpoint
13335///   (`https://compute.googleapis.com`). Applications using regional
13336///   endpoints or running in restricted networks (e.g. a network configured
13337///   with [Private Google Access with VPC Service Controls]) may want to
13338///   override this default.
13339/// * [with_credentials()]: by default this client uses
13340///   [Application Default Credentials]. Applications using custom
13341///   authentication may need to override this default.
13342///
13343/// [with_endpoint()]: super::builder::region_instance_groups::ClientBuilder::with_endpoint
13344/// [with_credentials()]: super::builder::region_instance_groups::ClientBuilder::with_credentials
13345/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
13346/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
13347///
13348/// # Pooling and Cloning
13349///
13350/// `RegionInstanceGroups` holds a connection pool internally, it is advised to
13351/// create one and reuse it. You do not need to wrap `RegionInstanceGroups` in
13352/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
13353/// already uses an `Arc` internally.
13354#[cfg(feature = "region-instance-groups")]
13355#[cfg_attr(docsrs, doc(cfg(feature = "region-instance-groups")))]
13356#[derive(Clone, Debug)]
13357pub struct RegionInstanceGroups {
13358    inner: std::sync::Arc<dyn super::stub::dynamic::RegionInstanceGroups>,
13359}
13360
13361#[cfg(feature = "region-instance-groups")]
13362impl RegionInstanceGroups {
13363    /// Returns a builder for [RegionInstanceGroups].
13364    ///
13365    /// ```
13366    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
13367    /// # use google_cloud_compute_v1::client::RegionInstanceGroups;
13368    /// let client = RegionInstanceGroups::builder().build().await?;
13369    /// # Ok(()) }
13370    /// ```
13371    pub fn builder() -> super::builder::region_instance_groups::ClientBuilder {
13372        crate::new_client_builder(super::builder::region_instance_groups::client::Factory)
13373    }
13374
13375    /// Creates a new client from the provided stub.
13376    ///
13377    /// The most common case for calling this function is in tests mocking the
13378    /// client's behavior.
13379    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
13380    where
13381        T: super::stub::RegionInstanceGroups + 'static,
13382    {
13383        Self { inner: stub.into() }
13384    }
13385
13386    pub(crate) async fn new(
13387        config: gaxi::options::ClientConfig,
13388    ) -> crate::ClientBuilderResult<Self> {
13389        let inner = Self::build_inner(config).await?;
13390        Ok(Self { inner })
13391    }
13392
13393    async fn build_inner(
13394        conf: gaxi::options::ClientConfig,
13395    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::RegionInstanceGroups>>
13396    {
13397        if gaxi::options::tracing_enabled(&conf) {
13398            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
13399        }
13400        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
13401    }
13402
13403    async fn build_transport(
13404        conf: gaxi::options::ClientConfig,
13405    ) -> crate::ClientBuilderResult<impl super::stub::RegionInstanceGroups> {
13406        super::transport::RegionInstanceGroups::new(conf).await
13407    }
13408
13409    async fn build_with_tracing(
13410        conf: gaxi::options::ClientConfig,
13411    ) -> crate::ClientBuilderResult<impl super::stub::RegionInstanceGroups> {
13412        Self::build_transport(conf)
13413            .await
13414            .map(super::tracing::RegionInstanceGroups::new)
13415    }
13416
13417    /// Returns the specified instance group resource.
13418    pub fn get(&self) -> super::builder::region_instance_groups::Get {
13419        super::builder::region_instance_groups::Get::new(self.inner.clone())
13420    }
13421
13422    /// Retrieves the list of instance group resources contained within
13423    /// the specified region.
13424    pub fn list(&self) -> super::builder::region_instance_groups::List {
13425        super::builder::region_instance_groups::List::new(self.inner.clone())
13426    }
13427
13428    /// Lists the instances in the specified instance group and displays
13429    /// information about the named ports. Depending on the specified options, this
13430    /// method can list all instances or only the instances that are running.
13431    /// The orderBy query parameter is not supported.
13432    pub fn list_instances(&self) -> super::builder::region_instance_groups::ListInstances {
13433        super::builder::region_instance_groups::ListInstances::new(self.inner.clone())
13434    }
13435
13436    /// Sets the named ports for the specified regional instance group.
13437    pub fn set_named_ports(&self) -> super::builder::region_instance_groups::SetNamedPorts {
13438        super::builder::region_instance_groups::SetNamedPorts::new(self.inner.clone())
13439    }
13440
13441    /// Returns permissions that a caller has on the specified resource.
13442    pub fn test_iam_permissions(
13443        &self,
13444    ) -> super::builder::region_instance_groups::TestIamPermissions {
13445        super::builder::region_instance_groups::TestIamPermissions::new(self.inner.clone())
13446    }
13447
13448    /// Retrieves the specified region-specific Operations resource.
13449    pub fn get_operation(&self) -> super::builder::region_instance_groups::GetOperation {
13450        super::builder::region_instance_groups::GetOperation::new(self.inner.clone())
13451    }
13452}
13453
13454/// Implements a client for the Compute Engine API.
13455///
13456/// # Example
13457/// ```
13458/// # use google_cloud_compute_v1::client::RegionInstanceTemplates;
13459/// async fn sample(
13460/// ) -> anyhow::Result<()> {
13461///     let client = RegionInstanceTemplates::builder().build().await?;
13462///     // use `client` to make requests to the Compute Engine API.
13463///     Ok(())
13464/// }
13465/// ```
13466///
13467/// # Service Description
13468///
13469/// Service for the `regionInstanceTemplates` resource.
13470///
13471/// The client library was generated with API version 2026-09-01.
13472///
13473/// # Configuration
13474///
13475/// To configure `RegionInstanceTemplates` use the `with_*` methods in the type returned
13476/// by [builder()][RegionInstanceTemplates::builder]. The default configuration should
13477/// work for most applications. Common configuration changes include
13478///
13479/// * [with_endpoint()]: by default this client uses the global default endpoint
13480///   (`https://compute.googleapis.com`). Applications using regional
13481///   endpoints or running in restricted networks (e.g. a network configured
13482///   with [Private Google Access with VPC Service Controls]) may want to
13483///   override this default.
13484/// * [with_credentials()]: by default this client uses
13485///   [Application Default Credentials]. Applications using custom
13486///   authentication may need to override this default.
13487///
13488/// [with_endpoint()]: super::builder::region_instance_templates::ClientBuilder::with_endpoint
13489/// [with_credentials()]: super::builder::region_instance_templates::ClientBuilder::with_credentials
13490/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
13491/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
13492///
13493/// # Pooling and Cloning
13494///
13495/// `RegionInstanceTemplates` holds a connection pool internally, it is advised to
13496/// create one and reuse it. You do not need to wrap `RegionInstanceTemplates` in
13497/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
13498/// already uses an `Arc` internally.
13499#[cfg(feature = "region-instance-templates")]
13500#[cfg_attr(docsrs, doc(cfg(feature = "region-instance-templates")))]
13501#[derive(Clone, Debug)]
13502pub struct RegionInstanceTemplates {
13503    inner: std::sync::Arc<dyn super::stub::dynamic::RegionInstanceTemplates>,
13504}
13505
13506#[cfg(feature = "region-instance-templates")]
13507impl RegionInstanceTemplates {
13508    /// Returns a builder for [RegionInstanceTemplates].
13509    ///
13510    /// ```
13511    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
13512    /// # use google_cloud_compute_v1::client::RegionInstanceTemplates;
13513    /// let client = RegionInstanceTemplates::builder().build().await?;
13514    /// # Ok(()) }
13515    /// ```
13516    pub fn builder() -> super::builder::region_instance_templates::ClientBuilder {
13517        crate::new_client_builder(super::builder::region_instance_templates::client::Factory)
13518    }
13519
13520    /// Creates a new client from the provided stub.
13521    ///
13522    /// The most common case for calling this function is in tests mocking the
13523    /// client's behavior.
13524    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
13525    where
13526        T: super::stub::RegionInstanceTemplates + 'static,
13527    {
13528        Self { inner: stub.into() }
13529    }
13530
13531    pub(crate) async fn new(
13532        config: gaxi::options::ClientConfig,
13533    ) -> crate::ClientBuilderResult<Self> {
13534        let inner = Self::build_inner(config).await?;
13535        Ok(Self { inner })
13536    }
13537
13538    async fn build_inner(
13539        conf: gaxi::options::ClientConfig,
13540    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::RegionInstanceTemplates>>
13541    {
13542        if gaxi::options::tracing_enabled(&conf) {
13543            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
13544        }
13545        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
13546    }
13547
13548    async fn build_transport(
13549        conf: gaxi::options::ClientConfig,
13550    ) -> crate::ClientBuilderResult<impl super::stub::RegionInstanceTemplates> {
13551        super::transport::RegionInstanceTemplates::new(conf).await
13552    }
13553
13554    async fn build_with_tracing(
13555        conf: gaxi::options::ClientConfig,
13556    ) -> crate::ClientBuilderResult<impl super::stub::RegionInstanceTemplates> {
13557        Self::build_transport(conf)
13558            .await
13559            .map(super::tracing::RegionInstanceTemplates::new)
13560    }
13561
13562    /// Deletes the specified instance template. Deleting an instance template is
13563    /// permanent and cannot be undone.
13564    pub fn delete(&self) -> super::builder::region_instance_templates::Delete {
13565        super::builder::region_instance_templates::Delete::new(self.inner.clone())
13566    }
13567
13568    /// Returns the specified instance template.
13569    pub fn get(&self) -> super::builder::region_instance_templates::Get {
13570        super::builder::region_instance_templates::Get::new(self.inner.clone())
13571    }
13572
13573    /// Creates an instance template in the specified project and region using the
13574    /// global instance template whose URL is included in the request.
13575    pub fn insert(&self) -> super::builder::region_instance_templates::Insert {
13576        super::builder::region_instance_templates::Insert::new(self.inner.clone())
13577    }
13578
13579    /// Retrieves a list of instance templates that are contained within the
13580    /// specified project and region.
13581    pub fn list(&self) -> super::builder::region_instance_templates::List {
13582        super::builder::region_instance_templates::List::new(self.inner.clone())
13583    }
13584
13585    /// Retrieves the specified region-specific Operations resource.
13586    pub fn get_operation(&self) -> super::builder::region_instance_templates::GetOperation {
13587        super::builder::region_instance_templates::GetOperation::new(self.inner.clone())
13588    }
13589}
13590
13591/// Implements a client for the Compute Engine API.
13592///
13593/// # Example
13594/// ```
13595/// # use google_cloud_compute_v1::client::RegionInstances;
13596/// async fn sample(
13597/// ) -> anyhow::Result<()> {
13598///     let client = RegionInstances::builder().build().await?;
13599///     // use `client` to make requests to the Compute Engine API.
13600///     Ok(())
13601/// }
13602/// ```
13603///
13604/// # Service Description
13605///
13606/// Service for the `regionInstances` resource.
13607///
13608/// The client library was generated with API version 2026-09-01.
13609///
13610/// # Configuration
13611///
13612/// To configure `RegionInstances` use the `with_*` methods in the type returned
13613/// by [builder()][RegionInstances::builder]. The default configuration should
13614/// work for most applications. Common configuration changes include
13615///
13616/// * [with_endpoint()]: by default this client uses the global default endpoint
13617///   (`https://compute.googleapis.com`). Applications using regional
13618///   endpoints or running in restricted networks (e.g. a network configured
13619///   with [Private Google Access with VPC Service Controls]) may want to
13620///   override this default.
13621/// * [with_credentials()]: by default this client uses
13622///   [Application Default Credentials]. Applications using custom
13623///   authentication may need to override this default.
13624///
13625/// [with_endpoint()]: super::builder::region_instances::ClientBuilder::with_endpoint
13626/// [with_credentials()]: super::builder::region_instances::ClientBuilder::with_credentials
13627/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
13628/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
13629///
13630/// # Pooling and Cloning
13631///
13632/// `RegionInstances` holds a connection pool internally, it is advised to
13633/// create one and reuse it. You do not need to wrap `RegionInstances` in
13634/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
13635/// already uses an `Arc` internally.
13636#[cfg(feature = "region-instances")]
13637#[cfg_attr(docsrs, doc(cfg(feature = "region-instances")))]
13638#[derive(Clone, Debug)]
13639pub struct RegionInstances {
13640    inner: std::sync::Arc<dyn super::stub::dynamic::RegionInstances>,
13641}
13642
13643#[cfg(feature = "region-instances")]
13644impl RegionInstances {
13645    /// Returns a builder for [RegionInstances].
13646    ///
13647    /// ```
13648    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
13649    /// # use google_cloud_compute_v1::client::RegionInstances;
13650    /// let client = RegionInstances::builder().build().await?;
13651    /// # Ok(()) }
13652    /// ```
13653    pub fn builder() -> super::builder::region_instances::ClientBuilder {
13654        crate::new_client_builder(super::builder::region_instances::client::Factory)
13655    }
13656
13657    /// Creates a new client from the provided stub.
13658    ///
13659    /// The most common case for calling this function is in tests mocking the
13660    /// client's behavior.
13661    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
13662    where
13663        T: super::stub::RegionInstances + 'static,
13664    {
13665        Self { inner: stub.into() }
13666    }
13667
13668    pub(crate) async fn new(
13669        config: gaxi::options::ClientConfig,
13670    ) -> crate::ClientBuilderResult<Self> {
13671        let inner = Self::build_inner(config).await?;
13672        Ok(Self { inner })
13673    }
13674
13675    async fn build_inner(
13676        conf: gaxi::options::ClientConfig,
13677    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::RegionInstances>> {
13678        if gaxi::options::tracing_enabled(&conf) {
13679            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
13680        }
13681        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
13682    }
13683
13684    async fn build_transport(
13685        conf: gaxi::options::ClientConfig,
13686    ) -> crate::ClientBuilderResult<impl super::stub::RegionInstances> {
13687        super::transport::RegionInstances::new(conf).await
13688    }
13689
13690    async fn build_with_tracing(
13691        conf: gaxi::options::ClientConfig,
13692    ) -> crate::ClientBuilderResult<impl super::stub::RegionInstances> {
13693        Self::build_transport(conf)
13694            .await
13695            .map(super::tracing::RegionInstances::new)
13696    }
13697
13698    /// Creates multiple instances in a given region. Count specifies the number of
13699    /// instances to create.
13700    pub fn bulk_insert(&self) -> super::builder::region_instances::BulkInsert {
13701        super::builder::region_instances::BulkInsert::new(self.inner.clone())
13702    }
13703
13704    /// Retrieves the specified region-specific Operations resource.
13705    pub fn get_operation(&self) -> super::builder::region_instances::GetOperation {
13706        super::builder::region_instances::GetOperation::new(self.inner.clone())
13707    }
13708}
13709
13710/// Implements a client for the Compute Engine API.
13711///
13712/// # Example
13713/// ```
13714/// # use google_cloud_compute_v1::client::RegionInstantSnapshotGroups;
13715/// async fn sample(
13716/// ) -> anyhow::Result<()> {
13717///     let client = RegionInstantSnapshotGroups::builder().build().await?;
13718///     // use `client` to make requests to the Compute Engine API.
13719///     Ok(())
13720/// }
13721/// ```
13722///
13723/// # Service Description
13724///
13725/// Service for the `regionInstantSnapshotGroups` resource.
13726///
13727/// The client library was generated with API version 2026-09-01.
13728///
13729/// # Configuration
13730///
13731/// To configure `RegionInstantSnapshotGroups` use the `with_*` methods in the type returned
13732/// by [builder()][RegionInstantSnapshotGroups::builder]. The default configuration should
13733/// work for most applications. Common configuration changes include
13734///
13735/// * [with_endpoint()]: by default this client uses the global default endpoint
13736///   (`https://compute.googleapis.com`). Applications using regional
13737///   endpoints or running in restricted networks (e.g. a network configured
13738///   with [Private Google Access with VPC Service Controls]) may want to
13739///   override this default.
13740/// * [with_credentials()]: by default this client uses
13741///   [Application Default Credentials]. Applications using custom
13742///   authentication may need to override this default.
13743///
13744/// [with_endpoint()]: super::builder::region_instant_snapshot_groups::ClientBuilder::with_endpoint
13745/// [with_credentials()]: super::builder::region_instant_snapshot_groups::ClientBuilder::with_credentials
13746/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
13747/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
13748///
13749/// # Pooling and Cloning
13750///
13751/// `RegionInstantSnapshotGroups` holds a connection pool internally, it is advised to
13752/// create one and reuse it. You do not need to wrap `RegionInstantSnapshotGroups` in
13753/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
13754/// already uses an `Arc` internally.
13755#[cfg(feature = "region-instant-snapshot-groups")]
13756#[cfg_attr(docsrs, doc(cfg(feature = "region-instant-snapshot-groups")))]
13757#[derive(Clone, Debug)]
13758pub struct RegionInstantSnapshotGroups {
13759    inner: std::sync::Arc<dyn super::stub::dynamic::RegionInstantSnapshotGroups>,
13760}
13761
13762#[cfg(feature = "region-instant-snapshot-groups")]
13763impl RegionInstantSnapshotGroups {
13764    /// Returns a builder for [RegionInstantSnapshotGroups].
13765    ///
13766    /// ```
13767    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
13768    /// # use google_cloud_compute_v1::client::RegionInstantSnapshotGroups;
13769    /// let client = RegionInstantSnapshotGroups::builder().build().await?;
13770    /// # Ok(()) }
13771    /// ```
13772    pub fn builder() -> super::builder::region_instant_snapshot_groups::ClientBuilder {
13773        crate::new_client_builder(super::builder::region_instant_snapshot_groups::client::Factory)
13774    }
13775
13776    /// Creates a new client from the provided stub.
13777    ///
13778    /// The most common case for calling this function is in tests mocking the
13779    /// client's behavior.
13780    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
13781    where
13782        T: super::stub::RegionInstantSnapshotGroups + 'static,
13783    {
13784        Self { inner: stub.into() }
13785    }
13786
13787    pub(crate) async fn new(
13788        config: gaxi::options::ClientConfig,
13789    ) -> crate::ClientBuilderResult<Self> {
13790        let inner = Self::build_inner(config).await?;
13791        Ok(Self { inner })
13792    }
13793
13794    async fn build_inner(
13795        conf: gaxi::options::ClientConfig,
13796    ) -> crate::ClientBuilderResult<
13797        std::sync::Arc<dyn super::stub::dynamic::RegionInstantSnapshotGroups>,
13798    > {
13799        if gaxi::options::tracing_enabled(&conf) {
13800            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
13801        }
13802        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
13803    }
13804
13805    async fn build_transport(
13806        conf: gaxi::options::ClientConfig,
13807    ) -> crate::ClientBuilderResult<impl super::stub::RegionInstantSnapshotGroups> {
13808        super::transport::RegionInstantSnapshotGroups::new(conf).await
13809    }
13810
13811    async fn build_with_tracing(
13812        conf: gaxi::options::ClientConfig,
13813    ) -> crate::ClientBuilderResult<impl super::stub::RegionInstantSnapshotGroups> {
13814        Self::build_transport(conf)
13815            .await
13816            .map(super::tracing::RegionInstantSnapshotGroups::new)
13817    }
13818
13819    /// deletes a Regional InstantSnapshotGroup resource
13820    pub fn delete(&self) -> super::builder::region_instant_snapshot_groups::Delete {
13821        super::builder::region_instant_snapshot_groups::Delete::new(self.inner.clone())
13822    }
13823
13824    /// returns the specified InstantSnapshotGroup resource in the specified
13825    /// region.
13826    pub fn get(&self) -> super::builder::region_instant_snapshot_groups::Get {
13827        super::builder::region_instant_snapshot_groups::Get::new(self.inner.clone())
13828    }
13829
13830    /// Gets the access control policy for a resource. May be empty if no such
13831    /// policy or resource exists.
13832    pub fn get_iam_policy(&self) -> super::builder::region_instant_snapshot_groups::GetIamPolicy {
13833        super::builder::region_instant_snapshot_groups::GetIamPolicy::new(self.inner.clone())
13834    }
13835
13836    /// creates a Regional InstantSnapshotGroup resource
13837    pub fn insert(&self) -> super::builder::region_instant_snapshot_groups::Insert {
13838        super::builder::region_instant_snapshot_groups::Insert::new(self.inner.clone())
13839    }
13840
13841    /// retrieves the list of InstantSnapshotGroup resources contained within
13842    /// the specified region.
13843    pub fn list(&self) -> super::builder::region_instant_snapshot_groups::List {
13844        super::builder::region_instant_snapshot_groups::List::new(self.inner.clone())
13845    }
13846
13847    /// Sets the access control policy on the specified resource.
13848    /// Replaces any existing policy.
13849    pub fn set_iam_policy(&self) -> super::builder::region_instant_snapshot_groups::SetIamPolicy {
13850        super::builder::region_instant_snapshot_groups::SetIamPolicy::new(self.inner.clone())
13851    }
13852
13853    /// Returns permissions that a caller has on the specified resource.
13854    pub fn test_iam_permissions(
13855        &self,
13856    ) -> super::builder::region_instant_snapshot_groups::TestIamPermissions {
13857        super::builder::region_instant_snapshot_groups::TestIamPermissions::new(self.inner.clone())
13858    }
13859
13860    /// Retrieves the specified region-specific Operations resource.
13861    pub fn get_operation(&self) -> super::builder::region_instant_snapshot_groups::GetOperation {
13862        super::builder::region_instant_snapshot_groups::GetOperation::new(self.inner.clone())
13863    }
13864}
13865
13866/// Implements a client for the Compute Engine API.
13867///
13868/// # Example
13869/// ```
13870/// # use google_cloud_compute_v1::client::RegionInstantSnapshots;
13871/// async fn sample(
13872/// ) -> anyhow::Result<()> {
13873///     let client = RegionInstantSnapshots::builder().build().await?;
13874///     // use `client` to make requests to the Compute Engine API.
13875///     Ok(())
13876/// }
13877/// ```
13878///
13879/// # Service Description
13880///
13881/// Service for the `regionInstantSnapshots` resource.
13882///
13883/// The client library was generated with API version 2026-09-01.
13884///
13885/// # Configuration
13886///
13887/// To configure `RegionInstantSnapshots` use the `with_*` methods in the type returned
13888/// by [builder()][RegionInstantSnapshots::builder]. The default configuration should
13889/// work for most applications. Common configuration changes include
13890///
13891/// * [with_endpoint()]: by default this client uses the global default endpoint
13892///   (`https://compute.googleapis.com`). Applications using regional
13893///   endpoints or running in restricted networks (e.g. a network configured
13894///   with [Private Google Access with VPC Service Controls]) may want to
13895///   override this default.
13896/// * [with_credentials()]: by default this client uses
13897///   [Application Default Credentials]. Applications using custom
13898///   authentication may need to override this default.
13899///
13900/// [with_endpoint()]: super::builder::region_instant_snapshots::ClientBuilder::with_endpoint
13901/// [with_credentials()]: super::builder::region_instant_snapshots::ClientBuilder::with_credentials
13902/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
13903/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
13904///
13905/// # Pooling and Cloning
13906///
13907/// `RegionInstantSnapshots` holds a connection pool internally, it is advised to
13908/// create one and reuse it. You do not need to wrap `RegionInstantSnapshots` in
13909/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
13910/// already uses an `Arc` internally.
13911#[cfg(feature = "region-instant-snapshots")]
13912#[cfg_attr(docsrs, doc(cfg(feature = "region-instant-snapshots")))]
13913#[derive(Clone, Debug)]
13914pub struct RegionInstantSnapshots {
13915    inner: std::sync::Arc<dyn super::stub::dynamic::RegionInstantSnapshots>,
13916}
13917
13918#[cfg(feature = "region-instant-snapshots")]
13919impl RegionInstantSnapshots {
13920    /// Returns a builder for [RegionInstantSnapshots].
13921    ///
13922    /// ```
13923    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
13924    /// # use google_cloud_compute_v1::client::RegionInstantSnapshots;
13925    /// let client = RegionInstantSnapshots::builder().build().await?;
13926    /// # Ok(()) }
13927    /// ```
13928    pub fn builder() -> super::builder::region_instant_snapshots::ClientBuilder {
13929        crate::new_client_builder(super::builder::region_instant_snapshots::client::Factory)
13930    }
13931
13932    /// Creates a new client from the provided stub.
13933    ///
13934    /// The most common case for calling this function is in tests mocking the
13935    /// client's behavior.
13936    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
13937    where
13938        T: super::stub::RegionInstantSnapshots + 'static,
13939    {
13940        Self { inner: stub.into() }
13941    }
13942
13943    pub(crate) async fn new(
13944        config: gaxi::options::ClientConfig,
13945    ) -> crate::ClientBuilderResult<Self> {
13946        let inner = Self::build_inner(config).await?;
13947        Ok(Self { inner })
13948    }
13949
13950    async fn build_inner(
13951        conf: gaxi::options::ClientConfig,
13952    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::RegionInstantSnapshots>>
13953    {
13954        if gaxi::options::tracing_enabled(&conf) {
13955            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
13956        }
13957        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
13958    }
13959
13960    async fn build_transport(
13961        conf: gaxi::options::ClientConfig,
13962    ) -> crate::ClientBuilderResult<impl super::stub::RegionInstantSnapshots> {
13963        super::transport::RegionInstantSnapshots::new(conf).await
13964    }
13965
13966    async fn build_with_tracing(
13967        conf: gaxi::options::ClientConfig,
13968    ) -> crate::ClientBuilderResult<impl super::stub::RegionInstantSnapshots> {
13969        Self::build_transport(conf)
13970            .await
13971            .map(super::tracing::RegionInstantSnapshots::new)
13972    }
13973
13974    /// Deletes the specified InstantSnapshot resource. Keep in mind that deleting
13975    /// a single instantSnapshot might not necessarily delete all the data on that
13976    /// instantSnapshot. If any data on the instantSnapshot that is marked for
13977    /// deletion is needed for subsequent instantSnapshots, the data will be moved
13978    /// to the next corresponding instantSnapshot.
13979    ///
13980    /// For more information, seeDeleting
13981    /// instantSnapshots.
13982    pub fn delete(&self) -> super::builder::region_instant_snapshots::Delete {
13983        super::builder::region_instant_snapshots::Delete::new(self.inner.clone())
13984    }
13985
13986    /// Returns the specified InstantSnapshot resource in the specified region.
13987    pub fn get(&self) -> super::builder::region_instant_snapshots::Get {
13988        super::builder::region_instant_snapshots::Get::new(self.inner.clone())
13989    }
13990
13991    /// Gets the access control policy for a resource. May be empty if no such
13992    /// policy or resource exists.
13993    pub fn get_iam_policy(&self) -> super::builder::region_instant_snapshots::GetIamPolicy {
13994        super::builder::region_instant_snapshots::GetIamPolicy::new(self.inner.clone())
13995    }
13996
13997    /// Creates an instant snapshot in the specified region.
13998    pub fn insert(&self) -> super::builder::region_instant_snapshots::Insert {
13999        super::builder::region_instant_snapshots::Insert::new(self.inner.clone())
14000    }
14001
14002    /// Retrieves the list of InstantSnapshot resources contained within
14003    /// the specified region.
14004    pub fn list(&self) -> super::builder::region_instant_snapshots::List {
14005        super::builder::region_instant_snapshots::List::new(self.inner.clone())
14006    }
14007
14008    /// Sets the access control policy on the specified resource.
14009    /// Replaces any existing policy.
14010    pub fn set_iam_policy(&self) -> super::builder::region_instant_snapshots::SetIamPolicy {
14011        super::builder::region_instant_snapshots::SetIamPolicy::new(self.inner.clone())
14012    }
14013
14014    /// Sets the labels on a instantSnapshot in the given region. To learn more
14015    /// about labels, read the Labeling
14016    /// Resources documentation.
14017    pub fn set_labels(&self) -> super::builder::region_instant_snapshots::SetLabels {
14018        super::builder::region_instant_snapshots::SetLabels::new(self.inner.clone())
14019    }
14020
14021    /// Returns permissions that a caller has on the specified resource.
14022    pub fn test_iam_permissions(
14023        &self,
14024    ) -> super::builder::region_instant_snapshots::TestIamPermissions {
14025        super::builder::region_instant_snapshots::TestIamPermissions::new(self.inner.clone())
14026    }
14027
14028    /// Retrieves the specified region-specific Operations resource.
14029    pub fn get_operation(&self) -> super::builder::region_instant_snapshots::GetOperation {
14030        super::builder::region_instant_snapshots::GetOperation::new(self.inner.clone())
14031    }
14032}
14033
14034/// Implements a client for the Compute Engine API.
14035///
14036/// # Example
14037/// ```
14038/// # use google_cloud_compute_v1::client::RegionNetworkEndpointGroups;
14039/// async fn sample(
14040/// ) -> anyhow::Result<()> {
14041///     let client = RegionNetworkEndpointGroups::builder().build().await?;
14042///     // use `client` to make requests to the Compute Engine API.
14043///     Ok(())
14044/// }
14045/// ```
14046///
14047/// # Service Description
14048///
14049/// Service for the `regionNetworkEndpointGroups` resource.
14050///
14051/// The client library was generated with API version 2026-09-01.
14052///
14053/// # Configuration
14054///
14055/// To configure `RegionNetworkEndpointGroups` use the `with_*` methods in the type returned
14056/// by [builder()][RegionNetworkEndpointGroups::builder]. The default configuration should
14057/// work for most applications. Common configuration changes include
14058///
14059/// * [with_endpoint()]: by default this client uses the global default endpoint
14060///   (`https://compute.googleapis.com`). Applications using regional
14061///   endpoints or running in restricted networks (e.g. a network configured
14062///   with [Private Google Access with VPC Service Controls]) may want to
14063///   override this default.
14064/// * [with_credentials()]: by default this client uses
14065///   [Application Default Credentials]. Applications using custom
14066///   authentication may need to override this default.
14067///
14068/// [with_endpoint()]: super::builder::region_network_endpoint_groups::ClientBuilder::with_endpoint
14069/// [with_credentials()]: super::builder::region_network_endpoint_groups::ClientBuilder::with_credentials
14070/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
14071/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
14072///
14073/// # Pooling and Cloning
14074///
14075/// `RegionNetworkEndpointGroups` holds a connection pool internally, it is advised to
14076/// create one and reuse it. You do not need to wrap `RegionNetworkEndpointGroups` in
14077/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
14078/// already uses an `Arc` internally.
14079#[cfg(feature = "region-network-endpoint-groups")]
14080#[cfg_attr(docsrs, doc(cfg(feature = "region-network-endpoint-groups")))]
14081#[derive(Clone, Debug)]
14082pub struct RegionNetworkEndpointGroups {
14083    inner: std::sync::Arc<dyn super::stub::dynamic::RegionNetworkEndpointGroups>,
14084}
14085
14086#[cfg(feature = "region-network-endpoint-groups")]
14087impl RegionNetworkEndpointGroups {
14088    /// Returns a builder for [RegionNetworkEndpointGroups].
14089    ///
14090    /// ```
14091    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
14092    /// # use google_cloud_compute_v1::client::RegionNetworkEndpointGroups;
14093    /// let client = RegionNetworkEndpointGroups::builder().build().await?;
14094    /// # Ok(()) }
14095    /// ```
14096    pub fn builder() -> super::builder::region_network_endpoint_groups::ClientBuilder {
14097        crate::new_client_builder(super::builder::region_network_endpoint_groups::client::Factory)
14098    }
14099
14100    /// Creates a new client from the provided stub.
14101    ///
14102    /// The most common case for calling this function is in tests mocking the
14103    /// client's behavior.
14104    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
14105    where
14106        T: super::stub::RegionNetworkEndpointGroups + 'static,
14107    {
14108        Self { inner: stub.into() }
14109    }
14110
14111    pub(crate) async fn new(
14112        config: gaxi::options::ClientConfig,
14113    ) -> crate::ClientBuilderResult<Self> {
14114        let inner = Self::build_inner(config).await?;
14115        Ok(Self { inner })
14116    }
14117
14118    async fn build_inner(
14119        conf: gaxi::options::ClientConfig,
14120    ) -> crate::ClientBuilderResult<
14121        std::sync::Arc<dyn super::stub::dynamic::RegionNetworkEndpointGroups>,
14122    > {
14123        if gaxi::options::tracing_enabled(&conf) {
14124            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
14125        }
14126        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
14127    }
14128
14129    async fn build_transport(
14130        conf: gaxi::options::ClientConfig,
14131    ) -> crate::ClientBuilderResult<impl super::stub::RegionNetworkEndpointGroups> {
14132        super::transport::RegionNetworkEndpointGroups::new(conf).await
14133    }
14134
14135    async fn build_with_tracing(
14136        conf: gaxi::options::ClientConfig,
14137    ) -> crate::ClientBuilderResult<impl super::stub::RegionNetworkEndpointGroups> {
14138        Self::build_transport(conf)
14139            .await
14140            .map(super::tracing::RegionNetworkEndpointGroups::new)
14141    }
14142
14143    /// Attach a list of network endpoints to the specified network endpoint group.
14144    pub fn attach_network_endpoints(
14145        &self,
14146    ) -> super::builder::region_network_endpoint_groups::AttachNetworkEndpoints {
14147        super::builder::region_network_endpoint_groups::AttachNetworkEndpoints::new(
14148            self.inner.clone(),
14149        )
14150    }
14151
14152    /// Deletes the specified network endpoint group. Note that the NEG cannot be
14153    /// deleted if it is configured as a backend of a backend service.
14154    pub fn delete(&self) -> super::builder::region_network_endpoint_groups::Delete {
14155        super::builder::region_network_endpoint_groups::Delete::new(self.inner.clone())
14156    }
14157
14158    /// Detach the network endpoint from the specified network endpoint group.
14159    pub fn detach_network_endpoints(
14160        &self,
14161    ) -> super::builder::region_network_endpoint_groups::DetachNetworkEndpoints {
14162        super::builder::region_network_endpoint_groups::DetachNetworkEndpoints::new(
14163            self.inner.clone(),
14164        )
14165    }
14166
14167    /// Returns the specified network endpoint group.
14168    pub fn get(&self) -> super::builder::region_network_endpoint_groups::Get {
14169        super::builder::region_network_endpoint_groups::Get::new(self.inner.clone())
14170    }
14171
14172    /// Creates a network endpoint group in the specified project using the
14173    /// parameters that are included in the request.
14174    ///
14175    /// Note: Use the following APIs to manage network endpoint groups:
14176    ///
14177    /// - To manage NEGs with zonal scope (such as zonal NEGs, hybrid connectivity
14178    ///   NEGs): zonal
14179    ///   API
14180    /// - To manage NEGs with regional scope (such as regional internet NEGs,
14181    ///   serverless NEGs, Private Service Connect NEGs): regional
14182    ///   API
14183    /// - To manage NEGs with global scope (such as global internet NEGs):global
14184    ///   API
14185    pub fn insert(&self) -> super::builder::region_network_endpoint_groups::Insert {
14186        super::builder::region_network_endpoint_groups::Insert::new(self.inner.clone())
14187    }
14188
14189    /// Retrieves the list of regional network endpoint groups available to the
14190    /// specified project in the given region.
14191    pub fn list(&self) -> super::builder::region_network_endpoint_groups::List {
14192        super::builder::region_network_endpoint_groups::List::new(self.inner.clone())
14193    }
14194
14195    /// Lists the network endpoints in the specified network endpoint group.
14196    pub fn list_network_endpoints(
14197        &self,
14198    ) -> super::builder::region_network_endpoint_groups::ListNetworkEndpoints {
14199        super::builder::region_network_endpoint_groups::ListNetworkEndpoints::new(
14200            self.inner.clone(),
14201        )
14202    }
14203
14204    /// Retrieves the specified region-specific Operations resource.
14205    pub fn get_operation(&self) -> super::builder::region_network_endpoint_groups::GetOperation {
14206        super::builder::region_network_endpoint_groups::GetOperation::new(self.inner.clone())
14207    }
14208}
14209
14210/// Implements a client for the Compute Engine API.
14211///
14212/// # Example
14213/// ```
14214/// # use google_cloud_compute_v1::client::RegionNetworkFirewallPolicies;
14215/// async fn sample(
14216/// ) -> anyhow::Result<()> {
14217///     let client = RegionNetworkFirewallPolicies::builder().build().await?;
14218///     // use `client` to make requests to the Compute Engine API.
14219///     Ok(())
14220/// }
14221/// ```
14222///
14223/// # Service Description
14224///
14225/// Service for the `regionNetworkFirewallPolicies` resource.
14226///
14227/// The client library was generated with API version 2026-09-01.
14228///
14229/// # Configuration
14230///
14231/// To configure `RegionNetworkFirewallPolicies` use the `with_*` methods in the type returned
14232/// by [builder()][RegionNetworkFirewallPolicies::builder]. The default configuration should
14233/// work for most applications. Common configuration changes include
14234///
14235/// * [with_endpoint()]: by default this client uses the global default endpoint
14236///   (`https://compute.googleapis.com`). Applications using regional
14237///   endpoints or running in restricted networks (e.g. a network configured
14238///   with [Private Google Access with VPC Service Controls]) may want to
14239///   override this default.
14240/// * [with_credentials()]: by default this client uses
14241///   [Application Default Credentials]. Applications using custom
14242///   authentication may need to override this default.
14243///
14244/// [with_endpoint()]: super::builder::region_network_firewall_policies::ClientBuilder::with_endpoint
14245/// [with_credentials()]: super::builder::region_network_firewall_policies::ClientBuilder::with_credentials
14246/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
14247/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
14248///
14249/// # Pooling and Cloning
14250///
14251/// `RegionNetworkFirewallPolicies` holds a connection pool internally, it is advised to
14252/// create one and reuse it. You do not need to wrap `RegionNetworkFirewallPolicies` in
14253/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
14254/// already uses an `Arc` internally.
14255#[cfg(feature = "region-network-firewall-policies")]
14256#[cfg_attr(docsrs, doc(cfg(feature = "region-network-firewall-policies")))]
14257#[derive(Clone, Debug)]
14258pub struct RegionNetworkFirewallPolicies {
14259    inner: std::sync::Arc<dyn super::stub::dynamic::RegionNetworkFirewallPolicies>,
14260}
14261
14262#[cfg(feature = "region-network-firewall-policies")]
14263impl RegionNetworkFirewallPolicies {
14264    /// Returns a builder for [RegionNetworkFirewallPolicies].
14265    ///
14266    /// ```
14267    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
14268    /// # use google_cloud_compute_v1::client::RegionNetworkFirewallPolicies;
14269    /// let client = RegionNetworkFirewallPolicies::builder().build().await?;
14270    /// # Ok(()) }
14271    /// ```
14272    pub fn builder() -> super::builder::region_network_firewall_policies::ClientBuilder {
14273        crate::new_client_builder(super::builder::region_network_firewall_policies::client::Factory)
14274    }
14275
14276    /// Creates a new client from the provided stub.
14277    ///
14278    /// The most common case for calling this function is in tests mocking the
14279    /// client's behavior.
14280    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
14281    where
14282        T: super::stub::RegionNetworkFirewallPolicies + 'static,
14283    {
14284        Self { inner: stub.into() }
14285    }
14286
14287    pub(crate) async fn new(
14288        config: gaxi::options::ClientConfig,
14289    ) -> crate::ClientBuilderResult<Self> {
14290        let inner = Self::build_inner(config).await?;
14291        Ok(Self { inner })
14292    }
14293
14294    async fn build_inner(
14295        conf: gaxi::options::ClientConfig,
14296    ) -> crate::ClientBuilderResult<
14297        std::sync::Arc<dyn super::stub::dynamic::RegionNetworkFirewallPolicies>,
14298    > {
14299        if gaxi::options::tracing_enabled(&conf) {
14300            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
14301        }
14302        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
14303    }
14304
14305    async fn build_transport(
14306        conf: gaxi::options::ClientConfig,
14307    ) -> crate::ClientBuilderResult<impl super::stub::RegionNetworkFirewallPolicies> {
14308        super::transport::RegionNetworkFirewallPolicies::new(conf).await
14309    }
14310
14311    async fn build_with_tracing(
14312        conf: gaxi::options::ClientConfig,
14313    ) -> crate::ClientBuilderResult<impl super::stub::RegionNetworkFirewallPolicies> {
14314        Self::build_transport(conf)
14315            .await
14316            .map(super::tracing::RegionNetworkFirewallPolicies::new)
14317    }
14318
14319    /// Inserts an association for the specified network firewall policy.
14320    pub fn add_association(
14321        &self,
14322    ) -> super::builder::region_network_firewall_policies::AddAssociation {
14323        super::builder::region_network_firewall_policies::AddAssociation::new(self.inner.clone())
14324    }
14325
14326    /// Inserts a rule into a network firewall policy.
14327    pub fn add_rule(&self) -> super::builder::region_network_firewall_policies::AddRule {
14328        super::builder::region_network_firewall_policies::AddRule::new(self.inner.clone())
14329    }
14330
14331    /// Copies rules to the specified network firewall policy.
14332    pub fn clone_rules(&self) -> super::builder::region_network_firewall_policies::CloneRules {
14333        super::builder::region_network_firewall_policies::CloneRules::new(self.inner.clone())
14334    }
14335
14336    /// Deletes the specified network firewall policy.
14337    pub fn delete(&self) -> super::builder::region_network_firewall_policies::Delete {
14338        super::builder::region_network_firewall_policies::Delete::new(self.inner.clone())
14339    }
14340
14341    /// Returns the specified network firewall policy.
14342    pub fn get(&self) -> super::builder::region_network_firewall_policies::Get {
14343        super::builder::region_network_firewall_policies::Get::new(self.inner.clone())
14344    }
14345
14346    /// Gets an association with the specified name.
14347    pub fn get_association(
14348        &self,
14349    ) -> super::builder::region_network_firewall_policies::GetAssociation {
14350        super::builder::region_network_firewall_policies::GetAssociation::new(self.inner.clone())
14351    }
14352
14353    /// Returns the effective firewalls on a given network.
14354    pub fn get_effective_firewalls(
14355        &self,
14356    ) -> super::builder::region_network_firewall_policies::GetEffectiveFirewalls {
14357        super::builder::region_network_firewall_policies::GetEffectiveFirewalls::new(
14358            self.inner.clone(),
14359        )
14360    }
14361
14362    /// Gets the access control policy for a resource. May be empty if no such
14363    /// policy or resource exists.
14364    pub fn get_iam_policy(&self) -> super::builder::region_network_firewall_policies::GetIamPolicy {
14365        super::builder::region_network_firewall_policies::GetIamPolicy::new(self.inner.clone())
14366    }
14367
14368    /// Gets a rule of the specified priority.
14369    pub fn get_rule(&self) -> super::builder::region_network_firewall_policies::GetRule {
14370        super::builder::region_network_firewall_policies::GetRule::new(self.inner.clone())
14371    }
14372
14373    /// Creates a new network firewall policy in the specified project and region.
14374    pub fn insert(&self) -> super::builder::region_network_firewall_policies::Insert {
14375        super::builder::region_network_firewall_policies::Insert::new(self.inner.clone())
14376    }
14377
14378    /// Lists all the network firewall policies that have been configured
14379    /// for the specified project in the given region.
14380    pub fn list(&self) -> super::builder::region_network_firewall_policies::List {
14381        super::builder::region_network_firewall_policies::List::new(self.inner.clone())
14382    }
14383
14384    /// Patches the specified network firewall policy.
14385    pub fn patch(&self) -> super::builder::region_network_firewall_policies::Patch {
14386        super::builder::region_network_firewall_policies::Patch::new(self.inner.clone())
14387    }
14388
14389    /// Updates an association for the specified network firewall policy.
14390    pub fn patch_association(
14391        &self,
14392    ) -> super::builder::region_network_firewall_policies::PatchAssociation {
14393        super::builder::region_network_firewall_policies::PatchAssociation::new(self.inner.clone())
14394    }
14395
14396    /// Patches a rule of the specified priority.
14397    pub fn patch_rule(&self) -> super::builder::region_network_firewall_policies::PatchRule {
14398        super::builder::region_network_firewall_policies::PatchRule::new(self.inner.clone())
14399    }
14400
14401    /// Removes an association for the specified network firewall policy.
14402    pub fn remove_association(
14403        &self,
14404    ) -> super::builder::region_network_firewall_policies::RemoveAssociation {
14405        super::builder::region_network_firewall_policies::RemoveAssociation::new(self.inner.clone())
14406    }
14407
14408    /// Deletes a rule of the specified priority.
14409    pub fn remove_rule(&self) -> super::builder::region_network_firewall_policies::RemoveRule {
14410        super::builder::region_network_firewall_policies::RemoveRule::new(self.inner.clone())
14411    }
14412
14413    /// Sets the access control policy on the specified resource.
14414    /// Replaces any existing policy.
14415    pub fn set_iam_policy(&self) -> super::builder::region_network_firewall_policies::SetIamPolicy {
14416        super::builder::region_network_firewall_policies::SetIamPolicy::new(self.inner.clone())
14417    }
14418
14419    /// Returns permissions that a caller has on the specified resource.
14420    pub fn test_iam_permissions(
14421        &self,
14422    ) -> super::builder::region_network_firewall_policies::TestIamPermissions {
14423        super::builder::region_network_firewall_policies::TestIamPermissions::new(
14424            self.inner.clone(),
14425        )
14426    }
14427
14428    /// Retrieves the specified region-specific Operations resource.
14429    pub fn get_operation(&self) -> super::builder::region_network_firewall_policies::GetOperation {
14430        super::builder::region_network_firewall_policies::GetOperation::new(self.inner.clone())
14431    }
14432}
14433
14434/// Implements a client for the Compute Engine API.
14435///
14436/// # Example
14437/// ```
14438/// # use google_cloud_compute_v1::client::RegionNotificationEndpoints;
14439/// async fn sample(
14440/// ) -> anyhow::Result<()> {
14441///     let client = RegionNotificationEndpoints::builder().build().await?;
14442///     // use `client` to make requests to the Compute Engine API.
14443///     Ok(())
14444/// }
14445/// ```
14446///
14447/// # Service Description
14448///
14449/// Service for the `regionNotificationEndpoints` resource.
14450///
14451/// The client library was generated with API version 2026-09-01.
14452///
14453/// # Configuration
14454///
14455/// To configure `RegionNotificationEndpoints` use the `with_*` methods in the type returned
14456/// by [builder()][RegionNotificationEndpoints::builder]. The default configuration should
14457/// work for most applications. Common configuration changes include
14458///
14459/// * [with_endpoint()]: by default this client uses the global default endpoint
14460///   (`https://compute.googleapis.com`). Applications using regional
14461///   endpoints or running in restricted networks (e.g. a network configured
14462///   with [Private Google Access with VPC Service Controls]) may want to
14463///   override this default.
14464/// * [with_credentials()]: by default this client uses
14465///   [Application Default Credentials]. Applications using custom
14466///   authentication may need to override this default.
14467///
14468/// [with_endpoint()]: super::builder::region_notification_endpoints::ClientBuilder::with_endpoint
14469/// [with_credentials()]: super::builder::region_notification_endpoints::ClientBuilder::with_credentials
14470/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
14471/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
14472///
14473/// # Pooling and Cloning
14474///
14475/// `RegionNotificationEndpoints` holds a connection pool internally, it is advised to
14476/// create one and reuse it. You do not need to wrap `RegionNotificationEndpoints` in
14477/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
14478/// already uses an `Arc` internally.
14479#[cfg(feature = "region-notification-endpoints")]
14480#[cfg_attr(docsrs, doc(cfg(feature = "region-notification-endpoints")))]
14481#[derive(Clone, Debug)]
14482pub struct RegionNotificationEndpoints {
14483    inner: std::sync::Arc<dyn super::stub::dynamic::RegionNotificationEndpoints>,
14484}
14485
14486#[cfg(feature = "region-notification-endpoints")]
14487impl RegionNotificationEndpoints {
14488    /// Returns a builder for [RegionNotificationEndpoints].
14489    ///
14490    /// ```
14491    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
14492    /// # use google_cloud_compute_v1::client::RegionNotificationEndpoints;
14493    /// let client = RegionNotificationEndpoints::builder().build().await?;
14494    /// # Ok(()) }
14495    /// ```
14496    pub fn builder() -> super::builder::region_notification_endpoints::ClientBuilder {
14497        crate::new_client_builder(super::builder::region_notification_endpoints::client::Factory)
14498    }
14499
14500    /// Creates a new client from the provided stub.
14501    ///
14502    /// The most common case for calling this function is in tests mocking the
14503    /// client's behavior.
14504    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
14505    where
14506        T: super::stub::RegionNotificationEndpoints + 'static,
14507    {
14508        Self { inner: stub.into() }
14509    }
14510
14511    pub(crate) async fn new(
14512        config: gaxi::options::ClientConfig,
14513    ) -> crate::ClientBuilderResult<Self> {
14514        let inner = Self::build_inner(config).await?;
14515        Ok(Self { inner })
14516    }
14517
14518    async fn build_inner(
14519        conf: gaxi::options::ClientConfig,
14520    ) -> crate::ClientBuilderResult<
14521        std::sync::Arc<dyn super::stub::dynamic::RegionNotificationEndpoints>,
14522    > {
14523        if gaxi::options::tracing_enabled(&conf) {
14524            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
14525        }
14526        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
14527    }
14528
14529    async fn build_transport(
14530        conf: gaxi::options::ClientConfig,
14531    ) -> crate::ClientBuilderResult<impl super::stub::RegionNotificationEndpoints> {
14532        super::transport::RegionNotificationEndpoints::new(conf).await
14533    }
14534
14535    async fn build_with_tracing(
14536        conf: gaxi::options::ClientConfig,
14537    ) -> crate::ClientBuilderResult<impl super::stub::RegionNotificationEndpoints> {
14538        Self::build_transport(conf)
14539            .await
14540            .map(super::tracing::RegionNotificationEndpoints::new)
14541    }
14542
14543    /// Retrieves the list of all NotificationEndpoint resources,
14544    /// regional and global, available to the specified project.
14545    pub fn aggregated_list(&self) -> super::builder::region_notification_endpoints::AggregatedList {
14546        super::builder::region_notification_endpoints::AggregatedList::new(self.inner.clone())
14547    }
14548
14549    /// Deletes the specified NotificationEndpoint in the given region
14550    pub fn delete(&self) -> super::builder::region_notification_endpoints::Delete {
14551        super::builder::region_notification_endpoints::Delete::new(self.inner.clone())
14552    }
14553
14554    /// Returns the specified NotificationEndpoint resource in the given region.
14555    pub fn get(&self) -> super::builder::region_notification_endpoints::Get {
14556        super::builder::region_notification_endpoints::Get::new(self.inner.clone())
14557    }
14558
14559    /// Create a NotificationEndpoint in the specified project in the given region
14560    /// using the parameters that are included in the request.
14561    pub fn insert(&self) -> super::builder::region_notification_endpoints::Insert {
14562        super::builder::region_notification_endpoints::Insert::new(self.inner.clone())
14563    }
14564
14565    /// Lists the NotificationEndpoints for a project in the given region.
14566    pub fn list(&self) -> super::builder::region_notification_endpoints::List {
14567        super::builder::region_notification_endpoints::List::new(self.inner.clone())
14568    }
14569
14570    /// Returns permissions that a caller has on the specified resource.
14571    pub fn test_iam_permissions(
14572        &self,
14573    ) -> super::builder::region_notification_endpoints::TestIamPermissions {
14574        super::builder::region_notification_endpoints::TestIamPermissions::new(self.inner.clone())
14575    }
14576
14577    /// Retrieves the specified region-specific Operations resource.
14578    pub fn get_operation(&self) -> super::builder::region_notification_endpoints::GetOperation {
14579        super::builder::region_notification_endpoints::GetOperation::new(self.inner.clone())
14580    }
14581}
14582
14583/// Implements a client for the Compute Engine API.
14584///
14585/// # Example
14586/// ```
14587/// # use google_cloud_compute_v1::client::RegionOperations;
14588/// async fn sample(
14589/// ) -> anyhow::Result<()> {
14590///     let client = RegionOperations::builder().build().await?;
14591///     // use `client` to make requests to the Compute Engine API.
14592///     Ok(())
14593/// }
14594/// ```
14595///
14596/// # Service Description
14597///
14598/// Service for the `regionOperations` resource.
14599///
14600/// The client library was generated with API version 2026-09-01.
14601///
14602/// # Configuration
14603///
14604/// To configure `RegionOperations` use the `with_*` methods in the type returned
14605/// by [builder()][RegionOperations::builder]. The default configuration should
14606/// work for most applications. Common configuration changes include
14607///
14608/// * [with_endpoint()]: by default this client uses the global default endpoint
14609///   (`https://compute.googleapis.com`). Applications using regional
14610///   endpoints or running in restricted networks (e.g. a network configured
14611///   with [Private Google Access with VPC Service Controls]) may want to
14612///   override this default.
14613/// * [with_credentials()]: by default this client uses
14614///   [Application Default Credentials]. Applications using custom
14615///   authentication may need to override this default.
14616///
14617/// [with_endpoint()]: super::builder::region_operations::ClientBuilder::with_endpoint
14618/// [with_credentials()]: super::builder::region_operations::ClientBuilder::with_credentials
14619/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
14620/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
14621///
14622/// # Pooling and Cloning
14623///
14624/// `RegionOperations` holds a connection pool internally, it is advised to
14625/// create one and reuse it. You do not need to wrap `RegionOperations` in
14626/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
14627/// already uses an `Arc` internally.
14628#[cfg(feature = "region-operations")]
14629#[cfg_attr(docsrs, doc(cfg(feature = "region-operations")))]
14630#[derive(Clone, Debug)]
14631pub struct RegionOperations {
14632    inner: std::sync::Arc<dyn super::stub::dynamic::RegionOperations>,
14633}
14634
14635#[cfg(feature = "region-operations")]
14636impl RegionOperations {
14637    /// Returns a builder for [RegionOperations].
14638    ///
14639    /// ```
14640    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
14641    /// # use google_cloud_compute_v1::client::RegionOperations;
14642    /// let client = RegionOperations::builder().build().await?;
14643    /// # Ok(()) }
14644    /// ```
14645    pub fn builder() -> super::builder::region_operations::ClientBuilder {
14646        crate::new_client_builder(super::builder::region_operations::client::Factory)
14647    }
14648
14649    /// Creates a new client from the provided stub.
14650    ///
14651    /// The most common case for calling this function is in tests mocking the
14652    /// client's behavior.
14653    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
14654    where
14655        T: super::stub::RegionOperations + 'static,
14656    {
14657        Self { inner: stub.into() }
14658    }
14659
14660    pub(crate) async fn new(
14661        config: gaxi::options::ClientConfig,
14662    ) -> crate::ClientBuilderResult<Self> {
14663        let inner = Self::build_inner(config).await?;
14664        Ok(Self { inner })
14665    }
14666
14667    async fn build_inner(
14668        conf: gaxi::options::ClientConfig,
14669    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::RegionOperations>>
14670    {
14671        if gaxi::options::tracing_enabled(&conf) {
14672            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
14673        }
14674        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
14675    }
14676
14677    async fn build_transport(
14678        conf: gaxi::options::ClientConfig,
14679    ) -> crate::ClientBuilderResult<impl super::stub::RegionOperations> {
14680        super::transport::RegionOperations::new(conf).await
14681    }
14682
14683    async fn build_with_tracing(
14684        conf: gaxi::options::ClientConfig,
14685    ) -> crate::ClientBuilderResult<impl super::stub::RegionOperations> {
14686        Self::build_transport(conf)
14687            .await
14688            .map(super::tracing::RegionOperations::new)
14689    }
14690
14691    /// Deletes the specified region-specific Operations resource.
14692    pub fn delete(&self) -> super::builder::region_operations::Delete {
14693        super::builder::region_operations::Delete::new(self.inner.clone())
14694    }
14695
14696    /// Retrieves the specified region-specific Operations resource.
14697    pub fn get(&self) -> super::builder::region_operations::Get {
14698        super::builder::region_operations::Get::new(self.inner.clone())
14699    }
14700
14701    /// Retrieves a list of Operation resources contained within
14702    /// the specified region.
14703    pub fn list(&self) -> super::builder::region_operations::List {
14704        super::builder::region_operations::List::new(self.inner.clone())
14705    }
14706
14707    /// Waits for the specified Operation resource to return as `DONE`
14708    /// or for the request to approach the 2 minute deadline, and retrieves the
14709    /// specified Operation resource. This method differs from the
14710    /// `GET` method in that it waits for no more than the default
14711    /// deadline (2 minutes) and then returns the current state of the operation,
14712    /// which might be `DONE` or still in progress.
14713    ///
14714    /// This method is called on a best-effort basis. Specifically:
14715    ///
14716    /// ```norust
14717    /// - In uncommon cases, when the server is overloaded, the request might
14718    /// return before the default deadline is reached, or might return after zero
14719    /// seconds.
14720    /// ```
14721    ///
14722    /// - If the default deadline is reached, there is no guarantee that the
14723    ///   operation is actually done when the method returns. Be prepared to retry
14724    ///   if the operation is not `DONE`.
14725    pub fn wait(&self) -> super::builder::region_operations::Wait {
14726        super::builder::region_operations::Wait::new(self.inner.clone())
14727    }
14728}
14729
14730/// Implements a client for the Compute Engine API.
14731///
14732/// # Example
14733/// ```
14734/// # use google_cloud_compute_v1::client::RegionSecurityPolicies;
14735/// async fn sample(
14736/// ) -> anyhow::Result<()> {
14737///     let client = RegionSecurityPolicies::builder().build().await?;
14738///     // use `client` to make requests to the Compute Engine API.
14739///     Ok(())
14740/// }
14741/// ```
14742///
14743/// # Service Description
14744///
14745/// Service for the `regionSecurityPolicies` resource.
14746///
14747/// The client library was generated with API version 2026-09-01.
14748///
14749/// # Configuration
14750///
14751/// To configure `RegionSecurityPolicies` use the `with_*` methods in the type returned
14752/// by [builder()][RegionSecurityPolicies::builder]. The default configuration should
14753/// work for most applications. Common configuration changes include
14754///
14755/// * [with_endpoint()]: by default this client uses the global default endpoint
14756///   (`https://compute.googleapis.com`). Applications using regional
14757///   endpoints or running in restricted networks (e.g. a network configured
14758///   with [Private Google Access with VPC Service Controls]) may want to
14759///   override this default.
14760/// * [with_credentials()]: by default this client uses
14761///   [Application Default Credentials]. Applications using custom
14762///   authentication may need to override this default.
14763///
14764/// [with_endpoint()]: super::builder::region_security_policies::ClientBuilder::with_endpoint
14765/// [with_credentials()]: super::builder::region_security_policies::ClientBuilder::with_credentials
14766/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
14767/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
14768///
14769/// # Pooling and Cloning
14770///
14771/// `RegionSecurityPolicies` holds a connection pool internally, it is advised to
14772/// create one and reuse it. You do not need to wrap `RegionSecurityPolicies` in
14773/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
14774/// already uses an `Arc` internally.
14775#[cfg(feature = "region-security-policies")]
14776#[cfg_attr(docsrs, doc(cfg(feature = "region-security-policies")))]
14777#[derive(Clone, Debug)]
14778pub struct RegionSecurityPolicies {
14779    inner: std::sync::Arc<dyn super::stub::dynamic::RegionSecurityPolicies>,
14780}
14781
14782#[cfg(feature = "region-security-policies")]
14783impl RegionSecurityPolicies {
14784    /// Returns a builder for [RegionSecurityPolicies].
14785    ///
14786    /// ```
14787    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
14788    /// # use google_cloud_compute_v1::client::RegionSecurityPolicies;
14789    /// let client = RegionSecurityPolicies::builder().build().await?;
14790    /// # Ok(()) }
14791    /// ```
14792    pub fn builder() -> super::builder::region_security_policies::ClientBuilder {
14793        crate::new_client_builder(super::builder::region_security_policies::client::Factory)
14794    }
14795
14796    /// Creates a new client from the provided stub.
14797    ///
14798    /// The most common case for calling this function is in tests mocking the
14799    /// client's behavior.
14800    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
14801    where
14802        T: super::stub::RegionSecurityPolicies + 'static,
14803    {
14804        Self { inner: stub.into() }
14805    }
14806
14807    pub(crate) async fn new(
14808        config: gaxi::options::ClientConfig,
14809    ) -> crate::ClientBuilderResult<Self> {
14810        let inner = Self::build_inner(config).await?;
14811        Ok(Self { inner })
14812    }
14813
14814    async fn build_inner(
14815        conf: gaxi::options::ClientConfig,
14816    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::RegionSecurityPolicies>>
14817    {
14818        if gaxi::options::tracing_enabled(&conf) {
14819            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
14820        }
14821        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
14822    }
14823
14824    async fn build_transport(
14825        conf: gaxi::options::ClientConfig,
14826    ) -> crate::ClientBuilderResult<impl super::stub::RegionSecurityPolicies> {
14827        super::transport::RegionSecurityPolicies::new(conf).await
14828    }
14829
14830    async fn build_with_tracing(
14831        conf: gaxi::options::ClientConfig,
14832    ) -> crate::ClientBuilderResult<impl super::stub::RegionSecurityPolicies> {
14833        Self::build_transport(conf)
14834            .await
14835            .map(super::tracing::RegionSecurityPolicies::new)
14836    }
14837
14838    /// Inserts a rule into a security policy.
14839    pub fn add_rule(&self) -> super::builder::region_security_policies::AddRule {
14840        super::builder::region_security_policies::AddRule::new(self.inner.clone())
14841    }
14842
14843    /// Deletes the specified policy.
14844    pub fn delete(&self) -> super::builder::region_security_policies::Delete {
14845        super::builder::region_security_policies::Delete::new(self.inner.clone())
14846    }
14847
14848    /// List all of the ordered rules present in a single specified policy.
14849    pub fn get(&self) -> super::builder::region_security_policies::Get {
14850        super::builder::region_security_policies::Get::new(self.inner.clone())
14851    }
14852
14853    /// Gets a rule at the specified priority.
14854    pub fn get_rule(&self) -> super::builder::region_security_policies::GetRule {
14855        super::builder::region_security_policies::GetRule::new(self.inner.clone())
14856    }
14857
14858    /// Creates a new policy in the specified project using the data included in
14859    /// the request.
14860    pub fn insert(&self) -> super::builder::region_security_policies::Insert {
14861        super::builder::region_security_policies::Insert::new(self.inner.clone())
14862    }
14863
14864    /// List all the policies that have been configured for the specified project
14865    /// and region.
14866    pub fn list(&self) -> super::builder::region_security_policies::List {
14867        super::builder::region_security_policies::List::new(self.inner.clone())
14868    }
14869
14870    /// Patches the specified policy with the data included in the request. To
14871    /// clear fields in the policy, leave the fields empty and specify them in the
14872    /// updateMask. This cannot be used to be update the rules in the policy.
14873    /// Please use the per rule methods like addRule, patchRule, and removeRule
14874    /// instead.
14875    pub fn patch(&self) -> super::builder::region_security_policies::Patch {
14876        super::builder::region_security_policies::Patch::new(self.inner.clone())
14877    }
14878
14879    /// Patches a rule at the specified priority. To clear fields in the rule,
14880    /// leave the fields empty and specify them in the updateMask.
14881    pub fn patch_rule(&self) -> super::builder::region_security_policies::PatchRule {
14882        super::builder::region_security_policies::PatchRule::new(self.inner.clone())
14883    }
14884
14885    /// Deletes a rule at the specified priority.
14886    pub fn remove_rule(&self) -> super::builder::region_security_policies::RemoveRule {
14887        super::builder::region_security_policies::RemoveRule::new(self.inner.clone())
14888    }
14889
14890    /// Sets the labels on a security policy. To learn more about labels,
14891    /// read the Labeling Resources
14892    /// documentation.
14893    pub fn set_labels(&self) -> super::builder::region_security_policies::SetLabels {
14894        super::builder::region_security_policies::SetLabels::new(self.inner.clone())
14895    }
14896
14897    /// Retrieves the specified region-specific Operations resource.
14898    pub fn get_operation(&self) -> super::builder::region_security_policies::GetOperation {
14899        super::builder::region_security_policies::GetOperation::new(self.inner.clone())
14900    }
14901}
14902
14903/// Implements a client for the Compute Engine API.
14904///
14905/// # Example
14906/// ```
14907/// # use google_cloud_compute_v1::client::RegionSnapshotSettings;
14908/// async fn sample(
14909/// ) -> anyhow::Result<()> {
14910///     let client = RegionSnapshotSettings::builder().build().await?;
14911///     // use `client` to make requests to the Compute Engine API.
14912///     Ok(())
14913/// }
14914/// ```
14915///
14916/// # Service Description
14917///
14918/// Service for the `regionSnapshotSettings` resource.
14919///
14920/// The client library was generated with API version 2026-09-01.
14921///
14922/// # Configuration
14923///
14924/// To configure `RegionSnapshotSettings` use the `with_*` methods in the type returned
14925/// by [builder()][RegionSnapshotSettings::builder]. The default configuration should
14926/// work for most applications. Common configuration changes include
14927///
14928/// * [with_endpoint()]: by default this client uses the global default endpoint
14929///   (`https://compute.googleapis.com`). Applications using regional
14930///   endpoints or running in restricted networks (e.g. a network configured
14931///   with [Private Google Access with VPC Service Controls]) may want to
14932///   override this default.
14933/// * [with_credentials()]: by default this client uses
14934///   [Application Default Credentials]. Applications using custom
14935///   authentication may need to override this default.
14936///
14937/// [with_endpoint()]: super::builder::region_snapshot_settings::ClientBuilder::with_endpoint
14938/// [with_credentials()]: super::builder::region_snapshot_settings::ClientBuilder::with_credentials
14939/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
14940/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
14941///
14942/// # Pooling and Cloning
14943///
14944/// `RegionSnapshotSettings` holds a connection pool internally, it is advised to
14945/// create one and reuse it. You do not need to wrap `RegionSnapshotSettings` in
14946/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
14947/// already uses an `Arc` internally.
14948#[cfg(feature = "region-snapshot-settings")]
14949#[cfg_attr(docsrs, doc(cfg(feature = "region-snapshot-settings")))]
14950#[derive(Clone, Debug)]
14951pub struct RegionSnapshotSettings {
14952    inner: std::sync::Arc<dyn super::stub::dynamic::RegionSnapshotSettings>,
14953}
14954
14955#[cfg(feature = "region-snapshot-settings")]
14956impl RegionSnapshotSettings {
14957    /// Returns a builder for [RegionSnapshotSettings].
14958    ///
14959    /// ```
14960    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
14961    /// # use google_cloud_compute_v1::client::RegionSnapshotSettings;
14962    /// let client = RegionSnapshotSettings::builder().build().await?;
14963    /// # Ok(()) }
14964    /// ```
14965    pub fn builder() -> super::builder::region_snapshot_settings::ClientBuilder {
14966        crate::new_client_builder(super::builder::region_snapshot_settings::client::Factory)
14967    }
14968
14969    /// Creates a new client from the provided stub.
14970    ///
14971    /// The most common case for calling this function is in tests mocking the
14972    /// client's behavior.
14973    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
14974    where
14975        T: super::stub::RegionSnapshotSettings + 'static,
14976    {
14977        Self { inner: stub.into() }
14978    }
14979
14980    pub(crate) async fn new(
14981        config: gaxi::options::ClientConfig,
14982    ) -> crate::ClientBuilderResult<Self> {
14983        let inner = Self::build_inner(config).await?;
14984        Ok(Self { inner })
14985    }
14986
14987    async fn build_inner(
14988        conf: gaxi::options::ClientConfig,
14989    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::RegionSnapshotSettings>>
14990    {
14991        if gaxi::options::tracing_enabled(&conf) {
14992            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
14993        }
14994        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
14995    }
14996
14997    async fn build_transport(
14998        conf: gaxi::options::ClientConfig,
14999    ) -> crate::ClientBuilderResult<impl super::stub::RegionSnapshotSettings> {
15000        super::transport::RegionSnapshotSettings::new(conf).await
15001    }
15002
15003    async fn build_with_tracing(
15004        conf: gaxi::options::ClientConfig,
15005    ) -> crate::ClientBuilderResult<impl super::stub::RegionSnapshotSettings> {
15006        Self::build_transport(conf)
15007            .await
15008            .map(super::tracing::RegionSnapshotSettings::new)
15009    }
15010
15011    /// Get region snapshot settings.
15012    pub fn get(&self) -> super::builder::region_snapshot_settings::Get {
15013        super::builder::region_snapshot_settings::Get::new(self.inner.clone())
15014    }
15015
15016    /// Patch region snapshot settings.
15017    pub fn patch(&self) -> super::builder::region_snapshot_settings::Patch {
15018        super::builder::region_snapshot_settings::Patch::new(self.inner.clone())
15019    }
15020
15021    /// Retrieves the specified region-specific Operations resource.
15022    pub fn get_operation(&self) -> super::builder::region_snapshot_settings::GetOperation {
15023        super::builder::region_snapshot_settings::GetOperation::new(self.inner.clone())
15024    }
15025}
15026
15027/// Implements a client for the Compute Engine API.
15028///
15029/// # Example
15030/// ```
15031/// # use google_cloud_compute_v1::client::RegionSnapshots;
15032/// async fn sample(
15033/// ) -> anyhow::Result<()> {
15034///     let client = RegionSnapshots::builder().build().await?;
15035///     // use `client` to make requests to the Compute Engine API.
15036///     Ok(())
15037/// }
15038/// ```
15039///
15040/// # Service Description
15041///
15042/// Service for the `regionSnapshots` resource.
15043///
15044/// The client library was generated with API version 2026-09-01.
15045///
15046/// # Configuration
15047///
15048/// To configure `RegionSnapshots` use the `with_*` methods in the type returned
15049/// by [builder()][RegionSnapshots::builder]. The default configuration should
15050/// work for most applications. Common configuration changes include
15051///
15052/// * [with_endpoint()]: by default this client uses the global default endpoint
15053///   (`https://compute.googleapis.com`). Applications using regional
15054///   endpoints or running in restricted networks (e.g. a network configured
15055///   with [Private Google Access with VPC Service Controls]) may want to
15056///   override this default.
15057/// * [with_credentials()]: by default this client uses
15058///   [Application Default Credentials]. Applications using custom
15059///   authentication may need to override this default.
15060///
15061/// [with_endpoint()]: super::builder::region_snapshots::ClientBuilder::with_endpoint
15062/// [with_credentials()]: super::builder::region_snapshots::ClientBuilder::with_credentials
15063/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
15064/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
15065///
15066/// # Pooling and Cloning
15067///
15068/// `RegionSnapshots` holds a connection pool internally, it is advised to
15069/// create one and reuse it. You do not need to wrap `RegionSnapshots` in
15070/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
15071/// already uses an `Arc` internally.
15072#[cfg(feature = "region-snapshots")]
15073#[cfg_attr(docsrs, doc(cfg(feature = "region-snapshots")))]
15074#[derive(Clone, Debug)]
15075pub struct RegionSnapshots {
15076    inner: std::sync::Arc<dyn super::stub::dynamic::RegionSnapshots>,
15077}
15078
15079#[cfg(feature = "region-snapshots")]
15080impl RegionSnapshots {
15081    /// Returns a builder for [RegionSnapshots].
15082    ///
15083    /// ```
15084    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
15085    /// # use google_cloud_compute_v1::client::RegionSnapshots;
15086    /// let client = RegionSnapshots::builder().build().await?;
15087    /// # Ok(()) }
15088    /// ```
15089    pub fn builder() -> super::builder::region_snapshots::ClientBuilder {
15090        crate::new_client_builder(super::builder::region_snapshots::client::Factory)
15091    }
15092
15093    /// Creates a new client from the provided stub.
15094    ///
15095    /// The most common case for calling this function is in tests mocking the
15096    /// client's behavior.
15097    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
15098    where
15099        T: super::stub::RegionSnapshots + 'static,
15100    {
15101        Self { inner: stub.into() }
15102    }
15103
15104    pub(crate) async fn new(
15105        config: gaxi::options::ClientConfig,
15106    ) -> crate::ClientBuilderResult<Self> {
15107        let inner = Self::build_inner(config).await?;
15108        Ok(Self { inner })
15109    }
15110
15111    async fn build_inner(
15112        conf: gaxi::options::ClientConfig,
15113    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::RegionSnapshots>> {
15114        if gaxi::options::tracing_enabled(&conf) {
15115            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
15116        }
15117        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
15118    }
15119
15120    async fn build_transport(
15121        conf: gaxi::options::ClientConfig,
15122    ) -> crate::ClientBuilderResult<impl super::stub::RegionSnapshots> {
15123        super::transport::RegionSnapshots::new(conf).await
15124    }
15125
15126    async fn build_with_tracing(
15127        conf: gaxi::options::ClientConfig,
15128    ) -> crate::ClientBuilderResult<impl super::stub::RegionSnapshots> {
15129        Self::build_transport(conf)
15130            .await
15131            .map(super::tracing::RegionSnapshots::new)
15132    }
15133
15134    /// Deletes the specified Snapshot resource. Keep in mind that deleting
15135    /// a single snapshot might not necessarily delete all the data on that
15136    /// snapshot. If any data on the snapshot that is marked for deletion is
15137    /// needed for subsequent snapshots, the data will be moved to the next
15138    /// corresponding snapshot.
15139    ///
15140    /// For more information, seeDeleting
15141    /// snapshots.
15142    pub fn delete(&self) -> super::builder::region_snapshots::Delete {
15143        super::builder::region_snapshots::Delete::new(self.inner.clone())
15144    }
15145
15146    /// Returns the specified Snapshot resource.
15147    pub fn get(&self) -> super::builder::region_snapshots::Get {
15148        super::builder::region_snapshots::Get::new(self.inner.clone())
15149    }
15150
15151    /// Gets the access control policy for a resource. May be empty if no such
15152    /// policy or resource exists.
15153    pub fn get_iam_policy(&self) -> super::builder::region_snapshots::GetIamPolicy {
15154        super::builder::region_snapshots::GetIamPolicy::new(self.inner.clone())
15155    }
15156
15157    /// Creates a snapshot in the specified region using the data included
15158    /// in the request.
15159    pub fn insert(&self) -> super::builder::region_snapshots::Insert {
15160        super::builder::region_snapshots::Insert::new(self.inner.clone())
15161    }
15162
15163    /// Retrieves the list of Snapshot resources contained within
15164    /// the specified region.
15165    pub fn list(&self) -> super::builder::region_snapshots::List {
15166        super::builder::region_snapshots::List::new(self.inner.clone())
15167    }
15168
15169    /// Sets the access control policy on the specified resource.
15170    /// Replaces any existing policy.
15171    pub fn set_iam_policy(&self) -> super::builder::region_snapshots::SetIamPolicy {
15172        super::builder::region_snapshots::SetIamPolicy::new(self.inner.clone())
15173    }
15174
15175    /// Sets the labels on a regional snapshot. To learn more about labels, read
15176    /// the Labeling Resources
15177    /// documentation.
15178    pub fn set_labels(&self) -> super::builder::region_snapshots::SetLabels {
15179        super::builder::region_snapshots::SetLabels::new(self.inner.clone())
15180    }
15181
15182    /// Returns permissions that a caller has on the specified resource.
15183    pub fn test_iam_permissions(&self) -> super::builder::region_snapshots::TestIamPermissions {
15184        super::builder::region_snapshots::TestIamPermissions::new(self.inner.clone())
15185    }
15186
15187    /// Rotates the customer-managed
15188    /// encryption key to the latest version for the specified snapshot.
15189    pub fn update_kms_key(&self) -> super::builder::region_snapshots::UpdateKmsKey {
15190        super::builder::region_snapshots::UpdateKmsKey::new(self.inner.clone())
15191    }
15192
15193    /// Retrieves the specified region-specific Operations resource.
15194    pub fn get_operation(&self) -> super::builder::region_snapshots::GetOperation {
15195        super::builder::region_snapshots::GetOperation::new(self.inner.clone())
15196    }
15197}
15198
15199/// Implements a client for the Compute Engine API.
15200///
15201/// # Example
15202/// ```
15203/// # use google_cloud_compute_v1::client::RegionSslCertificates;
15204/// async fn sample(
15205/// ) -> anyhow::Result<()> {
15206///     let client = RegionSslCertificates::builder().build().await?;
15207///     // use `client` to make requests to the Compute Engine API.
15208///     Ok(())
15209/// }
15210/// ```
15211///
15212/// # Service Description
15213///
15214/// Service for the `regionSslCertificates` resource.
15215///
15216/// The client library was generated with API version 2026-09-01.
15217///
15218/// # Configuration
15219///
15220/// To configure `RegionSslCertificates` use the `with_*` methods in the type returned
15221/// by [builder()][RegionSslCertificates::builder]. The default configuration should
15222/// work for most applications. Common configuration changes include
15223///
15224/// * [with_endpoint()]: by default this client uses the global default endpoint
15225///   (`https://compute.googleapis.com`). Applications using regional
15226///   endpoints or running in restricted networks (e.g. a network configured
15227///   with [Private Google Access with VPC Service Controls]) may want to
15228///   override this default.
15229/// * [with_credentials()]: by default this client uses
15230///   [Application Default Credentials]. Applications using custom
15231///   authentication may need to override this default.
15232///
15233/// [with_endpoint()]: super::builder::region_ssl_certificates::ClientBuilder::with_endpoint
15234/// [with_credentials()]: super::builder::region_ssl_certificates::ClientBuilder::with_credentials
15235/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
15236/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
15237///
15238/// # Pooling and Cloning
15239///
15240/// `RegionSslCertificates` holds a connection pool internally, it is advised to
15241/// create one and reuse it. You do not need to wrap `RegionSslCertificates` in
15242/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
15243/// already uses an `Arc` internally.
15244#[cfg(feature = "region-ssl-certificates")]
15245#[cfg_attr(docsrs, doc(cfg(feature = "region-ssl-certificates")))]
15246#[derive(Clone, Debug)]
15247pub struct RegionSslCertificates {
15248    inner: std::sync::Arc<dyn super::stub::dynamic::RegionSslCertificates>,
15249}
15250
15251#[cfg(feature = "region-ssl-certificates")]
15252impl RegionSslCertificates {
15253    /// Returns a builder for [RegionSslCertificates].
15254    ///
15255    /// ```
15256    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
15257    /// # use google_cloud_compute_v1::client::RegionSslCertificates;
15258    /// let client = RegionSslCertificates::builder().build().await?;
15259    /// # Ok(()) }
15260    /// ```
15261    pub fn builder() -> super::builder::region_ssl_certificates::ClientBuilder {
15262        crate::new_client_builder(super::builder::region_ssl_certificates::client::Factory)
15263    }
15264
15265    /// Creates a new client from the provided stub.
15266    ///
15267    /// The most common case for calling this function is in tests mocking the
15268    /// client's behavior.
15269    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
15270    where
15271        T: super::stub::RegionSslCertificates + 'static,
15272    {
15273        Self { inner: stub.into() }
15274    }
15275
15276    pub(crate) async fn new(
15277        config: gaxi::options::ClientConfig,
15278    ) -> crate::ClientBuilderResult<Self> {
15279        let inner = Self::build_inner(config).await?;
15280        Ok(Self { inner })
15281    }
15282
15283    async fn build_inner(
15284        conf: gaxi::options::ClientConfig,
15285    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::RegionSslCertificates>>
15286    {
15287        if gaxi::options::tracing_enabled(&conf) {
15288            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
15289        }
15290        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
15291    }
15292
15293    async fn build_transport(
15294        conf: gaxi::options::ClientConfig,
15295    ) -> crate::ClientBuilderResult<impl super::stub::RegionSslCertificates> {
15296        super::transport::RegionSslCertificates::new(conf).await
15297    }
15298
15299    async fn build_with_tracing(
15300        conf: gaxi::options::ClientConfig,
15301    ) -> crate::ClientBuilderResult<impl super::stub::RegionSslCertificates> {
15302        Self::build_transport(conf)
15303            .await
15304            .map(super::tracing::RegionSslCertificates::new)
15305    }
15306
15307    /// Deletes the specified SslCertificate resource in the region.
15308    pub fn delete(&self) -> super::builder::region_ssl_certificates::Delete {
15309        super::builder::region_ssl_certificates::Delete::new(self.inner.clone())
15310    }
15311
15312    /// Returns the specified SslCertificate resource in the specified region. Get
15313    /// a list of available SSL certificates by making a list()
15314    /// request.
15315    pub fn get(&self) -> super::builder::region_ssl_certificates::Get {
15316        super::builder::region_ssl_certificates::Get::new(self.inner.clone())
15317    }
15318
15319    /// Creates a SslCertificate resource in the specified project and region using
15320    /// the data included in the request
15321    pub fn insert(&self) -> super::builder::region_ssl_certificates::Insert {
15322        super::builder::region_ssl_certificates::Insert::new(self.inner.clone())
15323    }
15324
15325    /// Retrieves the list of SslCertificate resources available to the specified
15326    /// project in the specified region.
15327    pub fn list(&self) -> super::builder::region_ssl_certificates::List {
15328        super::builder::region_ssl_certificates::List::new(self.inner.clone())
15329    }
15330
15331    /// Retrieves the specified region-specific Operations resource.
15332    pub fn get_operation(&self) -> super::builder::region_ssl_certificates::GetOperation {
15333        super::builder::region_ssl_certificates::GetOperation::new(self.inner.clone())
15334    }
15335}
15336
15337/// Implements a client for the Compute Engine API.
15338///
15339/// # Example
15340/// ```
15341/// # use google_cloud_compute_v1::client::RegionSslPolicies;
15342/// async fn sample(
15343/// ) -> anyhow::Result<()> {
15344///     let client = RegionSslPolicies::builder().build().await?;
15345///     // use `client` to make requests to the Compute Engine API.
15346///     Ok(())
15347/// }
15348/// ```
15349///
15350/// # Service Description
15351///
15352/// Service for the `regionSslPolicies` resource.
15353///
15354/// The client library was generated with API version 2026-09-01.
15355///
15356/// # Configuration
15357///
15358/// To configure `RegionSslPolicies` use the `with_*` methods in the type returned
15359/// by [builder()][RegionSslPolicies::builder]. The default configuration should
15360/// work for most applications. Common configuration changes include
15361///
15362/// * [with_endpoint()]: by default this client uses the global default endpoint
15363///   (`https://compute.googleapis.com`). Applications using regional
15364///   endpoints or running in restricted networks (e.g. a network configured
15365///   with [Private Google Access with VPC Service Controls]) may want to
15366///   override this default.
15367/// * [with_credentials()]: by default this client uses
15368///   [Application Default Credentials]. Applications using custom
15369///   authentication may need to override this default.
15370///
15371/// [with_endpoint()]: super::builder::region_ssl_policies::ClientBuilder::with_endpoint
15372/// [with_credentials()]: super::builder::region_ssl_policies::ClientBuilder::with_credentials
15373/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
15374/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
15375///
15376/// # Pooling and Cloning
15377///
15378/// `RegionSslPolicies` holds a connection pool internally, it is advised to
15379/// create one and reuse it. You do not need to wrap `RegionSslPolicies` in
15380/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
15381/// already uses an `Arc` internally.
15382#[cfg(feature = "region-ssl-policies")]
15383#[cfg_attr(docsrs, doc(cfg(feature = "region-ssl-policies")))]
15384#[derive(Clone, Debug)]
15385pub struct RegionSslPolicies {
15386    inner: std::sync::Arc<dyn super::stub::dynamic::RegionSslPolicies>,
15387}
15388
15389#[cfg(feature = "region-ssl-policies")]
15390impl RegionSslPolicies {
15391    /// Returns a builder for [RegionSslPolicies].
15392    ///
15393    /// ```
15394    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
15395    /// # use google_cloud_compute_v1::client::RegionSslPolicies;
15396    /// let client = RegionSslPolicies::builder().build().await?;
15397    /// # Ok(()) }
15398    /// ```
15399    pub fn builder() -> super::builder::region_ssl_policies::ClientBuilder {
15400        crate::new_client_builder(super::builder::region_ssl_policies::client::Factory)
15401    }
15402
15403    /// Creates a new client from the provided stub.
15404    ///
15405    /// The most common case for calling this function is in tests mocking the
15406    /// client's behavior.
15407    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
15408    where
15409        T: super::stub::RegionSslPolicies + 'static,
15410    {
15411        Self { inner: stub.into() }
15412    }
15413
15414    pub(crate) async fn new(
15415        config: gaxi::options::ClientConfig,
15416    ) -> crate::ClientBuilderResult<Self> {
15417        let inner = Self::build_inner(config).await?;
15418        Ok(Self { inner })
15419    }
15420
15421    async fn build_inner(
15422        conf: gaxi::options::ClientConfig,
15423    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::RegionSslPolicies>>
15424    {
15425        if gaxi::options::tracing_enabled(&conf) {
15426            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
15427        }
15428        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
15429    }
15430
15431    async fn build_transport(
15432        conf: gaxi::options::ClientConfig,
15433    ) -> crate::ClientBuilderResult<impl super::stub::RegionSslPolicies> {
15434        super::transport::RegionSslPolicies::new(conf).await
15435    }
15436
15437    async fn build_with_tracing(
15438        conf: gaxi::options::ClientConfig,
15439    ) -> crate::ClientBuilderResult<impl super::stub::RegionSslPolicies> {
15440        Self::build_transport(conf)
15441            .await
15442            .map(super::tracing::RegionSslPolicies::new)
15443    }
15444
15445    /// Deletes the specified SSL policy. The SSL policy resource can be deleted
15446    /// only if it is not in use by any TargetHttpsProxy or TargetSslProxy
15447    /// resources.
15448    pub fn delete(&self) -> super::builder::region_ssl_policies::Delete {
15449        super::builder::region_ssl_policies::Delete::new(self.inner.clone())
15450    }
15451
15452    /// Lists all of the ordered rules present in a single specified policy.
15453    pub fn get(&self) -> super::builder::region_ssl_policies::Get {
15454        super::builder::region_ssl_policies::Get::new(self.inner.clone())
15455    }
15456
15457    /// Creates a new policy in the specified project and region using the data
15458    /// included in the request.
15459    pub fn insert(&self) -> super::builder::region_ssl_policies::Insert {
15460        super::builder::region_ssl_policies::Insert::new(self.inner.clone())
15461    }
15462
15463    /// Lists all the SSL policies that have been configured for the specified
15464    /// project and region.
15465    pub fn list(&self) -> super::builder::region_ssl_policies::List {
15466        super::builder::region_ssl_policies::List::new(self.inner.clone())
15467    }
15468
15469    /// Lists all features that can be specified in the SSL policy when using
15470    /// custom profile.
15471    pub fn list_available_features(
15472        &self,
15473    ) -> super::builder::region_ssl_policies::ListAvailableFeatures {
15474        super::builder::region_ssl_policies::ListAvailableFeatures::new(self.inner.clone())
15475    }
15476
15477    /// Patches the specified SSL policy with the data included in the request.
15478    pub fn patch(&self) -> super::builder::region_ssl_policies::Patch {
15479        super::builder::region_ssl_policies::Patch::new(self.inner.clone())
15480    }
15481
15482    /// Retrieves the specified region-specific Operations resource.
15483    pub fn get_operation(&self) -> super::builder::region_ssl_policies::GetOperation {
15484        super::builder::region_ssl_policies::GetOperation::new(self.inner.clone())
15485    }
15486}
15487
15488/// Implements a client for the Compute Engine API.
15489///
15490/// # Example
15491/// ```
15492/// # use google_cloud_compute_v1::client::RegionTargetHttpProxies;
15493/// async fn sample(
15494/// ) -> anyhow::Result<()> {
15495///     let client = RegionTargetHttpProxies::builder().build().await?;
15496///     // use `client` to make requests to the Compute Engine API.
15497///     Ok(())
15498/// }
15499/// ```
15500///
15501/// # Service Description
15502///
15503/// Service for the `regionTargetHttpProxies` resource.
15504///
15505/// The client library was generated with API version 2026-09-01.
15506///
15507/// # Configuration
15508///
15509/// To configure `RegionTargetHttpProxies` use the `with_*` methods in the type returned
15510/// by [builder()][RegionTargetHttpProxies::builder]. The default configuration should
15511/// work for most applications. Common configuration changes include
15512///
15513/// * [with_endpoint()]: by default this client uses the global default endpoint
15514///   (`https://compute.googleapis.com`). Applications using regional
15515///   endpoints or running in restricted networks (e.g. a network configured
15516///   with [Private Google Access with VPC Service Controls]) may want to
15517///   override this default.
15518/// * [with_credentials()]: by default this client uses
15519///   [Application Default Credentials]. Applications using custom
15520///   authentication may need to override this default.
15521///
15522/// [with_endpoint()]: super::builder::region_target_http_proxies::ClientBuilder::with_endpoint
15523/// [with_credentials()]: super::builder::region_target_http_proxies::ClientBuilder::with_credentials
15524/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
15525/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
15526///
15527/// # Pooling and Cloning
15528///
15529/// `RegionTargetHttpProxies` holds a connection pool internally, it is advised to
15530/// create one and reuse it. You do not need to wrap `RegionTargetHttpProxies` in
15531/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
15532/// already uses an `Arc` internally.
15533#[cfg(feature = "region-target-http-proxies")]
15534#[cfg_attr(docsrs, doc(cfg(feature = "region-target-http-proxies")))]
15535#[derive(Clone, Debug)]
15536pub struct RegionTargetHttpProxies {
15537    inner: std::sync::Arc<dyn super::stub::dynamic::RegionTargetHttpProxies>,
15538}
15539
15540#[cfg(feature = "region-target-http-proxies")]
15541impl RegionTargetHttpProxies {
15542    /// Returns a builder for [RegionTargetHttpProxies].
15543    ///
15544    /// ```
15545    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
15546    /// # use google_cloud_compute_v1::client::RegionTargetHttpProxies;
15547    /// let client = RegionTargetHttpProxies::builder().build().await?;
15548    /// # Ok(()) }
15549    /// ```
15550    pub fn builder() -> super::builder::region_target_http_proxies::ClientBuilder {
15551        crate::new_client_builder(super::builder::region_target_http_proxies::client::Factory)
15552    }
15553
15554    /// Creates a new client from the provided stub.
15555    ///
15556    /// The most common case for calling this function is in tests mocking the
15557    /// client's behavior.
15558    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
15559    where
15560        T: super::stub::RegionTargetHttpProxies + 'static,
15561    {
15562        Self { inner: stub.into() }
15563    }
15564
15565    pub(crate) async fn new(
15566        config: gaxi::options::ClientConfig,
15567    ) -> crate::ClientBuilderResult<Self> {
15568        let inner = Self::build_inner(config).await?;
15569        Ok(Self { inner })
15570    }
15571
15572    async fn build_inner(
15573        conf: gaxi::options::ClientConfig,
15574    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::RegionTargetHttpProxies>>
15575    {
15576        if gaxi::options::tracing_enabled(&conf) {
15577            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
15578        }
15579        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
15580    }
15581
15582    async fn build_transport(
15583        conf: gaxi::options::ClientConfig,
15584    ) -> crate::ClientBuilderResult<impl super::stub::RegionTargetHttpProxies> {
15585        super::transport::RegionTargetHttpProxies::new(conf).await
15586    }
15587
15588    async fn build_with_tracing(
15589        conf: gaxi::options::ClientConfig,
15590    ) -> crate::ClientBuilderResult<impl super::stub::RegionTargetHttpProxies> {
15591        Self::build_transport(conf)
15592            .await
15593            .map(super::tracing::RegionTargetHttpProxies::new)
15594    }
15595
15596    /// Deletes the specified TargetHttpProxy resource.
15597    pub fn delete(&self) -> super::builder::region_target_http_proxies::Delete {
15598        super::builder::region_target_http_proxies::Delete::new(self.inner.clone())
15599    }
15600
15601    /// Returns the specified TargetHttpProxy resource in the specified region.
15602    pub fn get(&self) -> super::builder::region_target_http_proxies::Get {
15603        super::builder::region_target_http_proxies::Get::new(self.inner.clone())
15604    }
15605
15606    /// Creates a TargetHttpProxy resource in the specified project and region
15607    /// using the data included in the request.
15608    pub fn insert(&self) -> super::builder::region_target_http_proxies::Insert {
15609        super::builder::region_target_http_proxies::Insert::new(self.inner.clone())
15610    }
15611
15612    /// Retrieves the list of TargetHttpProxy resources available
15613    /// to the specified project in the specified region.
15614    pub fn list(&self) -> super::builder::region_target_http_proxies::List {
15615        super::builder::region_target_http_proxies::List::new(self.inner.clone())
15616    }
15617
15618    /// Changes the URL map for TargetHttpProxy.
15619    pub fn set_url_map(&self) -> super::builder::region_target_http_proxies::SetUrlMap {
15620        super::builder::region_target_http_proxies::SetUrlMap::new(self.inner.clone())
15621    }
15622
15623    /// Retrieves the specified region-specific Operations resource.
15624    pub fn get_operation(&self) -> super::builder::region_target_http_proxies::GetOperation {
15625        super::builder::region_target_http_proxies::GetOperation::new(self.inner.clone())
15626    }
15627}
15628
15629/// Implements a client for the Compute Engine API.
15630///
15631/// # Example
15632/// ```
15633/// # use google_cloud_compute_v1::client::RegionTargetHttpsProxies;
15634/// async fn sample(
15635/// ) -> anyhow::Result<()> {
15636///     let client = RegionTargetHttpsProxies::builder().build().await?;
15637///     // use `client` to make requests to the Compute Engine API.
15638///     Ok(())
15639/// }
15640/// ```
15641///
15642/// # Service Description
15643///
15644/// Service for the `regionTargetHttpsProxies` resource.
15645///
15646/// The client library was generated with API version 2026-09-01.
15647///
15648/// # Configuration
15649///
15650/// To configure `RegionTargetHttpsProxies` use the `with_*` methods in the type returned
15651/// by [builder()][RegionTargetHttpsProxies::builder]. The default configuration should
15652/// work for most applications. Common configuration changes include
15653///
15654/// * [with_endpoint()]: by default this client uses the global default endpoint
15655///   (`https://compute.googleapis.com`). Applications using regional
15656///   endpoints or running in restricted networks (e.g. a network configured
15657///   with [Private Google Access with VPC Service Controls]) may want to
15658///   override this default.
15659/// * [with_credentials()]: by default this client uses
15660///   [Application Default Credentials]. Applications using custom
15661///   authentication may need to override this default.
15662///
15663/// [with_endpoint()]: super::builder::region_target_https_proxies::ClientBuilder::with_endpoint
15664/// [with_credentials()]: super::builder::region_target_https_proxies::ClientBuilder::with_credentials
15665/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
15666/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
15667///
15668/// # Pooling and Cloning
15669///
15670/// `RegionTargetHttpsProxies` holds a connection pool internally, it is advised to
15671/// create one and reuse it. You do not need to wrap `RegionTargetHttpsProxies` in
15672/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
15673/// already uses an `Arc` internally.
15674#[cfg(feature = "region-target-https-proxies")]
15675#[cfg_attr(docsrs, doc(cfg(feature = "region-target-https-proxies")))]
15676#[derive(Clone, Debug)]
15677pub struct RegionTargetHttpsProxies {
15678    inner: std::sync::Arc<dyn super::stub::dynamic::RegionTargetHttpsProxies>,
15679}
15680
15681#[cfg(feature = "region-target-https-proxies")]
15682impl RegionTargetHttpsProxies {
15683    /// Returns a builder for [RegionTargetHttpsProxies].
15684    ///
15685    /// ```
15686    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
15687    /// # use google_cloud_compute_v1::client::RegionTargetHttpsProxies;
15688    /// let client = RegionTargetHttpsProxies::builder().build().await?;
15689    /// # Ok(()) }
15690    /// ```
15691    pub fn builder() -> super::builder::region_target_https_proxies::ClientBuilder {
15692        crate::new_client_builder(super::builder::region_target_https_proxies::client::Factory)
15693    }
15694
15695    /// Creates a new client from the provided stub.
15696    ///
15697    /// The most common case for calling this function is in tests mocking the
15698    /// client's behavior.
15699    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
15700    where
15701        T: super::stub::RegionTargetHttpsProxies + 'static,
15702    {
15703        Self { inner: stub.into() }
15704    }
15705
15706    pub(crate) async fn new(
15707        config: gaxi::options::ClientConfig,
15708    ) -> crate::ClientBuilderResult<Self> {
15709        let inner = Self::build_inner(config).await?;
15710        Ok(Self { inner })
15711    }
15712
15713    async fn build_inner(
15714        conf: gaxi::options::ClientConfig,
15715    ) -> crate::ClientBuilderResult<
15716        std::sync::Arc<dyn super::stub::dynamic::RegionTargetHttpsProxies>,
15717    > {
15718        if gaxi::options::tracing_enabled(&conf) {
15719            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
15720        }
15721        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
15722    }
15723
15724    async fn build_transport(
15725        conf: gaxi::options::ClientConfig,
15726    ) -> crate::ClientBuilderResult<impl super::stub::RegionTargetHttpsProxies> {
15727        super::transport::RegionTargetHttpsProxies::new(conf).await
15728    }
15729
15730    async fn build_with_tracing(
15731        conf: gaxi::options::ClientConfig,
15732    ) -> crate::ClientBuilderResult<impl super::stub::RegionTargetHttpsProxies> {
15733        Self::build_transport(conf)
15734            .await
15735            .map(super::tracing::RegionTargetHttpsProxies::new)
15736    }
15737
15738    /// Deletes the specified TargetHttpsProxy resource.
15739    pub fn delete(&self) -> super::builder::region_target_https_proxies::Delete {
15740        super::builder::region_target_https_proxies::Delete::new(self.inner.clone())
15741    }
15742
15743    /// Returns the specified TargetHttpsProxy resource in the specified region.
15744    pub fn get(&self) -> super::builder::region_target_https_proxies::Get {
15745        super::builder::region_target_https_proxies::Get::new(self.inner.clone())
15746    }
15747
15748    /// Creates a TargetHttpsProxy resource in the specified project and region
15749    /// using the data included in the request.
15750    pub fn insert(&self) -> super::builder::region_target_https_proxies::Insert {
15751        super::builder::region_target_https_proxies::Insert::new(self.inner.clone())
15752    }
15753
15754    /// Retrieves the list of TargetHttpsProxy resources available
15755    /// to the specified project in the specified region.
15756    pub fn list(&self) -> super::builder::region_target_https_proxies::List {
15757        super::builder::region_target_https_proxies::List::new(self.inner.clone())
15758    }
15759
15760    /// Patches the specified regional TargetHttpsProxy resource with the data
15761    /// included in the request. This method supports PATCH
15762    /// semantics and usesJSON merge
15763    /// patch format and processing rules.
15764    pub fn patch(&self) -> super::builder::region_target_https_proxies::Patch {
15765        super::builder::region_target_https_proxies::Patch::new(self.inner.clone())
15766    }
15767
15768    /// Replaces SslCertificates for TargetHttpsProxy.
15769    pub fn set_ssl_certificates(
15770        &self,
15771    ) -> super::builder::region_target_https_proxies::SetSslCertificates {
15772        super::builder::region_target_https_proxies::SetSslCertificates::new(self.inner.clone())
15773    }
15774
15775    /// Changes the URL map for TargetHttpsProxy.
15776    pub fn set_url_map(&self) -> super::builder::region_target_https_proxies::SetUrlMap {
15777        super::builder::region_target_https_proxies::SetUrlMap::new(self.inner.clone())
15778    }
15779
15780    /// Retrieves the specified region-specific Operations resource.
15781    pub fn get_operation(&self) -> super::builder::region_target_https_proxies::GetOperation {
15782        super::builder::region_target_https_proxies::GetOperation::new(self.inner.clone())
15783    }
15784}
15785
15786/// Implements a client for the Compute Engine API.
15787///
15788/// # Example
15789/// ```
15790/// # use google_cloud_compute_v1::client::RegionTargetTcpProxies;
15791/// async fn sample(
15792/// ) -> anyhow::Result<()> {
15793///     let client = RegionTargetTcpProxies::builder().build().await?;
15794///     // use `client` to make requests to the Compute Engine API.
15795///     Ok(())
15796/// }
15797/// ```
15798///
15799/// # Service Description
15800///
15801/// Service for the `regionTargetTcpProxies` resource.
15802///
15803/// The client library was generated with API version 2026-09-01.
15804///
15805/// # Configuration
15806///
15807/// To configure `RegionTargetTcpProxies` use the `with_*` methods in the type returned
15808/// by [builder()][RegionTargetTcpProxies::builder]. The default configuration should
15809/// work for most applications. Common configuration changes include
15810///
15811/// * [with_endpoint()]: by default this client uses the global default endpoint
15812///   (`https://compute.googleapis.com`). Applications using regional
15813///   endpoints or running in restricted networks (e.g. a network configured
15814///   with [Private Google Access with VPC Service Controls]) may want to
15815///   override this default.
15816/// * [with_credentials()]: by default this client uses
15817///   [Application Default Credentials]. Applications using custom
15818///   authentication may need to override this default.
15819///
15820/// [with_endpoint()]: super::builder::region_target_tcp_proxies::ClientBuilder::with_endpoint
15821/// [with_credentials()]: super::builder::region_target_tcp_proxies::ClientBuilder::with_credentials
15822/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
15823/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
15824///
15825/// # Pooling and Cloning
15826///
15827/// `RegionTargetTcpProxies` holds a connection pool internally, it is advised to
15828/// create one and reuse it. You do not need to wrap `RegionTargetTcpProxies` in
15829/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
15830/// already uses an `Arc` internally.
15831#[cfg(feature = "region-target-tcp-proxies")]
15832#[cfg_attr(docsrs, doc(cfg(feature = "region-target-tcp-proxies")))]
15833#[derive(Clone, Debug)]
15834pub struct RegionTargetTcpProxies {
15835    inner: std::sync::Arc<dyn super::stub::dynamic::RegionTargetTcpProxies>,
15836}
15837
15838#[cfg(feature = "region-target-tcp-proxies")]
15839impl RegionTargetTcpProxies {
15840    /// Returns a builder for [RegionTargetTcpProxies].
15841    ///
15842    /// ```
15843    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
15844    /// # use google_cloud_compute_v1::client::RegionTargetTcpProxies;
15845    /// let client = RegionTargetTcpProxies::builder().build().await?;
15846    /// # Ok(()) }
15847    /// ```
15848    pub fn builder() -> super::builder::region_target_tcp_proxies::ClientBuilder {
15849        crate::new_client_builder(super::builder::region_target_tcp_proxies::client::Factory)
15850    }
15851
15852    /// Creates a new client from the provided stub.
15853    ///
15854    /// The most common case for calling this function is in tests mocking the
15855    /// client's behavior.
15856    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
15857    where
15858        T: super::stub::RegionTargetTcpProxies + 'static,
15859    {
15860        Self { inner: stub.into() }
15861    }
15862
15863    pub(crate) async fn new(
15864        config: gaxi::options::ClientConfig,
15865    ) -> crate::ClientBuilderResult<Self> {
15866        let inner = Self::build_inner(config).await?;
15867        Ok(Self { inner })
15868    }
15869
15870    async fn build_inner(
15871        conf: gaxi::options::ClientConfig,
15872    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::RegionTargetTcpProxies>>
15873    {
15874        if gaxi::options::tracing_enabled(&conf) {
15875            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
15876        }
15877        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
15878    }
15879
15880    async fn build_transport(
15881        conf: gaxi::options::ClientConfig,
15882    ) -> crate::ClientBuilderResult<impl super::stub::RegionTargetTcpProxies> {
15883        super::transport::RegionTargetTcpProxies::new(conf).await
15884    }
15885
15886    async fn build_with_tracing(
15887        conf: gaxi::options::ClientConfig,
15888    ) -> crate::ClientBuilderResult<impl super::stub::RegionTargetTcpProxies> {
15889        Self::build_transport(conf)
15890            .await
15891            .map(super::tracing::RegionTargetTcpProxies::new)
15892    }
15893
15894    /// Deletes the specified TargetTcpProxy resource.
15895    pub fn delete(&self) -> super::builder::region_target_tcp_proxies::Delete {
15896        super::builder::region_target_tcp_proxies::Delete::new(self.inner.clone())
15897    }
15898
15899    /// Returns the specified TargetTcpProxy resource.
15900    pub fn get(&self) -> super::builder::region_target_tcp_proxies::Get {
15901        super::builder::region_target_tcp_proxies::Get::new(self.inner.clone())
15902    }
15903
15904    /// Creates a TargetTcpProxy resource in the specified project and region using
15905    /// the data included in the request.
15906    pub fn insert(&self) -> super::builder::region_target_tcp_proxies::Insert {
15907        super::builder::region_target_tcp_proxies::Insert::new(self.inner.clone())
15908    }
15909
15910    /// Retrieves a list of TargetTcpProxy resources
15911    /// available to the specified project in a given region.
15912    pub fn list(&self) -> super::builder::region_target_tcp_proxies::List {
15913        super::builder::region_target_tcp_proxies::List::new(self.inner.clone())
15914    }
15915
15916    /// Retrieves the specified region-specific Operations resource.
15917    pub fn get_operation(&self) -> super::builder::region_target_tcp_proxies::GetOperation {
15918        super::builder::region_target_tcp_proxies::GetOperation::new(self.inner.clone())
15919    }
15920}
15921
15922/// Implements a client for the Compute Engine API.
15923///
15924/// # Example
15925/// ```
15926/// # use google_cloud_compute_v1::client::RegionUrlMaps;
15927/// async fn sample(
15928/// ) -> anyhow::Result<()> {
15929///     let client = RegionUrlMaps::builder().build().await?;
15930///     // use `client` to make requests to the Compute Engine API.
15931///     Ok(())
15932/// }
15933/// ```
15934///
15935/// # Service Description
15936///
15937/// Service for the `regionUrlMaps` resource.
15938///
15939/// The client library was generated with API version 2026-09-01.
15940///
15941/// # Configuration
15942///
15943/// To configure `RegionUrlMaps` use the `with_*` methods in the type returned
15944/// by [builder()][RegionUrlMaps::builder]. The default configuration should
15945/// work for most applications. Common configuration changes include
15946///
15947/// * [with_endpoint()]: by default this client uses the global default endpoint
15948///   (`https://compute.googleapis.com`). Applications using regional
15949///   endpoints or running in restricted networks (e.g. a network configured
15950///   with [Private Google Access with VPC Service Controls]) may want to
15951///   override this default.
15952/// * [with_credentials()]: by default this client uses
15953///   [Application Default Credentials]. Applications using custom
15954///   authentication may need to override this default.
15955///
15956/// [with_endpoint()]: super::builder::region_url_maps::ClientBuilder::with_endpoint
15957/// [with_credentials()]: super::builder::region_url_maps::ClientBuilder::with_credentials
15958/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
15959/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
15960///
15961/// # Pooling and Cloning
15962///
15963/// `RegionUrlMaps` holds a connection pool internally, it is advised to
15964/// create one and reuse it. You do not need to wrap `RegionUrlMaps` in
15965/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
15966/// already uses an `Arc` internally.
15967#[cfg(feature = "region-url-maps")]
15968#[cfg_attr(docsrs, doc(cfg(feature = "region-url-maps")))]
15969#[derive(Clone, Debug)]
15970pub struct RegionUrlMaps {
15971    inner: std::sync::Arc<dyn super::stub::dynamic::RegionUrlMaps>,
15972}
15973
15974#[cfg(feature = "region-url-maps")]
15975impl RegionUrlMaps {
15976    /// Returns a builder for [RegionUrlMaps].
15977    ///
15978    /// ```
15979    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
15980    /// # use google_cloud_compute_v1::client::RegionUrlMaps;
15981    /// let client = RegionUrlMaps::builder().build().await?;
15982    /// # Ok(()) }
15983    /// ```
15984    pub fn builder() -> super::builder::region_url_maps::ClientBuilder {
15985        crate::new_client_builder(super::builder::region_url_maps::client::Factory)
15986    }
15987
15988    /// Creates a new client from the provided stub.
15989    ///
15990    /// The most common case for calling this function is in tests mocking the
15991    /// client's behavior.
15992    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
15993    where
15994        T: super::stub::RegionUrlMaps + 'static,
15995    {
15996        Self { inner: stub.into() }
15997    }
15998
15999    pub(crate) async fn new(
16000        config: gaxi::options::ClientConfig,
16001    ) -> crate::ClientBuilderResult<Self> {
16002        let inner = Self::build_inner(config).await?;
16003        Ok(Self { inner })
16004    }
16005
16006    async fn build_inner(
16007        conf: gaxi::options::ClientConfig,
16008    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::RegionUrlMaps>> {
16009        if gaxi::options::tracing_enabled(&conf) {
16010            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
16011        }
16012        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
16013    }
16014
16015    async fn build_transport(
16016        conf: gaxi::options::ClientConfig,
16017    ) -> crate::ClientBuilderResult<impl super::stub::RegionUrlMaps> {
16018        super::transport::RegionUrlMaps::new(conf).await
16019    }
16020
16021    async fn build_with_tracing(
16022        conf: gaxi::options::ClientConfig,
16023    ) -> crate::ClientBuilderResult<impl super::stub::RegionUrlMaps> {
16024        Self::build_transport(conf)
16025            .await
16026            .map(super::tracing::RegionUrlMaps::new)
16027    }
16028
16029    /// Deletes the specified UrlMap resource.
16030    pub fn delete(&self) -> super::builder::region_url_maps::Delete {
16031        super::builder::region_url_maps::Delete::new(self.inner.clone())
16032    }
16033
16034    /// Returns the specified UrlMap resource.
16035    pub fn get(&self) -> super::builder::region_url_maps::Get {
16036        super::builder::region_url_maps::Get::new(self.inner.clone())
16037    }
16038
16039    /// Creates a UrlMap resource in the specified project using
16040    /// the data included in the request.
16041    pub fn insert(&self) -> super::builder::region_url_maps::Insert {
16042        super::builder::region_url_maps::Insert::new(self.inner.clone())
16043    }
16044
16045    /// Retrieves the list of UrlMap resources available to the specified
16046    /// project in the specified region.
16047    pub fn list(&self) -> super::builder::region_url_maps::List {
16048        super::builder::region_url_maps::List::new(self.inner.clone())
16049    }
16050
16051    /// Patches the specified UrlMap resource with the data included in the
16052    /// request. This method supportsPATCH
16053    /// semantics and usesJSON merge
16054    /// patch format and processing rules.
16055    pub fn patch(&self) -> super::builder::region_url_maps::Patch {
16056        super::builder::region_url_maps::Patch::new(self.inner.clone())
16057    }
16058
16059    /// Updates the specified UrlMap resource with the data included in the
16060    /// request.
16061    pub fn update(&self) -> super::builder::region_url_maps::Update {
16062        super::builder::region_url_maps::Update::new(self.inner.clone())
16063    }
16064
16065    /// Runs static validation for the UrlMap. In particular, the tests of the
16066    /// provided UrlMap will be run. Calling this method does NOT create the
16067    /// UrlMap.
16068    pub fn validate(&self) -> super::builder::region_url_maps::Validate {
16069        super::builder::region_url_maps::Validate::new(self.inner.clone())
16070    }
16071
16072    /// Retrieves the specified region-specific Operations resource.
16073    pub fn get_operation(&self) -> super::builder::region_url_maps::GetOperation {
16074        super::builder::region_url_maps::GetOperation::new(self.inner.clone())
16075    }
16076}
16077
16078/// Implements a client for the Compute Engine API.
16079///
16080/// # Example
16081/// ```
16082/// # use google_cloud_compute_v1::client::RegionZones;
16083/// async fn sample(
16084/// ) -> anyhow::Result<()> {
16085///     let client = RegionZones::builder().build().await?;
16086///     // use `client` to make requests to the Compute Engine API.
16087///     Ok(())
16088/// }
16089/// ```
16090///
16091/// # Service Description
16092///
16093/// Service for the `regionZones` resource.
16094///
16095/// The client library was generated with API version 2026-09-01.
16096///
16097/// # Configuration
16098///
16099/// To configure `RegionZones` use the `with_*` methods in the type returned
16100/// by [builder()][RegionZones::builder]. The default configuration should
16101/// work for most applications. Common configuration changes include
16102///
16103/// * [with_endpoint()]: by default this client uses the global default endpoint
16104///   (`https://compute.googleapis.com`). Applications using regional
16105///   endpoints or running in restricted networks (e.g. a network configured
16106///   with [Private Google Access with VPC Service Controls]) may want to
16107///   override this default.
16108/// * [with_credentials()]: by default this client uses
16109///   [Application Default Credentials]. Applications using custom
16110///   authentication may need to override this default.
16111///
16112/// [with_endpoint()]: super::builder::region_zones::ClientBuilder::with_endpoint
16113/// [with_credentials()]: super::builder::region_zones::ClientBuilder::with_credentials
16114/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
16115/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
16116///
16117/// # Pooling and Cloning
16118///
16119/// `RegionZones` holds a connection pool internally, it is advised to
16120/// create one and reuse it. You do not need to wrap `RegionZones` in
16121/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
16122/// already uses an `Arc` internally.
16123#[cfg(feature = "region-zones")]
16124#[cfg_attr(docsrs, doc(cfg(feature = "region-zones")))]
16125#[derive(Clone, Debug)]
16126pub struct RegionZones {
16127    inner: std::sync::Arc<dyn super::stub::dynamic::RegionZones>,
16128}
16129
16130#[cfg(feature = "region-zones")]
16131impl RegionZones {
16132    /// Returns a builder for [RegionZones].
16133    ///
16134    /// ```
16135    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
16136    /// # use google_cloud_compute_v1::client::RegionZones;
16137    /// let client = RegionZones::builder().build().await?;
16138    /// # Ok(()) }
16139    /// ```
16140    pub fn builder() -> super::builder::region_zones::ClientBuilder {
16141        crate::new_client_builder(super::builder::region_zones::client::Factory)
16142    }
16143
16144    /// Creates a new client from the provided stub.
16145    ///
16146    /// The most common case for calling this function is in tests mocking the
16147    /// client's behavior.
16148    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
16149    where
16150        T: super::stub::RegionZones + 'static,
16151    {
16152        Self { inner: stub.into() }
16153    }
16154
16155    pub(crate) async fn new(
16156        config: gaxi::options::ClientConfig,
16157    ) -> crate::ClientBuilderResult<Self> {
16158        let inner = Self::build_inner(config).await?;
16159        Ok(Self { inner })
16160    }
16161
16162    async fn build_inner(
16163        conf: gaxi::options::ClientConfig,
16164    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::RegionZones>> {
16165        if gaxi::options::tracing_enabled(&conf) {
16166            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
16167        }
16168        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
16169    }
16170
16171    async fn build_transport(
16172        conf: gaxi::options::ClientConfig,
16173    ) -> crate::ClientBuilderResult<impl super::stub::RegionZones> {
16174        super::transport::RegionZones::new(conf).await
16175    }
16176
16177    async fn build_with_tracing(
16178        conf: gaxi::options::ClientConfig,
16179    ) -> crate::ClientBuilderResult<impl super::stub::RegionZones> {
16180        Self::build_transport(conf)
16181            .await
16182            .map(super::tracing::RegionZones::new)
16183    }
16184
16185    /// Retrieves the list of Zone resources under the specific region available to
16186    /// the specified project.
16187    pub fn list(&self) -> super::builder::region_zones::List {
16188        super::builder::region_zones::List::new(self.inner.clone())
16189    }
16190}
16191
16192/// Implements a client for the Compute Engine API.
16193///
16194/// # Example
16195/// ```
16196/// # use google_cloud_compute_v1::client::Regions;
16197/// async fn sample(
16198/// ) -> anyhow::Result<()> {
16199///     let client = Regions::builder().build().await?;
16200///     // use `client` to make requests to the Compute Engine API.
16201///     Ok(())
16202/// }
16203/// ```
16204///
16205/// # Service Description
16206///
16207/// Service for the `regions` resource.
16208///
16209/// The client library was generated with API version 2026-09-01.
16210///
16211/// # Configuration
16212///
16213/// To configure `Regions` use the `with_*` methods in the type returned
16214/// by [builder()][Regions::builder]. The default configuration should
16215/// work for most applications. Common configuration changes include
16216///
16217/// * [with_endpoint()]: by default this client uses the global default endpoint
16218///   (`https://compute.googleapis.com`). Applications using regional
16219///   endpoints or running in restricted networks (e.g. a network configured
16220///   with [Private Google Access with VPC Service Controls]) may want to
16221///   override this default.
16222/// * [with_credentials()]: by default this client uses
16223///   [Application Default Credentials]. Applications using custom
16224///   authentication may need to override this default.
16225///
16226/// [with_endpoint()]: super::builder::regions::ClientBuilder::with_endpoint
16227/// [with_credentials()]: super::builder::regions::ClientBuilder::with_credentials
16228/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
16229/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
16230///
16231/// # Pooling and Cloning
16232///
16233/// `Regions` holds a connection pool internally, it is advised to
16234/// create one and reuse it. You do not need to wrap `Regions` in
16235/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
16236/// already uses an `Arc` internally.
16237#[cfg(feature = "regions")]
16238#[cfg_attr(docsrs, doc(cfg(feature = "regions")))]
16239#[derive(Clone, Debug)]
16240pub struct Regions {
16241    inner: std::sync::Arc<dyn super::stub::dynamic::Regions>,
16242}
16243
16244#[cfg(feature = "regions")]
16245impl Regions {
16246    /// Returns a builder for [Regions].
16247    ///
16248    /// ```
16249    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
16250    /// # use google_cloud_compute_v1::client::Regions;
16251    /// let client = Regions::builder().build().await?;
16252    /// # Ok(()) }
16253    /// ```
16254    pub fn builder() -> super::builder::regions::ClientBuilder {
16255        crate::new_client_builder(super::builder::regions::client::Factory)
16256    }
16257
16258    /// Creates a new client from the provided stub.
16259    ///
16260    /// The most common case for calling this function is in tests mocking the
16261    /// client's behavior.
16262    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
16263    where
16264        T: super::stub::Regions + 'static,
16265    {
16266        Self { inner: stub.into() }
16267    }
16268
16269    pub(crate) async fn new(
16270        config: gaxi::options::ClientConfig,
16271    ) -> crate::ClientBuilderResult<Self> {
16272        let inner = Self::build_inner(config).await?;
16273        Ok(Self { inner })
16274    }
16275
16276    async fn build_inner(
16277        conf: gaxi::options::ClientConfig,
16278    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::Regions>> {
16279        if gaxi::options::tracing_enabled(&conf) {
16280            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
16281        }
16282        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
16283    }
16284
16285    async fn build_transport(
16286        conf: gaxi::options::ClientConfig,
16287    ) -> crate::ClientBuilderResult<impl super::stub::Regions> {
16288        super::transport::Regions::new(conf).await
16289    }
16290
16291    async fn build_with_tracing(
16292        conf: gaxi::options::ClientConfig,
16293    ) -> crate::ClientBuilderResult<impl super::stub::Regions> {
16294        Self::build_transport(conf)
16295            .await
16296            .map(super::tracing::Regions::new)
16297    }
16298
16299    /// Returns the specified Region resource.
16300    ///
16301    /// To decrease latency for this method, you can optionally omit any unneeded
16302    /// information from the response by using a field mask. This practice is
16303    /// especially recommended for unused quota information (the `quotas` field).
16304    /// To exclude one or more fields, set your request's `fields` query parameter
16305    /// to only include the fields you need. For example, to only include the `id`
16306    /// and `selfLink` fields, add the query parameter `?fields=id,selfLink` to
16307    /// your request.
16308    ///
16309    /// This method fails if the quota information is unavailable for the region
16310    /// and if the organization policy constraint
16311    /// compute.requireBasicQuotaInResponse is enforced. This
16312    /// constraint, when enforced, disables the fail-open behaviour when quota
16313    /// information (the `items.quotas` field) is unavailable for the region.
16314    /// It is recommended to use the default setting
16315    /// for the constraint unless your application requires the fail-closed
16316    /// behaviour for this method.
16317    pub fn get(&self) -> super::builder::regions::Get {
16318        super::builder::regions::Get::new(self.inner.clone())
16319    }
16320
16321    /// Retrieves the list of region resources available to the specified project.
16322    ///
16323    /// To decrease latency for this method, you can optionally omit any unneeded
16324    /// information from the response by using a field mask. This practice is
16325    /// especially recommended for unused quota information
16326    /// (the `items.quotas` field).
16327    /// To exclude one or more fields, set your request's `fields` query parameter
16328    /// to only include the fields you need. For example, to only include the `id`
16329    /// and `selfLink` fields, add the query parameter `?fields=id,selfLink` to
16330    /// your request.
16331    ///
16332    /// This method fails if the quota information is unavailable for the region
16333    /// and if the organization policy constraint
16334    /// compute.requireBasicQuotaInResponse is enforced. This
16335    /// constraint, when enforced, disables the fail-open behaviour when quota
16336    /// information (the `items.quotas` field) is unavailable for the region.
16337    /// It is recommended to use the default setting
16338    /// for the constraint unless your application requires the fail-closed
16339    /// behaviour for this method.
16340    pub fn list(&self) -> super::builder::regions::List {
16341        super::builder::regions::List::new(self.inner.clone())
16342    }
16343}
16344
16345/// Implements a client for the Compute Engine API.
16346///
16347/// # Example
16348/// ```
16349/// # use google_cloud_compute_v1::client::ReliabilityRisks;
16350/// async fn sample(
16351/// ) -> anyhow::Result<()> {
16352///     let client = ReliabilityRisks::builder().build().await?;
16353///     // use `client` to make requests to the Compute Engine API.
16354///     Ok(())
16355/// }
16356/// ```
16357///
16358/// # Service Description
16359///
16360/// Service for the `reliabilityRisks` resource.
16361///
16362/// The client library was generated with API version 2026-09-01.
16363///
16364/// # Configuration
16365///
16366/// To configure `ReliabilityRisks` use the `with_*` methods in the type returned
16367/// by [builder()][ReliabilityRisks::builder]. The default configuration should
16368/// work for most applications. Common configuration changes include
16369///
16370/// * [with_endpoint()]: by default this client uses the global default endpoint
16371///   (`https://compute.googleapis.com`). Applications using regional
16372///   endpoints or running in restricted networks (e.g. a network configured
16373///   with [Private Google Access with VPC Service Controls]) may want to
16374///   override this default.
16375/// * [with_credentials()]: by default this client uses
16376///   [Application Default Credentials]. Applications using custom
16377///   authentication may need to override this default.
16378///
16379/// [with_endpoint()]: super::builder::reliability_risks::ClientBuilder::with_endpoint
16380/// [with_credentials()]: super::builder::reliability_risks::ClientBuilder::with_credentials
16381/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
16382/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
16383///
16384/// # Pooling and Cloning
16385///
16386/// `ReliabilityRisks` holds a connection pool internally, it is advised to
16387/// create one and reuse it. You do not need to wrap `ReliabilityRisks` in
16388/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
16389/// already uses an `Arc` internally.
16390#[cfg(feature = "reliability-risks")]
16391#[cfg_attr(docsrs, doc(cfg(feature = "reliability-risks")))]
16392#[derive(Clone, Debug)]
16393pub struct ReliabilityRisks {
16394    inner: std::sync::Arc<dyn super::stub::dynamic::ReliabilityRisks>,
16395}
16396
16397#[cfg(feature = "reliability-risks")]
16398impl ReliabilityRisks {
16399    /// Returns a builder for [ReliabilityRisks].
16400    ///
16401    /// ```
16402    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
16403    /// # use google_cloud_compute_v1::client::ReliabilityRisks;
16404    /// let client = ReliabilityRisks::builder().build().await?;
16405    /// # Ok(()) }
16406    /// ```
16407    pub fn builder() -> super::builder::reliability_risks::ClientBuilder {
16408        crate::new_client_builder(super::builder::reliability_risks::client::Factory)
16409    }
16410
16411    /// Creates a new client from the provided stub.
16412    ///
16413    /// The most common case for calling this function is in tests mocking the
16414    /// client's behavior.
16415    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
16416    where
16417        T: super::stub::ReliabilityRisks + 'static,
16418    {
16419        Self { inner: stub.into() }
16420    }
16421
16422    pub(crate) async fn new(
16423        config: gaxi::options::ClientConfig,
16424    ) -> crate::ClientBuilderResult<Self> {
16425        let inner = Self::build_inner(config).await?;
16426        Ok(Self { inner })
16427    }
16428
16429    async fn build_inner(
16430        conf: gaxi::options::ClientConfig,
16431    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::ReliabilityRisks>>
16432    {
16433        if gaxi::options::tracing_enabled(&conf) {
16434            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
16435        }
16436        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
16437    }
16438
16439    async fn build_transport(
16440        conf: gaxi::options::ClientConfig,
16441    ) -> crate::ClientBuilderResult<impl super::stub::ReliabilityRisks> {
16442        super::transport::ReliabilityRisks::new(conf).await
16443    }
16444
16445    async fn build_with_tracing(
16446        conf: gaxi::options::ClientConfig,
16447    ) -> crate::ClientBuilderResult<impl super::stub::ReliabilityRisks> {
16448        Self::build_transport(conf)
16449            .await
16450            .map(super::tracing::ReliabilityRisks::new)
16451    }
16452
16453    /// Returns the specified ReliabilityRisk resource.
16454    pub fn get(&self) -> super::builder::reliability_risks::Get {
16455        super::builder::reliability_risks::Get::new(self.inner.clone())
16456    }
16457
16458    /// Retrieves the list of reliabilityRisks available in the specified project.
16459    pub fn list(&self) -> super::builder::reliability_risks::List {
16460        super::builder::reliability_risks::List::new(self.inner.clone())
16461    }
16462}
16463
16464/// Implements a client for the Compute Engine API.
16465///
16466/// # Example
16467/// ```
16468/// # use google_cloud_compute_v1::client::ReservationBlocks;
16469/// async fn sample(
16470/// ) -> anyhow::Result<()> {
16471///     let client = ReservationBlocks::builder().build().await?;
16472///     // use `client` to make requests to the Compute Engine API.
16473///     Ok(())
16474/// }
16475/// ```
16476///
16477/// # Service Description
16478///
16479/// Service for the `reservationBlocks` resource.
16480///
16481/// The client library was generated with API version 2026-09-01.
16482///
16483/// # Configuration
16484///
16485/// To configure `ReservationBlocks` use the `with_*` methods in the type returned
16486/// by [builder()][ReservationBlocks::builder]. The default configuration should
16487/// work for most applications. Common configuration changes include
16488///
16489/// * [with_endpoint()]: by default this client uses the global default endpoint
16490///   (`https://compute.googleapis.com`). Applications using regional
16491///   endpoints or running in restricted networks (e.g. a network configured
16492///   with [Private Google Access with VPC Service Controls]) may want to
16493///   override this default.
16494/// * [with_credentials()]: by default this client uses
16495///   [Application Default Credentials]. Applications using custom
16496///   authentication may need to override this default.
16497///
16498/// [with_endpoint()]: super::builder::reservation_blocks::ClientBuilder::with_endpoint
16499/// [with_credentials()]: super::builder::reservation_blocks::ClientBuilder::with_credentials
16500/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
16501/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
16502///
16503/// # Pooling and Cloning
16504///
16505/// `ReservationBlocks` holds a connection pool internally, it is advised to
16506/// create one and reuse it. You do not need to wrap `ReservationBlocks` in
16507/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
16508/// already uses an `Arc` internally.
16509#[cfg(feature = "reservation-blocks")]
16510#[cfg_attr(docsrs, doc(cfg(feature = "reservation-blocks")))]
16511#[derive(Clone, Debug)]
16512pub struct ReservationBlocks {
16513    inner: std::sync::Arc<dyn super::stub::dynamic::ReservationBlocks>,
16514}
16515
16516#[cfg(feature = "reservation-blocks")]
16517impl ReservationBlocks {
16518    /// Returns a builder for [ReservationBlocks].
16519    ///
16520    /// ```
16521    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
16522    /// # use google_cloud_compute_v1::client::ReservationBlocks;
16523    /// let client = ReservationBlocks::builder().build().await?;
16524    /// # Ok(()) }
16525    /// ```
16526    pub fn builder() -> super::builder::reservation_blocks::ClientBuilder {
16527        crate::new_client_builder(super::builder::reservation_blocks::client::Factory)
16528    }
16529
16530    /// Creates a new client from the provided stub.
16531    ///
16532    /// The most common case for calling this function is in tests mocking the
16533    /// client's behavior.
16534    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
16535    where
16536        T: super::stub::ReservationBlocks + 'static,
16537    {
16538        Self { inner: stub.into() }
16539    }
16540
16541    pub(crate) async fn new(
16542        config: gaxi::options::ClientConfig,
16543    ) -> crate::ClientBuilderResult<Self> {
16544        let inner = Self::build_inner(config).await?;
16545        Ok(Self { inner })
16546    }
16547
16548    async fn build_inner(
16549        conf: gaxi::options::ClientConfig,
16550    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::ReservationBlocks>>
16551    {
16552        if gaxi::options::tracing_enabled(&conf) {
16553            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
16554        }
16555        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
16556    }
16557
16558    async fn build_transport(
16559        conf: gaxi::options::ClientConfig,
16560    ) -> crate::ClientBuilderResult<impl super::stub::ReservationBlocks> {
16561        super::transport::ReservationBlocks::new(conf).await
16562    }
16563
16564    async fn build_with_tracing(
16565        conf: gaxi::options::ClientConfig,
16566    ) -> crate::ClientBuilderResult<impl super::stub::ReservationBlocks> {
16567        Self::build_transport(conf)
16568            .await
16569            .map(super::tracing::ReservationBlocks::new)
16570    }
16571
16572    /// Retrieves information about the specified reservation block.
16573    pub fn get(&self) -> super::builder::reservation_blocks::Get {
16574        super::builder::reservation_blocks::Get::new(self.inner.clone())
16575    }
16576
16577    /// Gets the access control policy for a resource. May be empty if no such
16578    /// policy or resource exists.
16579    pub fn get_iam_policy(&self) -> super::builder::reservation_blocks::GetIamPolicy {
16580        super::builder::reservation_blocks::GetIamPolicy::new(self.inner.clone())
16581    }
16582
16583    /// Retrieves a list of reservation blocks under a single reservation.
16584    pub fn list(&self) -> super::builder::reservation_blocks::List {
16585        super::builder::reservation_blocks::List::new(self.inner.clone())
16586    }
16587
16588    /// Allows customers to perform maintenance on a reservation block
16589    pub fn perform_maintenance(&self) -> super::builder::reservation_blocks::PerformMaintenance {
16590        super::builder::reservation_blocks::PerformMaintenance::new(self.inner.clone())
16591    }
16592
16593    /// Sets the access control policy on the specified resource.
16594    /// Replaces any existing policy.
16595    pub fn set_iam_policy(&self) -> super::builder::reservation_blocks::SetIamPolicy {
16596        super::builder::reservation_blocks::SetIamPolicy::new(self.inner.clone())
16597    }
16598
16599    /// Returns permissions that a caller has on the specified resource.
16600    pub fn test_iam_permissions(&self) -> super::builder::reservation_blocks::TestIamPermissions {
16601        super::builder::reservation_blocks::TestIamPermissions::new(self.inner.clone())
16602    }
16603
16604    /// Retrieves the specified zone-specific Operations resource.
16605    pub fn get_operation(&self) -> super::builder::reservation_blocks::GetOperation {
16606        super::builder::reservation_blocks::GetOperation::new(self.inner.clone())
16607    }
16608}
16609
16610/// Implements a client for the Compute Engine API.
16611///
16612/// # Example
16613/// ```
16614/// # use google_cloud_compute_v1::client::ReservationSlots;
16615/// async fn sample(
16616/// ) -> anyhow::Result<()> {
16617///     let client = ReservationSlots::builder().build().await?;
16618///     // use `client` to make requests to the Compute Engine API.
16619///     Ok(())
16620/// }
16621/// ```
16622///
16623/// # Service Description
16624///
16625/// Service for the `reservationSlots` resource.
16626///
16627/// The client library was generated with API version 2026-09-01.
16628///
16629/// # Configuration
16630///
16631/// To configure `ReservationSlots` use the `with_*` methods in the type returned
16632/// by [builder()][ReservationSlots::builder]. The default configuration should
16633/// work for most applications. Common configuration changes include
16634///
16635/// * [with_endpoint()]: by default this client uses the global default endpoint
16636///   (`https://compute.googleapis.com`). Applications using regional
16637///   endpoints or running in restricted networks (e.g. a network configured
16638///   with [Private Google Access with VPC Service Controls]) may want to
16639///   override this default.
16640/// * [with_credentials()]: by default this client uses
16641///   [Application Default Credentials]. Applications using custom
16642///   authentication may need to override this default.
16643///
16644/// [with_endpoint()]: super::builder::reservation_slots::ClientBuilder::with_endpoint
16645/// [with_credentials()]: super::builder::reservation_slots::ClientBuilder::with_credentials
16646/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
16647/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
16648///
16649/// # Pooling and Cloning
16650///
16651/// `ReservationSlots` holds a connection pool internally, it is advised to
16652/// create one and reuse it. You do not need to wrap `ReservationSlots` in
16653/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
16654/// already uses an `Arc` internally.
16655#[cfg(feature = "reservation-slots")]
16656#[cfg_attr(docsrs, doc(cfg(feature = "reservation-slots")))]
16657#[derive(Clone, Debug)]
16658pub struct ReservationSlots {
16659    inner: std::sync::Arc<dyn super::stub::dynamic::ReservationSlots>,
16660}
16661
16662#[cfg(feature = "reservation-slots")]
16663impl ReservationSlots {
16664    /// Returns a builder for [ReservationSlots].
16665    ///
16666    /// ```
16667    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
16668    /// # use google_cloud_compute_v1::client::ReservationSlots;
16669    /// let client = ReservationSlots::builder().build().await?;
16670    /// # Ok(()) }
16671    /// ```
16672    pub fn builder() -> super::builder::reservation_slots::ClientBuilder {
16673        crate::new_client_builder(super::builder::reservation_slots::client::Factory)
16674    }
16675
16676    /// Creates a new client from the provided stub.
16677    ///
16678    /// The most common case for calling this function is in tests mocking the
16679    /// client's behavior.
16680    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
16681    where
16682        T: super::stub::ReservationSlots + 'static,
16683    {
16684        Self { inner: stub.into() }
16685    }
16686
16687    pub(crate) async fn new(
16688        config: gaxi::options::ClientConfig,
16689    ) -> crate::ClientBuilderResult<Self> {
16690        let inner = Self::build_inner(config).await?;
16691        Ok(Self { inner })
16692    }
16693
16694    async fn build_inner(
16695        conf: gaxi::options::ClientConfig,
16696    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::ReservationSlots>>
16697    {
16698        if gaxi::options::tracing_enabled(&conf) {
16699            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
16700        }
16701        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
16702    }
16703
16704    async fn build_transport(
16705        conf: gaxi::options::ClientConfig,
16706    ) -> crate::ClientBuilderResult<impl super::stub::ReservationSlots> {
16707        super::transport::ReservationSlots::new(conf).await
16708    }
16709
16710    async fn build_with_tracing(
16711        conf: gaxi::options::ClientConfig,
16712    ) -> crate::ClientBuilderResult<impl super::stub::ReservationSlots> {
16713        Self::build_transport(conf)
16714            .await
16715            .map(super::tracing::ReservationSlots::new)
16716    }
16717
16718    /// Retrieves information about the specified reservation slot.
16719    pub fn get(&self) -> super::builder::reservation_slots::Get {
16720        super::builder::reservation_slots::Get::new(self.inner.clone())
16721    }
16722
16723    /// Get health info on a reservation slot.
16724    pub fn get_health(&self) -> super::builder::reservation_slots::GetHealth {
16725        super::builder::reservation_slots::GetHealth::new(self.inner.clone())
16726    }
16727
16728    /// Allows customers to get SBOM versions of a reservation slot.
16729    pub fn get_version(&self) -> super::builder::reservation_slots::GetVersion {
16730        super::builder::reservation_slots::GetVersion::new(self.inner.clone())
16731    }
16732
16733    /// Retrieves a list of reservation slots under a single reservation.
16734    pub fn list(&self) -> super::builder::reservation_slots::List {
16735        super::builder::reservation_slots::List::new(self.inner.clone())
16736    }
16737
16738    /// Update a reservation slot in the specified sub-block.
16739    pub fn update(&self) -> super::builder::reservation_slots::Update {
16740        super::builder::reservation_slots::Update::new(self.inner.clone())
16741    }
16742
16743    /// Retrieves the specified zone-specific Operations resource.
16744    pub fn get_operation(&self) -> super::builder::reservation_slots::GetOperation {
16745        super::builder::reservation_slots::GetOperation::new(self.inner.clone())
16746    }
16747}
16748
16749/// Implements a client for the Compute Engine API.
16750///
16751/// # Example
16752/// ```
16753/// # use google_cloud_compute_v1::client::ReservationSubBlocks;
16754/// async fn sample(
16755/// ) -> anyhow::Result<()> {
16756///     let client = ReservationSubBlocks::builder().build().await?;
16757///     // use `client` to make requests to the Compute Engine API.
16758///     Ok(())
16759/// }
16760/// ```
16761///
16762/// # Service Description
16763///
16764/// Service for the `reservationSubBlocks` resource.
16765///
16766/// The client library was generated with API version 2026-09-01.
16767///
16768/// # Configuration
16769///
16770/// To configure `ReservationSubBlocks` use the `with_*` methods in the type returned
16771/// by [builder()][ReservationSubBlocks::builder]. The default configuration should
16772/// work for most applications. Common configuration changes include
16773///
16774/// * [with_endpoint()]: by default this client uses the global default endpoint
16775///   (`https://compute.googleapis.com`). Applications using regional
16776///   endpoints or running in restricted networks (e.g. a network configured
16777///   with [Private Google Access with VPC Service Controls]) may want to
16778///   override this default.
16779/// * [with_credentials()]: by default this client uses
16780///   [Application Default Credentials]. Applications using custom
16781///   authentication may need to override this default.
16782///
16783/// [with_endpoint()]: super::builder::reservation_sub_blocks::ClientBuilder::with_endpoint
16784/// [with_credentials()]: super::builder::reservation_sub_blocks::ClientBuilder::with_credentials
16785/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
16786/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
16787///
16788/// # Pooling and Cloning
16789///
16790/// `ReservationSubBlocks` holds a connection pool internally, it is advised to
16791/// create one and reuse it. You do not need to wrap `ReservationSubBlocks` in
16792/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
16793/// already uses an `Arc` internally.
16794#[cfg(feature = "reservation-sub-blocks")]
16795#[cfg_attr(docsrs, doc(cfg(feature = "reservation-sub-blocks")))]
16796#[derive(Clone, Debug)]
16797pub struct ReservationSubBlocks {
16798    inner: std::sync::Arc<dyn super::stub::dynamic::ReservationSubBlocks>,
16799}
16800
16801#[cfg(feature = "reservation-sub-blocks")]
16802impl ReservationSubBlocks {
16803    /// Returns a builder for [ReservationSubBlocks].
16804    ///
16805    /// ```
16806    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
16807    /// # use google_cloud_compute_v1::client::ReservationSubBlocks;
16808    /// let client = ReservationSubBlocks::builder().build().await?;
16809    /// # Ok(()) }
16810    /// ```
16811    pub fn builder() -> super::builder::reservation_sub_blocks::ClientBuilder {
16812        crate::new_client_builder(super::builder::reservation_sub_blocks::client::Factory)
16813    }
16814
16815    /// Creates a new client from the provided stub.
16816    ///
16817    /// The most common case for calling this function is in tests mocking the
16818    /// client's behavior.
16819    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
16820    where
16821        T: super::stub::ReservationSubBlocks + 'static,
16822    {
16823        Self { inner: stub.into() }
16824    }
16825
16826    pub(crate) async fn new(
16827        config: gaxi::options::ClientConfig,
16828    ) -> crate::ClientBuilderResult<Self> {
16829        let inner = Self::build_inner(config).await?;
16830        Ok(Self { inner })
16831    }
16832
16833    async fn build_inner(
16834        conf: gaxi::options::ClientConfig,
16835    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::ReservationSubBlocks>>
16836    {
16837        if gaxi::options::tracing_enabled(&conf) {
16838            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
16839        }
16840        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
16841    }
16842
16843    async fn build_transport(
16844        conf: gaxi::options::ClientConfig,
16845    ) -> crate::ClientBuilderResult<impl super::stub::ReservationSubBlocks> {
16846        super::transport::ReservationSubBlocks::new(conf).await
16847    }
16848
16849    async fn build_with_tracing(
16850        conf: gaxi::options::ClientConfig,
16851    ) -> crate::ClientBuilderResult<impl super::stub::ReservationSubBlocks> {
16852        Self::build_transport(conf)
16853            .await
16854            .map(super::tracing::ReservationSubBlocks::new)
16855    }
16856
16857    /// Retrieves information about the specified reservation subBlock.
16858    pub fn get(&self) -> super::builder::reservation_sub_blocks::Get {
16859        super::builder::reservation_sub_blocks::Get::new(self.inner.clone())
16860    }
16861
16862    /// Gets the access control policy for a resource. May be empty if no such
16863    /// policy or resource exists.
16864    pub fn get_iam_policy(&self) -> super::builder::reservation_sub_blocks::GetIamPolicy {
16865        super::builder::reservation_sub_blocks::GetIamPolicy::new(self.inner.clone())
16866    }
16867
16868    /// Allows customers to get SBOM versions of a reservation subBlock.
16869    pub fn get_version(&self) -> super::builder::reservation_sub_blocks::GetVersion {
16870        super::builder::reservation_sub_blocks::GetVersion::new(self.inner.clone())
16871    }
16872
16873    /// Retrieves a list of reservation subBlocks under a single reservation.
16874    pub fn list(&self) -> super::builder::reservation_sub_blocks::List {
16875        super::builder::reservation_sub_blocks::List::new(self.inner.clone())
16876    }
16877
16878    /// Allows customers to perform maintenance on a reservation subBlock
16879    pub fn perform_maintenance(
16880        &self,
16881    ) -> super::builder::reservation_sub_blocks::PerformMaintenance {
16882        super::builder::reservation_sub_blocks::PerformMaintenance::new(self.inner.clone())
16883    }
16884
16885    /// Allows customers to report a faulty subBlock.
16886    pub fn report_faulty(&self) -> super::builder::reservation_sub_blocks::ReportFaulty {
16887        super::builder::reservation_sub_blocks::ReportFaulty::new(self.inner.clone())
16888    }
16889
16890    /// Sets the access control policy on the specified resource.
16891    /// Replaces any existing policy.
16892    pub fn set_iam_policy(&self) -> super::builder::reservation_sub_blocks::SetIamPolicy {
16893        super::builder::reservation_sub_blocks::SetIamPolicy::new(self.inner.clone())
16894    }
16895
16896    /// Returns permissions that a caller has on the specified resource.
16897    pub fn test_iam_permissions(
16898        &self,
16899    ) -> super::builder::reservation_sub_blocks::TestIamPermissions {
16900        super::builder::reservation_sub_blocks::TestIamPermissions::new(self.inner.clone())
16901    }
16902
16903    /// Retrieves the specified zone-specific Operations resource.
16904    pub fn get_operation(&self) -> super::builder::reservation_sub_blocks::GetOperation {
16905        super::builder::reservation_sub_blocks::GetOperation::new(self.inner.clone())
16906    }
16907}
16908
16909/// Implements a client for the Compute Engine API.
16910///
16911/// # Example
16912/// ```
16913/// # use google_cloud_compute_v1::client::Reservations;
16914/// async fn sample(
16915/// ) -> anyhow::Result<()> {
16916///     let client = Reservations::builder().build().await?;
16917///     // use `client` to make requests to the Compute Engine API.
16918///     Ok(())
16919/// }
16920/// ```
16921///
16922/// # Service Description
16923///
16924/// Service for the `reservations` resource.
16925///
16926/// The client library was generated with API version 2026-09-01.
16927///
16928/// # Configuration
16929///
16930/// To configure `Reservations` use the `with_*` methods in the type returned
16931/// by [builder()][Reservations::builder]. The default configuration should
16932/// work for most applications. Common configuration changes include
16933///
16934/// * [with_endpoint()]: by default this client uses the global default endpoint
16935///   (`https://compute.googleapis.com`). Applications using regional
16936///   endpoints or running in restricted networks (e.g. a network configured
16937///   with [Private Google Access with VPC Service Controls]) may want to
16938///   override this default.
16939/// * [with_credentials()]: by default this client uses
16940///   [Application Default Credentials]. Applications using custom
16941///   authentication may need to override this default.
16942///
16943/// [with_endpoint()]: super::builder::reservations::ClientBuilder::with_endpoint
16944/// [with_credentials()]: super::builder::reservations::ClientBuilder::with_credentials
16945/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
16946/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
16947///
16948/// # Pooling and Cloning
16949///
16950/// `Reservations` holds a connection pool internally, it is advised to
16951/// create one and reuse it. You do not need to wrap `Reservations` in
16952/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
16953/// already uses an `Arc` internally.
16954#[cfg(feature = "reservations")]
16955#[cfg_attr(docsrs, doc(cfg(feature = "reservations")))]
16956#[derive(Clone, Debug)]
16957pub struct Reservations {
16958    inner: std::sync::Arc<dyn super::stub::dynamic::Reservations>,
16959}
16960
16961#[cfg(feature = "reservations")]
16962impl Reservations {
16963    /// Returns a builder for [Reservations].
16964    ///
16965    /// ```
16966    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
16967    /// # use google_cloud_compute_v1::client::Reservations;
16968    /// let client = Reservations::builder().build().await?;
16969    /// # Ok(()) }
16970    /// ```
16971    pub fn builder() -> super::builder::reservations::ClientBuilder {
16972        crate::new_client_builder(super::builder::reservations::client::Factory)
16973    }
16974
16975    /// Creates a new client from the provided stub.
16976    ///
16977    /// The most common case for calling this function is in tests mocking the
16978    /// client's behavior.
16979    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
16980    where
16981        T: super::stub::Reservations + 'static,
16982    {
16983        Self { inner: stub.into() }
16984    }
16985
16986    pub(crate) async fn new(
16987        config: gaxi::options::ClientConfig,
16988    ) -> crate::ClientBuilderResult<Self> {
16989        let inner = Self::build_inner(config).await?;
16990        Ok(Self { inner })
16991    }
16992
16993    async fn build_inner(
16994        conf: gaxi::options::ClientConfig,
16995    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::Reservations>> {
16996        if gaxi::options::tracing_enabled(&conf) {
16997            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
16998        }
16999        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
17000    }
17001
17002    async fn build_transport(
17003        conf: gaxi::options::ClientConfig,
17004    ) -> crate::ClientBuilderResult<impl super::stub::Reservations> {
17005        super::transport::Reservations::new(conf).await
17006    }
17007
17008    async fn build_with_tracing(
17009        conf: gaxi::options::ClientConfig,
17010    ) -> crate::ClientBuilderResult<impl super::stub::Reservations> {
17011        Self::build_transport(conf)
17012            .await
17013            .map(super::tracing::Reservations::new)
17014    }
17015
17016    /// Retrieves an aggregated list of reservations.
17017    ///
17018    /// To prevent failure, it is recommended that you set the
17019    /// `returnPartialSuccess` parameter to `true`.
17020    pub fn aggregated_list(&self) -> super::builder::reservations::AggregatedList {
17021        super::builder::reservations::AggregatedList::new(self.inner.clone())
17022    }
17023
17024    /// Deletes the specified reservation.
17025    pub fn delete(&self) -> super::builder::reservations::Delete {
17026        super::builder::reservations::Delete::new(self.inner.clone())
17027    }
17028
17029    /// Retrieves information about the specified reservation.
17030    pub fn get(&self) -> super::builder::reservations::Get {
17031        super::builder::reservations::Get::new(self.inner.clone())
17032    }
17033
17034    /// Gets the access control policy for a resource. May be empty if no such
17035    /// policy or resource exists.
17036    pub fn get_iam_policy(&self) -> super::builder::reservations::GetIamPolicy {
17037        super::builder::reservations::GetIamPolicy::new(self.inner.clone())
17038    }
17039
17040    /// Creates a new reservation. For more information, readReserving zonal
17041    /// resources.
17042    pub fn insert(&self) -> super::builder::reservations::Insert {
17043        super::builder::reservations::Insert::new(self.inner.clone())
17044    }
17045
17046    /// A list of all the reservations that have been configured for the
17047    /// specified project in specified zone.
17048    pub fn list(&self) -> super::builder::reservations::List {
17049        super::builder::reservations::List::new(self.inner.clone())
17050    }
17051
17052    /// Perform maintenance on an extended reservation
17053    pub fn perform_maintenance(&self) -> super::builder::reservations::PerformMaintenance {
17054        super::builder::reservations::PerformMaintenance::new(self.inner.clone())
17055    }
17056
17057    /// Resizes the reservation (applicable to standalone reservations only). For
17058    /// more information, readModifying
17059    /// reservations.
17060    pub fn resize(&self) -> super::builder::reservations::Resize {
17061        super::builder::reservations::Resize::new(self.inner.clone())
17062    }
17063
17064    /// Sets the access control policy on the specified resource.
17065    /// Replaces any existing policy.
17066    pub fn set_iam_policy(&self) -> super::builder::reservations::SetIamPolicy {
17067        super::builder::reservations::SetIamPolicy::new(self.inner.clone())
17068    }
17069
17070    /// Returns permissions that a caller has on the specified resource.
17071    pub fn test_iam_permissions(&self) -> super::builder::reservations::TestIamPermissions {
17072        super::builder::reservations::TestIamPermissions::new(self.inner.clone())
17073    }
17074
17075    /// Update share settings of the reservation.
17076    pub fn update(&self) -> super::builder::reservations::Update {
17077        super::builder::reservations::Update::new(self.inner.clone())
17078    }
17079
17080    /// Retrieves the specified zone-specific Operations resource.
17081    pub fn get_operation(&self) -> super::builder::reservations::GetOperation {
17082        super::builder::reservations::GetOperation::new(self.inner.clone())
17083    }
17084}
17085
17086/// Implements a client for the Compute Engine API.
17087///
17088/// # Example
17089/// ```
17090/// # use google_cloud_compute_v1::client::ResourcePolicies;
17091/// async fn sample(
17092/// ) -> anyhow::Result<()> {
17093///     let client = ResourcePolicies::builder().build().await?;
17094///     // use `client` to make requests to the Compute Engine API.
17095///     Ok(())
17096/// }
17097/// ```
17098///
17099/// # Service Description
17100///
17101/// Service for the `resourcePolicies` resource.
17102///
17103/// The client library was generated with API version 2026-09-01.
17104///
17105/// # Configuration
17106///
17107/// To configure `ResourcePolicies` use the `with_*` methods in the type returned
17108/// by [builder()][ResourcePolicies::builder]. The default configuration should
17109/// work for most applications. Common configuration changes include
17110///
17111/// * [with_endpoint()]: by default this client uses the global default endpoint
17112///   (`https://compute.googleapis.com`). Applications using regional
17113///   endpoints or running in restricted networks (e.g. a network configured
17114///   with [Private Google Access with VPC Service Controls]) may want to
17115///   override this default.
17116/// * [with_credentials()]: by default this client uses
17117///   [Application Default Credentials]. Applications using custom
17118///   authentication may need to override this default.
17119///
17120/// [with_endpoint()]: super::builder::resource_policies::ClientBuilder::with_endpoint
17121/// [with_credentials()]: super::builder::resource_policies::ClientBuilder::with_credentials
17122/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
17123/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
17124///
17125/// # Pooling and Cloning
17126///
17127/// `ResourcePolicies` holds a connection pool internally, it is advised to
17128/// create one and reuse it. You do not need to wrap `ResourcePolicies` in
17129/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
17130/// already uses an `Arc` internally.
17131#[cfg(feature = "resource-policies")]
17132#[cfg_attr(docsrs, doc(cfg(feature = "resource-policies")))]
17133#[derive(Clone, Debug)]
17134pub struct ResourcePolicies {
17135    inner: std::sync::Arc<dyn super::stub::dynamic::ResourcePolicies>,
17136}
17137
17138#[cfg(feature = "resource-policies")]
17139impl ResourcePolicies {
17140    /// Returns a builder for [ResourcePolicies].
17141    ///
17142    /// ```
17143    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
17144    /// # use google_cloud_compute_v1::client::ResourcePolicies;
17145    /// let client = ResourcePolicies::builder().build().await?;
17146    /// # Ok(()) }
17147    /// ```
17148    pub fn builder() -> super::builder::resource_policies::ClientBuilder {
17149        crate::new_client_builder(super::builder::resource_policies::client::Factory)
17150    }
17151
17152    /// Creates a new client from the provided stub.
17153    ///
17154    /// The most common case for calling this function is in tests mocking the
17155    /// client's behavior.
17156    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
17157    where
17158        T: super::stub::ResourcePolicies + 'static,
17159    {
17160        Self { inner: stub.into() }
17161    }
17162
17163    pub(crate) async fn new(
17164        config: gaxi::options::ClientConfig,
17165    ) -> crate::ClientBuilderResult<Self> {
17166        let inner = Self::build_inner(config).await?;
17167        Ok(Self { inner })
17168    }
17169
17170    async fn build_inner(
17171        conf: gaxi::options::ClientConfig,
17172    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::ResourcePolicies>>
17173    {
17174        if gaxi::options::tracing_enabled(&conf) {
17175            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
17176        }
17177        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
17178    }
17179
17180    async fn build_transport(
17181        conf: gaxi::options::ClientConfig,
17182    ) -> crate::ClientBuilderResult<impl super::stub::ResourcePolicies> {
17183        super::transport::ResourcePolicies::new(conf).await
17184    }
17185
17186    async fn build_with_tracing(
17187        conf: gaxi::options::ClientConfig,
17188    ) -> crate::ClientBuilderResult<impl super::stub::ResourcePolicies> {
17189        Self::build_transport(conf)
17190            .await
17191            .map(super::tracing::ResourcePolicies::new)
17192    }
17193
17194    /// Retrieves an aggregated list of resource policies.
17195    ///
17196    /// To prevent failure, Google recommends that you set the
17197    /// `returnPartialSuccess` parameter to `true`.
17198    pub fn aggregated_list(&self) -> super::builder::resource_policies::AggregatedList {
17199        super::builder::resource_policies::AggregatedList::new(self.inner.clone())
17200    }
17201
17202    /// Deletes the specified resource policy.
17203    pub fn delete(&self) -> super::builder::resource_policies::Delete {
17204        super::builder::resource_policies::Delete::new(self.inner.clone())
17205    }
17206
17207    /// Retrieves all information of the specified resource policy.
17208    pub fn get(&self) -> super::builder::resource_policies::Get {
17209        super::builder::resource_policies::Get::new(self.inner.clone())
17210    }
17211
17212    /// Gets the access control policy for a resource. May be empty if no such
17213    /// policy or resource exists.
17214    pub fn get_iam_policy(&self) -> super::builder::resource_policies::GetIamPolicy {
17215        super::builder::resource_policies::GetIamPolicy::new(self.inner.clone())
17216    }
17217
17218    /// Creates a new resource policy.
17219    pub fn insert(&self) -> super::builder::resource_policies::Insert {
17220        super::builder::resource_policies::Insert::new(self.inner.clone())
17221    }
17222
17223    /// A list all the resource policies that have been configured for the
17224    /// specified project in specified region.
17225    pub fn list(&self) -> super::builder::resource_policies::List {
17226        super::builder::resource_policies::List::new(self.inner.clone())
17227    }
17228
17229    /// Modify the specified resource policy.
17230    pub fn patch(&self) -> super::builder::resource_policies::Patch {
17231        super::builder::resource_policies::Patch::new(self.inner.clone())
17232    }
17233
17234    /// Sets the access control policy on the specified resource.
17235    /// Replaces any existing policy.
17236    pub fn set_iam_policy(&self) -> super::builder::resource_policies::SetIamPolicy {
17237        super::builder::resource_policies::SetIamPolicy::new(self.inner.clone())
17238    }
17239
17240    /// Returns permissions that a caller has on the specified resource.
17241    pub fn test_iam_permissions(&self) -> super::builder::resource_policies::TestIamPermissions {
17242        super::builder::resource_policies::TestIamPermissions::new(self.inner.clone())
17243    }
17244
17245    /// Retrieves the specified region-specific Operations resource.
17246    pub fn get_operation(&self) -> super::builder::resource_policies::GetOperation {
17247        super::builder::resource_policies::GetOperation::new(self.inner.clone())
17248    }
17249}
17250
17251/// Implements a client for the Compute Engine API.
17252///
17253/// # Example
17254/// ```
17255/// # use google_cloud_compute_v1::client::RolloutPlans;
17256/// async fn sample(
17257/// ) -> anyhow::Result<()> {
17258///     let client = RolloutPlans::builder().build().await?;
17259///     // use `client` to make requests to the Compute Engine API.
17260///     Ok(())
17261/// }
17262/// ```
17263///
17264/// # Service Description
17265///
17266/// Service for the `rolloutPlans` resource.
17267///
17268/// The client library was generated with API version 2026-09-01.
17269///
17270/// # Configuration
17271///
17272/// To configure `RolloutPlans` use the `with_*` methods in the type returned
17273/// by [builder()][RolloutPlans::builder]. The default configuration should
17274/// work for most applications. Common configuration changes include
17275///
17276/// * [with_endpoint()]: by default this client uses the global default endpoint
17277///   (`https://compute.googleapis.com`). Applications using regional
17278///   endpoints or running in restricted networks (e.g. a network configured
17279///   with [Private Google Access with VPC Service Controls]) may want to
17280///   override this default.
17281/// * [with_credentials()]: by default this client uses
17282///   [Application Default Credentials]. Applications using custom
17283///   authentication may need to override this default.
17284///
17285/// [with_endpoint()]: super::builder::rollout_plans::ClientBuilder::with_endpoint
17286/// [with_credentials()]: super::builder::rollout_plans::ClientBuilder::with_credentials
17287/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
17288/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
17289///
17290/// # Pooling and Cloning
17291///
17292/// `RolloutPlans` holds a connection pool internally, it is advised to
17293/// create one and reuse it. You do not need to wrap `RolloutPlans` in
17294/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
17295/// already uses an `Arc` internally.
17296#[cfg(feature = "rollout-plans")]
17297#[cfg_attr(docsrs, doc(cfg(feature = "rollout-plans")))]
17298#[derive(Clone, Debug)]
17299pub struct RolloutPlans {
17300    inner: std::sync::Arc<dyn super::stub::dynamic::RolloutPlans>,
17301}
17302
17303#[cfg(feature = "rollout-plans")]
17304impl RolloutPlans {
17305    /// Returns a builder for [RolloutPlans].
17306    ///
17307    /// ```
17308    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
17309    /// # use google_cloud_compute_v1::client::RolloutPlans;
17310    /// let client = RolloutPlans::builder().build().await?;
17311    /// # Ok(()) }
17312    /// ```
17313    pub fn builder() -> super::builder::rollout_plans::ClientBuilder {
17314        crate::new_client_builder(super::builder::rollout_plans::client::Factory)
17315    }
17316
17317    /// Creates a new client from the provided stub.
17318    ///
17319    /// The most common case for calling this function is in tests mocking the
17320    /// client's behavior.
17321    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
17322    where
17323        T: super::stub::RolloutPlans + 'static,
17324    {
17325        Self { inner: stub.into() }
17326    }
17327
17328    pub(crate) async fn new(
17329        config: gaxi::options::ClientConfig,
17330    ) -> crate::ClientBuilderResult<Self> {
17331        let inner = Self::build_inner(config).await?;
17332        Ok(Self { inner })
17333    }
17334
17335    async fn build_inner(
17336        conf: gaxi::options::ClientConfig,
17337    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::RolloutPlans>> {
17338        if gaxi::options::tracing_enabled(&conf) {
17339            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
17340        }
17341        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
17342    }
17343
17344    async fn build_transport(
17345        conf: gaxi::options::ClientConfig,
17346    ) -> crate::ClientBuilderResult<impl super::stub::RolloutPlans> {
17347        super::transport::RolloutPlans::new(conf).await
17348    }
17349
17350    async fn build_with_tracing(
17351        conf: gaxi::options::ClientConfig,
17352    ) -> crate::ClientBuilderResult<impl super::stub::RolloutPlans> {
17353        Self::build_transport(conf)
17354            .await
17355            .map(super::tracing::RolloutPlans::new)
17356    }
17357
17358    /// Deletes a RolloutPlan.
17359    pub fn delete(&self) -> super::builder::rollout_plans::Delete {
17360        super::builder::rollout_plans::Delete::new(self.inner.clone())
17361    }
17362
17363    /// Gets details of a single project-scoped RolloutPlan.
17364    pub fn get(&self) -> super::builder::rollout_plans::Get {
17365        super::builder::rollout_plans::Get::new(self.inner.clone())
17366    }
17367
17368    /// Creates a new RolloutPlan in a given project and location.
17369    pub fn insert(&self) -> super::builder::rollout_plans::Insert {
17370        super::builder::rollout_plans::Insert::new(self.inner.clone())
17371    }
17372
17373    /// Lists RolloutPlans in a given project and location.
17374    pub fn list(&self) -> super::builder::rollout_plans::List {
17375        super::builder::rollout_plans::List::new(self.inner.clone())
17376    }
17377
17378    /// Retrieves the specified Operations resource.
17379    pub fn get_operation(&self) -> super::builder::rollout_plans::GetOperation {
17380        super::builder::rollout_plans::GetOperation::new(self.inner.clone())
17381    }
17382}
17383
17384/// Implements a client for the Compute Engine API.
17385///
17386/// # Example
17387/// ```
17388/// # use google_cloud_compute_v1::client::Rollouts;
17389/// async fn sample(
17390/// ) -> anyhow::Result<()> {
17391///     let client = Rollouts::builder().build().await?;
17392///     // use `client` to make requests to the Compute Engine API.
17393///     Ok(())
17394/// }
17395/// ```
17396///
17397/// # Service Description
17398///
17399/// Service for the `rollouts` resource.
17400///
17401/// The client library was generated with API version 2026-09-01.
17402///
17403/// # Configuration
17404///
17405/// To configure `Rollouts` use the `with_*` methods in the type returned
17406/// by [builder()][Rollouts::builder]. The default configuration should
17407/// work for most applications. Common configuration changes include
17408///
17409/// * [with_endpoint()]: by default this client uses the global default endpoint
17410///   (`https://compute.googleapis.com`). Applications using regional
17411///   endpoints or running in restricted networks (e.g. a network configured
17412///   with [Private Google Access with VPC Service Controls]) may want to
17413///   override this default.
17414/// * [with_credentials()]: by default this client uses
17415///   [Application Default Credentials]. Applications using custom
17416///   authentication may need to override this default.
17417///
17418/// [with_endpoint()]: super::builder::rollouts::ClientBuilder::with_endpoint
17419/// [with_credentials()]: super::builder::rollouts::ClientBuilder::with_credentials
17420/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
17421/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
17422///
17423/// # Pooling and Cloning
17424///
17425/// `Rollouts` holds a connection pool internally, it is advised to
17426/// create one and reuse it. You do not need to wrap `Rollouts` in
17427/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
17428/// already uses an `Arc` internally.
17429#[cfg(feature = "rollouts")]
17430#[cfg_attr(docsrs, doc(cfg(feature = "rollouts")))]
17431#[derive(Clone, Debug)]
17432pub struct Rollouts {
17433    inner: std::sync::Arc<dyn super::stub::dynamic::Rollouts>,
17434}
17435
17436#[cfg(feature = "rollouts")]
17437impl Rollouts {
17438    /// Returns a builder for [Rollouts].
17439    ///
17440    /// ```
17441    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
17442    /// # use google_cloud_compute_v1::client::Rollouts;
17443    /// let client = Rollouts::builder().build().await?;
17444    /// # Ok(()) }
17445    /// ```
17446    pub fn builder() -> super::builder::rollouts::ClientBuilder {
17447        crate::new_client_builder(super::builder::rollouts::client::Factory)
17448    }
17449
17450    /// Creates a new client from the provided stub.
17451    ///
17452    /// The most common case for calling this function is in tests mocking the
17453    /// client's behavior.
17454    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
17455    where
17456        T: super::stub::Rollouts + 'static,
17457    {
17458        Self { inner: stub.into() }
17459    }
17460
17461    pub(crate) async fn new(
17462        config: gaxi::options::ClientConfig,
17463    ) -> crate::ClientBuilderResult<Self> {
17464        let inner = Self::build_inner(config).await?;
17465        Ok(Self { inner })
17466    }
17467
17468    async fn build_inner(
17469        conf: gaxi::options::ClientConfig,
17470    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::Rollouts>> {
17471        if gaxi::options::tracing_enabled(&conf) {
17472            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
17473        }
17474        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
17475    }
17476
17477    async fn build_transport(
17478        conf: gaxi::options::ClientConfig,
17479    ) -> crate::ClientBuilderResult<impl super::stub::Rollouts> {
17480        super::transport::Rollouts::new(conf).await
17481    }
17482
17483    async fn build_with_tracing(
17484        conf: gaxi::options::ClientConfig,
17485    ) -> crate::ClientBuilderResult<impl super::stub::Rollouts> {
17486        Self::build_transport(conf)
17487            .await
17488            .map(super::tracing::Rollouts::new)
17489    }
17490
17491    /// Advances a Rollout to the next wave, or completes it if no waves remain.
17492    pub fn advance(&self) -> super::builder::rollouts::Advance {
17493        super::builder::rollouts::Advance::new(self.inner.clone())
17494    }
17495
17496    /// Cancels a Rollout.
17497    pub fn cancel(&self) -> super::builder::rollouts::Cancel {
17498        super::builder::rollouts::Cancel::new(self.inner.clone())
17499    }
17500
17501    /// Deletes a Rollout.
17502    pub fn delete(&self) -> super::builder::rollouts::Delete {
17503        super::builder::rollouts::Delete::new(self.inner.clone())
17504    }
17505
17506    /// Gets details of a single project-scoped Rollout.
17507    pub fn get(&self) -> super::builder::rollouts::Get {
17508        super::builder::rollouts::Get::new(self.inner.clone())
17509    }
17510
17511    /// Lists Rollouts in a given project and location.
17512    pub fn list(&self) -> super::builder::rollouts::List {
17513        super::builder::rollouts::List::new(self.inner.clone())
17514    }
17515
17516    /// Pauses a Rollout.
17517    pub fn pause(&self) -> super::builder::rollouts::Pause {
17518        super::builder::rollouts::Pause::new(self.inner.clone())
17519    }
17520
17521    /// Resumes a Rollout.
17522    pub fn resume(&self) -> super::builder::rollouts::Resume {
17523        super::builder::rollouts::Resume::new(self.inner.clone())
17524    }
17525
17526    /// Retrieves the specified Operations resource.
17527    pub fn get_operation(&self) -> super::builder::rollouts::GetOperation {
17528        super::builder::rollouts::GetOperation::new(self.inner.clone())
17529    }
17530}
17531
17532/// Implements a client for the Compute Engine API.
17533///
17534/// # Example
17535/// ```
17536/// # use google_cloud_compute_v1::client::Routers;
17537/// async fn sample(
17538/// ) -> anyhow::Result<()> {
17539///     let client = Routers::builder().build().await?;
17540///     // use `client` to make requests to the Compute Engine API.
17541///     Ok(())
17542/// }
17543/// ```
17544///
17545/// # Service Description
17546///
17547/// Service for the `routers` resource.
17548///
17549/// The client library was generated with API version 2026-09-01.
17550///
17551/// # Configuration
17552///
17553/// To configure `Routers` use the `with_*` methods in the type returned
17554/// by [builder()][Routers::builder]. The default configuration should
17555/// work for most applications. Common configuration changes include
17556///
17557/// * [with_endpoint()]: by default this client uses the global default endpoint
17558///   (`https://compute.googleapis.com`). Applications using regional
17559///   endpoints or running in restricted networks (e.g. a network configured
17560///   with [Private Google Access with VPC Service Controls]) may want to
17561///   override this default.
17562/// * [with_credentials()]: by default this client uses
17563///   [Application Default Credentials]. Applications using custom
17564///   authentication may need to override this default.
17565///
17566/// [with_endpoint()]: super::builder::routers::ClientBuilder::with_endpoint
17567/// [with_credentials()]: super::builder::routers::ClientBuilder::with_credentials
17568/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
17569/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
17570///
17571/// # Pooling and Cloning
17572///
17573/// `Routers` holds a connection pool internally, it is advised to
17574/// create one and reuse it. You do not need to wrap `Routers` in
17575/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
17576/// already uses an `Arc` internally.
17577#[cfg(feature = "routers")]
17578#[cfg_attr(docsrs, doc(cfg(feature = "routers")))]
17579#[derive(Clone, Debug)]
17580pub struct Routers {
17581    inner: std::sync::Arc<dyn super::stub::dynamic::Routers>,
17582}
17583
17584#[cfg(feature = "routers")]
17585impl Routers {
17586    /// Returns a builder for [Routers].
17587    ///
17588    /// ```
17589    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
17590    /// # use google_cloud_compute_v1::client::Routers;
17591    /// let client = Routers::builder().build().await?;
17592    /// # Ok(()) }
17593    /// ```
17594    pub fn builder() -> super::builder::routers::ClientBuilder {
17595        crate::new_client_builder(super::builder::routers::client::Factory)
17596    }
17597
17598    /// Creates a new client from the provided stub.
17599    ///
17600    /// The most common case for calling this function is in tests mocking the
17601    /// client's behavior.
17602    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
17603    where
17604        T: super::stub::Routers + 'static,
17605    {
17606        Self { inner: stub.into() }
17607    }
17608
17609    pub(crate) async fn new(
17610        config: gaxi::options::ClientConfig,
17611    ) -> crate::ClientBuilderResult<Self> {
17612        let inner = Self::build_inner(config).await?;
17613        Ok(Self { inner })
17614    }
17615
17616    async fn build_inner(
17617        conf: gaxi::options::ClientConfig,
17618    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::Routers>> {
17619        if gaxi::options::tracing_enabled(&conf) {
17620            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
17621        }
17622        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
17623    }
17624
17625    async fn build_transport(
17626        conf: gaxi::options::ClientConfig,
17627    ) -> crate::ClientBuilderResult<impl super::stub::Routers> {
17628        super::transport::Routers::new(conf).await
17629    }
17630
17631    async fn build_with_tracing(
17632        conf: gaxi::options::ClientConfig,
17633    ) -> crate::ClientBuilderResult<impl super::stub::Routers> {
17634        Self::build_transport(conf)
17635            .await
17636            .map(super::tracing::Routers::new)
17637    }
17638
17639    /// Retrieves an aggregated list of routers.
17640    ///
17641    /// To prevent failure, Google recommends that you set the
17642    /// `returnPartialSuccess` parameter to `true`.
17643    pub fn aggregated_list(&self) -> super::builder::routers::AggregatedList {
17644        super::builder::routers::AggregatedList::new(self.inner.clone())
17645    }
17646
17647    /// Deletes the specified Router resource.
17648    pub fn delete(&self) -> super::builder::routers::Delete {
17649        super::builder::routers::Delete::new(self.inner.clone())
17650    }
17651
17652    /// Deletes Named Set
17653    pub fn delete_named_set(&self) -> super::builder::routers::DeleteNamedSet {
17654        super::builder::routers::DeleteNamedSet::new(self.inner.clone())
17655    }
17656
17657    /// Deletes Route Policy
17658    pub fn delete_route_policy(&self) -> super::builder::routers::DeleteRoutePolicy {
17659        super::builder::routers::DeleteRoutePolicy::new(self.inner.clone())
17660    }
17661
17662    /// Returns the specified Router resource.
17663    pub fn get(&self) -> super::builder::routers::Get {
17664        super::builder::routers::Get::new(self.inner.clone())
17665    }
17666
17667    /// Returns specified Named Set
17668    pub fn get_named_set(&self) -> super::builder::routers::GetNamedSet {
17669        super::builder::routers::GetNamedSet::new(self.inner.clone())
17670    }
17671
17672    /// Retrieves runtime NAT IP information.
17673    pub fn get_nat_ip_info(&self) -> super::builder::routers::GetNatIpInfo {
17674        super::builder::routers::GetNatIpInfo::new(self.inner.clone())
17675    }
17676
17677    /// Retrieves runtime Nat mapping information of VM endpoints.
17678    pub fn get_nat_mapping_info(&self) -> super::builder::routers::GetNatMappingInfo {
17679        super::builder::routers::GetNatMappingInfo::new(self.inner.clone())
17680    }
17681
17682    /// Returns specified Route Policy
17683    pub fn get_route_policy(&self) -> super::builder::routers::GetRoutePolicy {
17684        super::builder::routers::GetRoutePolicy::new(self.inner.clone())
17685    }
17686
17687    /// Retrieves runtime information of the specified router.
17688    pub fn get_router_status(&self) -> super::builder::routers::GetRouterStatus {
17689        super::builder::routers::GetRouterStatus::new(self.inner.clone())
17690    }
17691
17692    /// Creates a Router resource in the specified project and region using
17693    /// the data included in the request.
17694    pub fn insert(&self) -> super::builder::routers::Insert {
17695        super::builder::routers::Insert::new(self.inner.clone())
17696    }
17697
17698    /// Retrieves a list of Router resources available to the specified project.
17699    pub fn list(&self) -> super::builder::routers::List {
17700        super::builder::routers::List::new(self.inner.clone())
17701    }
17702
17703    /// Retrieves a list of router bgp routes available to the specified project.
17704    pub fn list_bgp_routes(&self) -> super::builder::routers::ListBgpRoutes {
17705        super::builder::routers::ListBgpRoutes::new(self.inner.clone())
17706    }
17707
17708    /// Retrieves a list of router named set subresources available to the
17709    /// specified project.
17710    pub fn list_named_sets(&self) -> super::builder::routers::ListNamedSets {
17711        super::builder::routers::ListNamedSets::new(self.inner.clone())
17712    }
17713
17714    /// Retrieves a list of router route policy subresources available to the
17715    /// specified project.
17716    pub fn list_route_policies(&self) -> super::builder::routers::ListRoutePolicies {
17717        super::builder::routers::ListRoutePolicies::new(self.inner.clone())
17718    }
17719
17720    /// Patches the specified Router resource with the data included in the
17721    /// request. This method supportsPATCH
17722    /// semantics and usesJSON merge
17723    /// patch format and processing rules.
17724    pub fn patch(&self) -> super::builder::routers::Patch {
17725        super::builder::routers::Patch::new(self.inner.clone())
17726    }
17727
17728    /// Patches Named Set
17729    pub fn patch_named_set(&self) -> super::builder::routers::PatchNamedSet {
17730        super::builder::routers::PatchNamedSet::new(self.inner.clone())
17731    }
17732
17733    /// Patches Route Policy
17734    pub fn patch_route_policy(&self) -> super::builder::routers::PatchRoutePolicy {
17735        super::builder::routers::PatchRoutePolicy::new(self.inner.clone())
17736    }
17737
17738    /// Preview fields auto-generated during router create andupdate operations.
17739    /// Calling this method does NOT create or update the router.
17740    pub fn preview(&self) -> super::builder::routers::Preview {
17741        super::builder::routers::Preview::new(self.inner.clone())
17742    }
17743
17744    /// Updates the specified Router resource with the data included in the
17745    /// request.  This method conforms toPUT semantics, which requests that the state of the
17746    /// target resource be created or replaced with the state defined by the
17747    /// representation enclosed in the request message payload.
17748    pub fn update(&self) -> super::builder::routers::Update {
17749        super::builder::routers::Update::new(self.inner.clone())
17750    }
17751
17752    /// Updates or creates new Named Set
17753    pub fn update_named_set(&self) -> super::builder::routers::UpdateNamedSet {
17754        super::builder::routers::UpdateNamedSet::new(self.inner.clone())
17755    }
17756
17757    /// Updates or creates new Route Policy
17758    pub fn update_route_policy(&self) -> super::builder::routers::UpdateRoutePolicy {
17759        super::builder::routers::UpdateRoutePolicy::new(self.inner.clone())
17760    }
17761
17762    /// Retrieves the specified region-specific Operations resource.
17763    pub fn get_operation(&self) -> super::builder::routers::GetOperation {
17764        super::builder::routers::GetOperation::new(self.inner.clone())
17765    }
17766}
17767
17768/// Implements a client for the Compute Engine API.
17769///
17770/// # Example
17771/// ```
17772/// # use google_cloud_compute_v1::client::Routes;
17773/// async fn sample(
17774/// ) -> anyhow::Result<()> {
17775///     let client = Routes::builder().build().await?;
17776///     // use `client` to make requests to the Compute Engine API.
17777///     Ok(())
17778/// }
17779/// ```
17780///
17781/// # Service Description
17782///
17783/// Service for the `routes` resource.
17784///
17785/// The client library was generated with API version 2026-09-01.
17786///
17787/// # Configuration
17788///
17789/// To configure `Routes` use the `with_*` methods in the type returned
17790/// by [builder()][Routes::builder]. The default configuration should
17791/// work for most applications. Common configuration changes include
17792///
17793/// * [with_endpoint()]: by default this client uses the global default endpoint
17794///   (`https://compute.googleapis.com`). Applications using regional
17795///   endpoints or running in restricted networks (e.g. a network configured
17796///   with [Private Google Access with VPC Service Controls]) may want to
17797///   override this default.
17798/// * [with_credentials()]: by default this client uses
17799///   [Application Default Credentials]. Applications using custom
17800///   authentication may need to override this default.
17801///
17802/// [with_endpoint()]: super::builder::routes::ClientBuilder::with_endpoint
17803/// [with_credentials()]: super::builder::routes::ClientBuilder::with_credentials
17804/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
17805/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
17806///
17807/// # Pooling and Cloning
17808///
17809/// `Routes` holds a connection pool internally, it is advised to
17810/// create one and reuse it. You do not need to wrap `Routes` in
17811/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
17812/// already uses an `Arc` internally.
17813#[cfg(feature = "routes")]
17814#[cfg_attr(docsrs, doc(cfg(feature = "routes")))]
17815#[derive(Clone, Debug)]
17816pub struct Routes {
17817    inner: std::sync::Arc<dyn super::stub::dynamic::Routes>,
17818}
17819
17820#[cfg(feature = "routes")]
17821impl Routes {
17822    /// Returns a builder for [Routes].
17823    ///
17824    /// ```
17825    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
17826    /// # use google_cloud_compute_v1::client::Routes;
17827    /// let client = Routes::builder().build().await?;
17828    /// # Ok(()) }
17829    /// ```
17830    pub fn builder() -> super::builder::routes::ClientBuilder {
17831        crate::new_client_builder(super::builder::routes::client::Factory)
17832    }
17833
17834    /// Creates a new client from the provided stub.
17835    ///
17836    /// The most common case for calling this function is in tests mocking the
17837    /// client's behavior.
17838    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
17839    where
17840        T: super::stub::Routes + 'static,
17841    {
17842        Self { inner: stub.into() }
17843    }
17844
17845    pub(crate) async fn new(
17846        config: gaxi::options::ClientConfig,
17847    ) -> crate::ClientBuilderResult<Self> {
17848        let inner = Self::build_inner(config).await?;
17849        Ok(Self { inner })
17850    }
17851
17852    async fn build_inner(
17853        conf: gaxi::options::ClientConfig,
17854    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::Routes>> {
17855        if gaxi::options::tracing_enabled(&conf) {
17856            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
17857        }
17858        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
17859    }
17860
17861    async fn build_transport(
17862        conf: gaxi::options::ClientConfig,
17863    ) -> crate::ClientBuilderResult<impl super::stub::Routes> {
17864        super::transport::Routes::new(conf).await
17865    }
17866
17867    async fn build_with_tracing(
17868        conf: gaxi::options::ClientConfig,
17869    ) -> crate::ClientBuilderResult<impl super::stub::Routes> {
17870        Self::build_transport(conf)
17871            .await
17872            .map(super::tracing::Routes::new)
17873    }
17874
17875    /// Deletes the specified Route resource.
17876    pub fn delete(&self) -> super::builder::routes::Delete {
17877        super::builder::routes::Delete::new(self.inner.clone())
17878    }
17879
17880    /// Returns the specified Route resource.
17881    pub fn get(&self) -> super::builder::routes::Get {
17882        super::builder::routes::Get::new(self.inner.clone())
17883    }
17884
17885    /// Creates a Route resource in the specified project using the data included
17886    /// in the request.
17887    pub fn insert(&self) -> super::builder::routes::Insert {
17888        super::builder::routes::Insert::new(self.inner.clone())
17889    }
17890
17891    /// Retrieves the list of Route resources available to the specified project.
17892    pub fn list(&self) -> super::builder::routes::List {
17893        super::builder::routes::List::new(self.inner.clone())
17894    }
17895
17896    /// Returns permissions that a caller has on the specified resource.
17897    pub fn test_iam_permissions(&self) -> super::builder::routes::TestIamPermissions {
17898        super::builder::routes::TestIamPermissions::new(self.inner.clone())
17899    }
17900
17901    /// Retrieves the specified Operations resource.
17902    pub fn get_operation(&self) -> super::builder::routes::GetOperation {
17903        super::builder::routes::GetOperation::new(self.inner.clone())
17904    }
17905}
17906
17907/// Implements a client for the Compute Engine API.
17908///
17909/// # Example
17910/// ```
17911/// # use google_cloud_compute_v1::client::SecurityPolicies;
17912/// async fn sample(
17913/// ) -> anyhow::Result<()> {
17914///     let client = SecurityPolicies::builder().build().await?;
17915///     // use `client` to make requests to the Compute Engine API.
17916///     Ok(())
17917/// }
17918/// ```
17919///
17920/// # Service Description
17921///
17922/// Service for the `securityPolicies` resource.
17923///
17924/// The client library was generated with API version 2026-09-01.
17925///
17926/// # Configuration
17927///
17928/// To configure `SecurityPolicies` use the `with_*` methods in the type returned
17929/// by [builder()][SecurityPolicies::builder]. The default configuration should
17930/// work for most applications. Common configuration changes include
17931///
17932/// * [with_endpoint()]: by default this client uses the global default endpoint
17933///   (`https://compute.googleapis.com`). Applications using regional
17934///   endpoints or running in restricted networks (e.g. a network configured
17935///   with [Private Google Access with VPC Service Controls]) may want to
17936///   override this default.
17937/// * [with_credentials()]: by default this client uses
17938///   [Application Default Credentials]. Applications using custom
17939///   authentication may need to override this default.
17940///
17941/// [with_endpoint()]: super::builder::security_policies::ClientBuilder::with_endpoint
17942/// [with_credentials()]: super::builder::security_policies::ClientBuilder::with_credentials
17943/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
17944/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
17945///
17946/// # Pooling and Cloning
17947///
17948/// `SecurityPolicies` holds a connection pool internally, it is advised to
17949/// create one and reuse it. You do not need to wrap `SecurityPolicies` in
17950/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
17951/// already uses an `Arc` internally.
17952#[cfg(feature = "security-policies")]
17953#[cfg_attr(docsrs, doc(cfg(feature = "security-policies")))]
17954#[derive(Clone, Debug)]
17955pub struct SecurityPolicies {
17956    inner: std::sync::Arc<dyn super::stub::dynamic::SecurityPolicies>,
17957}
17958
17959#[cfg(feature = "security-policies")]
17960impl SecurityPolicies {
17961    /// Returns a builder for [SecurityPolicies].
17962    ///
17963    /// ```
17964    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
17965    /// # use google_cloud_compute_v1::client::SecurityPolicies;
17966    /// let client = SecurityPolicies::builder().build().await?;
17967    /// # Ok(()) }
17968    /// ```
17969    pub fn builder() -> super::builder::security_policies::ClientBuilder {
17970        crate::new_client_builder(super::builder::security_policies::client::Factory)
17971    }
17972
17973    /// Creates a new client from the provided stub.
17974    ///
17975    /// The most common case for calling this function is in tests mocking the
17976    /// client's behavior.
17977    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
17978    where
17979        T: super::stub::SecurityPolicies + 'static,
17980    {
17981        Self { inner: stub.into() }
17982    }
17983
17984    pub(crate) async fn new(
17985        config: gaxi::options::ClientConfig,
17986    ) -> crate::ClientBuilderResult<Self> {
17987        let inner = Self::build_inner(config).await?;
17988        Ok(Self { inner })
17989    }
17990
17991    async fn build_inner(
17992        conf: gaxi::options::ClientConfig,
17993    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::SecurityPolicies>>
17994    {
17995        if gaxi::options::tracing_enabled(&conf) {
17996            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
17997        }
17998        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
17999    }
18000
18001    async fn build_transport(
18002        conf: gaxi::options::ClientConfig,
18003    ) -> crate::ClientBuilderResult<impl super::stub::SecurityPolicies> {
18004        super::transport::SecurityPolicies::new(conf).await
18005    }
18006
18007    async fn build_with_tracing(
18008        conf: gaxi::options::ClientConfig,
18009    ) -> crate::ClientBuilderResult<impl super::stub::SecurityPolicies> {
18010        Self::build_transport(conf)
18011            .await
18012            .map(super::tracing::SecurityPolicies::new)
18013    }
18014
18015    /// Inserts a rule into a security policy.
18016    pub fn add_rule(&self) -> super::builder::security_policies::AddRule {
18017        super::builder::security_policies::AddRule::new(self.inner.clone())
18018    }
18019
18020    /// Retrieves the list of all SecurityPolicy resources, regional and global,
18021    /// available to the specified project.
18022    ///
18023    /// To prevent failure, Google recommends that you set the
18024    /// `returnPartialSuccess` parameter to `true`.
18025    pub fn aggregated_list(&self) -> super::builder::security_policies::AggregatedList {
18026        super::builder::security_policies::AggregatedList::new(self.inner.clone())
18027    }
18028
18029    /// Deletes the specified policy.
18030    pub fn delete(&self) -> super::builder::security_policies::Delete {
18031        super::builder::security_policies::Delete::new(self.inner.clone())
18032    }
18033
18034    /// List all of the ordered rules present in a single specified policy.
18035    pub fn get(&self) -> super::builder::security_policies::Get {
18036        super::builder::security_policies::Get::new(self.inner.clone())
18037    }
18038
18039    /// Gets a rule at the specified priority.
18040    pub fn get_rule(&self) -> super::builder::security_policies::GetRule {
18041        super::builder::security_policies::GetRule::new(self.inner.clone())
18042    }
18043
18044    /// Creates a new policy in the specified project using the data included in
18045    /// the request.
18046    pub fn insert(&self) -> super::builder::security_policies::Insert {
18047        super::builder::security_policies::Insert::new(self.inner.clone())
18048    }
18049
18050    /// List all the policies that have been configured for the specified project.
18051    pub fn list(&self) -> super::builder::security_policies::List {
18052        super::builder::security_policies::List::new(self.inner.clone())
18053    }
18054
18055    /// Gets the current list of preconfigured Web Application Firewall (WAF)
18056    /// expressions.
18057    pub fn list_preconfigured_expression_sets(
18058        &self,
18059    ) -> super::builder::security_policies::ListPreconfiguredExpressionSets {
18060        super::builder::security_policies::ListPreconfiguredExpressionSets::new(self.inner.clone())
18061    }
18062
18063    /// Patches the specified policy with the data included in the request. To
18064    /// clear fields in the policy, leave the fields empty and specify them in the
18065    /// updateMask. This cannot be used to be update the rules in the policy.
18066    /// Please use the per rule methods like addRule, patchRule, and removeRule
18067    /// instead.
18068    pub fn patch(&self) -> super::builder::security_policies::Patch {
18069        super::builder::security_policies::Patch::new(self.inner.clone())
18070    }
18071
18072    /// Patches a rule at the specified priority. To clear fields in the rule,
18073    /// leave the fields empty and specify them in the updateMask.
18074    pub fn patch_rule(&self) -> super::builder::security_policies::PatchRule {
18075        super::builder::security_policies::PatchRule::new(self.inner.clone())
18076    }
18077
18078    /// Deletes a rule at the specified priority.
18079    pub fn remove_rule(&self) -> super::builder::security_policies::RemoveRule {
18080        super::builder::security_policies::RemoveRule::new(self.inner.clone())
18081    }
18082
18083    /// Sets the labels on a security policy. To learn more about labels,
18084    /// read the Labeling Resources
18085    /// documentation.
18086    pub fn set_labels(&self) -> super::builder::security_policies::SetLabels {
18087        super::builder::security_policies::SetLabels::new(self.inner.clone())
18088    }
18089
18090    /// Retrieves the specified Operations resource.
18091    pub fn get_operation(&self) -> super::builder::security_policies::GetOperation {
18092        super::builder::security_policies::GetOperation::new(self.inner.clone())
18093    }
18094}
18095
18096/// Implements a client for the Compute Engine API.
18097///
18098/// # Example
18099/// ```
18100/// # use google_cloud_compute_v1::client::ServiceAttachments;
18101/// async fn sample(
18102/// ) -> anyhow::Result<()> {
18103///     let client = ServiceAttachments::builder().build().await?;
18104///     // use `client` to make requests to the Compute Engine API.
18105///     Ok(())
18106/// }
18107/// ```
18108///
18109/// # Service Description
18110///
18111/// Service for the `serviceAttachments` resource.
18112///
18113/// The client library was generated with API version 2026-09-01.
18114///
18115/// # Configuration
18116///
18117/// To configure `ServiceAttachments` use the `with_*` methods in the type returned
18118/// by [builder()][ServiceAttachments::builder]. The default configuration should
18119/// work for most applications. Common configuration changes include
18120///
18121/// * [with_endpoint()]: by default this client uses the global default endpoint
18122///   (`https://compute.googleapis.com`). Applications using regional
18123///   endpoints or running in restricted networks (e.g. a network configured
18124///   with [Private Google Access with VPC Service Controls]) may want to
18125///   override this default.
18126/// * [with_credentials()]: by default this client uses
18127///   [Application Default Credentials]. Applications using custom
18128///   authentication may need to override this default.
18129///
18130/// [with_endpoint()]: super::builder::service_attachments::ClientBuilder::with_endpoint
18131/// [with_credentials()]: super::builder::service_attachments::ClientBuilder::with_credentials
18132/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
18133/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
18134///
18135/// # Pooling and Cloning
18136///
18137/// `ServiceAttachments` holds a connection pool internally, it is advised to
18138/// create one and reuse it. You do not need to wrap `ServiceAttachments` in
18139/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
18140/// already uses an `Arc` internally.
18141#[cfg(feature = "service-attachments")]
18142#[cfg_attr(docsrs, doc(cfg(feature = "service-attachments")))]
18143#[derive(Clone, Debug)]
18144pub struct ServiceAttachments {
18145    inner: std::sync::Arc<dyn super::stub::dynamic::ServiceAttachments>,
18146}
18147
18148#[cfg(feature = "service-attachments")]
18149impl ServiceAttachments {
18150    /// Returns a builder for [ServiceAttachments].
18151    ///
18152    /// ```
18153    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
18154    /// # use google_cloud_compute_v1::client::ServiceAttachments;
18155    /// let client = ServiceAttachments::builder().build().await?;
18156    /// # Ok(()) }
18157    /// ```
18158    pub fn builder() -> super::builder::service_attachments::ClientBuilder {
18159        crate::new_client_builder(super::builder::service_attachments::client::Factory)
18160    }
18161
18162    /// Creates a new client from the provided stub.
18163    ///
18164    /// The most common case for calling this function is in tests mocking the
18165    /// client's behavior.
18166    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
18167    where
18168        T: super::stub::ServiceAttachments + 'static,
18169    {
18170        Self { inner: stub.into() }
18171    }
18172
18173    pub(crate) async fn new(
18174        config: gaxi::options::ClientConfig,
18175    ) -> crate::ClientBuilderResult<Self> {
18176        let inner = Self::build_inner(config).await?;
18177        Ok(Self { inner })
18178    }
18179
18180    async fn build_inner(
18181        conf: gaxi::options::ClientConfig,
18182    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::ServiceAttachments>>
18183    {
18184        if gaxi::options::tracing_enabled(&conf) {
18185            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
18186        }
18187        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
18188    }
18189
18190    async fn build_transport(
18191        conf: gaxi::options::ClientConfig,
18192    ) -> crate::ClientBuilderResult<impl super::stub::ServiceAttachments> {
18193        super::transport::ServiceAttachments::new(conf).await
18194    }
18195
18196    async fn build_with_tracing(
18197        conf: gaxi::options::ClientConfig,
18198    ) -> crate::ClientBuilderResult<impl super::stub::ServiceAttachments> {
18199        Self::build_transport(conf)
18200            .await
18201            .map(super::tracing::ServiceAttachments::new)
18202    }
18203
18204    /// Retrieves the list of all ServiceAttachment resources,
18205    /// regional and global, available to the specified project.
18206    ///
18207    /// To prevent failure, Google recommends that you set the
18208    /// `returnPartialSuccess` parameter to `true`.
18209    pub fn aggregated_list(&self) -> super::builder::service_attachments::AggregatedList {
18210        super::builder::service_attachments::AggregatedList::new(self.inner.clone())
18211    }
18212
18213    /// Deletes the specified ServiceAttachment in the given scope
18214    pub fn delete(&self) -> super::builder::service_attachments::Delete {
18215        super::builder::service_attachments::Delete::new(self.inner.clone())
18216    }
18217
18218    /// Returns the specified ServiceAttachment resource in the given scope.
18219    pub fn get(&self) -> super::builder::service_attachments::Get {
18220        super::builder::service_attachments::Get::new(self.inner.clone())
18221    }
18222
18223    /// Gets the access control policy for a resource. May be empty if no such
18224    /// policy or resource exists.
18225    pub fn get_iam_policy(&self) -> super::builder::service_attachments::GetIamPolicy {
18226        super::builder::service_attachments::GetIamPolicy::new(self.inner.clone())
18227    }
18228
18229    /// Creates a ServiceAttachment in the specified project in the given scope
18230    /// using the parameters that are included in the request.
18231    pub fn insert(&self) -> super::builder::service_attachments::Insert {
18232        super::builder::service_attachments::Insert::new(self.inner.clone())
18233    }
18234
18235    /// Lists the ServiceAttachments for a project in the given scope.
18236    pub fn list(&self) -> super::builder::service_attachments::List {
18237        super::builder::service_attachments::List::new(self.inner.clone())
18238    }
18239
18240    /// Patches the specified ServiceAttachment resource with the data included in
18241    /// the request. This method supports PATCH
18242    /// semantics and usesJSON merge
18243    /// patch format and processing rules.
18244    pub fn patch(&self) -> super::builder::service_attachments::Patch {
18245        super::builder::service_attachments::Patch::new(self.inner.clone())
18246    }
18247
18248    /// Sets the access control policy on the specified resource.
18249    /// Replaces any existing policy.
18250    pub fn set_iam_policy(&self) -> super::builder::service_attachments::SetIamPolicy {
18251        super::builder::service_attachments::SetIamPolicy::new(self.inner.clone())
18252    }
18253
18254    /// Returns permissions that a caller has on the specified resource.
18255    pub fn test_iam_permissions(&self) -> super::builder::service_attachments::TestIamPermissions {
18256        super::builder::service_attachments::TestIamPermissions::new(self.inner.clone())
18257    }
18258
18259    /// Retrieves the specified region-specific Operations resource.
18260    pub fn get_operation(&self) -> super::builder::service_attachments::GetOperation {
18261        super::builder::service_attachments::GetOperation::new(self.inner.clone())
18262    }
18263}
18264
18265/// Implements a client for the Compute Engine API.
18266///
18267/// # Example
18268/// ```
18269/// # use google_cloud_compute_v1::client::SnapshotSettings;
18270/// async fn sample(
18271/// ) -> anyhow::Result<()> {
18272///     let client = SnapshotSettings::builder().build().await?;
18273///     // use `client` to make requests to the Compute Engine API.
18274///     Ok(())
18275/// }
18276/// ```
18277///
18278/// # Service Description
18279///
18280/// Service for the `snapshotSettings` resource.
18281///
18282/// The client library was generated with API version 2026-09-01.
18283///
18284/// # Configuration
18285///
18286/// To configure `SnapshotSettings` use the `with_*` methods in the type returned
18287/// by [builder()][SnapshotSettings::builder]. The default configuration should
18288/// work for most applications. Common configuration changes include
18289///
18290/// * [with_endpoint()]: by default this client uses the global default endpoint
18291///   (`https://compute.googleapis.com`). Applications using regional
18292///   endpoints or running in restricted networks (e.g. a network configured
18293///   with [Private Google Access with VPC Service Controls]) may want to
18294///   override this default.
18295/// * [with_credentials()]: by default this client uses
18296///   [Application Default Credentials]. Applications using custom
18297///   authentication may need to override this default.
18298///
18299/// [with_endpoint()]: super::builder::snapshot_settings::ClientBuilder::with_endpoint
18300/// [with_credentials()]: super::builder::snapshot_settings::ClientBuilder::with_credentials
18301/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
18302/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
18303///
18304/// # Pooling and Cloning
18305///
18306/// `SnapshotSettings` holds a connection pool internally, it is advised to
18307/// create one and reuse it. You do not need to wrap `SnapshotSettings` in
18308/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
18309/// already uses an `Arc` internally.
18310#[cfg(feature = "snapshot-settings")]
18311#[cfg_attr(docsrs, doc(cfg(feature = "snapshot-settings")))]
18312#[derive(Clone, Debug)]
18313pub struct SnapshotSettings {
18314    inner: std::sync::Arc<dyn super::stub::dynamic::SnapshotSettings>,
18315}
18316
18317#[cfg(feature = "snapshot-settings")]
18318impl SnapshotSettings {
18319    /// Returns a builder for [SnapshotSettings].
18320    ///
18321    /// ```
18322    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
18323    /// # use google_cloud_compute_v1::client::SnapshotSettings;
18324    /// let client = SnapshotSettings::builder().build().await?;
18325    /// # Ok(()) }
18326    /// ```
18327    pub fn builder() -> super::builder::snapshot_settings::ClientBuilder {
18328        crate::new_client_builder(super::builder::snapshot_settings::client::Factory)
18329    }
18330
18331    /// Creates a new client from the provided stub.
18332    ///
18333    /// The most common case for calling this function is in tests mocking the
18334    /// client's behavior.
18335    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
18336    where
18337        T: super::stub::SnapshotSettings + 'static,
18338    {
18339        Self { inner: stub.into() }
18340    }
18341
18342    pub(crate) async fn new(
18343        config: gaxi::options::ClientConfig,
18344    ) -> crate::ClientBuilderResult<Self> {
18345        let inner = Self::build_inner(config).await?;
18346        Ok(Self { inner })
18347    }
18348
18349    async fn build_inner(
18350        conf: gaxi::options::ClientConfig,
18351    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::SnapshotSettings>>
18352    {
18353        if gaxi::options::tracing_enabled(&conf) {
18354            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
18355        }
18356        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
18357    }
18358
18359    async fn build_transport(
18360        conf: gaxi::options::ClientConfig,
18361    ) -> crate::ClientBuilderResult<impl super::stub::SnapshotSettings> {
18362        super::transport::SnapshotSettings::new(conf).await
18363    }
18364
18365    async fn build_with_tracing(
18366        conf: gaxi::options::ClientConfig,
18367    ) -> crate::ClientBuilderResult<impl super::stub::SnapshotSettings> {
18368        Self::build_transport(conf)
18369            .await
18370            .map(super::tracing::SnapshotSettings::new)
18371    }
18372
18373    /// Get snapshot settings.
18374    pub fn get(&self) -> super::builder::snapshot_settings::Get {
18375        super::builder::snapshot_settings::Get::new(self.inner.clone())
18376    }
18377
18378    /// Patch snapshot settings.
18379    pub fn patch(&self) -> super::builder::snapshot_settings::Patch {
18380        super::builder::snapshot_settings::Patch::new(self.inner.clone())
18381    }
18382
18383    /// Retrieves the specified Operations resource.
18384    pub fn get_operation(&self) -> super::builder::snapshot_settings::GetOperation {
18385        super::builder::snapshot_settings::GetOperation::new(self.inner.clone())
18386    }
18387}
18388
18389/// Implements a client for the Compute Engine API.
18390///
18391/// # Example
18392/// ```
18393/// # use google_cloud_compute_v1::client::Snapshots;
18394/// async fn sample(
18395/// ) -> anyhow::Result<()> {
18396///     let client = Snapshots::builder().build().await?;
18397///     // use `client` to make requests to the Compute Engine API.
18398///     Ok(())
18399/// }
18400/// ```
18401///
18402/// # Service Description
18403///
18404/// Service for the `snapshots` resource.
18405///
18406/// The client library was generated with API version 2026-09-01.
18407///
18408/// # Configuration
18409///
18410/// To configure `Snapshots` use the `with_*` methods in the type returned
18411/// by [builder()][Snapshots::builder]. The default configuration should
18412/// work for most applications. Common configuration changes include
18413///
18414/// * [with_endpoint()]: by default this client uses the global default endpoint
18415///   (`https://compute.googleapis.com`). Applications using regional
18416///   endpoints or running in restricted networks (e.g. a network configured
18417///   with [Private Google Access with VPC Service Controls]) may want to
18418///   override this default.
18419/// * [with_credentials()]: by default this client uses
18420///   [Application Default Credentials]. Applications using custom
18421///   authentication may need to override this default.
18422///
18423/// [with_endpoint()]: super::builder::snapshots::ClientBuilder::with_endpoint
18424/// [with_credentials()]: super::builder::snapshots::ClientBuilder::with_credentials
18425/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
18426/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
18427///
18428/// # Pooling and Cloning
18429///
18430/// `Snapshots` holds a connection pool internally, it is advised to
18431/// create one and reuse it. You do not need to wrap `Snapshots` in
18432/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
18433/// already uses an `Arc` internally.
18434#[cfg(feature = "snapshots")]
18435#[cfg_attr(docsrs, doc(cfg(feature = "snapshots")))]
18436#[derive(Clone, Debug)]
18437pub struct Snapshots {
18438    inner: std::sync::Arc<dyn super::stub::dynamic::Snapshots>,
18439}
18440
18441#[cfg(feature = "snapshots")]
18442impl Snapshots {
18443    /// Returns a builder for [Snapshots].
18444    ///
18445    /// ```
18446    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
18447    /// # use google_cloud_compute_v1::client::Snapshots;
18448    /// let client = Snapshots::builder().build().await?;
18449    /// # Ok(()) }
18450    /// ```
18451    pub fn builder() -> super::builder::snapshots::ClientBuilder {
18452        crate::new_client_builder(super::builder::snapshots::client::Factory)
18453    }
18454
18455    /// Creates a new client from the provided stub.
18456    ///
18457    /// The most common case for calling this function is in tests mocking the
18458    /// client's behavior.
18459    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
18460    where
18461        T: super::stub::Snapshots + 'static,
18462    {
18463        Self { inner: stub.into() }
18464    }
18465
18466    pub(crate) async fn new(
18467        config: gaxi::options::ClientConfig,
18468    ) -> crate::ClientBuilderResult<Self> {
18469        let inner = Self::build_inner(config).await?;
18470        Ok(Self { inner })
18471    }
18472
18473    async fn build_inner(
18474        conf: gaxi::options::ClientConfig,
18475    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::Snapshots>> {
18476        if gaxi::options::tracing_enabled(&conf) {
18477            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
18478        }
18479        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
18480    }
18481
18482    async fn build_transport(
18483        conf: gaxi::options::ClientConfig,
18484    ) -> crate::ClientBuilderResult<impl super::stub::Snapshots> {
18485        super::transport::Snapshots::new(conf).await
18486    }
18487
18488    async fn build_with_tracing(
18489        conf: gaxi::options::ClientConfig,
18490    ) -> crate::ClientBuilderResult<impl super::stub::Snapshots> {
18491        Self::build_transport(conf)
18492            .await
18493            .map(super::tracing::Snapshots::new)
18494    }
18495
18496    /// Deletes the specified Snapshot resource. Keep in mind that deleting
18497    /// a single snapshot might not necessarily delete all the data on that
18498    /// snapshot. If any data on the snapshot that is marked for deletion is
18499    /// needed for subsequent snapshots, the data will be moved to the next
18500    /// corresponding snapshot.
18501    ///
18502    /// For more information, seeDeleting
18503    /// snapshots.
18504    pub fn delete(&self) -> super::builder::snapshots::Delete {
18505        super::builder::snapshots::Delete::new(self.inner.clone())
18506    }
18507
18508    /// Returns the specified Snapshot resource.
18509    pub fn get(&self) -> super::builder::snapshots::Get {
18510        super::builder::snapshots::Get::new(self.inner.clone())
18511    }
18512
18513    /// Gets the access control policy for a resource. May be empty if no such
18514    /// policy or resource exists.
18515    pub fn get_iam_policy(&self) -> super::builder::snapshots::GetIamPolicy {
18516        super::builder::snapshots::GetIamPolicy::new(self.inner.clone())
18517    }
18518
18519    /// Creates a snapshot in the specified project using the data included
18520    /// in the request. For regular snapshot creation, consider using this method
18521    /// instead of disks.createSnapshot,
18522    /// as this method supports more features, such as creating snapshots in a
18523    /// project different from the source disk project.
18524    pub fn insert(&self) -> super::builder::snapshots::Insert {
18525        super::builder::snapshots::Insert::new(self.inner.clone())
18526    }
18527
18528    /// Retrieves the list of Snapshot resources contained within
18529    /// the specified project.
18530    pub fn list(&self) -> super::builder::snapshots::List {
18531        super::builder::snapshots::List::new(self.inner.clone())
18532    }
18533
18534    /// Sets the access control policy on the specified resource.
18535    /// Replaces any existing policy.
18536    pub fn set_iam_policy(&self) -> super::builder::snapshots::SetIamPolicy {
18537        super::builder::snapshots::SetIamPolicy::new(self.inner.clone())
18538    }
18539
18540    /// Sets the labels on a snapshot. To learn more about labels, read theLabeling
18541    /// Resources documentation.
18542    pub fn set_labels(&self) -> super::builder::snapshots::SetLabels {
18543        super::builder::snapshots::SetLabels::new(self.inner.clone())
18544    }
18545
18546    /// Returns permissions that a caller has on the specified resource.
18547    pub fn test_iam_permissions(&self) -> super::builder::snapshots::TestIamPermissions {
18548        super::builder::snapshots::TestIamPermissions::new(self.inner.clone())
18549    }
18550
18551    /// Rotates the customer-managed
18552    /// encryption key to the latest version for the specified snapshot.
18553    pub fn update_kms_key(&self) -> super::builder::snapshots::UpdateKmsKey {
18554        super::builder::snapshots::UpdateKmsKey::new(self.inner.clone())
18555    }
18556
18557    /// Retrieves the specified Operations resource.
18558    pub fn get_operation(&self) -> super::builder::snapshots::GetOperation {
18559        super::builder::snapshots::GetOperation::new(self.inner.clone())
18560    }
18561}
18562
18563/// Implements a client for the Compute Engine API.
18564///
18565/// # Example
18566/// ```
18567/// # use google_cloud_compute_v1::client::SslCertificates;
18568/// async fn sample(
18569/// ) -> anyhow::Result<()> {
18570///     let client = SslCertificates::builder().build().await?;
18571///     // use `client` to make requests to the Compute Engine API.
18572///     Ok(())
18573/// }
18574/// ```
18575///
18576/// # Service Description
18577///
18578/// Service for the `sslCertificates` resource.
18579///
18580/// The client library was generated with API version 2026-09-01.
18581///
18582/// # Configuration
18583///
18584/// To configure `SslCertificates` use the `with_*` methods in the type returned
18585/// by [builder()][SslCertificates::builder]. The default configuration should
18586/// work for most applications. Common configuration changes include
18587///
18588/// * [with_endpoint()]: by default this client uses the global default endpoint
18589///   (`https://compute.googleapis.com`). Applications using regional
18590///   endpoints or running in restricted networks (e.g. a network configured
18591///   with [Private Google Access with VPC Service Controls]) may want to
18592///   override this default.
18593/// * [with_credentials()]: by default this client uses
18594///   [Application Default Credentials]. Applications using custom
18595///   authentication may need to override this default.
18596///
18597/// [with_endpoint()]: super::builder::ssl_certificates::ClientBuilder::with_endpoint
18598/// [with_credentials()]: super::builder::ssl_certificates::ClientBuilder::with_credentials
18599/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
18600/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
18601///
18602/// # Pooling and Cloning
18603///
18604/// `SslCertificates` holds a connection pool internally, it is advised to
18605/// create one and reuse it. You do not need to wrap `SslCertificates` in
18606/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
18607/// already uses an `Arc` internally.
18608#[cfg(feature = "ssl-certificates")]
18609#[cfg_attr(docsrs, doc(cfg(feature = "ssl-certificates")))]
18610#[derive(Clone, Debug)]
18611pub struct SslCertificates {
18612    inner: std::sync::Arc<dyn super::stub::dynamic::SslCertificates>,
18613}
18614
18615#[cfg(feature = "ssl-certificates")]
18616impl SslCertificates {
18617    /// Returns a builder for [SslCertificates].
18618    ///
18619    /// ```
18620    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
18621    /// # use google_cloud_compute_v1::client::SslCertificates;
18622    /// let client = SslCertificates::builder().build().await?;
18623    /// # Ok(()) }
18624    /// ```
18625    pub fn builder() -> super::builder::ssl_certificates::ClientBuilder {
18626        crate::new_client_builder(super::builder::ssl_certificates::client::Factory)
18627    }
18628
18629    /// Creates a new client from the provided stub.
18630    ///
18631    /// The most common case for calling this function is in tests mocking the
18632    /// client's behavior.
18633    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
18634    where
18635        T: super::stub::SslCertificates + 'static,
18636    {
18637        Self { inner: stub.into() }
18638    }
18639
18640    pub(crate) async fn new(
18641        config: gaxi::options::ClientConfig,
18642    ) -> crate::ClientBuilderResult<Self> {
18643        let inner = Self::build_inner(config).await?;
18644        Ok(Self { inner })
18645    }
18646
18647    async fn build_inner(
18648        conf: gaxi::options::ClientConfig,
18649    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::SslCertificates>> {
18650        if gaxi::options::tracing_enabled(&conf) {
18651            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
18652        }
18653        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
18654    }
18655
18656    async fn build_transport(
18657        conf: gaxi::options::ClientConfig,
18658    ) -> crate::ClientBuilderResult<impl super::stub::SslCertificates> {
18659        super::transport::SslCertificates::new(conf).await
18660    }
18661
18662    async fn build_with_tracing(
18663        conf: gaxi::options::ClientConfig,
18664    ) -> crate::ClientBuilderResult<impl super::stub::SslCertificates> {
18665        Self::build_transport(conf)
18666            .await
18667            .map(super::tracing::SslCertificates::new)
18668    }
18669
18670    /// Retrieves the list of all SslCertificate resources, regional and global,
18671    /// available to the specified project.
18672    ///
18673    /// To prevent failure, Google recommends that you set the
18674    /// `returnPartialSuccess` parameter to `true`.
18675    pub fn aggregated_list(&self) -> super::builder::ssl_certificates::AggregatedList {
18676        super::builder::ssl_certificates::AggregatedList::new(self.inner.clone())
18677    }
18678
18679    /// Deletes the specified SslCertificate resource.
18680    pub fn delete(&self) -> super::builder::ssl_certificates::Delete {
18681        super::builder::ssl_certificates::Delete::new(self.inner.clone())
18682    }
18683
18684    /// Returns the specified SslCertificate resource.
18685    pub fn get(&self) -> super::builder::ssl_certificates::Get {
18686        super::builder::ssl_certificates::Get::new(self.inner.clone())
18687    }
18688
18689    /// Creates a SslCertificate resource in the specified project using the data
18690    /// included in the request.
18691    pub fn insert(&self) -> super::builder::ssl_certificates::Insert {
18692        super::builder::ssl_certificates::Insert::new(self.inner.clone())
18693    }
18694
18695    /// Retrieves the list of SslCertificate resources available to the specified
18696    /// project.
18697    pub fn list(&self) -> super::builder::ssl_certificates::List {
18698        super::builder::ssl_certificates::List::new(self.inner.clone())
18699    }
18700
18701    /// Retrieves the specified Operations resource.
18702    pub fn get_operation(&self) -> super::builder::ssl_certificates::GetOperation {
18703        super::builder::ssl_certificates::GetOperation::new(self.inner.clone())
18704    }
18705}
18706
18707/// Implements a client for the Compute Engine API.
18708///
18709/// # Example
18710/// ```
18711/// # use google_cloud_compute_v1::client::SslPolicies;
18712/// async fn sample(
18713/// ) -> anyhow::Result<()> {
18714///     let client = SslPolicies::builder().build().await?;
18715///     // use `client` to make requests to the Compute Engine API.
18716///     Ok(())
18717/// }
18718/// ```
18719///
18720/// # Service Description
18721///
18722/// Service for the `sslPolicies` resource.
18723///
18724/// The client library was generated with API version 2026-09-01.
18725///
18726/// # Configuration
18727///
18728/// To configure `SslPolicies` use the `with_*` methods in the type returned
18729/// by [builder()][SslPolicies::builder]. The default configuration should
18730/// work for most applications. Common configuration changes include
18731///
18732/// * [with_endpoint()]: by default this client uses the global default endpoint
18733///   (`https://compute.googleapis.com`). Applications using regional
18734///   endpoints or running in restricted networks (e.g. a network configured
18735///   with [Private Google Access with VPC Service Controls]) may want to
18736///   override this default.
18737/// * [with_credentials()]: by default this client uses
18738///   [Application Default Credentials]. Applications using custom
18739///   authentication may need to override this default.
18740///
18741/// [with_endpoint()]: super::builder::ssl_policies::ClientBuilder::with_endpoint
18742/// [with_credentials()]: super::builder::ssl_policies::ClientBuilder::with_credentials
18743/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
18744/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
18745///
18746/// # Pooling and Cloning
18747///
18748/// `SslPolicies` holds a connection pool internally, it is advised to
18749/// create one and reuse it. You do not need to wrap `SslPolicies` in
18750/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
18751/// already uses an `Arc` internally.
18752#[cfg(feature = "ssl-policies")]
18753#[cfg_attr(docsrs, doc(cfg(feature = "ssl-policies")))]
18754#[derive(Clone, Debug)]
18755pub struct SslPolicies {
18756    inner: std::sync::Arc<dyn super::stub::dynamic::SslPolicies>,
18757}
18758
18759#[cfg(feature = "ssl-policies")]
18760impl SslPolicies {
18761    /// Returns a builder for [SslPolicies].
18762    ///
18763    /// ```
18764    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
18765    /// # use google_cloud_compute_v1::client::SslPolicies;
18766    /// let client = SslPolicies::builder().build().await?;
18767    /// # Ok(()) }
18768    /// ```
18769    pub fn builder() -> super::builder::ssl_policies::ClientBuilder {
18770        crate::new_client_builder(super::builder::ssl_policies::client::Factory)
18771    }
18772
18773    /// Creates a new client from the provided stub.
18774    ///
18775    /// The most common case for calling this function is in tests mocking the
18776    /// client's behavior.
18777    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
18778    where
18779        T: super::stub::SslPolicies + 'static,
18780    {
18781        Self { inner: stub.into() }
18782    }
18783
18784    pub(crate) async fn new(
18785        config: gaxi::options::ClientConfig,
18786    ) -> crate::ClientBuilderResult<Self> {
18787        let inner = Self::build_inner(config).await?;
18788        Ok(Self { inner })
18789    }
18790
18791    async fn build_inner(
18792        conf: gaxi::options::ClientConfig,
18793    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::SslPolicies>> {
18794        if gaxi::options::tracing_enabled(&conf) {
18795            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
18796        }
18797        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
18798    }
18799
18800    async fn build_transport(
18801        conf: gaxi::options::ClientConfig,
18802    ) -> crate::ClientBuilderResult<impl super::stub::SslPolicies> {
18803        super::transport::SslPolicies::new(conf).await
18804    }
18805
18806    async fn build_with_tracing(
18807        conf: gaxi::options::ClientConfig,
18808    ) -> crate::ClientBuilderResult<impl super::stub::SslPolicies> {
18809        Self::build_transport(conf)
18810            .await
18811            .map(super::tracing::SslPolicies::new)
18812    }
18813
18814    /// Retrieves the list of all SslPolicy resources, regional and global,
18815    /// available to the specified project.
18816    ///
18817    /// To prevent failure, Google recommends that you set the
18818    /// `returnPartialSuccess` parameter to `true`.
18819    pub fn aggregated_list(&self) -> super::builder::ssl_policies::AggregatedList {
18820        super::builder::ssl_policies::AggregatedList::new(self.inner.clone())
18821    }
18822
18823    /// Deletes the specified SSL policy. The SSL policy resource can be deleted
18824    /// only if it is not in use by any TargetHttpsProxy or TargetSslProxy
18825    /// resources.
18826    pub fn delete(&self) -> super::builder::ssl_policies::Delete {
18827        super::builder::ssl_policies::Delete::new(self.inner.clone())
18828    }
18829
18830    /// Lists all of the ordered rules present in a single specified policy.
18831    pub fn get(&self) -> super::builder::ssl_policies::Get {
18832        super::builder::ssl_policies::Get::new(self.inner.clone())
18833    }
18834
18835    /// Returns the specified SSL policy resource.
18836    pub fn insert(&self) -> super::builder::ssl_policies::Insert {
18837        super::builder::ssl_policies::Insert::new(self.inner.clone())
18838    }
18839
18840    /// Lists all the SSL policies that have been configured for the specified
18841    /// project.
18842    pub fn list(&self) -> super::builder::ssl_policies::List {
18843        super::builder::ssl_policies::List::new(self.inner.clone())
18844    }
18845
18846    /// Lists all features that can be specified in the SSL policy when using
18847    /// custom profile.
18848    pub fn list_available_features(&self) -> super::builder::ssl_policies::ListAvailableFeatures {
18849        super::builder::ssl_policies::ListAvailableFeatures::new(self.inner.clone())
18850    }
18851
18852    /// Patches the specified SSL policy with the data included in the request.
18853    pub fn patch(&self) -> super::builder::ssl_policies::Patch {
18854        super::builder::ssl_policies::Patch::new(self.inner.clone())
18855    }
18856
18857    /// Retrieves the specified Operations resource.
18858    pub fn get_operation(&self) -> super::builder::ssl_policies::GetOperation {
18859        super::builder::ssl_policies::GetOperation::new(self.inner.clone())
18860    }
18861}
18862
18863/// Implements a client for the Compute Engine API.
18864///
18865/// # Example
18866/// ```
18867/// # use google_cloud_compute_v1::client::StoragePoolTypes;
18868/// async fn sample(
18869/// ) -> anyhow::Result<()> {
18870///     let client = StoragePoolTypes::builder().build().await?;
18871///     // use `client` to make requests to the Compute Engine API.
18872///     Ok(())
18873/// }
18874/// ```
18875///
18876/// # Service Description
18877///
18878/// Service for the `storagePoolTypes` resource.
18879///
18880/// The client library was generated with API version 2026-09-01.
18881///
18882/// # Configuration
18883///
18884/// To configure `StoragePoolTypes` use the `with_*` methods in the type returned
18885/// by [builder()][StoragePoolTypes::builder]. The default configuration should
18886/// work for most applications. Common configuration changes include
18887///
18888/// * [with_endpoint()]: by default this client uses the global default endpoint
18889///   (`https://compute.googleapis.com`). Applications using regional
18890///   endpoints or running in restricted networks (e.g. a network configured
18891///   with [Private Google Access with VPC Service Controls]) may want to
18892///   override this default.
18893/// * [with_credentials()]: by default this client uses
18894///   [Application Default Credentials]. Applications using custom
18895///   authentication may need to override this default.
18896///
18897/// [with_endpoint()]: super::builder::storage_pool_types::ClientBuilder::with_endpoint
18898/// [with_credentials()]: super::builder::storage_pool_types::ClientBuilder::with_credentials
18899/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
18900/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
18901///
18902/// # Pooling and Cloning
18903///
18904/// `StoragePoolTypes` holds a connection pool internally, it is advised to
18905/// create one and reuse it. You do not need to wrap `StoragePoolTypes` in
18906/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
18907/// already uses an `Arc` internally.
18908#[cfg(feature = "storage-pool-types")]
18909#[cfg_attr(docsrs, doc(cfg(feature = "storage-pool-types")))]
18910#[derive(Clone, Debug)]
18911pub struct StoragePoolTypes {
18912    inner: std::sync::Arc<dyn super::stub::dynamic::StoragePoolTypes>,
18913}
18914
18915#[cfg(feature = "storage-pool-types")]
18916impl StoragePoolTypes {
18917    /// Returns a builder for [StoragePoolTypes].
18918    ///
18919    /// ```
18920    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
18921    /// # use google_cloud_compute_v1::client::StoragePoolTypes;
18922    /// let client = StoragePoolTypes::builder().build().await?;
18923    /// # Ok(()) }
18924    /// ```
18925    pub fn builder() -> super::builder::storage_pool_types::ClientBuilder {
18926        crate::new_client_builder(super::builder::storage_pool_types::client::Factory)
18927    }
18928
18929    /// Creates a new client from the provided stub.
18930    ///
18931    /// The most common case for calling this function is in tests mocking the
18932    /// client's behavior.
18933    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
18934    where
18935        T: super::stub::StoragePoolTypes + 'static,
18936    {
18937        Self { inner: stub.into() }
18938    }
18939
18940    pub(crate) async fn new(
18941        config: gaxi::options::ClientConfig,
18942    ) -> crate::ClientBuilderResult<Self> {
18943        let inner = Self::build_inner(config).await?;
18944        Ok(Self { inner })
18945    }
18946
18947    async fn build_inner(
18948        conf: gaxi::options::ClientConfig,
18949    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::StoragePoolTypes>>
18950    {
18951        if gaxi::options::tracing_enabled(&conf) {
18952            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
18953        }
18954        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
18955    }
18956
18957    async fn build_transport(
18958        conf: gaxi::options::ClientConfig,
18959    ) -> crate::ClientBuilderResult<impl super::stub::StoragePoolTypes> {
18960        super::transport::StoragePoolTypes::new(conf).await
18961    }
18962
18963    async fn build_with_tracing(
18964        conf: gaxi::options::ClientConfig,
18965    ) -> crate::ClientBuilderResult<impl super::stub::StoragePoolTypes> {
18966        Self::build_transport(conf)
18967            .await
18968            .map(super::tracing::StoragePoolTypes::new)
18969    }
18970
18971    /// Retrieves an aggregated list of storage pool types.
18972    ///
18973    /// To prevent failure, Google recommends that you set the
18974    /// `returnPartialSuccess` parameter to `true`.
18975    pub fn aggregated_list(&self) -> super::builder::storage_pool_types::AggregatedList {
18976        super::builder::storage_pool_types::AggregatedList::new(self.inner.clone())
18977    }
18978
18979    /// Returns the specified storage pool type.
18980    pub fn get(&self) -> super::builder::storage_pool_types::Get {
18981        super::builder::storage_pool_types::Get::new(self.inner.clone())
18982    }
18983
18984    /// Retrieves a list of storage pool types available to the specified
18985    /// project.
18986    pub fn list(&self) -> super::builder::storage_pool_types::List {
18987        super::builder::storage_pool_types::List::new(self.inner.clone())
18988    }
18989}
18990
18991/// Implements a client for the Compute Engine API.
18992///
18993/// # Example
18994/// ```
18995/// # use google_cloud_compute_v1::client::StoragePools;
18996/// async fn sample(
18997/// ) -> anyhow::Result<()> {
18998///     let client = StoragePools::builder().build().await?;
18999///     // use `client` to make requests to the Compute Engine API.
19000///     Ok(())
19001/// }
19002/// ```
19003///
19004/// # Service Description
19005///
19006/// Service for the `storagePools` resource.
19007///
19008/// The client library was generated with API version 2026-09-01.
19009///
19010/// # Configuration
19011///
19012/// To configure `StoragePools` use the `with_*` methods in the type returned
19013/// by [builder()][StoragePools::builder]. The default configuration should
19014/// work for most applications. Common configuration changes include
19015///
19016/// * [with_endpoint()]: by default this client uses the global default endpoint
19017///   (`https://compute.googleapis.com`). Applications using regional
19018///   endpoints or running in restricted networks (e.g. a network configured
19019///   with [Private Google Access with VPC Service Controls]) may want to
19020///   override this default.
19021/// * [with_credentials()]: by default this client uses
19022///   [Application Default Credentials]. Applications using custom
19023///   authentication may need to override this default.
19024///
19025/// [with_endpoint()]: super::builder::storage_pools::ClientBuilder::with_endpoint
19026/// [with_credentials()]: super::builder::storage_pools::ClientBuilder::with_credentials
19027/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
19028/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
19029///
19030/// # Pooling and Cloning
19031///
19032/// `StoragePools` holds a connection pool internally, it is advised to
19033/// create one and reuse it. You do not need to wrap `StoragePools` in
19034/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
19035/// already uses an `Arc` internally.
19036#[cfg(feature = "storage-pools")]
19037#[cfg_attr(docsrs, doc(cfg(feature = "storage-pools")))]
19038#[derive(Clone, Debug)]
19039pub struct StoragePools {
19040    inner: std::sync::Arc<dyn super::stub::dynamic::StoragePools>,
19041}
19042
19043#[cfg(feature = "storage-pools")]
19044impl StoragePools {
19045    /// Returns a builder for [StoragePools].
19046    ///
19047    /// ```
19048    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
19049    /// # use google_cloud_compute_v1::client::StoragePools;
19050    /// let client = StoragePools::builder().build().await?;
19051    /// # Ok(()) }
19052    /// ```
19053    pub fn builder() -> super::builder::storage_pools::ClientBuilder {
19054        crate::new_client_builder(super::builder::storage_pools::client::Factory)
19055    }
19056
19057    /// Creates a new client from the provided stub.
19058    ///
19059    /// The most common case for calling this function is in tests mocking the
19060    /// client's behavior.
19061    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
19062    where
19063        T: super::stub::StoragePools + 'static,
19064    {
19065        Self { inner: stub.into() }
19066    }
19067
19068    pub(crate) async fn new(
19069        config: gaxi::options::ClientConfig,
19070    ) -> crate::ClientBuilderResult<Self> {
19071        let inner = Self::build_inner(config).await?;
19072        Ok(Self { inner })
19073    }
19074
19075    async fn build_inner(
19076        conf: gaxi::options::ClientConfig,
19077    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::StoragePools>> {
19078        if gaxi::options::tracing_enabled(&conf) {
19079            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
19080        }
19081        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
19082    }
19083
19084    async fn build_transport(
19085        conf: gaxi::options::ClientConfig,
19086    ) -> crate::ClientBuilderResult<impl super::stub::StoragePools> {
19087        super::transport::StoragePools::new(conf).await
19088    }
19089
19090    async fn build_with_tracing(
19091        conf: gaxi::options::ClientConfig,
19092    ) -> crate::ClientBuilderResult<impl super::stub::StoragePools> {
19093        Self::build_transport(conf)
19094            .await
19095            .map(super::tracing::StoragePools::new)
19096    }
19097
19098    /// Retrieves an aggregated list of storage pools.
19099    ///
19100    /// To prevent failure, Google recommends that you set the
19101    /// `returnPartialSuccess` parameter to `true`.
19102    pub fn aggregated_list(&self) -> super::builder::storage_pools::AggregatedList {
19103        super::builder::storage_pools::AggregatedList::new(self.inner.clone())
19104    }
19105
19106    /// Deletes the specified storage pool. Deleting a storagePool
19107    /// removes its data permanently and is irreversible. However, deleting a
19108    /// storagePool does not delete any snapshots previously
19109    /// made from the storagePool. You must separately delete
19110    /// snapshots.
19111    pub fn delete(&self) -> super::builder::storage_pools::Delete {
19112        super::builder::storage_pools::Delete::new(self.inner.clone())
19113    }
19114
19115    /// Returns a specified storage pool. Gets a list of available
19116    /// storage pools by making a list() request.
19117    pub fn get(&self) -> super::builder::storage_pools::Get {
19118        super::builder::storage_pools::Get::new(self.inner.clone())
19119    }
19120
19121    /// Gets the access control policy for a resource. May be empty if no such
19122    /// policy or resource exists.
19123    pub fn get_iam_policy(&self) -> super::builder::storage_pools::GetIamPolicy {
19124        super::builder::storage_pools::GetIamPolicy::new(self.inner.clone())
19125    }
19126
19127    /// Creates a storage pool in the specified project using the data
19128    /// in the request.
19129    pub fn insert(&self) -> super::builder::storage_pools::Insert {
19130        super::builder::storage_pools::Insert::new(self.inner.clone())
19131    }
19132
19133    /// Retrieves a list of storage pools contained within
19134    /// the specified zone.
19135    pub fn list(&self) -> super::builder::storage_pools::List {
19136        super::builder::storage_pools::List::new(self.inner.clone())
19137    }
19138
19139    /// Lists the disks in a specified storage pool.
19140    pub fn list_disks(&self) -> super::builder::storage_pools::ListDisks {
19141        super::builder::storage_pools::ListDisks::new(self.inner.clone())
19142    }
19143
19144    /// Sets the access control policy on the specified resource.
19145    /// Replaces any existing policy.
19146    pub fn set_iam_policy(&self) -> super::builder::storage_pools::SetIamPolicy {
19147        super::builder::storage_pools::SetIamPolicy::new(self.inner.clone())
19148    }
19149
19150    /// Returns permissions that a caller has on the specified resource.
19151    pub fn test_iam_permissions(&self) -> super::builder::storage_pools::TestIamPermissions {
19152        super::builder::storage_pools::TestIamPermissions::new(self.inner.clone())
19153    }
19154
19155    /// Updates the specified storagePool with the data included in the request.
19156    /// The update is performed only on selected fields included as part
19157    /// of update-mask. Only the following fields can be modified:
19158    /// pool_provisioned_capacity_gb, pool_provisioned_iops and
19159    /// pool_provisioned_throughput.
19160    pub fn update(&self) -> super::builder::storage_pools::Update {
19161        super::builder::storage_pools::Update::new(self.inner.clone())
19162    }
19163
19164    /// Retrieves the specified zone-specific Operations resource.
19165    pub fn get_operation(&self) -> super::builder::storage_pools::GetOperation {
19166        super::builder::storage_pools::GetOperation::new(self.inner.clone())
19167    }
19168}
19169
19170/// Implements a client for the Compute Engine API.
19171///
19172/// # Example
19173/// ```
19174/// # use google_cloud_compute_v1::client::Subnetworks;
19175/// async fn sample(
19176/// ) -> anyhow::Result<()> {
19177///     let client = Subnetworks::builder().build().await?;
19178///     // use `client` to make requests to the Compute Engine API.
19179///     Ok(())
19180/// }
19181/// ```
19182///
19183/// # Service Description
19184///
19185/// Service for the `subnetworks` resource.
19186///
19187/// The client library was generated with API version 2026-09-01.
19188///
19189/// # Configuration
19190///
19191/// To configure `Subnetworks` use the `with_*` methods in the type returned
19192/// by [builder()][Subnetworks::builder]. The default configuration should
19193/// work for most applications. Common configuration changes include
19194///
19195/// * [with_endpoint()]: by default this client uses the global default endpoint
19196///   (`https://compute.googleapis.com`). Applications using regional
19197///   endpoints or running in restricted networks (e.g. a network configured
19198///   with [Private Google Access with VPC Service Controls]) may want to
19199///   override this default.
19200/// * [with_credentials()]: by default this client uses
19201///   [Application Default Credentials]. Applications using custom
19202///   authentication may need to override this default.
19203///
19204/// [with_endpoint()]: super::builder::subnetworks::ClientBuilder::with_endpoint
19205/// [with_credentials()]: super::builder::subnetworks::ClientBuilder::with_credentials
19206/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
19207/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
19208///
19209/// # Pooling and Cloning
19210///
19211/// `Subnetworks` holds a connection pool internally, it is advised to
19212/// create one and reuse it. You do not need to wrap `Subnetworks` in
19213/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
19214/// already uses an `Arc` internally.
19215#[cfg(feature = "subnetworks")]
19216#[cfg_attr(docsrs, doc(cfg(feature = "subnetworks")))]
19217#[derive(Clone, Debug)]
19218pub struct Subnetworks {
19219    inner: std::sync::Arc<dyn super::stub::dynamic::Subnetworks>,
19220}
19221
19222#[cfg(feature = "subnetworks")]
19223impl Subnetworks {
19224    /// Returns a builder for [Subnetworks].
19225    ///
19226    /// ```
19227    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
19228    /// # use google_cloud_compute_v1::client::Subnetworks;
19229    /// let client = Subnetworks::builder().build().await?;
19230    /// # Ok(()) }
19231    /// ```
19232    pub fn builder() -> super::builder::subnetworks::ClientBuilder {
19233        crate::new_client_builder(super::builder::subnetworks::client::Factory)
19234    }
19235
19236    /// Creates a new client from the provided stub.
19237    ///
19238    /// The most common case for calling this function is in tests mocking the
19239    /// client's behavior.
19240    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
19241    where
19242        T: super::stub::Subnetworks + 'static,
19243    {
19244        Self { inner: stub.into() }
19245    }
19246
19247    pub(crate) async fn new(
19248        config: gaxi::options::ClientConfig,
19249    ) -> crate::ClientBuilderResult<Self> {
19250        let inner = Self::build_inner(config).await?;
19251        Ok(Self { inner })
19252    }
19253
19254    async fn build_inner(
19255        conf: gaxi::options::ClientConfig,
19256    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::Subnetworks>> {
19257        if gaxi::options::tracing_enabled(&conf) {
19258            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
19259        }
19260        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
19261    }
19262
19263    async fn build_transport(
19264        conf: gaxi::options::ClientConfig,
19265    ) -> crate::ClientBuilderResult<impl super::stub::Subnetworks> {
19266        super::transport::Subnetworks::new(conf).await
19267    }
19268
19269    async fn build_with_tracing(
19270        conf: gaxi::options::ClientConfig,
19271    ) -> crate::ClientBuilderResult<impl super::stub::Subnetworks> {
19272        Self::build_transport(conf)
19273            .await
19274            .map(super::tracing::Subnetworks::new)
19275    }
19276
19277    /// Retrieves an aggregated list of subnetworks.
19278    ///
19279    /// To prevent failure, Google recommends that you set the
19280    /// `returnPartialSuccess` parameter to `true`.
19281    pub fn aggregated_list(&self) -> super::builder::subnetworks::AggregatedList {
19282        super::builder::subnetworks::AggregatedList::new(self.inner.clone())
19283    }
19284
19285    /// Deletes the specified subnetwork.
19286    pub fn delete(&self) -> super::builder::subnetworks::Delete {
19287        super::builder::subnetworks::Delete::new(self.inner.clone())
19288    }
19289
19290    /// Expands the IP CIDR range of the subnetwork to a specified value.
19291    pub fn expand_ip_cidr_range(&self) -> super::builder::subnetworks::ExpandIpCidrRange {
19292        super::builder::subnetworks::ExpandIpCidrRange::new(self.inner.clone())
19293    }
19294
19295    /// Returns the specified subnetwork.
19296    pub fn get(&self) -> super::builder::subnetworks::Get {
19297        super::builder::subnetworks::Get::new(self.inner.clone())
19298    }
19299
19300    /// Gets the access control policy for a resource. May be empty if no such
19301    /// policy or resource exists.
19302    pub fn get_iam_policy(&self) -> super::builder::subnetworks::GetIamPolicy {
19303        super::builder::subnetworks::GetIamPolicy::new(self.inner.clone())
19304    }
19305
19306    /// Creates a subnetwork in the specified project using the data
19307    /// included in the request.
19308    pub fn insert(&self) -> super::builder::subnetworks::Insert {
19309        super::builder::subnetworks::Insert::new(self.inner.clone())
19310    }
19311
19312    /// Retrieves a list of subnetworks available to the specified
19313    /// project.
19314    pub fn list(&self) -> super::builder::subnetworks::List {
19315        super::builder::subnetworks::List::new(self.inner.clone())
19316    }
19317
19318    /// Retrieves an aggregated list of all usable subnetworks in the project.
19319    pub fn list_usable(&self) -> super::builder::subnetworks::ListUsable {
19320        super::builder::subnetworks::ListUsable::new(self.inner.clone())
19321    }
19322
19323    /// Patches the specified subnetwork with the data included in the request.
19324    /// Only certain fields can be updated with a patch request
19325    /// as indicated in the field descriptions.
19326    /// You must specify the current fingerprint of the
19327    /// subnetwork resource being patched.
19328    pub fn patch(&self) -> super::builder::subnetworks::Patch {
19329        super::builder::subnetworks::Patch::new(self.inner.clone())
19330    }
19331
19332    /// Sets the access control policy on the specified resource.
19333    /// Replaces any existing policy.
19334    pub fn set_iam_policy(&self) -> super::builder::subnetworks::SetIamPolicy {
19335        super::builder::subnetworks::SetIamPolicy::new(self.inner.clone())
19336    }
19337
19338    /// Set whether VMs in this subnet can access Google services without assigning
19339    /// external IP addresses through Private Google Access.
19340    pub fn set_private_ip_google_access(
19341        &self,
19342    ) -> super::builder::subnetworks::SetPrivateIpGoogleAccess {
19343        super::builder::subnetworks::SetPrivateIpGoogleAccess::new(self.inner.clone())
19344    }
19345
19346    /// Returns permissions that a caller has on the specified resource.
19347    pub fn test_iam_permissions(&self) -> super::builder::subnetworks::TestIamPermissions {
19348        super::builder::subnetworks::TestIamPermissions::new(self.inner.clone())
19349    }
19350
19351    /// Retrieves the specified region-specific Operations resource.
19352    pub fn get_operation(&self) -> super::builder::subnetworks::GetOperation {
19353        super::builder::subnetworks::GetOperation::new(self.inner.clone())
19354    }
19355}
19356
19357/// Implements a client for the Compute Engine API.
19358///
19359/// # Example
19360/// ```
19361/// # use google_cloud_compute_v1::client::TargetGrpcProxies;
19362/// async fn sample(
19363/// ) -> anyhow::Result<()> {
19364///     let client = TargetGrpcProxies::builder().build().await?;
19365///     // use `client` to make requests to the Compute Engine API.
19366///     Ok(())
19367/// }
19368/// ```
19369///
19370/// # Service Description
19371///
19372/// Service for the `targetGrpcProxies` resource.
19373///
19374/// The client library was generated with API version 2026-09-01.
19375///
19376/// # Configuration
19377///
19378/// To configure `TargetGrpcProxies` use the `with_*` methods in the type returned
19379/// by [builder()][TargetGrpcProxies::builder]. The default configuration should
19380/// work for most applications. Common configuration changes include
19381///
19382/// * [with_endpoint()]: by default this client uses the global default endpoint
19383///   (`https://compute.googleapis.com`). Applications using regional
19384///   endpoints or running in restricted networks (e.g. a network configured
19385///   with [Private Google Access with VPC Service Controls]) may want to
19386///   override this default.
19387/// * [with_credentials()]: by default this client uses
19388///   [Application Default Credentials]. Applications using custom
19389///   authentication may need to override this default.
19390///
19391/// [with_endpoint()]: super::builder::target_grpc_proxies::ClientBuilder::with_endpoint
19392/// [with_credentials()]: super::builder::target_grpc_proxies::ClientBuilder::with_credentials
19393/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
19394/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
19395///
19396/// # Pooling and Cloning
19397///
19398/// `TargetGrpcProxies` holds a connection pool internally, it is advised to
19399/// create one and reuse it. You do not need to wrap `TargetGrpcProxies` in
19400/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
19401/// already uses an `Arc` internally.
19402#[cfg(feature = "target-grpc-proxies")]
19403#[cfg_attr(docsrs, doc(cfg(feature = "target-grpc-proxies")))]
19404#[derive(Clone, Debug)]
19405pub struct TargetGrpcProxies {
19406    inner: std::sync::Arc<dyn super::stub::dynamic::TargetGrpcProxies>,
19407}
19408
19409#[cfg(feature = "target-grpc-proxies")]
19410impl TargetGrpcProxies {
19411    /// Returns a builder for [TargetGrpcProxies].
19412    ///
19413    /// ```
19414    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
19415    /// # use google_cloud_compute_v1::client::TargetGrpcProxies;
19416    /// let client = TargetGrpcProxies::builder().build().await?;
19417    /// # Ok(()) }
19418    /// ```
19419    pub fn builder() -> super::builder::target_grpc_proxies::ClientBuilder {
19420        crate::new_client_builder(super::builder::target_grpc_proxies::client::Factory)
19421    }
19422
19423    /// Creates a new client from the provided stub.
19424    ///
19425    /// The most common case for calling this function is in tests mocking the
19426    /// client's behavior.
19427    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
19428    where
19429        T: super::stub::TargetGrpcProxies + 'static,
19430    {
19431        Self { inner: stub.into() }
19432    }
19433
19434    pub(crate) async fn new(
19435        config: gaxi::options::ClientConfig,
19436    ) -> crate::ClientBuilderResult<Self> {
19437        let inner = Self::build_inner(config).await?;
19438        Ok(Self { inner })
19439    }
19440
19441    async fn build_inner(
19442        conf: gaxi::options::ClientConfig,
19443    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::TargetGrpcProxies>>
19444    {
19445        if gaxi::options::tracing_enabled(&conf) {
19446            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
19447        }
19448        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
19449    }
19450
19451    async fn build_transport(
19452        conf: gaxi::options::ClientConfig,
19453    ) -> crate::ClientBuilderResult<impl super::stub::TargetGrpcProxies> {
19454        super::transport::TargetGrpcProxies::new(conf).await
19455    }
19456
19457    async fn build_with_tracing(
19458        conf: gaxi::options::ClientConfig,
19459    ) -> crate::ClientBuilderResult<impl super::stub::TargetGrpcProxies> {
19460        Self::build_transport(conf)
19461            .await
19462            .map(super::tracing::TargetGrpcProxies::new)
19463    }
19464
19465    /// Deletes the specified TargetGrpcProxy in the given scope
19466    pub fn delete(&self) -> super::builder::target_grpc_proxies::Delete {
19467        super::builder::target_grpc_proxies::Delete::new(self.inner.clone())
19468    }
19469
19470    /// Returns the specified TargetGrpcProxy resource in the given scope.
19471    pub fn get(&self) -> super::builder::target_grpc_proxies::Get {
19472        super::builder::target_grpc_proxies::Get::new(self.inner.clone())
19473    }
19474
19475    /// Creates a TargetGrpcProxy in the specified project in the given scope
19476    /// using the parameters that are included in the request.
19477    pub fn insert(&self) -> super::builder::target_grpc_proxies::Insert {
19478        super::builder::target_grpc_proxies::Insert::new(self.inner.clone())
19479    }
19480
19481    /// Lists the TargetGrpcProxies for a project in the given scope.
19482    pub fn list(&self) -> super::builder::target_grpc_proxies::List {
19483        super::builder::target_grpc_proxies::List::new(self.inner.clone())
19484    }
19485
19486    /// Patches the specified TargetGrpcProxy resource with the data included in
19487    /// the request. This method supports PATCH
19488    /// semantics and usesJSON merge
19489    /// patch format and processing rules.
19490    pub fn patch(&self) -> super::builder::target_grpc_proxies::Patch {
19491        super::builder::target_grpc_proxies::Patch::new(self.inner.clone())
19492    }
19493
19494    /// Retrieves the specified Operations resource.
19495    pub fn get_operation(&self) -> super::builder::target_grpc_proxies::GetOperation {
19496        super::builder::target_grpc_proxies::GetOperation::new(self.inner.clone())
19497    }
19498}
19499
19500/// Implements a client for the Compute Engine API.
19501///
19502/// # Example
19503/// ```
19504/// # use google_cloud_compute_v1::client::TargetHttpProxies;
19505/// async fn sample(
19506/// ) -> anyhow::Result<()> {
19507///     let client = TargetHttpProxies::builder().build().await?;
19508///     // use `client` to make requests to the Compute Engine API.
19509///     Ok(())
19510/// }
19511/// ```
19512///
19513/// # Service Description
19514///
19515/// Service for the `targetHttpProxies` resource.
19516///
19517/// The client library was generated with API version 2026-09-01.
19518///
19519/// # Configuration
19520///
19521/// To configure `TargetHttpProxies` use the `with_*` methods in the type returned
19522/// by [builder()][TargetHttpProxies::builder]. The default configuration should
19523/// work for most applications. Common configuration changes include
19524///
19525/// * [with_endpoint()]: by default this client uses the global default endpoint
19526///   (`https://compute.googleapis.com`). Applications using regional
19527///   endpoints or running in restricted networks (e.g. a network configured
19528///   with [Private Google Access with VPC Service Controls]) may want to
19529///   override this default.
19530/// * [with_credentials()]: by default this client uses
19531///   [Application Default Credentials]. Applications using custom
19532///   authentication may need to override this default.
19533///
19534/// [with_endpoint()]: super::builder::target_http_proxies::ClientBuilder::with_endpoint
19535/// [with_credentials()]: super::builder::target_http_proxies::ClientBuilder::with_credentials
19536/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
19537/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
19538///
19539/// # Pooling and Cloning
19540///
19541/// `TargetHttpProxies` holds a connection pool internally, it is advised to
19542/// create one and reuse it. You do not need to wrap `TargetHttpProxies` in
19543/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
19544/// already uses an `Arc` internally.
19545#[cfg(feature = "target-http-proxies")]
19546#[cfg_attr(docsrs, doc(cfg(feature = "target-http-proxies")))]
19547#[derive(Clone, Debug)]
19548pub struct TargetHttpProxies {
19549    inner: std::sync::Arc<dyn super::stub::dynamic::TargetHttpProxies>,
19550}
19551
19552#[cfg(feature = "target-http-proxies")]
19553impl TargetHttpProxies {
19554    /// Returns a builder for [TargetHttpProxies].
19555    ///
19556    /// ```
19557    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
19558    /// # use google_cloud_compute_v1::client::TargetHttpProxies;
19559    /// let client = TargetHttpProxies::builder().build().await?;
19560    /// # Ok(()) }
19561    /// ```
19562    pub fn builder() -> super::builder::target_http_proxies::ClientBuilder {
19563        crate::new_client_builder(super::builder::target_http_proxies::client::Factory)
19564    }
19565
19566    /// Creates a new client from the provided stub.
19567    ///
19568    /// The most common case for calling this function is in tests mocking the
19569    /// client's behavior.
19570    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
19571    where
19572        T: super::stub::TargetHttpProxies + 'static,
19573    {
19574        Self { inner: stub.into() }
19575    }
19576
19577    pub(crate) async fn new(
19578        config: gaxi::options::ClientConfig,
19579    ) -> crate::ClientBuilderResult<Self> {
19580        let inner = Self::build_inner(config).await?;
19581        Ok(Self { inner })
19582    }
19583
19584    async fn build_inner(
19585        conf: gaxi::options::ClientConfig,
19586    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::TargetHttpProxies>>
19587    {
19588        if gaxi::options::tracing_enabled(&conf) {
19589            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
19590        }
19591        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
19592    }
19593
19594    async fn build_transport(
19595        conf: gaxi::options::ClientConfig,
19596    ) -> crate::ClientBuilderResult<impl super::stub::TargetHttpProxies> {
19597        super::transport::TargetHttpProxies::new(conf).await
19598    }
19599
19600    async fn build_with_tracing(
19601        conf: gaxi::options::ClientConfig,
19602    ) -> crate::ClientBuilderResult<impl super::stub::TargetHttpProxies> {
19603        Self::build_transport(conf)
19604            .await
19605            .map(super::tracing::TargetHttpProxies::new)
19606    }
19607
19608    /// Retrieves the list of all TargetHttpProxy resources, regional and global,
19609    /// available to the specified project.
19610    ///
19611    /// To prevent failure, Google recommends that you set the
19612    /// `returnPartialSuccess` parameter to `true`.
19613    pub fn aggregated_list(&self) -> super::builder::target_http_proxies::AggregatedList {
19614        super::builder::target_http_proxies::AggregatedList::new(self.inner.clone())
19615    }
19616
19617    /// Deletes the specified TargetHttpProxy resource.
19618    pub fn delete(&self) -> super::builder::target_http_proxies::Delete {
19619        super::builder::target_http_proxies::Delete::new(self.inner.clone())
19620    }
19621
19622    /// Returns the specified TargetHttpProxy resource.
19623    pub fn get(&self) -> super::builder::target_http_proxies::Get {
19624        super::builder::target_http_proxies::Get::new(self.inner.clone())
19625    }
19626
19627    /// Creates a TargetHttpProxy resource in the specified
19628    /// project using the data included in the request.
19629    pub fn insert(&self) -> super::builder::target_http_proxies::Insert {
19630        super::builder::target_http_proxies::Insert::new(self.inner.clone())
19631    }
19632
19633    /// Retrieves the list of TargetHttpProxy resources available
19634    /// to the specified project.
19635    pub fn list(&self) -> super::builder::target_http_proxies::List {
19636        super::builder::target_http_proxies::List::new(self.inner.clone())
19637    }
19638
19639    /// Patches the specified TargetHttpProxy resource with the data included in
19640    /// the request. This method supports PATCH
19641    /// semantics and usesJSON merge
19642    /// patch format and processing rules.
19643    pub fn patch(&self) -> super::builder::target_http_proxies::Patch {
19644        super::builder::target_http_proxies::Patch::new(self.inner.clone())
19645    }
19646
19647    /// Changes the URL map for TargetHttpProxy.
19648    pub fn set_url_map(&self) -> super::builder::target_http_proxies::SetUrlMap {
19649        super::builder::target_http_proxies::SetUrlMap::new(self.inner.clone())
19650    }
19651
19652    /// Retrieves the specified Operations resource.
19653    pub fn get_operation(&self) -> super::builder::target_http_proxies::GetOperation {
19654        super::builder::target_http_proxies::GetOperation::new(self.inner.clone())
19655    }
19656}
19657
19658/// Implements a client for the Compute Engine API.
19659///
19660/// # Example
19661/// ```
19662/// # use google_cloud_compute_v1::client::TargetHttpsProxies;
19663/// async fn sample(
19664/// ) -> anyhow::Result<()> {
19665///     let client = TargetHttpsProxies::builder().build().await?;
19666///     // use `client` to make requests to the Compute Engine API.
19667///     Ok(())
19668/// }
19669/// ```
19670///
19671/// # Service Description
19672///
19673/// Service for the `targetHttpsProxies` resource.
19674///
19675/// The client library was generated with API version 2026-09-01.
19676///
19677/// # Configuration
19678///
19679/// To configure `TargetHttpsProxies` use the `with_*` methods in the type returned
19680/// by [builder()][TargetHttpsProxies::builder]. The default configuration should
19681/// work for most applications. Common configuration changes include
19682///
19683/// * [with_endpoint()]: by default this client uses the global default endpoint
19684///   (`https://compute.googleapis.com`). Applications using regional
19685///   endpoints or running in restricted networks (e.g. a network configured
19686///   with [Private Google Access with VPC Service Controls]) may want to
19687///   override this default.
19688/// * [with_credentials()]: by default this client uses
19689///   [Application Default Credentials]. Applications using custom
19690///   authentication may need to override this default.
19691///
19692/// [with_endpoint()]: super::builder::target_https_proxies::ClientBuilder::with_endpoint
19693/// [with_credentials()]: super::builder::target_https_proxies::ClientBuilder::with_credentials
19694/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
19695/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
19696///
19697/// # Pooling and Cloning
19698///
19699/// `TargetHttpsProxies` holds a connection pool internally, it is advised to
19700/// create one and reuse it. You do not need to wrap `TargetHttpsProxies` in
19701/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
19702/// already uses an `Arc` internally.
19703#[cfg(feature = "target-https-proxies")]
19704#[cfg_attr(docsrs, doc(cfg(feature = "target-https-proxies")))]
19705#[derive(Clone, Debug)]
19706pub struct TargetHttpsProxies {
19707    inner: std::sync::Arc<dyn super::stub::dynamic::TargetHttpsProxies>,
19708}
19709
19710#[cfg(feature = "target-https-proxies")]
19711impl TargetHttpsProxies {
19712    /// Returns a builder for [TargetHttpsProxies].
19713    ///
19714    /// ```
19715    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
19716    /// # use google_cloud_compute_v1::client::TargetHttpsProxies;
19717    /// let client = TargetHttpsProxies::builder().build().await?;
19718    /// # Ok(()) }
19719    /// ```
19720    pub fn builder() -> super::builder::target_https_proxies::ClientBuilder {
19721        crate::new_client_builder(super::builder::target_https_proxies::client::Factory)
19722    }
19723
19724    /// Creates a new client from the provided stub.
19725    ///
19726    /// The most common case for calling this function is in tests mocking the
19727    /// client's behavior.
19728    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
19729    where
19730        T: super::stub::TargetHttpsProxies + 'static,
19731    {
19732        Self { inner: stub.into() }
19733    }
19734
19735    pub(crate) async fn new(
19736        config: gaxi::options::ClientConfig,
19737    ) -> crate::ClientBuilderResult<Self> {
19738        let inner = Self::build_inner(config).await?;
19739        Ok(Self { inner })
19740    }
19741
19742    async fn build_inner(
19743        conf: gaxi::options::ClientConfig,
19744    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::TargetHttpsProxies>>
19745    {
19746        if gaxi::options::tracing_enabled(&conf) {
19747            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
19748        }
19749        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
19750    }
19751
19752    async fn build_transport(
19753        conf: gaxi::options::ClientConfig,
19754    ) -> crate::ClientBuilderResult<impl super::stub::TargetHttpsProxies> {
19755        super::transport::TargetHttpsProxies::new(conf).await
19756    }
19757
19758    async fn build_with_tracing(
19759        conf: gaxi::options::ClientConfig,
19760    ) -> crate::ClientBuilderResult<impl super::stub::TargetHttpsProxies> {
19761        Self::build_transport(conf)
19762            .await
19763            .map(super::tracing::TargetHttpsProxies::new)
19764    }
19765
19766    /// Retrieves the list of all TargetHttpsProxy resources, regional and global,
19767    /// available to the specified project.
19768    ///
19769    /// To prevent failure, Google recommends that you set the
19770    /// `returnPartialSuccess` parameter to `true`.
19771    pub fn aggregated_list(&self) -> super::builder::target_https_proxies::AggregatedList {
19772        super::builder::target_https_proxies::AggregatedList::new(self.inner.clone())
19773    }
19774
19775    /// Deletes the specified TargetHttpsProxy resource.
19776    pub fn delete(&self) -> super::builder::target_https_proxies::Delete {
19777        super::builder::target_https_proxies::Delete::new(self.inner.clone())
19778    }
19779
19780    /// Returns the specified TargetHttpsProxy resource.
19781    pub fn get(&self) -> super::builder::target_https_proxies::Get {
19782        super::builder::target_https_proxies::Get::new(self.inner.clone())
19783    }
19784
19785    /// Creates a TargetHttpsProxy resource in the specified
19786    /// project using the data included in the request.
19787    pub fn insert(&self) -> super::builder::target_https_proxies::Insert {
19788        super::builder::target_https_proxies::Insert::new(self.inner.clone())
19789    }
19790
19791    /// Retrieves the list of TargetHttpsProxy resources
19792    /// available to the specified project.
19793    pub fn list(&self) -> super::builder::target_https_proxies::List {
19794        super::builder::target_https_proxies::List::new(self.inner.clone())
19795    }
19796
19797    /// Patches the specified TargetHttpsProxy resource with the data included in
19798    /// the request. This method supports PATCH
19799    /// semantics and usesJSON merge
19800    /// patch format and processing rules.
19801    pub fn patch(&self) -> super::builder::target_https_proxies::Patch {
19802        super::builder::target_https_proxies::Patch::new(self.inner.clone())
19803    }
19804
19805    /// Changes the Certificate Map for TargetHttpsProxy.
19806    pub fn set_certificate_map(&self) -> super::builder::target_https_proxies::SetCertificateMap {
19807        super::builder::target_https_proxies::SetCertificateMap::new(self.inner.clone())
19808    }
19809
19810    /// Sets the QUIC override policy for TargetHttpsProxy.
19811    pub fn set_quic_override(&self) -> super::builder::target_https_proxies::SetQuicOverride {
19812        super::builder::target_https_proxies::SetQuicOverride::new(self.inner.clone())
19813    }
19814
19815    /// Replaces SslCertificates for TargetHttpsProxy.
19816    pub fn set_ssl_certificates(&self) -> super::builder::target_https_proxies::SetSslCertificates {
19817        super::builder::target_https_proxies::SetSslCertificates::new(self.inner.clone())
19818    }
19819
19820    /// Sets the SSL policy for TargetHttpsProxy. The SSL policy specifies the
19821    /// server-side support for SSL features. This affects connections between
19822    /// clients and the HTTPS proxy load balancer. They do not affect the
19823    /// connection between the load balancer and the backends.
19824    pub fn set_ssl_policy(&self) -> super::builder::target_https_proxies::SetSslPolicy {
19825        super::builder::target_https_proxies::SetSslPolicy::new(self.inner.clone())
19826    }
19827
19828    /// Changes the URL map for TargetHttpsProxy.
19829    pub fn set_url_map(&self) -> super::builder::target_https_proxies::SetUrlMap {
19830        super::builder::target_https_proxies::SetUrlMap::new(self.inner.clone())
19831    }
19832
19833    /// Retrieves the specified Operations resource.
19834    pub fn get_operation(&self) -> super::builder::target_https_proxies::GetOperation {
19835        super::builder::target_https_proxies::GetOperation::new(self.inner.clone())
19836    }
19837}
19838
19839/// Implements a client for the Compute Engine API.
19840///
19841/// # Example
19842/// ```
19843/// # use google_cloud_compute_v1::client::TargetInstances;
19844/// async fn sample(
19845/// ) -> anyhow::Result<()> {
19846///     let client = TargetInstances::builder().build().await?;
19847///     // use `client` to make requests to the Compute Engine API.
19848///     Ok(())
19849/// }
19850/// ```
19851///
19852/// # Service Description
19853///
19854/// Service for the `targetInstances` resource.
19855///
19856/// The client library was generated with API version 2026-09-01.
19857///
19858/// # Configuration
19859///
19860/// To configure `TargetInstances` use the `with_*` methods in the type returned
19861/// by [builder()][TargetInstances::builder]. The default configuration should
19862/// work for most applications. Common configuration changes include
19863///
19864/// * [with_endpoint()]: by default this client uses the global default endpoint
19865///   (`https://compute.googleapis.com`). Applications using regional
19866///   endpoints or running in restricted networks (e.g. a network configured
19867///   with [Private Google Access with VPC Service Controls]) may want to
19868///   override this default.
19869/// * [with_credentials()]: by default this client uses
19870///   [Application Default Credentials]. Applications using custom
19871///   authentication may need to override this default.
19872///
19873/// [with_endpoint()]: super::builder::target_instances::ClientBuilder::with_endpoint
19874/// [with_credentials()]: super::builder::target_instances::ClientBuilder::with_credentials
19875/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
19876/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
19877///
19878/// # Pooling and Cloning
19879///
19880/// `TargetInstances` holds a connection pool internally, it is advised to
19881/// create one and reuse it. You do not need to wrap `TargetInstances` in
19882/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
19883/// already uses an `Arc` internally.
19884#[cfg(feature = "target-instances")]
19885#[cfg_attr(docsrs, doc(cfg(feature = "target-instances")))]
19886#[derive(Clone, Debug)]
19887pub struct TargetInstances {
19888    inner: std::sync::Arc<dyn super::stub::dynamic::TargetInstances>,
19889}
19890
19891#[cfg(feature = "target-instances")]
19892impl TargetInstances {
19893    /// Returns a builder for [TargetInstances].
19894    ///
19895    /// ```
19896    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
19897    /// # use google_cloud_compute_v1::client::TargetInstances;
19898    /// let client = TargetInstances::builder().build().await?;
19899    /// # Ok(()) }
19900    /// ```
19901    pub fn builder() -> super::builder::target_instances::ClientBuilder {
19902        crate::new_client_builder(super::builder::target_instances::client::Factory)
19903    }
19904
19905    /// Creates a new client from the provided stub.
19906    ///
19907    /// The most common case for calling this function is in tests mocking the
19908    /// client's behavior.
19909    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
19910    where
19911        T: super::stub::TargetInstances + 'static,
19912    {
19913        Self { inner: stub.into() }
19914    }
19915
19916    pub(crate) async fn new(
19917        config: gaxi::options::ClientConfig,
19918    ) -> crate::ClientBuilderResult<Self> {
19919        let inner = Self::build_inner(config).await?;
19920        Ok(Self { inner })
19921    }
19922
19923    async fn build_inner(
19924        conf: gaxi::options::ClientConfig,
19925    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::TargetInstances>> {
19926        if gaxi::options::tracing_enabled(&conf) {
19927            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
19928        }
19929        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
19930    }
19931
19932    async fn build_transport(
19933        conf: gaxi::options::ClientConfig,
19934    ) -> crate::ClientBuilderResult<impl super::stub::TargetInstances> {
19935        super::transport::TargetInstances::new(conf).await
19936    }
19937
19938    async fn build_with_tracing(
19939        conf: gaxi::options::ClientConfig,
19940    ) -> crate::ClientBuilderResult<impl super::stub::TargetInstances> {
19941        Self::build_transport(conf)
19942            .await
19943            .map(super::tracing::TargetInstances::new)
19944    }
19945
19946    /// Retrieves an aggregated list of target instances.
19947    ///
19948    /// To prevent failure, Google recommends that you set the
19949    /// `returnPartialSuccess` parameter to `true`.
19950    pub fn aggregated_list(&self) -> super::builder::target_instances::AggregatedList {
19951        super::builder::target_instances::AggregatedList::new(self.inner.clone())
19952    }
19953
19954    /// Deletes the specified TargetInstance resource.
19955    pub fn delete(&self) -> super::builder::target_instances::Delete {
19956        super::builder::target_instances::Delete::new(self.inner.clone())
19957    }
19958
19959    /// Returns the specified TargetInstance resource.
19960    pub fn get(&self) -> super::builder::target_instances::Get {
19961        super::builder::target_instances::Get::new(self.inner.clone())
19962    }
19963
19964    /// Creates a TargetInstance resource in the specified project and zone using
19965    /// the data included in the request.
19966    pub fn insert(&self) -> super::builder::target_instances::Insert {
19967        super::builder::target_instances::Insert::new(self.inner.clone())
19968    }
19969
19970    /// Retrieves a list of TargetInstance resources available to the specified
19971    /// project and zone.
19972    pub fn list(&self) -> super::builder::target_instances::List {
19973        super::builder::target_instances::List::new(self.inner.clone())
19974    }
19975
19976    /// Sets the Google Cloud Armor security policy for the specified target
19977    /// instance. For more information, seeGoogle
19978    /// Cloud Armor Overview
19979    pub fn set_security_policy(&self) -> super::builder::target_instances::SetSecurityPolicy {
19980        super::builder::target_instances::SetSecurityPolicy::new(self.inner.clone())
19981    }
19982
19983    /// Returns permissions that a caller has on the specified resource.
19984    pub fn test_iam_permissions(&self) -> super::builder::target_instances::TestIamPermissions {
19985        super::builder::target_instances::TestIamPermissions::new(self.inner.clone())
19986    }
19987
19988    /// Retrieves the specified zone-specific Operations resource.
19989    pub fn get_operation(&self) -> super::builder::target_instances::GetOperation {
19990        super::builder::target_instances::GetOperation::new(self.inner.clone())
19991    }
19992}
19993
19994/// Implements a client for the Compute Engine API.
19995///
19996/// # Example
19997/// ```
19998/// # use google_cloud_compute_v1::client::TargetPools;
19999/// async fn sample(
20000/// ) -> anyhow::Result<()> {
20001///     let client = TargetPools::builder().build().await?;
20002///     // use `client` to make requests to the Compute Engine API.
20003///     Ok(())
20004/// }
20005/// ```
20006///
20007/// # Service Description
20008///
20009/// Service for the `targetPools` resource.
20010///
20011/// The client library was generated with API version 2026-09-01.
20012///
20013/// # Configuration
20014///
20015/// To configure `TargetPools` use the `with_*` methods in the type returned
20016/// by [builder()][TargetPools::builder]. The default configuration should
20017/// work for most applications. Common configuration changes include
20018///
20019/// * [with_endpoint()]: by default this client uses the global default endpoint
20020///   (`https://compute.googleapis.com`). Applications using regional
20021///   endpoints or running in restricted networks (e.g. a network configured
20022///   with [Private Google Access with VPC Service Controls]) may want to
20023///   override this default.
20024/// * [with_credentials()]: by default this client uses
20025///   [Application Default Credentials]. Applications using custom
20026///   authentication may need to override this default.
20027///
20028/// [with_endpoint()]: super::builder::target_pools::ClientBuilder::with_endpoint
20029/// [with_credentials()]: super::builder::target_pools::ClientBuilder::with_credentials
20030/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
20031/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
20032///
20033/// # Pooling and Cloning
20034///
20035/// `TargetPools` holds a connection pool internally, it is advised to
20036/// create one and reuse it. You do not need to wrap `TargetPools` in
20037/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
20038/// already uses an `Arc` internally.
20039#[cfg(feature = "target-pools")]
20040#[cfg_attr(docsrs, doc(cfg(feature = "target-pools")))]
20041#[derive(Clone, Debug)]
20042pub struct TargetPools {
20043    inner: std::sync::Arc<dyn super::stub::dynamic::TargetPools>,
20044}
20045
20046#[cfg(feature = "target-pools")]
20047impl TargetPools {
20048    /// Returns a builder for [TargetPools].
20049    ///
20050    /// ```
20051    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
20052    /// # use google_cloud_compute_v1::client::TargetPools;
20053    /// let client = TargetPools::builder().build().await?;
20054    /// # Ok(()) }
20055    /// ```
20056    pub fn builder() -> super::builder::target_pools::ClientBuilder {
20057        crate::new_client_builder(super::builder::target_pools::client::Factory)
20058    }
20059
20060    /// Creates a new client from the provided stub.
20061    ///
20062    /// The most common case for calling this function is in tests mocking the
20063    /// client's behavior.
20064    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
20065    where
20066        T: super::stub::TargetPools + 'static,
20067    {
20068        Self { inner: stub.into() }
20069    }
20070
20071    pub(crate) async fn new(
20072        config: gaxi::options::ClientConfig,
20073    ) -> crate::ClientBuilderResult<Self> {
20074        let inner = Self::build_inner(config).await?;
20075        Ok(Self { inner })
20076    }
20077
20078    async fn build_inner(
20079        conf: gaxi::options::ClientConfig,
20080    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::TargetPools>> {
20081        if gaxi::options::tracing_enabled(&conf) {
20082            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
20083        }
20084        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
20085    }
20086
20087    async fn build_transport(
20088        conf: gaxi::options::ClientConfig,
20089    ) -> crate::ClientBuilderResult<impl super::stub::TargetPools> {
20090        super::transport::TargetPools::new(conf).await
20091    }
20092
20093    async fn build_with_tracing(
20094        conf: gaxi::options::ClientConfig,
20095    ) -> crate::ClientBuilderResult<impl super::stub::TargetPools> {
20096        Self::build_transport(conf)
20097            .await
20098            .map(super::tracing::TargetPools::new)
20099    }
20100
20101    /// Adds health check URLs to a target pool.
20102    pub fn add_health_check(&self) -> super::builder::target_pools::AddHealthCheck {
20103        super::builder::target_pools::AddHealthCheck::new(self.inner.clone())
20104    }
20105
20106    /// Adds an instance to a target pool.
20107    pub fn add_instance(&self) -> super::builder::target_pools::AddInstance {
20108        super::builder::target_pools::AddInstance::new(self.inner.clone())
20109    }
20110
20111    /// Retrieves an aggregated list of target pools.
20112    ///
20113    /// To prevent failure, Google recommends that you set the
20114    /// `returnPartialSuccess` parameter to `true`.
20115    pub fn aggregated_list(&self) -> super::builder::target_pools::AggregatedList {
20116        super::builder::target_pools::AggregatedList::new(self.inner.clone())
20117    }
20118
20119    /// Deletes the specified target pool.
20120    pub fn delete(&self) -> super::builder::target_pools::Delete {
20121        super::builder::target_pools::Delete::new(self.inner.clone())
20122    }
20123
20124    /// Returns the specified target pool.
20125    pub fn get(&self) -> super::builder::target_pools::Get {
20126        super::builder::target_pools::Get::new(self.inner.clone())
20127    }
20128
20129    /// Gets the most recent health check results for each IP for the
20130    /// instance that is referenced by the given target pool.
20131    pub fn get_health(&self) -> super::builder::target_pools::GetHealth {
20132        super::builder::target_pools::GetHealth::new(self.inner.clone())
20133    }
20134
20135    /// Creates a target pool in the specified project and region using
20136    /// the data included in the request.
20137    pub fn insert(&self) -> super::builder::target_pools::Insert {
20138        super::builder::target_pools::Insert::new(self.inner.clone())
20139    }
20140
20141    /// Retrieves a list of target pools available to the specified
20142    /// project and region.
20143    pub fn list(&self) -> super::builder::target_pools::List {
20144        super::builder::target_pools::List::new(self.inner.clone())
20145    }
20146
20147    /// Removes health check URL from a target pool.
20148    pub fn remove_health_check(&self) -> super::builder::target_pools::RemoveHealthCheck {
20149        super::builder::target_pools::RemoveHealthCheck::new(self.inner.clone())
20150    }
20151
20152    /// Removes instance URL from a target pool.
20153    pub fn remove_instance(&self) -> super::builder::target_pools::RemoveInstance {
20154        super::builder::target_pools::RemoveInstance::new(self.inner.clone())
20155    }
20156
20157    /// Changes a backup target pool's configurations.
20158    pub fn set_backup(&self) -> super::builder::target_pools::SetBackup {
20159        super::builder::target_pools::SetBackup::new(self.inner.clone())
20160    }
20161
20162    /// Sets the Google Cloud Armor security policy for the specified target pool.
20163    /// For more information, seeGoogle
20164    /// Cloud Armor Overview
20165    pub fn set_security_policy(&self) -> super::builder::target_pools::SetSecurityPolicy {
20166        super::builder::target_pools::SetSecurityPolicy::new(self.inner.clone())
20167    }
20168
20169    /// Returns permissions that a caller has on the specified resource.
20170    pub fn test_iam_permissions(&self) -> super::builder::target_pools::TestIamPermissions {
20171        super::builder::target_pools::TestIamPermissions::new(self.inner.clone())
20172    }
20173
20174    /// Retrieves the specified region-specific Operations resource.
20175    pub fn get_operation(&self) -> super::builder::target_pools::GetOperation {
20176        super::builder::target_pools::GetOperation::new(self.inner.clone())
20177    }
20178}
20179
20180/// Implements a client for the Compute Engine API.
20181///
20182/// # Example
20183/// ```
20184/// # use google_cloud_compute_v1::client::TargetSslProxies;
20185/// async fn sample(
20186/// ) -> anyhow::Result<()> {
20187///     let client = TargetSslProxies::builder().build().await?;
20188///     // use `client` to make requests to the Compute Engine API.
20189///     Ok(())
20190/// }
20191/// ```
20192///
20193/// # Service Description
20194///
20195/// Service for the `targetSslProxies` resource.
20196///
20197/// The client library was generated with API version 2026-09-01.
20198///
20199/// # Configuration
20200///
20201/// To configure `TargetSslProxies` use the `with_*` methods in the type returned
20202/// by [builder()][TargetSslProxies::builder]. The default configuration should
20203/// work for most applications. Common configuration changes include
20204///
20205/// * [with_endpoint()]: by default this client uses the global default endpoint
20206///   (`https://compute.googleapis.com`). Applications using regional
20207///   endpoints or running in restricted networks (e.g. a network configured
20208///   with [Private Google Access with VPC Service Controls]) may want to
20209///   override this default.
20210/// * [with_credentials()]: by default this client uses
20211///   [Application Default Credentials]. Applications using custom
20212///   authentication may need to override this default.
20213///
20214/// [with_endpoint()]: super::builder::target_ssl_proxies::ClientBuilder::with_endpoint
20215/// [with_credentials()]: super::builder::target_ssl_proxies::ClientBuilder::with_credentials
20216/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
20217/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
20218///
20219/// # Pooling and Cloning
20220///
20221/// `TargetSslProxies` holds a connection pool internally, it is advised to
20222/// create one and reuse it. You do not need to wrap `TargetSslProxies` in
20223/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
20224/// already uses an `Arc` internally.
20225#[cfg(feature = "target-ssl-proxies")]
20226#[cfg_attr(docsrs, doc(cfg(feature = "target-ssl-proxies")))]
20227#[derive(Clone, Debug)]
20228pub struct TargetSslProxies {
20229    inner: std::sync::Arc<dyn super::stub::dynamic::TargetSslProxies>,
20230}
20231
20232#[cfg(feature = "target-ssl-proxies")]
20233impl TargetSslProxies {
20234    /// Returns a builder for [TargetSslProxies].
20235    ///
20236    /// ```
20237    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
20238    /// # use google_cloud_compute_v1::client::TargetSslProxies;
20239    /// let client = TargetSslProxies::builder().build().await?;
20240    /// # Ok(()) }
20241    /// ```
20242    pub fn builder() -> super::builder::target_ssl_proxies::ClientBuilder {
20243        crate::new_client_builder(super::builder::target_ssl_proxies::client::Factory)
20244    }
20245
20246    /// Creates a new client from the provided stub.
20247    ///
20248    /// The most common case for calling this function is in tests mocking the
20249    /// client's behavior.
20250    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
20251    where
20252        T: super::stub::TargetSslProxies + 'static,
20253    {
20254        Self { inner: stub.into() }
20255    }
20256
20257    pub(crate) async fn new(
20258        config: gaxi::options::ClientConfig,
20259    ) -> crate::ClientBuilderResult<Self> {
20260        let inner = Self::build_inner(config).await?;
20261        Ok(Self { inner })
20262    }
20263
20264    async fn build_inner(
20265        conf: gaxi::options::ClientConfig,
20266    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::TargetSslProxies>>
20267    {
20268        if gaxi::options::tracing_enabled(&conf) {
20269            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
20270        }
20271        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
20272    }
20273
20274    async fn build_transport(
20275        conf: gaxi::options::ClientConfig,
20276    ) -> crate::ClientBuilderResult<impl super::stub::TargetSslProxies> {
20277        super::transport::TargetSslProxies::new(conf).await
20278    }
20279
20280    async fn build_with_tracing(
20281        conf: gaxi::options::ClientConfig,
20282    ) -> crate::ClientBuilderResult<impl super::stub::TargetSslProxies> {
20283        Self::build_transport(conf)
20284            .await
20285            .map(super::tracing::TargetSslProxies::new)
20286    }
20287
20288    /// Deletes the specified TargetSslProxy resource.
20289    pub fn delete(&self) -> super::builder::target_ssl_proxies::Delete {
20290        super::builder::target_ssl_proxies::Delete::new(self.inner.clone())
20291    }
20292
20293    /// Returns the specified TargetSslProxy resource.
20294    pub fn get(&self) -> super::builder::target_ssl_proxies::Get {
20295        super::builder::target_ssl_proxies::Get::new(self.inner.clone())
20296    }
20297
20298    /// Creates a TargetSslProxy resource in the specified project using
20299    /// the data included in the request.
20300    pub fn insert(&self) -> super::builder::target_ssl_proxies::Insert {
20301        super::builder::target_ssl_proxies::Insert::new(self.inner.clone())
20302    }
20303
20304    /// Retrieves the list of TargetSslProxy resources
20305    /// available to the specified project.
20306    pub fn list(&self) -> super::builder::target_ssl_proxies::List {
20307        super::builder::target_ssl_proxies::List::new(self.inner.clone())
20308    }
20309
20310    /// Changes the BackendService for TargetSslProxy.
20311    pub fn set_backend_service(&self) -> super::builder::target_ssl_proxies::SetBackendService {
20312        super::builder::target_ssl_proxies::SetBackendService::new(self.inner.clone())
20313    }
20314
20315    /// Changes the Certificate Map for TargetSslProxy.
20316    pub fn set_certificate_map(&self) -> super::builder::target_ssl_proxies::SetCertificateMap {
20317        super::builder::target_ssl_proxies::SetCertificateMap::new(self.inner.clone())
20318    }
20319
20320    /// Changes the ProxyHeaderType for TargetSslProxy.
20321    pub fn set_proxy_header(&self) -> super::builder::target_ssl_proxies::SetProxyHeader {
20322        super::builder::target_ssl_proxies::SetProxyHeader::new(self.inner.clone())
20323    }
20324
20325    /// Changes SslCertificates for TargetSslProxy.
20326    pub fn set_ssl_certificates(&self) -> super::builder::target_ssl_proxies::SetSslCertificates {
20327        super::builder::target_ssl_proxies::SetSslCertificates::new(self.inner.clone())
20328    }
20329
20330    /// Sets the SSL policy for TargetSslProxy. The SSL policy specifies the
20331    /// server-side support for SSL features. This affects connections between
20332    /// clients and the load balancer. They do not affect the
20333    /// connection between the load balancer and the backends.
20334    pub fn set_ssl_policy(&self) -> super::builder::target_ssl_proxies::SetSslPolicy {
20335        super::builder::target_ssl_proxies::SetSslPolicy::new(self.inner.clone())
20336    }
20337
20338    /// Returns permissions that a caller has on the specified resource.
20339    pub fn test_iam_permissions(&self) -> super::builder::target_ssl_proxies::TestIamPermissions {
20340        super::builder::target_ssl_proxies::TestIamPermissions::new(self.inner.clone())
20341    }
20342
20343    /// Retrieves the specified Operations resource.
20344    pub fn get_operation(&self) -> super::builder::target_ssl_proxies::GetOperation {
20345        super::builder::target_ssl_proxies::GetOperation::new(self.inner.clone())
20346    }
20347}
20348
20349/// Implements a client for the Compute Engine API.
20350///
20351/// # Example
20352/// ```
20353/// # use google_cloud_compute_v1::client::TargetTcpProxies;
20354/// async fn sample(
20355/// ) -> anyhow::Result<()> {
20356///     let client = TargetTcpProxies::builder().build().await?;
20357///     // use `client` to make requests to the Compute Engine API.
20358///     Ok(())
20359/// }
20360/// ```
20361///
20362/// # Service Description
20363///
20364/// Service for the `targetTcpProxies` resource.
20365///
20366/// The client library was generated with API version 2026-09-01.
20367///
20368/// # Configuration
20369///
20370/// To configure `TargetTcpProxies` use the `with_*` methods in the type returned
20371/// by [builder()][TargetTcpProxies::builder]. The default configuration should
20372/// work for most applications. Common configuration changes include
20373///
20374/// * [with_endpoint()]: by default this client uses the global default endpoint
20375///   (`https://compute.googleapis.com`). Applications using regional
20376///   endpoints or running in restricted networks (e.g. a network configured
20377///   with [Private Google Access with VPC Service Controls]) may want to
20378///   override this default.
20379/// * [with_credentials()]: by default this client uses
20380///   [Application Default Credentials]. Applications using custom
20381///   authentication may need to override this default.
20382///
20383/// [with_endpoint()]: super::builder::target_tcp_proxies::ClientBuilder::with_endpoint
20384/// [with_credentials()]: super::builder::target_tcp_proxies::ClientBuilder::with_credentials
20385/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
20386/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
20387///
20388/// # Pooling and Cloning
20389///
20390/// `TargetTcpProxies` holds a connection pool internally, it is advised to
20391/// create one and reuse it. You do not need to wrap `TargetTcpProxies` in
20392/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
20393/// already uses an `Arc` internally.
20394#[cfg(feature = "target-tcp-proxies")]
20395#[cfg_attr(docsrs, doc(cfg(feature = "target-tcp-proxies")))]
20396#[derive(Clone, Debug)]
20397pub struct TargetTcpProxies {
20398    inner: std::sync::Arc<dyn super::stub::dynamic::TargetTcpProxies>,
20399}
20400
20401#[cfg(feature = "target-tcp-proxies")]
20402impl TargetTcpProxies {
20403    /// Returns a builder for [TargetTcpProxies].
20404    ///
20405    /// ```
20406    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
20407    /// # use google_cloud_compute_v1::client::TargetTcpProxies;
20408    /// let client = TargetTcpProxies::builder().build().await?;
20409    /// # Ok(()) }
20410    /// ```
20411    pub fn builder() -> super::builder::target_tcp_proxies::ClientBuilder {
20412        crate::new_client_builder(super::builder::target_tcp_proxies::client::Factory)
20413    }
20414
20415    /// Creates a new client from the provided stub.
20416    ///
20417    /// The most common case for calling this function is in tests mocking the
20418    /// client's behavior.
20419    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
20420    where
20421        T: super::stub::TargetTcpProxies + 'static,
20422    {
20423        Self { inner: stub.into() }
20424    }
20425
20426    pub(crate) async fn new(
20427        config: gaxi::options::ClientConfig,
20428    ) -> crate::ClientBuilderResult<Self> {
20429        let inner = Self::build_inner(config).await?;
20430        Ok(Self { inner })
20431    }
20432
20433    async fn build_inner(
20434        conf: gaxi::options::ClientConfig,
20435    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::TargetTcpProxies>>
20436    {
20437        if gaxi::options::tracing_enabled(&conf) {
20438            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
20439        }
20440        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
20441    }
20442
20443    async fn build_transport(
20444        conf: gaxi::options::ClientConfig,
20445    ) -> crate::ClientBuilderResult<impl super::stub::TargetTcpProxies> {
20446        super::transport::TargetTcpProxies::new(conf).await
20447    }
20448
20449    async fn build_with_tracing(
20450        conf: gaxi::options::ClientConfig,
20451    ) -> crate::ClientBuilderResult<impl super::stub::TargetTcpProxies> {
20452        Self::build_transport(conf)
20453            .await
20454            .map(super::tracing::TargetTcpProxies::new)
20455    }
20456
20457    /// Retrieves the list of all TargetTcpProxy resources, regional and global,
20458    /// available to the specified project.
20459    ///
20460    /// To prevent failure, Google recommends that you set the
20461    /// `returnPartialSuccess` parameter to `true`.
20462    pub fn aggregated_list(&self) -> super::builder::target_tcp_proxies::AggregatedList {
20463        super::builder::target_tcp_proxies::AggregatedList::new(self.inner.clone())
20464    }
20465
20466    /// Deletes the specified TargetTcpProxy resource.
20467    pub fn delete(&self) -> super::builder::target_tcp_proxies::Delete {
20468        super::builder::target_tcp_proxies::Delete::new(self.inner.clone())
20469    }
20470
20471    /// Returns the specified TargetTcpProxy resource.
20472    pub fn get(&self) -> super::builder::target_tcp_proxies::Get {
20473        super::builder::target_tcp_proxies::Get::new(self.inner.clone())
20474    }
20475
20476    /// Creates a TargetTcpProxy resource in the specified project using
20477    /// the data included in the request.
20478    pub fn insert(&self) -> super::builder::target_tcp_proxies::Insert {
20479        super::builder::target_tcp_proxies::Insert::new(self.inner.clone())
20480    }
20481
20482    /// Retrieves the list of TargetTcpProxy resources
20483    /// available to the specified project.
20484    pub fn list(&self) -> super::builder::target_tcp_proxies::List {
20485        super::builder::target_tcp_proxies::List::new(self.inner.clone())
20486    }
20487
20488    /// Changes the BackendService for TargetTcpProxy.
20489    pub fn set_backend_service(&self) -> super::builder::target_tcp_proxies::SetBackendService {
20490        super::builder::target_tcp_proxies::SetBackendService::new(self.inner.clone())
20491    }
20492
20493    /// Changes the ProxyHeaderType for TargetTcpProxy.
20494    pub fn set_proxy_header(&self) -> super::builder::target_tcp_proxies::SetProxyHeader {
20495        super::builder::target_tcp_proxies::SetProxyHeader::new(self.inner.clone())
20496    }
20497
20498    /// Returns permissions that a caller has on the specified resource.
20499    pub fn test_iam_permissions(&self) -> super::builder::target_tcp_proxies::TestIamPermissions {
20500        super::builder::target_tcp_proxies::TestIamPermissions::new(self.inner.clone())
20501    }
20502
20503    /// Retrieves the specified Operations resource.
20504    pub fn get_operation(&self) -> super::builder::target_tcp_proxies::GetOperation {
20505        super::builder::target_tcp_proxies::GetOperation::new(self.inner.clone())
20506    }
20507}
20508
20509/// Implements a client for the Compute Engine API.
20510///
20511/// # Example
20512/// ```
20513/// # use google_cloud_compute_v1::client::TargetVpnGateways;
20514/// async fn sample(
20515/// ) -> anyhow::Result<()> {
20516///     let client = TargetVpnGateways::builder().build().await?;
20517///     // use `client` to make requests to the Compute Engine API.
20518///     Ok(())
20519/// }
20520/// ```
20521///
20522/// # Service Description
20523///
20524/// Service for the `targetVpnGateways` resource.
20525///
20526/// The client library was generated with API version 2026-09-01.
20527///
20528/// # Configuration
20529///
20530/// To configure `TargetVpnGateways` use the `with_*` methods in the type returned
20531/// by [builder()][TargetVpnGateways::builder]. The default configuration should
20532/// work for most applications. Common configuration changes include
20533///
20534/// * [with_endpoint()]: by default this client uses the global default endpoint
20535///   (`https://compute.googleapis.com`). Applications using regional
20536///   endpoints or running in restricted networks (e.g. a network configured
20537///   with [Private Google Access with VPC Service Controls]) may want to
20538///   override this default.
20539/// * [with_credentials()]: by default this client uses
20540///   [Application Default Credentials]. Applications using custom
20541///   authentication may need to override this default.
20542///
20543/// [with_endpoint()]: super::builder::target_vpn_gateways::ClientBuilder::with_endpoint
20544/// [with_credentials()]: super::builder::target_vpn_gateways::ClientBuilder::with_credentials
20545/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
20546/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
20547///
20548/// # Pooling and Cloning
20549///
20550/// `TargetVpnGateways` holds a connection pool internally, it is advised to
20551/// create one and reuse it. You do not need to wrap `TargetVpnGateways` in
20552/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
20553/// already uses an `Arc` internally.
20554#[cfg(feature = "target-vpn-gateways")]
20555#[cfg_attr(docsrs, doc(cfg(feature = "target-vpn-gateways")))]
20556#[derive(Clone, Debug)]
20557pub struct TargetVpnGateways {
20558    inner: std::sync::Arc<dyn super::stub::dynamic::TargetVpnGateways>,
20559}
20560
20561#[cfg(feature = "target-vpn-gateways")]
20562impl TargetVpnGateways {
20563    /// Returns a builder for [TargetVpnGateways].
20564    ///
20565    /// ```
20566    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
20567    /// # use google_cloud_compute_v1::client::TargetVpnGateways;
20568    /// let client = TargetVpnGateways::builder().build().await?;
20569    /// # Ok(()) }
20570    /// ```
20571    pub fn builder() -> super::builder::target_vpn_gateways::ClientBuilder {
20572        crate::new_client_builder(super::builder::target_vpn_gateways::client::Factory)
20573    }
20574
20575    /// Creates a new client from the provided stub.
20576    ///
20577    /// The most common case for calling this function is in tests mocking the
20578    /// client's behavior.
20579    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
20580    where
20581        T: super::stub::TargetVpnGateways + 'static,
20582    {
20583        Self { inner: stub.into() }
20584    }
20585
20586    pub(crate) async fn new(
20587        config: gaxi::options::ClientConfig,
20588    ) -> crate::ClientBuilderResult<Self> {
20589        let inner = Self::build_inner(config).await?;
20590        Ok(Self { inner })
20591    }
20592
20593    async fn build_inner(
20594        conf: gaxi::options::ClientConfig,
20595    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::TargetVpnGateways>>
20596    {
20597        if gaxi::options::tracing_enabled(&conf) {
20598            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
20599        }
20600        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
20601    }
20602
20603    async fn build_transport(
20604        conf: gaxi::options::ClientConfig,
20605    ) -> crate::ClientBuilderResult<impl super::stub::TargetVpnGateways> {
20606        super::transport::TargetVpnGateways::new(conf).await
20607    }
20608
20609    async fn build_with_tracing(
20610        conf: gaxi::options::ClientConfig,
20611    ) -> crate::ClientBuilderResult<impl super::stub::TargetVpnGateways> {
20612        Self::build_transport(conf)
20613            .await
20614            .map(super::tracing::TargetVpnGateways::new)
20615    }
20616
20617    /// Retrieves an aggregated list of target VPN gateways.
20618    ///
20619    /// To prevent failure, Google recommends that you set the
20620    /// `returnPartialSuccess` parameter to `true`.
20621    pub fn aggregated_list(&self) -> super::builder::target_vpn_gateways::AggregatedList {
20622        super::builder::target_vpn_gateways::AggregatedList::new(self.inner.clone())
20623    }
20624
20625    /// Deletes the specified target VPN gateway.
20626    pub fn delete(&self) -> super::builder::target_vpn_gateways::Delete {
20627        super::builder::target_vpn_gateways::Delete::new(self.inner.clone())
20628    }
20629
20630    /// Returns the specified target VPN gateway.
20631    pub fn get(&self) -> super::builder::target_vpn_gateways::Get {
20632        super::builder::target_vpn_gateways::Get::new(self.inner.clone())
20633    }
20634
20635    /// Creates a target VPN gateway in the specified project and region using
20636    /// the data included in the request.
20637    pub fn insert(&self) -> super::builder::target_vpn_gateways::Insert {
20638        super::builder::target_vpn_gateways::Insert::new(self.inner.clone())
20639    }
20640
20641    /// Retrieves a list of target VPN gateways available to the specified
20642    /// project and region.
20643    pub fn list(&self) -> super::builder::target_vpn_gateways::List {
20644        super::builder::target_vpn_gateways::List::new(self.inner.clone())
20645    }
20646
20647    /// Sets the labels on a TargetVpnGateway. To learn more about labels, read theLabeling
20648    /// Resources documentation.
20649    pub fn set_labels(&self) -> super::builder::target_vpn_gateways::SetLabels {
20650        super::builder::target_vpn_gateways::SetLabels::new(self.inner.clone())
20651    }
20652
20653    /// Retrieves the specified region-specific Operations resource.
20654    pub fn get_operation(&self) -> super::builder::target_vpn_gateways::GetOperation {
20655        super::builder::target_vpn_gateways::GetOperation::new(self.inner.clone())
20656    }
20657}
20658
20659/// Implements a client for the Compute Engine API.
20660///
20661/// # Example
20662/// ```
20663/// # use google_cloud_compute_v1::client::UrlMaps;
20664/// async fn sample(
20665/// ) -> anyhow::Result<()> {
20666///     let client = UrlMaps::builder().build().await?;
20667///     // use `client` to make requests to the Compute Engine API.
20668///     Ok(())
20669/// }
20670/// ```
20671///
20672/// # Service Description
20673///
20674/// Service for the `urlMaps` resource.
20675///
20676/// The client library was generated with API version 2026-09-01.
20677///
20678/// # Configuration
20679///
20680/// To configure `UrlMaps` use the `with_*` methods in the type returned
20681/// by [builder()][UrlMaps::builder]. The default configuration should
20682/// work for most applications. Common configuration changes include
20683///
20684/// * [with_endpoint()]: by default this client uses the global default endpoint
20685///   (`https://compute.googleapis.com`). Applications using regional
20686///   endpoints or running in restricted networks (e.g. a network configured
20687///   with [Private Google Access with VPC Service Controls]) may want to
20688///   override this default.
20689/// * [with_credentials()]: by default this client uses
20690///   [Application Default Credentials]. Applications using custom
20691///   authentication may need to override this default.
20692///
20693/// [with_endpoint()]: super::builder::url_maps::ClientBuilder::with_endpoint
20694/// [with_credentials()]: super::builder::url_maps::ClientBuilder::with_credentials
20695/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
20696/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
20697///
20698/// # Pooling and Cloning
20699///
20700/// `UrlMaps` holds a connection pool internally, it is advised to
20701/// create one and reuse it. You do not need to wrap `UrlMaps` in
20702/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
20703/// already uses an `Arc` internally.
20704#[cfg(feature = "url-maps")]
20705#[cfg_attr(docsrs, doc(cfg(feature = "url-maps")))]
20706#[derive(Clone, Debug)]
20707pub struct UrlMaps {
20708    inner: std::sync::Arc<dyn super::stub::dynamic::UrlMaps>,
20709}
20710
20711#[cfg(feature = "url-maps")]
20712impl UrlMaps {
20713    /// Returns a builder for [UrlMaps].
20714    ///
20715    /// ```
20716    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
20717    /// # use google_cloud_compute_v1::client::UrlMaps;
20718    /// let client = UrlMaps::builder().build().await?;
20719    /// # Ok(()) }
20720    /// ```
20721    pub fn builder() -> super::builder::url_maps::ClientBuilder {
20722        crate::new_client_builder(super::builder::url_maps::client::Factory)
20723    }
20724
20725    /// Creates a new client from the provided stub.
20726    ///
20727    /// The most common case for calling this function is in tests mocking the
20728    /// client's behavior.
20729    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
20730    where
20731        T: super::stub::UrlMaps + 'static,
20732    {
20733        Self { inner: stub.into() }
20734    }
20735
20736    pub(crate) async fn new(
20737        config: gaxi::options::ClientConfig,
20738    ) -> crate::ClientBuilderResult<Self> {
20739        let inner = Self::build_inner(config).await?;
20740        Ok(Self { inner })
20741    }
20742
20743    async fn build_inner(
20744        conf: gaxi::options::ClientConfig,
20745    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::UrlMaps>> {
20746        if gaxi::options::tracing_enabled(&conf) {
20747            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
20748        }
20749        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
20750    }
20751
20752    async fn build_transport(
20753        conf: gaxi::options::ClientConfig,
20754    ) -> crate::ClientBuilderResult<impl super::stub::UrlMaps> {
20755        super::transport::UrlMaps::new(conf).await
20756    }
20757
20758    async fn build_with_tracing(
20759        conf: gaxi::options::ClientConfig,
20760    ) -> crate::ClientBuilderResult<impl super::stub::UrlMaps> {
20761        Self::build_transport(conf)
20762            .await
20763            .map(super::tracing::UrlMaps::new)
20764    }
20765
20766    /// Retrieves the list of all UrlMap resources, regional and global,
20767    /// available to the specified project.
20768    ///
20769    /// To prevent failure, Google recommends that you set the
20770    /// `returnPartialSuccess` parameter to `true`.
20771    pub fn aggregated_list(&self) -> super::builder::url_maps::AggregatedList {
20772        super::builder::url_maps::AggregatedList::new(self.inner.clone())
20773    }
20774
20775    /// Deletes the specified UrlMap resource.
20776    pub fn delete(&self) -> super::builder::url_maps::Delete {
20777        super::builder::url_maps::Delete::new(self.inner.clone())
20778    }
20779
20780    /// Returns the specified UrlMap resource.
20781    pub fn get(&self) -> super::builder::url_maps::Get {
20782        super::builder::url_maps::Get::new(self.inner.clone())
20783    }
20784
20785    /// Creates a UrlMap resource in the specified project using
20786    /// the data included in the request.
20787    pub fn insert(&self) -> super::builder::url_maps::Insert {
20788        super::builder::url_maps::Insert::new(self.inner.clone())
20789    }
20790
20791    /// Initiates a cache invalidation operation, invalidating the specified path,
20792    /// scoped to the specified UrlMap.
20793    ///
20794    /// For more information, see [Invalidating cached
20795    /// content](/cdn/docs/invalidating-cached-content).
20796    pub fn invalidate_cache(&self) -> super::builder::url_maps::InvalidateCache {
20797        super::builder::url_maps::InvalidateCache::new(self.inner.clone())
20798    }
20799
20800    /// Retrieves the list of UrlMap resources available to the specified
20801    /// project.
20802    pub fn list(&self) -> super::builder::url_maps::List {
20803        super::builder::url_maps::List::new(self.inner.clone())
20804    }
20805
20806    /// Patches the specified UrlMap resource with the data included in the
20807    /// request. This method supportsPATCH
20808    /// semantics and uses theJSON merge
20809    /// patch format and processing rules.
20810    pub fn patch(&self) -> super::builder::url_maps::Patch {
20811        super::builder::url_maps::Patch::new(self.inner.clone())
20812    }
20813
20814    /// Returns permissions that a caller has on the specified resource.
20815    pub fn test_iam_permissions(&self) -> super::builder::url_maps::TestIamPermissions {
20816        super::builder::url_maps::TestIamPermissions::new(self.inner.clone())
20817    }
20818
20819    /// Updates the specified UrlMap resource with the data included in the
20820    /// request.
20821    pub fn update(&self) -> super::builder::url_maps::Update {
20822        super::builder::url_maps::Update::new(self.inner.clone())
20823    }
20824
20825    /// Runs static validation for the UrlMap. In particular, the tests of the
20826    /// provided UrlMap will be run. Calling this method does NOT create the
20827    /// UrlMap.
20828    pub fn validate(&self) -> super::builder::url_maps::Validate {
20829        super::builder::url_maps::Validate::new(self.inner.clone())
20830    }
20831
20832    /// Retrieves the specified Operations resource.
20833    pub fn get_operation(&self) -> super::builder::url_maps::GetOperation {
20834        super::builder::url_maps::GetOperation::new(self.inner.clone())
20835    }
20836}
20837
20838/// Implements a client for the Compute Engine API.
20839///
20840/// # Example
20841/// ```
20842/// # use google_cloud_compute_v1::client::VpnGateways;
20843/// async fn sample(
20844/// ) -> anyhow::Result<()> {
20845///     let client = VpnGateways::builder().build().await?;
20846///     // use `client` to make requests to the Compute Engine API.
20847///     Ok(())
20848/// }
20849/// ```
20850///
20851/// # Service Description
20852///
20853/// Service for the `vpnGateways` resource.
20854///
20855/// The client library was generated with API version 2026-09-01.
20856///
20857/// # Configuration
20858///
20859/// To configure `VpnGateways` use the `with_*` methods in the type returned
20860/// by [builder()][VpnGateways::builder]. The default configuration should
20861/// work for most applications. Common configuration changes include
20862///
20863/// * [with_endpoint()]: by default this client uses the global default endpoint
20864///   (`https://compute.googleapis.com`). Applications using regional
20865///   endpoints or running in restricted networks (e.g. a network configured
20866///   with [Private Google Access with VPC Service Controls]) may want to
20867///   override this default.
20868/// * [with_credentials()]: by default this client uses
20869///   [Application Default Credentials]. Applications using custom
20870///   authentication may need to override this default.
20871///
20872/// [with_endpoint()]: super::builder::vpn_gateways::ClientBuilder::with_endpoint
20873/// [with_credentials()]: super::builder::vpn_gateways::ClientBuilder::with_credentials
20874/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
20875/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
20876///
20877/// # Pooling and Cloning
20878///
20879/// `VpnGateways` holds a connection pool internally, it is advised to
20880/// create one and reuse it. You do not need to wrap `VpnGateways` in
20881/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
20882/// already uses an `Arc` internally.
20883#[cfg(feature = "vpn-gateways")]
20884#[cfg_attr(docsrs, doc(cfg(feature = "vpn-gateways")))]
20885#[derive(Clone, Debug)]
20886pub struct VpnGateways {
20887    inner: std::sync::Arc<dyn super::stub::dynamic::VpnGateways>,
20888}
20889
20890#[cfg(feature = "vpn-gateways")]
20891impl VpnGateways {
20892    /// Returns a builder for [VpnGateways].
20893    ///
20894    /// ```
20895    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
20896    /// # use google_cloud_compute_v1::client::VpnGateways;
20897    /// let client = VpnGateways::builder().build().await?;
20898    /// # Ok(()) }
20899    /// ```
20900    pub fn builder() -> super::builder::vpn_gateways::ClientBuilder {
20901        crate::new_client_builder(super::builder::vpn_gateways::client::Factory)
20902    }
20903
20904    /// Creates a new client from the provided stub.
20905    ///
20906    /// The most common case for calling this function is in tests mocking the
20907    /// client's behavior.
20908    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
20909    where
20910        T: super::stub::VpnGateways + 'static,
20911    {
20912        Self { inner: stub.into() }
20913    }
20914
20915    pub(crate) async fn new(
20916        config: gaxi::options::ClientConfig,
20917    ) -> crate::ClientBuilderResult<Self> {
20918        let inner = Self::build_inner(config).await?;
20919        Ok(Self { inner })
20920    }
20921
20922    async fn build_inner(
20923        conf: gaxi::options::ClientConfig,
20924    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::VpnGateways>> {
20925        if gaxi::options::tracing_enabled(&conf) {
20926            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
20927        }
20928        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
20929    }
20930
20931    async fn build_transport(
20932        conf: gaxi::options::ClientConfig,
20933    ) -> crate::ClientBuilderResult<impl super::stub::VpnGateways> {
20934        super::transport::VpnGateways::new(conf).await
20935    }
20936
20937    async fn build_with_tracing(
20938        conf: gaxi::options::ClientConfig,
20939    ) -> crate::ClientBuilderResult<impl super::stub::VpnGateways> {
20940        Self::build_transport(conf)
20941            .await
20942            .map(super::tracing::VpnGateways::new)
20943    }
20944
20945    /// Retrieves an aggregated list of VPN gateways.
20946    ///
20947    /// To prevent failure, Google recommends that you set the
20948    /// `returnPartialSuccess` parameter to `true`.
20949    pub fn aggregated_list(&self) -> super::builder::vpn_gateways::AggregatedList {
20950        super::builder::vpn_gateways::AggregatedList::new(self.inner.clone())
20951    }
20952
20953    /// Deletes the specified VPN gateway.
20954    pub fn delete(&self) -> super::builder::vpn_gateways::Delete {
20955        super::builder::vpn_gateways::Delete::new(self.inner.clone())
20956    }
20957
20958    /// Returns the specified VPN gateway.
20959    pub fn get(&self) -> super::builder::vpn_gateways::Get {
20960        super::builder::vpn_gateways::Get::new(self.inner.clone())
20961    }
20962
20963    /// Returns the status for the specified VPN gateway.
20964    pub fn get_status(&self) -> super::builder::vpn_gateways::GetStatus {
20965        super::builder::vpn_gateways::GetStatus::new(self.inner.clone())
20966    }
20967
20968    /// Creates a VPN gateway in the specified project and region using
20969    /// the data included in the request.
20970    pub fn insert(&self) -> super::builder::vpn_gateways::Insert {
20971        super::builder::vpn_gateways::Insert::new(self.inner.clone())
20972    }
20973
20974    /// Retrieves a list of VPN gateways available to the specified
20975    /// project and region.
20976    pub fn list(&self) -> super::builder::vpn_gateways::List {
20977        super::builder::vpn_gateways::List::new(self.inner.clone())
20978    }
20979
20980    /// Sets the labels on a VpnGateway. To learn more about labels, read theLabeling
20981    /// Resources documentation.
20982    pub fn set_labels(&self) -> super::builder::vpn_gateways::SetLabels {
20983        super::builder::vpn_gateways::SetLabels::new(self.inner.clone())
20984    }
20985
20986    /// Returns permissions that a caller has on the specified resource.
20987    pub fn test_iam_permissions(&self) -> super::builder::vpn_gateways::TestIamPermissions {
20988        super::builder::vpn_gateways::TestIamPermissions::new(self.inner.clone())
20989    }
20990
20991    /// Retrieves the specified region-specific Operations resource.
20992    pub fn get_operation(&self) -> super::builder::vpn_gateways::GetOperation {
20993        super::builder::vpn_gateways::GetOperation::new(self.inner.clone())
20994    }
20995}
20996
20997/// Implements a client for the Compute Engine API.
20998///
20999/// # Example
21000/// ```
21001/// # use google_cloud_compute_v1::client::VpnTunnels;
21002/// async fn sample(
21003/// ) -> anyhow::Result<()> {
21004///     let client = VpnTunnels::builder().build().await?;
21005///     // use `client` to make requests to the Compute Engine API.
21006///     Ok(())
21007/// }
21008/// ```
21009///
21010/// # Service Description
21011///
21012/// Service for the `vpnTunnels` resource.
21013///
21014/// The client library was generated with API version 2026-09-01.
21015///
21016/// # Configuration
21017///
21018/// To configure `VpnTunnels` use the `with_*` methods in the type returned
21019/// by [builder()][VpnTunnels::builder]. The default configuration should
21020/// work for most applications. Common configuration changes include
21021///
21022/// * [with_endpoint()]: by default this client uses the global default endpoint
21023///   (`https://compute.googleapis.com`). Applications using regional
21024///   endpoints or running in restricted networks (e.g. a network configured
21025///   with [Private Google Access with VPC Service Controls]) may want to
21026///   override this default.
21027/// * [with_credentials()]: by default this client uses
21028///   [Application Default Credentials]. Applications using custom
21029///   authentication may need to override this default.
21030///
21031/// [with_endpoint()]: super::builder::vpn_tunnels::ClientBuilder::with_endpoint
21032/// [with_credentials()]: super::builder::vpn_tunnels::ClientBuilder::with_credentials
21033/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
21034/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
21035///
21036/// # Pooling and Cloning
21037///
21038/// `VpnTunnels` holds a connection pool internally, it is advised to
21039/// create one and reuse it. You do not need to wrap `VpnTunnels` in
21040/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
21041/// already uses an `Arc` internally.
21042#[cfg(feature = "vpn-tunnels")]
21043#[cfg_attr(docsrs, doc(cfg(feature = "vpn-tunnels")))]
21044#[derive(Clone, Debug)]
21045pub struct VpnTunnels {
21046    inner: std::sync::Arc<dyn super::stub::dynamic::VpnTunnels>,
21047}
21048
21049#[cfg(feature = "vpn-tunnels")]
21050impl VpnTunnels {
21051    /// Returns a builder for [VpnTunnels].
21052    ///
21053    /// ```
21054    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
21055    /// # use google_cloud_compute_v1::client::VpnTunnels;
21056    /// let client = VpnTunnels::builder().build().await?;
21057    /// # Ok(()) }
21058    /// ```
21059    pub fn builder() -> super::builder::vpn_tunnels::ClientBuilder {
21060        crate::new_client_builder(super::builder::vpn_tunnels::client::Factory)
21061    }
21062
21063    /// Creates a new client from the provided stub.
21064    ///
21065    /// The most common case for calling this function is in tests mocking the
21066    /// client's behavior.
21067    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
21068    where
21069        T: super::stub::VpnTunnels + 'static,
21070    {
21071        Self { inner: stub.into() }
21072    }
21073
21074    pub(crate) async fn new(
21075        config: gaxi::options::ClientConfig,
21076    ) -> crate::ClientBuilderResult<Self> {
21077        let inner = Self::build_inner(config).await?;
21078        Ok(Self { inner })
21079    }
21080
21081    async fn build_inner(
21082        conf: gaxi::options::ClientConfig,
21083    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::VpnTunnels>> {
21084        if gaxi::options::tracing_enabled(&conf) {
21085            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
21086        }
21087        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
21088    }
21089
21090    async fn build_transport(
21091        conf: gaxi::options::ClientConfig,
21092    ) -> crate::ClientBuilderResult<impl super::stub::VpnTunnels> {
21093        super::transport::VpnTunnels::new(conf).await
21094    }
21095
21096    async fn build_with_tracing(
21097        conf: gaxi::options::ClientConfig,
21098    ) -> crate::ClientBuilderResult<impl super::stub::VpnTunnels> {
21099        Self::build_transport(conf)
21100            .await
21101            .map(super::tracing::VpnTunnels::new)
21102    }
21103
21104    /// Retrieves an aggregated list of VPN tunnels.
21105    ///
21106    /// To prevent failure, Google recommends that you set the
21107    /// `returnPartialSuccess` parameter to `true`.
21108    pub fn aggregated_list(&self) -> super::builder::vpn_tunnels::AggregatedList {
21109        super::builder::vpn_tunnels::AggregatedList::new(self.inner.clone())
21110    }
21111
21112    /// Deletes the specified VpnTunnel resource.
21113    pub fn delete(&self) -> super::builder::vpn_tunnels::Delete {
21114        super::builder::vpn_tunnels::Delete::new(self.inner.clone())
21115    }
21116
21117    /// Returns the specified VpnTunnel resource.
21118    pub fn get(&self) -> super::builder::vpn_tunnels::Get {
21119        super::builder::vpn_tunnels::Get::new(self.inner.clone())
21120    }
21121
21122    /// Creates a VpnTunnel resource in the specified project and region using
21123    /// the data included in the request.
21124    pub fn insert(&self) -> super::builder::vpn_tunnels::Insert {
21125        super::builder::vpn_tunnels::Insert::new(self.inner.clone())
21126    }
21127
21128    /// Retrieves a list of VpnTunnel resources contained in the specified
21129    /// project and region.
21130    pub fn list(&self) -> super::builder::vpn_tunnels::List {
21131        super::builder::vpn_tunnels::List::new(self.inner.clone())
21132    }
21133
21134    /// Sets the labels on a VpnTunnel. To learn more about labels, read theLabeling
21135    /// Resources documentation.
21136    pub fn set_labels(&self) -> super::builder::vpn_tunnels::SetLabels {
21137        super::builder::vpn_tunnels::SetLabels::new(self.inner.clone())
21138    }
21139
21140    /// Retrieves the specified region-specific Operations resource.
21141    pub fn get_operation(&self) -> super::builder::vpn_tunnels::GetOperation {
21142        super::builder::vpn_tunnels::GetOperation::new(self.inner.clone())
21143    }
21144}
21145
21146/// Implements a client for the Compute Engine API.
21147///
21148/// # Example
21149/// ```
21150/// # use google_cloud_compute_v1::client::WireGroups;
21151/// async fn sample(
21152/// ) -> anyhow::Result<()> {
21153///     let client = WireGroups::builder().build().await?;
21154///     // use `client` to make requests to the Compute Engine API.
21155///     Ok(())
21156/// }
21157/// ```
21158///
21159/// # Service Description
21160///
21161/// Service for the `wireGroups` resource.
21162///
21163/// The client library was generated with API version 2026-09-01.
21164///
21165/// # Configuration
21166///
21167/// To configure `WireGroups` use the `with_*` methods in the type returned
21168/// by [builder()][WireGroups::builder]. The default configuration should
21169/// work for most applications. Common configuration changes include
21170///
21171/// * [with_endpoint()]: by default this client uses the global default endpoint
21172///   (`https://compute.googleapis.com`). Applications using regional
21173///   endpoints or running in restricted networks (e.g. a network configured
21174///   with [Private Google Access with VPC Service Controls]) may want to
21175///   override this default.
21176/// * [with_credentials()]: by default this client uses
21177///   [Application Default Credentials]. Applications using custom
21178///   authentication may need to override this default.
21179///
21180/// [with_endpoint()]: super::builder::wire_groups::ClientBuilder::with_endpoint
21181/// [with_credentials()]: super::builder::wire_groups::ClientBuilder::with_credentials
21182/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
21183/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
21184///
21185/// # Pooling and Cloning
21186///
21187/// `WireGroups` holds a connection pool internally, it is advised to
21188/// create one and reuse it. You do not need to wrap `WireGroups` in
21189/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
21190/// already uses an `Arc` internally.
21191#[cfg(feature = "wire-groups")]
21192#[cfg_attr(docsrs, doc(cfg(feature = "wire-groups")))]
21193#[derive(Clone, Debug)]
21194pub struct WireGroups {
21195    inner: std::sync::Arc<dyn super::stub::dynamic::WireGroups>,
21196}
21197
21198#[cfg(feature = "wire-groups")]
21199impl WireGroups {
21200    /// Returns a builder for [WireGroups].
21201    ///
21202    /// ```
21203    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
21204    /// # use google_cloud_compute_v1::client::WireGroups;
21205    /// let client = WireGroups::builder().build().await?;
21206    /// # Ok(()) }
21207    /// ```
21208    pub fn builder() -> super::builder::wire_groups::ClientBuilder {
21209        crate::new_client_builder(super::builder::wire_groups::client::Factory)
21210    }
21211
21212    /// Creates a new client from the provided stub.
21213    ///
21214    /// The most common case for calling this function is in tests mocking the
21215    /// client's behavior.
21216    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
21217    where
21218        T: super::stub::WireGroups + 'static,
21219    {
21220        Self { inner: stub.into() }
21221    }
21222
21223    pub(crate) async fn new(
21224        config: gaxi::options::ClientConfig,
21225    ) -> crate::ClientBuilderResult<Self> {
21226        let inner = Self::build_inner(config).await?;
21227        Ok(Self { inner })
21228    }
21229
21230    async fn build_inner(
21231        conf: gaxi::options::ClientConfig,
21232    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::WireGroups>> {
21233        if gaxi::options::tracing_enabled(&conf) {
21234            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
21235        }
21236        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
21237    }
21238
21239    async fn build_transport(
21240        conf: gaxi::options::ClientConfig,
21241    ) -> crate::ClientBuilderResult<impl super::stub::WireGroups> {
21242        super::transport::WireGroups::new(conf).await
21243    }
21244
21245    async fn build_with_tracing(
21246        conf: gaxi::options::ClientConfig,
21247    ) -> crate::ClientBuilderResult<impl super::stub::WireGroups> {
21248        Self::build_transport(conf)
21249            .await
21250            .map(super::tracing::WireGroups::new)
21251    }
21252
21253    /// Deletes the specified wire group in the given scope.
21254    pub fn delete(&self) -> super::builder::wire_groups::Delete {
21255        super::builder::wire_groups::Delete::new(self.inner.clone())
21256    }
21257
21258    /// Gets the specified wire group resource in the given scope.
21259    pub fn get(&self) -> super::builder::wire_groups::Get {
21260        super::builder::wire_groups::Get::new(self.inner.clone())
21261    }
21262
21263    /// Creates a wire group in the specified project in the given scope
21264    /// using the parameters that are included in the request.
21265    pub fn insert(&self) -> super::builder::wire_groups::Insert {
21266        super::builder::wire_groups::Insert::new(self.inner.clone())
21267    }
21268
21269    /// Lists the wire groups for a project in the given scope.
21270    pub fn list(&self) -> super::builder::wire_groups::List {
21271        super::builder::wire_groups::List::new(self.inner.clone())
21272    }
21273
21274    /// Updates the specified wire group resource with the data included in the
21275    /// request. This method supportsPATCH
21276    /// semantics and usesJSON merge
21277    /// patch format and processing rules.
21278    pub fn patch(&self) -> super::builder::wire_groups::Patch {
21279        super::builder::wire_groups::Patch::new(self.inner.clone())
21280    }
21281
21282    /// Retrieves the specified Operations resource.
21283    pub fn get_operation(&self) -> super::builder::wire_groups::GetOperation {
21284        super::builder::wire_groups::GetOperation::new(self.inner.clone())
21285    }
21286}
21287
21288/// Implements a client for the Compute Engine API.
21289///
21290/// # Example
21291/// ```
21292/// # use google_cloud_compute_v1::client::ZoneOperations;
21293/// async fn sample(
21294/// ) -> anyhow::Result<()> {
21295///     let client = ZoneOperations::builder().build().await?;
21296///     // use `client` to make requests to the Compute Engine API.
21297///     Ok(())
21298/// }
21299/// ```
21300///
21301/// # Service Description
21302///
21303/// Service for the `zoneOperations` resource.
21304///
21305/// The client library was generated with API version 2026-09-01.
21306///
21307/// # Configuration
21308///
21309/// To configure `ZoneOperations` use the `with_*` methods in the type returned
21310/// by [builder()][ZoneOperations::builder]. The default configuration should
21311/// work for most applications. Common configuration changes include
21312///
21313/// * [with_endpoint()]: by default this client uses the global default endpoint
21314///   (`https://compute.googleapis.com`). Applications using regional
21315///   endpoints or running in restricted networks (e.g. a network configured
21316///   with [Private Google Access with VPC Service Controls]) may want to
21317///   override this default.
21318/// * [with_credentials()]: by default this client uses
21319///   [Application Default Credentials]. Applications using custom
21320///   authentication may need to override this default.
21321///
21322/// [with_endpoint()]: super::builder::zone_operations::ClientBuilder::with_endpoint
21323/// [with_credentials()]: super::builder::zone_operations::ClientBuilder::with_credentials
21324/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
21325/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
21326///
21327/// # Pooling and Cloning
21328///
21329/// `ZoneOperations` holds a connection pool internally, it is advised to
21330/// create one and reuse it. You do not need to wrap `ZoneOperations` in
21331/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
21332/// already uses an `Arc` internally.
21333#[cfg(feature = "zone-operations")]
21334#[cfg_attr(docsrs, doc(cfg(feature = "zone-operations")))]
21335#[derive(Clone, Debug)]
21336pub struct ZoneOperations {
21337    inner: std::sync::Arc<dyn super::stub::dynamic::ZoneOperations>,
21338}
21339
21340#[cfg(feature = "zone-operations")]
21341impl ZoneOperations {
21342    /// Returns a builder for [ZoneOperations].
21343    ///
21344    /// ```
21345    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
21346    /// # use google_cloud_compute_v1::client::ZoneOperations;
21347    /// let client = ZoneOperations::builder().build().await?;
21348    /// # Ok(()) }
21349    /// ```
21350    pub fn builder() -> super::builder::zone_operations::ClientBuilder {
21351        crate::new_client_builder(super::builder::zone_operations::client::Factory)
21352    }
21353
21354    /// Creates a new client from the provided stub.
21355    ///
21356    /// The most common case for calling this function is in tests mocking the
21357    /// client's behavior.
21358    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
21359    where
21360        T: super::stub::ZoneOperations + 'static,
21361    {
21362        Self { inner: stub.into() }
21363    }
21364
21365    pub(crate) async fn new(
21366        config: gaxi::options::ClientConfig,
21367    ) -> crate::ClientBuilderResult<Self> {
21368        let inner = Self::build_inner(config).await?;
21369        Ok(Self { inner })
21370    }
21371
21372    async fn build_inner(
21373        conf: gaxi::options::ClientConfig,
21374    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::ZoneOperations>> {
21375        if gaxi::options::tracing_enabled(&conf) {
21376            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
21377        }
21378        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
21379    }
21380
21381    async fn build_transport(
21382        conf: gaxi::options::ClientConfig,
21383    ) -> crate::ClientBuilderResult<impl super::stub::ZoneOperations> {
21384        super::transport::ZoneOperations::new(conf).await
21385    }
21386
21387    async fn build_with_tracing(
21388        conf: gaxi::options::ClientConfig,
21389    ) -> crate::ClientBuilderResult<impl super::stub::ZoneOperations> {
21390        Self::build_transport(conf)
21391            .await
21392            .map(super::tracing::ZoneOperations::new)
21393    }
21394
21395    /// Deletes the specified zone-specific Operations resource.
21396    pub fn delete(&self) -> super::builder::zone_operations::Delete {
21397        super::builder::zone_operations::Delete::new(self.inner.clone())
21398    }
21399
21400    /// Retrieves the specified zone-specific Operations resource.
21401    pub fn get(&self) -> super::builder::zone_operations::Get {
21402        super::builder::zone_operations::Get::new(self.inner.clone())
21403    }
21404
21405    /// Retrieves a list of Operation resources contained within
21406    /// the specified zone.
21407    pub fn list(&self) -> super::builder::zone_operations::List {
21408        super::builder::zone_operations::List::new(self.inner.clone())
21409    }
21410
21411    /// Waits for the specified Operation resource to return as `DONE`
21412    /// or for the request to approach the 2 minute deadline, and retrieves the
21413    /// specified Operation resource. This method waits for no more than the
21414    /// 2 minutes and then returns the current state of the
21415    /// operation, which might be `DONE` or still in progress.
21416    ///
21417    /// This method is called on a best-effort basis. Specifically:
21418    ///
21419    /// ```norust
21420    /// - In uncommon cases, when the server is overloaded, the request might
21421    /// return before the default deadline is reached, or might return after zero
21422    /// seconds.
21423    /// ```
21424    ///
21425    /// - If the default deadline is reached, there is no guarantee that the
21426    ///   operation is actually done when the method returns. Be prepared to retry
21427    ///   if the operation is not `DONE`.
21428    pub fn wait(&self) -> super::builder::zone_operations::Wait {
21429        super::builder::zone_operations::Wait::new(self.inner.clone())
21430    }
21431}
21432
21433/// Implements a client for the Compute Engine API.
21434///
21435/// # Example
21436/// ```
21437/// # use google_cloud_compute_v1::client::ZoneVmExtensionPolicies;
21438/// async fn sample(
21439/// ) -> anyhow::Result<()> {
21440///     let client = ZoneVmExtensionPolicies::builder().build().await?;
21441///     // use `client` to make requests to the Compute Engine API.
21442///     Ok(())
21443/// }
21444/// ```
21445///
21446/// # Service Description
21447///
21448/// Service for the `zoneVmExtensionPolicies` resource.
21449///
21450/// The client library was generated with API version 2026-09-01.
21451///
21452/// # Configuration
21453///
21454/// To configure `ZoneVmExtensionPolicies` use the `with_*` methods in the type returned
21455/// by [builder()][ZoneVmExtensionPolicies::builder]. The default configuration should
21456/// work for most applications. Common configuration changes include
21457///
21458/// * [with_endpoint()]: by default this client uses the global default endpoint
21459///   (`https://compute.googleapis.com`). Applications using regional
21460///   endpoints or running in restricted networks (e.g. a network configured
21461///   with [Private Google Access with VPC Service Controls]) may want to
21462///   override this default.
21463/// * [with_credentials()]: by default this client uses
21464///   [Application Default Credentials]. Applications using custom
21465///   authentication may need to override this default.
21466///
21467/// [with_endpoint()]: super::builder::zone_vm_extension_policies::ClientBuilder::with_endpoint
21468/// [with_credentials()]: super::builder::zone_vm_extension_policies::ClientBuilder::with_credentials
21469/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
21470/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
21471///
21472/// # Pooling and Cloning
21473///
21474/// `ZoneVmExtensionPolicies` holds a connection pool internally, it is advised to
21475/// create one and reuse it. You do not need to wrap `ZoneVmExtensionPolicies` in
21476/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
21477/// already uses an `Arc` internally.
21478#[cfg(feature = "zone-vm-extension-policies")]
21479#[cfg_attr(docsrs, doc(cfg(feature = "zone-vm-extension-policies")))]
21480#[derive(Clone, Debug)]
21481pub struct ZoneVmExtensionPolicies {
21482    inner: std::sync::Arc<dyn super::stub::dynamic::ZoneVmExtensionPolicies>,
21483}
21484
21485#[cfg(feature = "zone-vm-extension-policies")]
21486impl ZoneVmExtensionPolicies {
21487    /// Returns a builder for [ZoneVmExtensionPolicies].
21488    ///
21489    /// ```
21490    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
21491    /// # use google_cloud_compute_v1::client::ZoneVmExtensionPolicies;
21492    /// let client = ZoneVmExtensionPolicies::builder().build().await?;
21493    /// # Ok(()) }
21494    /// ```
21495    pub fn builder() -> super::builder::zone_vm_extension_policies::ClientBuilder {
21496        crate::new_client_builder(super::builder::zone_vm_extension_policies::client::Factory)
21497    }
21498
21499    /// Creates a new client from the provided stub.
21500    ///
21501    /// The most common case for calling this function is in tests mocking the
21502    /// client's behavior.
21503    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
21504    where
21505        T: super::stub::ZoneVmExtensionPolicies + 'static,
21506    {
21507        Self { inner: stub.into() }
21508    }
21509
21510    pub(crate) async fn new(
21511        config: gaxi::options::ClientConfig,
21512    ) -> crate::ClientBuilderResult<Self> {
21513        let inner = Self::build_inner(config).await?;
21514        Ok(Self { inner })
21515    }
21516
21517    async fn build_inner(
21518        conf: gaxi::options::ClientConfig,
21519    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::ZoneVmExtensionPolicies>>
21520    {
21521        if gaxi::options::tracing_enabled(&conf) {
21522            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
21523        }
21524        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
21525    }
21526
21527    async fn build_transport(
21528        conf: gaxi::options::ClientConfig,
21529    ) -> crate::ClientBuilderResult<impl super::stub::ZoneVmExtensionPolicies> {
21530        super::transport::ZoneVmExtensionPolicies::new(conf).await
21531    }
21532
21533    async fn build_with_tracing(
21534        conf: gaxi::options::ClientConfig,
21535    ) -> crate::ClientBuilderResult<impl super::stub::ZoneVmExtensionPolicies> {
21536        Self::build_transport(conf)
21537            .await
21538            .map(super::tracing::ZoneVmExtensionPolicies::new)
21539    }
21540
21541    /// Deletes a specified zone VM extension policy within a project.
21542    pub fn delete(&self) -> super::builder::zone_vm_extension_policies::Delete {
21543        super::builder::zone_vm_extension_policies::Delete::new(self.inner.clone())
21544    }
21545
21546    /// Retrieves details of a specific zone VM extension policy within a project.
21547    pub fn get(&self) -> super::builder::zone_vm_extension_policies::Get {
21548        super::builder::zone_vm_extension_policies::Get::new(self.inner.clone())
21549    }
21550
21551    /// Creates a new zone-level VM extension policy within a project.
21552    pub fn insert(&self) -> super::builder::zone_vm_extension_policies::Insert {
21553        super::builder::zone_vm_extension_policies::Insert::new(self.inner.clone())
21554    }
21555
21556    /// Lists all VM extension policies within a specific zone for a project.
21557    pub fn list(&self) -> super::builder::zone_vm_extension_policies::List {
21558        super::builder::zone_vm_extension_policies::List::new(self.inner.clone())
21559    }
21560
21561    /// Modifies an existing zone VM extension policy within a project.
21562    pub fn update(&self) -> super::builder::zone_vm_extension_policies::Update {
21563        super::builder::zone_vm_extension_policies::Update::new(self.inner.clone())
21564    }
21565
21566    /// Retrieves the specified zone-specific Operations resource.
21567    pub fn get_operation(&self) -> super::builder::zone_vm_extension_policies::GetOperation {
21568        super::builder::zone_vm_extension_policies::GetOperation::new(self.inner.clone())
21569    }
21570}
21571
21572/// Implements a client for the Compute Engine API.
21573///
21574/// # Example
21575/// ```
21576/// # use google_cloud_compute_v1::client::Zones;
21577/// async fn sample(
21578/// ) -> anyhow::Result<()> {
21579///     let client = Zones::builder().build().await?;
21580///     // use `client` to make requests to the Compute Engine API.
21581///     Ok(())
21582/// }
21583/// ```
21584///
21585/// # Service Description
21586///
21587/// Service for the `zones` resource.
21588///
21589/// The client library was generated with API version 2026-09-01.
21590///
21591/// # Configuration
21592///
21593/// To configure `Zones` use the `with_*` methods in the type returned
21594/// by [builder()][Zones::builder]. The default configuration should
21595/// work for most applications. Common configuration changes include
21596///
21597/// * [with_endpoint()]: by default this client uses the global default endpoint
21598///   (`https://compute.googleapis.com`). Applications using regional
21599///   endpoints or running in restricted networks (e.g. a network configured
21600///   with [Private Google Access with VPC Service Controls]) may want to
21601///   override this default.
21602/// * [with_credentials()]: by default this client uses
21603///   [Application Default Credentials]. Applications using custom
21604///   authentication may need to override this default.
21605///
21606/// [with_endpoint()]: super::builder::zones::ClientBuilder::with_endpoint
21607/// [with_credentials()]: super::builder::zones::ClientBuilder::with_credentials
21608/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
21609/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
21610///
21611/// # Pooling and Cloning
21612///
21613/// `Zones` holds a connection pool internally, it is advised to
21614/// create one and reuse it. You do not need to wrap `Zones` in
21615/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
21616/// already uses an `Arc` internally.
21617#[cfg(feature = "zones")]
21618#[cfg_attr(docsrs, doc(cfg(feature = "zones")))]
21619#[derive(Clone, Debug)]
21620pub struct Zones {
21621    inner: std::sync::Arc<dyn super::stub::dynamic::Zones>,
21622}
21623
21624#[cfg(feature = "zones")]
21625impl Zones {
21626    /// Returns a builder for [Zones].
21627    ///
21628    /// ```
21629    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
21630    /// # use google_cloud_compute_v1::client::Zones;
21631    /// let client = Zones::builder().build().await?;
21632    /// # Ok(()) }
21633    /// ```
21634    pub fn builder() -> super::builder::zones::ClientBuilder {
21635        crate::new_client_builder(super::builder::zones::client::Factory)
21636    }
21637
21638    /// Creates a new client from the provided stub.
21639    ///
21640    /// The most common case for calling this function is in tests mocking the
21641    /// client's behavior.
21642    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
21643    where
21644        T: super::stub::Zones + 'static,
21645    {
21646        Self { inner: stub.into() }
21647    }
21648
21649    pub(crate) async fn new(
21650        config: gaxi::options::ClientConfig,
21651    ) -> crate::ClientBuilderResult<Self> {
21652        let inner = Self::build_inner(config).await?;
21653        Ok(Self { inner })
21654    }
21655
21656    async fn build_inner(
21657        conf: gaxi::options::ClientConfig,
21658    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::Zones>> {
21659        if gaxi::options::tracing_enabled(&conf) {
21660            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
21661        }
21662        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
21663    }
21664
21665    async fn build_transport(
21666        conf: gaxi::options::ClientConfig,
21667    ) -> crate::ClientBuilderResult<impl super::stub::Zones> {
21668        super::transport::Zones::new(conf).await
21669    }
21670
21671    async fn build_with_tracing(
21672        conf: gaxi::options::ClientConfig,
21673    ) -> crate::ClientBuilderResult<impl super::stub::Zones> {
21674        Self::build_transport(conf)
21675            .await
21676            .map(super::tracing::Zones::new)
21677    }
21678
21679    /// Returns the specified Zone resource.
21680    pub fn get(&self) -> super::builder::zones::Get {
21681        super::builder::zones::Get::new(self.inner.clone())
21682    }
21683
21684    /// Retrieves the list of Zone resources available to the specified project.
21685    pub fn list(&self) -> super::builder::zones::List {
21686        super::builder::zones::List::new(self.inner.clone())
21687    }
21688}