google_cloud_deploy_v1/
client.rs

1// Copyright 2025 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// Code generated by sidekick. DO NOT EDIT.
16#![allow(rustdoc::redundant_explicit_links)]
17#![allow(rustdoc::broken_intra_doc_links)]
18
19/// Implements a client for the Cloud Deploy API.
20///
21/// # Example
22/// ```
23/// # tokio_test::block_on(async {
24/// # use google_cloud_deploy_v1::client::CloudDeploy;
25/// let client = CloudDeploy::builder().build().await?;
26/// // use `client` to make requests to the Cloud Deploy API.
27/// # gax::client_builder::Result::<()>::Ok(()) });
28/// ```
29///
30/// # Service Description
31///
32/// CloudDeploy service creates and manages Continuous Delivery operations
33/// on Google Cloud Platform via Skaffold (<https://skaffold.dev>).
34///
35/// # Configuration
36///
37/// To configure `CloudDeploy` use the `with_*` methods in the type returned
38/// by [builder()][CloudDeploy::builder]. The default configuration should
39/// work for most applications. Common configuration changes include
40///
41/// * [with_endpoint()]: by default this client uses the global default endpoint
42///   (`https://clouddeploy.googleapis.com`). Applications using regional
43///   endpoints or running in restricted networks (e.g. a network configured
44//    with [Private Google Access with VPC Service Controls]) may want to
45///   override this default.
46/// * [with_credentials()]: by default this client uses
47///   [Application Default Credentials]. Applications using custom
48///   authentication may need to override this default.
49///
50/// [with_endpoint()]: super::builder::cloud_deploy::ClientBuilder::with_endpoint
51/// [with_credentials()]: super::builder::cloud_deploy::ClientBuilder::credentials
52/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
53/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
54///
55/// # Pooling and Cloning
56///
57/// `CloudDeploy` holds a connection pool internally, it is advised to
58/// create one and the reuse it.  You do not need to wrap `CloudDeploy` in
59/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
60/// already uses an `Arc` internally.
61#[derive(Clone, Debug)]
62pub struct CloudDeploy {
63    inner: std::sync::Arc<dyn super::stub::dynamic::CloudDeploy>,
64}
65
66impl CloudDeploy {
67    /// Returns a builder for [CloudDeploy].
68    ///
69    /// ```
70    /// # tokio_test::block_on(async {
71    /// # use google_cloud_deploy_v1::client::CloudDeploy;
72    /// let client = CloudDeploy::builder().build().await?;
73    /// # gax::client_builder::Result::<()>::Ok(()) });
74    /// ```
75    pub fn builder() -> super::builder::cloud_deploy::ClientBuilder {
76        gax::client_builder::internal::new_builder(super::builder::cloud_deploy::client::Factory)
77    }
78
79    /// Creates a new client from the provided stub.
80    ///
81    /// The most common case for calling this function is in tests mocking the
82    /// client's behavior.
83    pub fn from_stub<T>(stub: T) -> Self
84    where
85        T: super::stub::CloudDeploy + 'static,
86    {
87        Self {
88            inner: std::sync::Arc::new(stub),
89        }
90    }
91
92    pub(crate) async fn new(
93        config: gaxi::options::ClientConfig,
94    ) -> gax::client_builder::Result<Self> {
95        let inner = Self::build_inner(config).await?;
96        Ok(Self { inner })
97    }
98
99    async fn build_inner(
100        conf: gaxi::options::ClientConfig,
101    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::CloudDeploy>> {
102        if gaxi::options::tracing_enabled(&conf) {
103            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
104        }
105        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
106    }
107
108    async fn build_transport(
109        conf: gaxi::options::ClientConfig,
110    ) -> gax::client_builder::Result<impl super::stub::CloudDeploy> {
111        super::transport::CloudDeploy::new(conf).await
112    }
113
114    async fn build_with_tracing(
115        conf: gaxi::options::ClientConfig,
116    ) -> gax::client_builder::Result<impl super::stub::CloudDeploy> {
117        Self::build_transport(conf)
118            .await
119            .map(super::tracing::CloudDeploy::new)
120    }
121
122    /// Lists DeliveryPipelines in a given project and location.
123    pub fn list_delivery_pipelines(&self) -> super::builder::cloud_deploy::ListDeliveryPipelines {
124        super::builder::cloud_deploy::ListDeliveryPipelines::new(self.inner.clone())
125    }
126
127    /// Gets details of a single DeliveryPipeline.
128    pub fn get_delivery_pipeline(&self) -> super::builder::cloud_deploy::GetDeliveryPipeline {
129        super::builder::cloud_deploy::GetDeliveryPipeline::new(self.inner.clone())
130    }
131
132    /// Creates a new DeliveryPipeline in a given project and location.
133    ///
134    /// # Long running operations
135    ///
136    /// This method is used to start, and/or poll a [long-running Operation].
137    /// The [Working with long-running operations] chapter in the [user guide]
138    /// covers these operations in detail.
139    ///
140    /// [long-running operation]: https://google.aip.dev/151
141    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
142    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
143    pub fn create_delivery_pipeline(&self) -> super::builder::cloud_deploy::CreateDeliveryPipeline {
144        super::builder::cloud_deploy::CreateDeliveryPipeline::new(self.inner.clone())
145    }
146
147    /// Updates the parameters of a single DeliveryPipeline.
148    ///
149    /// # Long running operations
150    ///
151    /// This method is used to start, and/or poll a [long-running Operation].
152    /// The [Working with long-running operations] chapter in the [user guide]
153    /// covers these operations in detail.
154    ///
155    /// [long-running operation]: https://google.aip.dev/151
156    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
157    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
158    pub fn update_delivery_pipeline(&self) -> super::builder::cloud_deploy::UpdateDeliveryPipeline {
159        super::builder::cloud_deploy::UpdateDeliveryPipeline::new(self.inner.clone())
160    }
161
162    /// Deletes a single DeliveryPipeline.
163    ///
164    /// # Long running operations
165    ///
166    /// This method is used to start, and/or poll a [long-running Operation].
167    /// The [Working with long-running operations] chapter in the [user guide]
168    /// covers these operations in detail.
169    ///
170    /// [long-running operation]: https://google.aip.dev/151
171    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
172    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
173    pub fn delete_delivery_pipeline(&self) -> super::builder::cloud_deploy::DeleteDeliveryPipeline {
174        super::builder::cloud_deploy::DeleteDeliveryPipeline::new(self.inner.clone())
175    }
176
177    /// Lists Targets in a given project and location.
178    pub fn list_targets(&self) -> super::builder::cloud_deploy::ListTargets {
179        super::builder::cloud_deploy::ListTargets::new(self.inner.clone())
180    }
181
182    /// Creates a `Rollout` to roll back the specified target.
183    pub fn rollback_target(&self) -> super::builder::cloud_deploy::RollbackTarget {
184        super::builder::cloud_deploy::RollbackTarget::new(self.inner.clone())
185    }
186
187    /// Gets details of a single Target.
188    pub fn get_target(&self) -> super::builder::cloud_deploy::GetTarget {
189        super::builder::cloud_deploy::GetTarget::new(self.inner.clone())
190    }
191
192    /// Creates a new Target in a given project and location.
193    ///
194    /// # Long running operations
195    ///
196    /// This method is used to start, and/or poll a [long-running Operation].
197    /// The [Working with long-running operations] chapter in the [user guide]
198    /// covers these operations in detail.
199    ///
200    /// [long-running operation]: https://google.aip.dev/151
201    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
202    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
203    pub fn create_target(&self) -> super::builder::cloud_deploy::CreateTarget {
204        super::builder::cloud_deploy::CreateTarget::new(self.inner.clone())
205    }
206
207    /// Updates the parameters of a single Target.
208    ///
209    /// # Long running operations
210    ///
211    /// This method is used to start, and/or poll a [long-running Operation].
212    /// The [Working with long-running operations] chapter in the [user guide]
213    /// covers these operations in detail.
214    ///
215    /// [long-running operation]: https://google.aip.dev/151
216    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
217    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
218    pub fn update_target(&self) -> super::builder::cloud_deploy::UpdateTarget {
219        super::builder::cloud_deploy::UpdateTarget::new(self.inner.clone())
220    }
221
222    /// Deletes a single Target.
223    ///
224    /// # Long running operations
225    ///
226    /// This method is used to start, and/or poll a [long-running Operation].
227    /// The [Working with long-running operations] chapter in the [user guide]
228    /// covers these operations in detail.
229    ///
230    /// [long-running operation]: https://google.aip.dev/151
231    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
232    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
233    pub fn delete_target(&self) -> super::builder::cloud_deploy::DeleteTarget {
234        super::builder::cloud_deploy::DeleteTarget::new(self.inner.clone())
235    }
236
237    /// Lists CustomTargetTypes in a given project and location.
238    pub fn list_custom_target_types(&self) -> super::builder::cloud_deploy::ListCustomTargetTypes {
239        super::builder::cloud_deploy::ListCustomTargetTypes::new(self.inner.clone())
240    }
241
242    /// Gets details of a single CustomTargetType.
243    pub fn get_custom_target_type(&self) -> super::builder::cloud_deploy::GetCustomTargetType {
244        super::builder::cloud_deploy::GetCustomTargetType::new(self.inner.clone())
245    }
246
247    /// Creates a new CustomTargetType in a given project and location.
248    ///
249    /// # Long running operations
250    ///
251    /// This method is used to start, and/or poll a [long-running Operation].
252    /// The [Working with long-running operations] chapter in the [user guide]
253    /// covers these operations in detail.
254    ///
255    /// [long-running operation]: https://google.aip.dev/151
256    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
257    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
258    pub fn create_custom_target_type(
259        &self,
260    ) -> super::builder::cloud_deploy::CreateCustomTargetType {
261        super::builder::cloud_deploy::CreateCustomTargetType::new(self.inner.clone())
262    }
263
264    /// Updates a single CustomTargetType.
265    ///
266    /// # Long running operations
267    ///
268    /// This method is used to start, and/or poll a [long-running Operation].
269    /// The [Working with long-running operations] chapter in the [user guide]
270    /// covers these operations in detail.
271    ///
272    /// [long-running operation]: https://google.aip.dev/151
273    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
274    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
275    pub fn update_custom_target_type(
276        &self,
277    ) -> super::builder::cloud_deploy::UpdateCustomTargetType {
278        super::builder::cloud_deploy::UpdateCustomTargetType::new(self.inner.clone())
279    }
280
281    /// Deletes a single CustomTargetType.
282    ///
283    /// # Long running operations
284    ///
285    /// This method is used to start, and/or poll a [long-running Operation].
286    /// The [Working with long-running operations] chapter in the [user guide]
287    /// covers these operations in detail.
288    ///
289    /// [long-running operation]: https://google.aip.dev/151
290    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
291    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
292    pub fn delete_custom_target_type(
293        &self,
294    ) -> super::builder::cloud_deploy::DeleteCustomTargetType {
295        super::builder::cloud_deploy::DeleteCustomTargetType::new(self.inner.clone())
296    }
297
298    /// Lists Releases in a given project and location.
299    pub fn list_releases(&self) -> super::builder::cloud_deploy::ListReleases {
300        super::builder::cloud_deploy::ListReleases::new(self.inner.clone())
301    }
302
303    /// Gets details of a single Release.
304    pub fn get_release(&self) -> super::builder::cloud_deploy::GetRelease {
305        super::builder::cloud_deploy::GetRelease::new(self.inner.clone())
306    }
307
308    /// Creates a new Release in a given project and location.
309    ///
310    /// # Long running operations
311    ///
312    /// This method is used to start, and/or poll a [long-running Operation].
313    /// The [Working with long-running operations] chapter in the [user guide]
314    /// covers these operations in detail.
315    ///
316    /// [long-running operation]: https://google.aip.dev/151
317    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
318    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
319    pub fn create_release(&self) -> super::builder::cloud_deploy::CreateRelease {
320        super::builder::cloud_deploy::CreateRelease::new(self.inner.clone())
321    }
322
323    /// Abandons a Release in the Delivery Pipeline.
324    pub fn abandon_release(&self) -> super::builder::cloud_deploy::AbandonRelease {
325        super::builder::cloud_deploy::AbandonRelease::new(self.inner.clone())
326    }
327
328    /// Creates a new DeployPolicy in a given project and location.
329    ///
330    /// # Long running operations
331    ///
332    /// This method is used to start, and/or poll a [long-running Operation].
333    /// The [Working with long-running operations] chapter in the [user guide]
334    /// covers these operations in detail.
335    ///
336    /// [long-running operation]: https://google.aip.dev/151
337    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
338    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
339    pub fn create_deploy_policy(&self) -> super::builder::cloud_deploy::CreateDeployPolicy {
340        super::builder::cloud_deploy::CreateDeployPolicy::new(self.inner.clone())
341    }
342
343    /// Updates the parameters of a single DeployPolicy.
344    ///
345    /// # Long running operations
346    ///
347    /// This method is used to start, and/or poll a [long-running Operation].
348    /// The [Working with long-running operations] chapter in the [user guide]
349    /// covers these operations in detail.
350    ///
351    /// [long-running operation]: https://google.aip.dev/151
352    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
353    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
354    pub fn update_deploy_policy(&self) -> super::builder::cloud_deploy::UpdateDeployPolicy {
355        super::builder::cloud_deploy::UpdateDeployPolicy::new(self.inner.clone())
356    }
357
358    /// Deletes a single DeployPolicy.
359    ///
360    /// # Long running operations
361    ///
362    /// This method is used to start, and/or poll a [long-running Operation].
363    /// The [Working with long-running operations] chapter in the [user guide]
364    /// covers these operations in detail.
365    ///
366    /// [long-running operation]: https://google.aip.dev/151
367    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
368    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
369    pub fn delete_deploy_policy(&self) -> super::builder::cloud_deploy::DeleteDeployPolicy {
370        super::builder::cloud_deploy::DeleteDeployPolicy::new(self.inner.clone())
371    }
372
373    /// Lists DeployPolicies in a given project and location.
374    pub fn list_deploy_policies(&self) -> super::builder::cloud_deploy::ListDeployPolicies {
375        super::builder::cloud_deploy::ListDeployPolicies::new(self.inner.clone())
376    }
377
378    /// Gets details of a single DeployPolicy.
379    pub fn get_deploy_policy(&self) -> super::builder::cloud_deploy::GetDeployPolicy {
380        super::builder::cloud_deploy::GetDeployPolicy::new(self.inner.clone())
381    }
382
383    /// Approves a Rollout.
384    pub fn approve_rollout(&self) -> super::builder::cloud_deploy::ApproveRollout {
385        super::builder::cloud_deploy::ApproveRollout::new(self.inner.clone())
386    }
387
388    /// Advances a Rollout in a given project and location.
389    pub fn advance_rollout(&self) -> super::builder::cloud_deploy::AdvanceRollout {
390        super::builder::cloud_deploy::AdvanceRollout::new(self.inner.clone())
391    }
392
393    /// Cancels a Rollout in a given project and location.
394    pub fn cancel_rollout(&self) -> super::builder::cloud_deploy::CancelRollout {
395        super::builder::cloud_deploy::CancelRollout::new(self.inner.clone())
396    }
397
398    /// Lists Rollouts in a given project and location.
399    pub fn list_rollouts(&self) -> super::builder::cloud_deploy::ListRollouts {
400        super::builder::cloud_deploy::ListRollouts::new(self.inner.clone())
401    }
402
403    /// Gets details of a single Rollout.
404    pub fn get_rollout(&self) -> super::builder::cloud_deploy::GetRollout {
405        super::builder::cloud_deploy::GetRollout::new(self.inner.clone())
406    }
407
408    /// Creates a new Rollout in a given project and location.
409    ///
410    /// # Long running operations
411    ///
412    /// This method is used to start, and/or poll a [long-running Operation].
413    /// The [Working with long-running operations] chapter in the [user guide]
414    /// covers these operations in detail.
415    ///
416    /// [long-running operation]: https://google.aip.dev/151
417    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
418    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
419    pub fn create_rollout(&self) -> super::builder::cloud_deploy::CreateRollout {
420        super::builder::cloud_deploy::CreateRollout::new(self.inner.clone())
421    }
422
423    /// Ignores the specified Job in a Rollout.
424    pub fn ignore_job(&self) -> super::builder::cloud_deploy::IgnoreJob {
425        super::builder::cloud_deploy::IgnoreJob::new(self.inner.clone())
426    }
427
428    /// Retries the specified Job in a Rollout.
429    pub fn retry_job(&self) -> super::builder::cloud_deploy::RetryJob {
430        super::builder::cloud_deploy::RetryJob::new(self.inner.clone())
431    }
432
433    /// Lists JobRuns in a given project and location.
434    pub fn list_job_runs(&self) -> super::builder::cloud_deploy::ListJobRuns {
435        super::builder::cloud_deploy::ListJobRuns::new(self.inner.clone())
436    }
437
438    /// Gets details of a single JobRun.
439    pub fn get_job_run(&self) -> super::builder::cloud_deploy::GetJobRun {
440        super::builder::cloud_deploy::GetJobRun::new(self.inner.clone())
441    }
442
443    /// Terminates a Job Run in a given project and location.
444    pub fn terminate_job_run(&self) -> super::builder::cloud_deploy::TerminateJobRun {
445        super::builder::cloud_deploy::TerminateJobRun::new(self.inner.clone())
446    }
447
448    /// Gets the configuration for a location.
449    pub fn get_config(&self) -> super::builder::cloud_deploy::GetConfig {
450        super::builder::cloud_deploy::GetConfig::new(self.inner.clone())
451    }
452
453    /// Creates a new Automation in a given project and location.
454    ///
455    /// # Long running operations
456    ///
457    /// This method is used to start, and/or poll a [long-running Operation].
458    /// The [Working with long-running operations] chapter in the [user guide]
459    /// covers these operations in detail.
460    ///
461    /// [long-running operation]: https://google.aip.dev/151
462    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
463    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
464    pub fn create_automation(&self) -> super::builder::cloud_deploy::CreateAutomation {
465        super::builder::cloud_deploy::CreateAutomation::new(self.inner.clone())
466    }
467
468    /// Updates the parameters of a single Automation resource.
469    ///
470    /// # Long running operations
471    ///
472    /// This method is used to start, and/or poll a [long-running Operation].
473    /// The [Working with long-running operations] chapter in the [user guide]
474    /// covers these operations in detail.
475    ///
476    /// [long-running operation]: https://google.aip.dev/151
477    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
478    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
479    pub fn update_automation(&self) -> super::builder::cloud_deploy::UpdateAutomation {
480        super::builder::cloud_deploy::UpdateAutomation::new(self.inner.clone())
481    }
482
483    /// Deletes a single Automation resource.
484    ///
485    /// # Long running operations
486    ///
487    /// This method is used to start, and/or poll a [long-running Operation].
488    /// The [Working with long-running operations] chapter in the [user guide]
489    /// covers these operations in detail.
490    ///
491    /// [long-running operation]: https://google.aip.dev/151
492    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
493    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
494    pub fn delete_automation(&self) -> super::builder::cloud_deploy::DeleteAutomation {
495        super::builder::cloud_deploy::DeleteAutomation::new(self.inner.clone())
496    }
497
498    /// Gets details of a single Automation.
499    pub fn get_automation(&self) -> super::builder::cloud_deploy::GetAutomation {
500        super::builder::cloud_deploy::GetAutomation::new(self.inner.clone())
501    }
502
503    /// Lists Automations in a given project and location.
504    pub fn list_automations(&self) -> super::builder::cloud_deploy::ListAutomations {
505        super::builder::cloud_deploy::ListAutomations::new(self.inner.clone())
506    }
507
508    /// Gets details of a single AutomationRun.
509    pub fn get_automation_run(&self) -> super::builder::cloud_deploy::GetAutomationRun {
510        super::builder::cloud_deploy::GetAutomationRun::new(self.inner.clone())
511    }
512
513    /// Lists AutomationRuns in a given project and location.
514    pub fn list_automation_runs(&self) -> super::builder::cloud_deploy::ListAutomationRuns {
515        super::builder::cloud_deploy::ListAutomationRuns::new(self.inner.clone())
516    }
517
518    /// Cancels an AutomationRun. The `state` of the `AutomationRun` after
519    /// cancelling is `CANCELLED`. `CancelAutomationRun` can be called on
520    /// AutomationRun in the state `IN_PROGRESS` and `PENDING`; AutomationRun
521    /// in a different state returns an `FAILED_PRECONDITION` error.
522    pub fn cancel_automation_run(&self) -> super::builder::cloud_deploy::CancelAutomationRun {
523        super::builder::cloud_deploy::CancelAutomationRun::new(self.inner.clone())
524    }
525
526    /// Lists information about the supported locations for this service.
527    pub fn list_locations(&self) -> super::builder::cloud_deploy::ListLocations {
528        super::builder::cloud_deploy::ListLocations::new(self.inner.clone())
529    }
530
531    /// Gets information about a location.
532    pub fn get_location(&self) -> super::builder::cloud_deploy::GetLocation {
533        super::builder::cloud_deploy::GetLocation::new(self.inner.clone())
534    }
535
536    /// Sets the access control policy on the specified resource. Replaces
537    /// any existing policy.
538    ///
539    /// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
540    /// errors.
541    pub fn set_iam_policy(&self) -> super::builder::cloud_deploy::SetIamPolicy {
542        super::builder::cloud_deploy::SetIamPolicy::new(self.inner.clone())
543    }
544
545    /// Gets the access control policy for a resource. Returns an empty policy
546    /// if the resource exists and does not have a policy set.
547    pub fn get_iam_policy(&self) -> super::builder::cloud_deploy::GetIamPolicy {
548        super::builder::cloud_deploy::GetIamPolicy::new(self.inner.clone())
549    }
550
551    /// Returns permissions that a caller has on the specified resource. If the
552    /// resource does not exist, this will return an empty set of
553    /// permissions, not a `NOT_FOUND` error.
554    ///
555    /// Note: This operation is designed to be used for building
556    /// permission-aware UIs and command-line tools, not for authorization
557    /// checking. This operation may "fail open" without warning.
558    pub fn test_iam_permissions(&self) -> super::builder::cloud_deploy::TestIamPermissions {
559        super::builder::cloud_deploy::TestIamPermissions::new(self.inner.clone())
560    }
561
562    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
563    ///
564    /// [google.longrunning.Operations]: longrunning::client::Operations
565    pub fn list_operations(&self) -> super::builder::cloud_deploy::ListOperations {
566        super::builder::cloud_deploy::ListOperations::new(self.inner.clone())
567    }
568
569    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
570    ///
571    /// [google.longrunning.Operations]: longrunning::client::Operations
572    pub fn get_operation(&self) -> super::builder::cloud_deploy::GetOperation {
573        super::builder::cloud_deploy::GetOperation::new(self.inner.clone())
574    }
575
576    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
577    ///
578    /// [google.longrunning.Operations]: longrunning::client::Operations
579    pub fn delete_operation(&self) -> super::builder::cloud_deploy::DeleteOperation {
580        super::builder::cloud_deploy::DeleteOperation::new(self.inner.clone())
581    }
582
583    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
584    ///
585    /// [google.longrunning.Operations]: longrunning::client::Operations
586    pub fn cancel_operation(&self) -> super::builder::cloud_deploy::CancelOperation {
587        super::builder::cloud_deploy::CancelOperation::new(self.inner.clone())
588    }
589}