google_cloud_run_v2/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 Run Admin API.
20///
21/// # Example
22/// ```
23/// # tokio_test::block_on(async {
24/// # use google_cloud_run_v2::client::Builds;
25/// let client = Builds::builder().build().await?;
26/// // use `client` to make requests to the Cloud Run Admin API.
27/// # gax::client_builder::Result::<()>::Ok(()) });
28/// ```
29///
30/// # Service Description
31///
32/// Cloud Run Build Control Plane API
33///
34/// # Configuration
35///
36/// To configure `Builds` use the `with_*` methods in the type returned
37/// by [builder()][Builds::builder]. The default configuration should
38/// work for most applications. Common configuration changes include
39///
40/// * [with_endpoint()]: by default this client uses the global default endpoint
41/// (`https://run.googleapis.com`). Applications using regional
42/// endpoints or running in restricted networks (e.g. a network configured
43// with [Private Google Access with VPC Service Controls]) may want to
44/// override this default.
45/// * [with_credentials()]: by default this client uses
46/// [Application Default Credentials]. Applications using custom
47/// authentication may need to override this default.
48///
49/// [with_endpoint()]: super::builder::builds::ClientBuilder::with_endpoint
50/// [with_credentials()]: super::builder::builds::ClientBuilder::credentials
51/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
52/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
53///
54/// # Pooling and Cloning
55///
56/// `Builds` holds a connection pool internally, it is advised to
57/// create one and the reuse it. You do not need to wrap `Builds` in
58/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
59/// already uses an `Arc` internally.
60#[derive(Clone, Debug)]
61pub struct Builds {
62 inner: std::sync::Arc<dyn super::stub::dynamic::Builds>,
63}
64
65impl Builds {
66 /// Returns a builder for [Builds].
67 ///
68 /// ```
69 /// # tokio_test::block_on(async {
70 /// # use google_cloud_run_v2::client::Builds;
71 /// let client = Builds::builder().build().await?;
72 /// # gax::client_builder::Result::<()>::Ok(()) });
73 /// ```
74 pub fn builder() -> super::builder::builds::ClientBuilder {
75 gax::client_builder::internal::new_builder(super::builder::builds::client::Factory)
76 }
77
78 /// Creates a new client from the provided stub.
79 ///
80 /// The most common case for calling this function is in tests mocking the
81 /// client's behavior.
82 pub fn from_stub<T>(stub: T) -> Self
83 where
84 T: super::stub::Builds + 'static,
85 {
86 Self {
87 inner: std::sync::Arc::new(stub),
88 }
89 }
90
91 pub(crate) async fn new(
92 config: gaxi::options::ClientConfig,
93 ) -> gax::client_builder::Result<Self> {
94 let inner = Self::build_inner(config).await?;
95 Ok(Self { inner })
96 }
97
98 async fn build_inner(
99 conf: gaxi::options::ClientConfig,
100 ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::Builds>> {
101 if gaxi::options::tracing_enabled(&conf) {
102 return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
103 }
104 Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
105 }
106
107 async fn build_transport(
108 conf: gaxi::options::ClientConfig,
109 ) -> gax::client_builder::Result<impl super::stub::Builds> {
110 super::transport::Builds::new(conf).await
111 }
112
113 async fn build_with_tracing(
114 conf: gaxi::options::ClientConfig,
115 ) -> gax::client_builder::Result<impl super::stub::Builds> {
116 Self::build_transport(conf)
117 .await
118 .map(super::tracing::Builds::new)
119 }
120
121 /// Submits a build in a given project.
122 pub fn submit_build(&self) -> super::builder::builds::SubmitBuild {
123 super::builder::builds::SubmitBuild::new(self.inner.clone())
124 }
125
126 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
127 ///
128 /// [google.longrunning.Operations]: longrunning::client::Operations
129 pub fn list_operations(&self) -> super::builder::builds::ListOperations {
130 super::builder::builds::ListOperations::new(self.inner.clone())
131 }
132
133 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
134 ///
135 /// [google.longrunning.Operations]: longrunning::client::Operations
136 pub fn get_operation(&self) -> super::builder::builds::GetOperation {
137 super::builder::builds::GetOperation::new(self.inner.clone())
138 }
139
140 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
141 ///
142 /// [google.longrunning.Operations]: longrunning::client::Operations
143 pub fn delete_operation(&self) -> super::builder::builds::DeleteOperation {
144 super::builder::builds::DeleteOperation::new(self.inner.clone())
145 }
146
147 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
148 ///
149 /// [google.longrunning.Operations]: longrunning::client::Operations
150 pub fn wait_operation(&self) -> super::builder::builds::WaitOperation {
151 super::builder::builds::WaitOperation::new(self.inner.clone())
152 }
153}
154
155/// Implements a client for the Cloud Run Admin API.
156///
157/// # Example
158/// ```
159/// # tokio_test::block_on(async {
160/// # use google_cloud_run_v2::client::Executions;
161/// let client = Executions::builder().build().await?;
162/// // use `client` to make requests to the Cloud Run Admin API.
163/// # gax::client_builder::Result::<()>::Ok(()) });
164/// ```
165///
166/// # Service Description
167///
168/// Cloud Run Execution Control Plane API.
169///
170/// # Configuration
171///
172/// To configure `Executions` use the `with_*` methods in the type returned
173/// by [builder()][Executions::builder]. The default configuration should
174/// work for most applications. Common configuration changes include
175///
176/// * [with_endpoint()]: by default this client uses the global default endpoint
177/// (`https://run.googleapis.com`). Applications using regional
178/// endpoints or running in restricted networks (e.g. a network configured
179// with [Private Google Access with VPC Service Controls]) may want to
180/// override this default.
181/// * [with_credentials()]: by default this client uses
182/// [Application Default Credentials]. Applications using custom
183/// authentication may need to override this default.
184///
185/// [with_endpoint()]: super::builder::executions::ClientBuilder::with_endpoint
186/// [with_credentials()]: super::builder::executions::ClientBuilder::credentials
187/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
188/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
189///
190/// # Pooling and Cloning
191///
192/// `Executions` holds a connection pool internally, it is advised to
193/// create one and the reuse it. You do not need to wrap `Executions` in
194/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
195/// already uses an `Arc` internally.
196#[derive(Clone, Debug)]
197pub struct Executions {
198 inner: std::sync::Arc<dyn super::stub::dynamic::Executions>,
199}
200
201impl Executions {
202 /// Returns a builder for [Executions].
203 ///
204 /// ```
205 /// # tokio_test::block_on(async {
206 /// # use google_cloud_run_v2::client::Executions;
207 /// let client = Executions::builder().build().await?;
208 /// # gax::client_builder::Result::<()>::Ok(()) });
209 /// ```
210 pub fn builder() -> super::builder::executions::ClientBuilder {
211 gax::client_builder::internal::new_builder(super::builder::executions::client::Factory)
212 }
213
214 /// Creates a new client from the provided stub.
215 ///
216 /// The most common case for calling this function is in tests mocking the
217 /// client's behavior.
218 pub fn from_stub<T>(stub: T) -> Self
219 where
220 T: super::stub::Executions + 'static,
221 {
222 Self {
223 inner: std::sync::Arc::new(stub),
224 }
225 }
226
227 pub(crate) async fn new(
228 config: gaxi::options::ClientConfig,
229 ) -> gax::client_builder::Result<Self> {
230 let inner = Self::build_inner(config).await?;
231 Ok(Self { inner })
232 }
233
234 async fn build_inner(
235 conf: gaxi::options::ClientConfig,
236 ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::Executions>> {
237 if gaxi::options::tracing_enabled(&conf) {
238 return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
239 }
240 Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
241 }
242
243 async fn build_transport(
244 conf: gaxi::options::ClientConfig,
245 ) -> gax::client_builder::Result<impl super::stub::Executions> {
246 super::transport::Executions::new(conf).await
247 }
248
249 async fn build_with_tracing(
250 conf: gaxi::options::ClientConfig,
251 ) -> gax::client_builder::Result<impl super::stub::Executions> {
252 Self::build_transport(conf)
253 .await
254 .map(super::tracing::Executions::new)
255 }
256
257 /// Gets information about an Execution.
258 pub fn get_execution(&self) -> super::builder::executions::GetExecution {
259 super::builder::executions::GetExecution::new(self.inner.clone())
260 }
261
262 /// Lists Executions from a Job. Results are sorted by creation time,
263 /// descending.
264 pub fn list_executions(&self) -> super::builder::executions::ListExecutions {
265 super::builder::executions::ListExecutions::new(self.inner.clone())
266 }
267
268 /// Deletes an Execution.
269 ///
270 /// # Long running operations
271 ///
272 /// This method is used to start, and/or poll a [long-running Operation].
273 /// The [Working with long-running operations] chapter in the [user guide]
274 /// covers these operations in detail.
275 ///
276 /// [long-running operation]: https://google.aip.dev/151
277 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
278 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
279 pub fn delete_execution(&self) -> super::builder::executions::DeleteExecution {
280 super::builder::executions::DeleteExecution::new(self.inner.clone())
281 }
282
283 /// Cancels an Execution.
284 ///
285 /// # Long running operations
286 ///
287 /// This method is used to start, and/or poll a [long-running Operation].
288 /// The [Working with long-running operations] chapter in the [user guide]
289 /// covers these operations in detail.
290 ///
291 /// [long-running operation]: https://google.aip.dev/151
292 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
293 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
294 pub fn cancel_execution(&self) -> super::builder::executions::CancelExecution {
295 super::builder::executions::CancelExecution::new(self.inner.clone())
296 }
297
298 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
299 ///
300 /// [google.longrunning.Operations]: longrunning::client::Operations
301 pub fn list_operations(&self) -> super::builder::executions::ListOperations {
302 super::builder::executions::ListOperations::new(self.inner.clone())
303 }
304
305 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
306 ///
307 /// [google.longrunning.Operations]: longrunning::client::Operations
308 pub fn get_operation(&self) -> super::builder::executions::GetOperation {
309 super::builder::executions::GetOperation::new(self.inner.clone())
310 }
311
312 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
313 ///
314 /// [google.longrunning.Operations]: longrunning::client::Operations
315 pub fn delete_operation(&self) -> super::builder::executions::DeleteOperation {
316 super::builder::executions::DeleteOperation::new(self.inner.clone())
317 }
318
319 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
320 ///
321 /// [google.longrunning.Operations]: longrunning::client::Operations
322 pub fn wait_operation(&self) -> super::builder::executions::WaitOperation {
323 super::builder::executions::WaitOperation::new(self.inner.clone())
324 }
325}
326
327/// Implements a client for the Cloud Run Admin API.
328///
329/// # Example
330/// ```
331/// # tokio_test::block_on(async {
332/// # use google_cloud_run_v2::client::Jobs;
333/// let client = Jobs::builder().build().await?;
334/// // use `client` to make requests to the Cloud Run Admin API.
335/// # gax::client_builder::Result::<()>::Ok(()) });
336/// ```
337///
338/// # Service Description
339///
340/// Cloud Run Job Control Plane API.
341///
342/// # Configuration
343///
344/// To configure `Jobs` use the `with_*` methods in the type returned
345/// by [builder()][Jobs::builder]. The default configuration should
346/// work for most applications. Common configuration changes include
347///
348/// * [with_endpoint()]: by default this client uses the global default endpoint
349/// (`https://run.googleapis.com`). Applications using regional
350/// endpoints or running in restricted networks (e.g. a network configured
351// with [Private Google Access with VPC Service Controls]) may want to
352/// override this default.
353/// * [with_credentials()]: by default this client uses
354/// [Application Default Credentials]. Applications using custom
355/// authentication may need to override this default.
356///
357/// [with_endpoint()]: super::builder::jobs::ClientBuilder::with_endpoint
358/// [with_credentials()]: super::builder::jobs::ClientBuilder::credentials
359/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
360/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
361///
362/// # Pooling and Cloning
363///
364/// `Jobs` holds a connection pool internally, it is advised to
365/// create one and the reuse it. You do not need to wrap `Jobs` in
366/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
367/// already uses an `Arc` internally.
368#[derive(Clone, Debug)]
369pub struct Jobs {
370 inner: std::sync::Arc<dyn super::stub::dynamic::Jobs>,
371}
372
373impl Jobs {
374 /// Returns a builder for [Jobs].
375 ///
376 /// ```
377 /// # tokio_test::block_on(async {
378 /// # use google_cloud_run_v2::client::Jobs;
379 /// let client = Jobs::builder().build().await?;
380 /// # gax::client_builder::Result::<()>::Ok(()) });
381 /// ```
382 pub fn builder() -> super::builder::jobs::ClientBuilder {
383 gax::client_builder::internal::new_builder(super::builder::jobs::client::Factory)
384 }
385
386 /// Creates a new client from the provided stub.
387 ///
388 /// The most common case for calling this function is in tests mocking the
389 /// client's behavior.
390 pub fn from_stub<T>(stub: T) -> Self
391 where
392 T: super::stub::Jobs + 'static,
393 {
394 Self {
395 inner: std::sync::Arc::new(stub),
396 }
397 }
398
399 pub(crate) async fn new(
400 config: gaxi::options::ClientConfig,
401 ) -> gax::client_builder::Result<Self> {
402 let inner = Self::build_inner(config).await?;
403 Ok(Self { inner })
404 }
405
406 async fn build_inner(
407 conf: gaxi::options::ClientConfig,
408 ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::Jobs>> {
409 if gaxi::options::tracing_enabled(&conf) {
410 return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
411 }
412 Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
413 }
414
415 async fn build_transport(
416 conf: gaxi::options::ClientConfig,
417 ) -> gax::client_builder::Result<impl super::stub::Jobs> {
418 super::transport::Jobs::new(conf).await
419 }
420
421 async fn build_with_tracing(
422 conf: gaxi::options::ClientConfig,
423 ) -> gax::client_builder::Result<impl super::stub::Jobs> {
424 Self::build_transport(conf)
425 .await
426 .map(super::tracing::Jobs::new)
427 }
428
429 /// Creates a Job.
430 ///
431 /// # Long running operations
432 ///
433 /// This method is used to start, and/or poll a [long-running Operation].
434 /// The [Working with long-running operations] chapter in the [user guide]
435 /// covers these operations in detail.
436 ///
437 /// [long-running operation]: https://google.aip.dev/151
438 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
439 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
440 pub fn create_job(&self) -> super::builder::jobs::CreateJob {
441 super::builder::jobs::CreateJob::new(self.inner.clone())
442 }
443
444 /// Gets information about a Job.
445 pub fn get_job(&self) -> super::builder::jobs::GetJob {
446 super::builder::jobs::GetJob::new(self.inner.clone())
447 }
448
449 /// Lists Jobs. Results are sorted by creation time, descending.
450 pub fn list_jobs(&self) -> super::builder::jobs::ListJobs {
451 super::builder::jobs::ListJobs::new(self.inner.clone())
452 }
453
454 /// Updates a Job.
455 ///
456 /// # Long running operations
457 ///
458 /// This method is used to start, and/or poll a [long-running Operation].
459 /// The [Working with long-running operations] chapter in the [user guide]
460 /// covers these operations in detail.
461 ///
462 /// [long-running operation]: https://google.aip.dev/151
463 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
464 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
465 pub fn update_job(&self) -> super::builder::jobs::UpdateJob {
466 super::builder::jobs::UpdateJob::new(self.inner.clone())
467 }
468
469 /// Deletes a Job.
470 ///
471 /// # Long running operations
472 ///
473 /// This method is used to start, and/or poll a [long-running Operation].
474 /// The [Working with long-running operations] chapter in the [user guide]
475 /// covers these operations in detail.
476 ///
477 /// [long-running operation]: https://google.aip.dev/151
478 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
479 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
480 pub fn delete_job(&self) -> super::builder::jobs::DeleteJob {
481 super::builder::jobs::DeleteJob::new(self.inner.clone())
482 }
483
484 /// Triggers creation of a new Execution of this Job.
485 ///
486 /// # Long running operations
487 ///
488 /// This method is used to start, and/or poll a [long-running Operation].
489 /// The [Working with long-running operations] chapter in the [user guide]
490 /// covers these operations in detail.
491 ///
492 /// [long-running operation]: https://google.aip.dev/151
493 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
494 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
495 pub fn run_job(&self) -> super::builder::jobs::RunJob {
496 super::builder::jobs::RunJob::new(self.inner.clone())
497 }
498
499 /// Gets the IAM Access Control policy currently in effect for the given Job.
500 /// This result does not include any inherited policies.
501 pub fn get_iam_policy(&self) -> super::builder::jobs::GetIamPolicy {
502 super::builder::jobs::GetIamPolicy::new(self.inner.clone())
503 }
504
505 /// Sets the IAM Access control policy for the specified Job. Overwrites
506 /// any existing policy.
507 pub fn set_iam_policy(&self) -> super::builder::jobs::SetIamPolicy {
508 super::builder::jobs::SetIamPolicy::new(self.inner.clone())
509 }
510
511 /// Returns permissions that a caller has on the specified Project.
512 ///
513 /// There are no permissions required for making this API call.
514 pub fn test_iam_permissions(&self) -> super::builder::jobs::TestIamPermissions {
515 super::builder::jobs::TestIamPermissions::new(self.inner.clone())
516 }
517
518 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
519 ///
520 /// [google.longrunning.Operations]: longrunning::client::Operations
521 pub fn list_operations(&self) -> super::builder::jobs::ListOperations {
522 super::builder::jobs::ListOperations::new(self.inner.clone())
523 }
524
525 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
526 ///
527 /// [google.longrunning.Operations]: longrunning::client::Operations
528 pub fn get_operation(&self) -> super::builder::jobs::GetOperation {
529 super::builder::jobs::GetOperation::new(self.inner.clone())
530 }
531
532 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
533 ///
534 /// [google.longrunning.Operations]: longrunning::client::Operations
535 pub fn delete_operation(&self) -> super::builder::jobs::DeleteOperation {
536 super::builder::jobs::DeleteOperation::new(self.inner.clone())
537 }
538
539 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
540 ///
541 /// [google.longrunning.Operations]: longrunning::client::Operations
542 pub fn wait_operation(&self) -> super::builder::jobs::WaitOperation {
543 super::builder::jobs::WaitOperation::new(self.inner.clone())
544 }
545}
546
547/// Implements a client for the Cloud Run Admin API.
548///
549/// # Example
550/// ```
551/// # tokio_test::block_on(async {
552/// # use google_cloud_run_v2::client::Revisions;
553/// let client = Revisions::builder().build().await?;
554/// // use `client` to make requests to the Cloud Run Admin API.
555/// # gax::client_builder::Result::<()>::Ok(()) });
556/// ```
557///
558/// # Service Description
559///
560/// Cloud Run Revision Control Plane API.
561///
562/// # Configuration
563///
564/// To configure `Revisions` use the `with_*` methods in the type returned
565/// by [builder()][Revisions::builder]. The default configuration should
566/// work for most applications. Common configuration changes include
567///
568/// * [with_endpoint()]: by default this client uses the global default endpoint
569/// (`https://run.googleapis.com`). Applications using regional
570/// endpoints or running in restricted networks (e.g. a network configured
571// with [Private Google Access with VPC Service Controls]) may want to
572/// override this default.
573/// * [with_credentials()]: by default this client uses
574/// [Application Default Credentials]. Applications using custom
575/// authentication may need to override this default.
576///
577/// [with_endpoint()]: super::builder::revisions::ClientBuilder::with_endpoint
578/// [with_credentials()]: super::builder::revisions::ClientBuilder::credentials
579/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
580/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
581///
582/// # Pooling and Cloning
583///
584/// `Revisions` holds a connection pool internally, it is advised to
585/// create one and the reuse it. You do not need to wrap `Revisions` in
586/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
587/// already uses an `Arc` internally.
588#[derive(Clone, Debug)]
589pub struct Revisions {
590 inner: std::sync::Arc<dyn super::stub::dynamic::Revisions>,
591}
592
593impl Revisions {
594 /// Returns a builder for [Revisions].
595 ///
596 /// ```
597 /// # tokio_test::block_on(async {
598 /// # use google_cloud_run_v2::client::Revisions;
599 /// let client = Revisions::builder().build().await?;
600 /// # gax::client_builder::Result::<()>::Ok(()) });
601 /// ```
602 pub fn builder() -> super::builder::revisions::ClientBuilder {
603 gax::client_builder::internal::new_builder(super::builder::revisions::client::Factory)
604 }
605
606 /// Creates a new client from the provided stub.
607 ///
608 /// The most common case for calling this function is in tests mocking the
609 /// client's behavior.
610 pub fn from_stub<T>(stub: T) -> Self
611 where
612 T: super::stub::Revisions + 'static,
613 {
614 Self {
615 inner: std::sync::Arc::new(stub),
616 }
617 }
618
619 pub(crate) async fn new(
620 config: gaxi::options::ClientConfig,
621 ) -> gax::client_builder::Result<Self> {
622 let inner = Self::build_inner(config).await?;
623 Ok(Self { inner })
624 }
625
626 async fn build_inner(
627 conf: gaxi::options::ClientConfig,
628 ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::Revisions>> {
629 if gaxi::options::tracing_enabled(&conf) {
630 return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
631 }
632 Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
633 }
634
635 async fn build_transport(
636 conf: gaxi::options::ClientConfig,
637 ) -> gax::client_builder::Result<impl super::stub::Revisions> {
638 super::transport::Revisions::new(conf).await
639 }
640
641 async fn build_with_tracing(
642 conf: gaxi::options::ClientConfig,
643 ) -> gax::client_builder::Result<impl super::stub::Revisions> {
644 Self::build_transport(conf)
645 .await
646 .map(super::tracing::Revisions::new)
647 }
648
649 /// Gets information about a Revision.
650 pub fn get_revision(&self) -> super::builder::revisions::GetRevision {
651 super::builder::revisions::GetRevision::new(self.inner.clone())
652 }
653
654 /// Lists Revisions from a given Service, or from a given location. Results
655 /// are sorted by creation time, descending.
656 pub fn list_revisions(&self) -> super::builder::revisions::ListRevisions {
657 super::builder::revisions::ListRevisions::new(self.inner.clone())
658 }
659
660 /// Deletes a Revision.
661 ///
662 /// # Long running operations
663 ///
664 /// This method is used to start, and/or poll a [long-running Operation].
665 /// The [Working with long-running operations] chapter in the [user guide]
666 /// covers these operations in detail.
667 ///
668 /// [long-running operation]: https://google.aip.dev/151
669 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
670 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
671 pub fn delete_revision(&self) -> super::builder::revisions::DeleteRevision {
672 super::builder::revisions::DeleteRevision::new(self.inner.clone())
673 }
674
675 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
676 ///
677 /// [google.longrunning.Operations]: longrunning::client::Operations
678 pub fn list_operations(&self) -> super::builder::revisions::ListOperations {
679 super::builder::revisions::ListOperations::new(self.inner.clone())
680 }
681
682 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
683 ///
684 /// [google.longrunning.Operations]: longrunning::client::Operations
685 pub fn get_operation(&self) -> super::builder::revisions::GetOperation {
686 super::builder::revisions::GetOperation::new(self.inner.clone())
687 }
688
689 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
690 ///
691 /// [google.longrunning.Operations]: longrunning::client::Operations
692 pub fn delete_operation(&self) -> super::builder::revisions::DeleteOperation {
693 super::builder::revisions::DeleteOperation::new(self.inner.clone())
694 }
695
696 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
697 ///
698 /// [google.longrunning.Operations]: longrunning::client::Operations
699 pub fn wait_operation(&self) -> super::builder::revisions::WaitOperation {
700 super::builder::revisions::WaitOperation::new(self.inner.clone())
701 }
702}
703
704/// Implements a client for the Cloud Run Admin API.
705///
706/// # Example
707/// ```
708/// # tokio_test::block_on(async {
709/// # use google_cloud_run_v2::client::Services;
710/// let client = Services::builder().build().await?;
711/// // use `client` to make requests to the Cloud Run Admin API.
712/// # gax::client_builder::Result::<()>::Ok(()) });
713/// ```
714///
715/// # Service Description
716///
717/// Cloud Run Service Control Plane API
718///
719/// # Configuration
720///
721/// To configure `Services` use the `with_*` methods in the type returned
722/// by [builder()][Services::builder]. The default configuration should
723/// work for most applications. Common configuration changes include
724///
725/// * [with_endpoint()]: by default this client uses the global default endpoint
726/// (`https://run.googleapis.com`). Applications using regional
727/// endpoints or running in restricted networks (e.g. a network configured
728// with [Private Google Access with VPC Service Controls]) may want to
729/// override this default.
730/// * [with_credentials()]: by default this client uses
731/// [Application Default Credentials]. Applications using custom
732/// authentication may need to override this default.
733///
734/// [with_endpoint()]: super::builder::services::ClientBuilder::with_endpoint
735/// [with_credentials()]: super::builder::services::ClientBuilder::credentials
736/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
737/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
738///
739/// # Pooling and Cloning
740///
741/// `Services` holds a connection pool internally, it is advised to
742/// create one and the reuse it. You do not need to wrap `Services` in
743/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
744/// already uses an `Arc` internally.
745#[derive(Clone, Debug)]
746pub struct Services {
747 inner: std::sync::Arc<dyn super::stub::dynamic::Services>,
748}
749
750impl Services {
751 /// Returns a builder for [Services].
752 ///
753 /// ```
754 /// # tokio_test::block_on(async {
755 /// # use google_cloud_run_v2::client::Services;
756 /// let client = Services::builder().build().await?;
757 /// # gax::client_builder::Result::<()>::Ok(()) });
758 /// ```
759 pub fn builder() -> super::builder::services::ClientBuilder {
760 gax::client_builder::internal::new_builder(super::builder::services::client::Factory)
761 }
762
763 /// Creates a new client from the provided stub.
764 ///
765 /// The most common case for calling this function is in tests mocking the
766 /// client's behavior.
767 pub fn from_stub<T>(stub: T) -> Self
768 where
769 T: super::stub::Services + 'static,
770 {
771 Self {
772 inner: std::sync::Arc::new(stub),
773 }
774 }
775
776 pub(crate) async fn new(
777 config: gaxi::options::ClientConfig,
778 ) -> gax::client_builder::Result<Self> {
779 let inner = Self::build_inner(config).await?;
780 Ok(Self { inner })
781 }
782
783 async fn build_inner(
784 conf: gaxi::options::ClientConfig,
785 ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::Services>> {
786 if gaxi::options::tracing_enabled(&conf) {
787 return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
788 }
789 Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
790 }
791
792 async fn build_transport(
793 conf: gaxi::options::ClientConfig,
794 ) -> gax::client_builder::Result<impl super::stub::Services> {
795 super::transport::Services::new(conf).await
796 }
797
798 async fn build_with_tracing(
799 conf: gaxi::options::ClientConfig,
800 ) -> gax::client_builder::Result<impl super::stub::Services> {
801 Self::build_transport(conf)
802 .await
803 .map(super::tracing::Services::new)
804 }
805
806 /// Creates a new Service in a given project and location.
807 ///
808 /// # Long running operations
809 ///
810 /// This method is used to start, and/or poll a [long-running Operation].
811 /// The [Working with long-running operations] chapter in the [user guide]
812 /// covers these operations in detail.
813 ///
814 /// [long-running operation]: https://google.aip.dev/151
815 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
816 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
817 pub fn create_service(&self) -> super::builder::services::CreateService {
818 super::builder::services::CreateService::new(self.inner.clone())
819 }
820
821 /// Gets information about a Service.
822 pub fn get_service(&self) -> super::builder::services::GetService {
823 super::builder::services::GetService::new(self.inner.clone())
824 }
825
826 /// Lists Services. Results are sorted by creation time, descending.
827 pub fn list_services(&self) -> super::builder::services::ListServices {
828 super::builder::services::ListServices::new(self.inner.clone())
829 }
830
831 /// Updates a Service.
832 ///
833 /// # Long running operations
834 ///
835 /// This method is used to start, and/or poll a [long-running Operation].
836 /// The [Working with long-running operations] chapter in the [user guide]
837 /// covers these operations in detail.
838 ///
839 /// [long-running operation]: https://google.aip.dev/151
840 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
841 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
842 pub fn update_service(&self) -> super::builder::services::UpdateService {
843 super::builder::services::UpdateService::new(self.inner.clone())
844 }
845
846 /// Deletes a Service.
847 /// This will cause the Service to stop serving traffic and will delete all
848 /// revisions.
849 ///
850 /// # Long running operations
851 ///
852 /// This method is used to start, and/or poll a [long-running Operation].
853 /// The [Working with long-running operations] chapter in the [user guide]
854 /// covers these operations in detail.
855 ///
856 /// [long-running operation]: https://google.aip.dev/151
857 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
858 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
859 pub fn delete_service(&self) -> super::builder::services::DeleteService {
860 super::builder::services::DeleteService::new(self.inner.clone())
861 }
862
863 /// Gets the IAM Access Control policy currently in effect for the given
864 /// Cloud Run Service. This result does not include any inherited policies.
865 pub fn get_iam_policy(&self) -> super::builder::services::GetIamPolicy {
866 super::builder::services::GetIamPolicy::new(self.inner.clone())
867 }
868
869 /// Sets the IAM Access control policy for the specified Service. Overwrites
870 /// any existing policy.
871 pub fn set_iam_policy(&self) -> super::builder::services::SetIamPolicy {
872 super::builder::services::SetIamPolicy::new(self.inner.clone())
873 }
874
875 /// Returns permissions that a caller has on the specified Project.
876 ///
877 /// There are no permissions required for making this API call.
878 pub fn test_iam_permissions(&self) -> super::builder::services::TestIamPermissions {
879 super::builder::services::TestIamPermissions::new(self.inner.clone())
880 }
881
882 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
883 ///
884 /// [google.longrunning.Operations]: longrunning::client::Operations
885 pub fn list_operations(&self) -> super::builder::services::ListOperations {
886 super::builder::services::ListOperations::new(self.inner.clone())
887 }
888
889 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
890 ///
891 /// [google.longrunning.Operations]: longrunning::client::Operations
892 pub fn get_operation(&self) -> super::builder::services::GetOperation {
893 super::builder::services::GetOperation::new(self.inner.clone())
894 }
895
896 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
897 ///
898 /// [google.longrunning.Operations]: longrunning::client::Operations
899 pub fn delete_operation(&self) -> super::builder::services::DeleteOperation {
900 super::builder::services::DeleteOperation::new(self.inner.clone())
901 }
902
903 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
904 ///
905 /// [google.longrunning.Operations]: longrunning::client::Operations
906 pub fn wait_operation(&self) -> super::builder::services::WaitOperation {
907 super::builder::services::WaitOperation::new(self.inner.clone())
908 }
909}
910
911/// Implements a client for the Cloud Run Admin API.
912///
913/// # Example
914/// ```
915/// # tokio_test::block_on(async {
916/// # use google_cloud_run_v2::client::Tasks;
917/// let client = Tasks::builder().build().await?;
918/// // use `client` to make requests to the Cloud Run Admin API.
919/// # gax::client_builder::Result::<()>::Ok(()) });
920/// ```
921///
922/// # Service Description
923///
924/// Cloud Run Task Control Plane API.
925///
926/// # Configuration
927///
928/// To configure `Tasks` use the `with_*` methods in the type returned
929/// by [builder()][Tasks::builder]. The default configuration should
930/// work for most applications. Common configuration changes include
931///
932/// * [with_endpoint()]: by default this client uses the global default endpoint
933/// (`https://run.googleapis.com`). Applications using regional
934/// endpoints or running in restricted networks (e.g. a network configured
935// with [Private Google Access with VPC Service Controls]) may want to
936/// override this default.
937/// * [with_credentials()]: by default this client uses
938/// [Application Default Credentials]. Applications using custom
939/// authentication may need to override this default.
940///
941/// [with_endpoint()]: super::builder::tasks::ClientBuilder::with_endpoint
942/// [with_credentials()]: super::builder::tasks::ClientBuilder::credentials
943/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
944/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
945///
946/// # Pooling and Cloning
947///
948/// `Tasks` holds a connection pool internally, it is advised to
949/// create one and the reuse it. You do not need to wrap `Tasks` in
950/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
951/// already uses an `Arc` internally.
952#[derive(Clone, Debug)]
953pub struct Tasks {
954 inner: std::sync::Arc<dyn super::stub::dynamic::Tasks>,
955}
956
957impl Tasks {
958 /// Returns a builder for [Tasks].
959 ///
960 /// ```
961 /// # tokio_test::block_on(async {
962 /// # use google_cloud_run_v2::client::Tasks;
963 /// let client = Tasks::builder().build().await?;
964 /// # gax::client_builder::Result::<()>::Ok(()) });
965 /// ```
966 pub fn builder() -> super::builder::tasks::ClientBuilder {
967 gax::client_builder::internal::new_builder(super::builder::tasks::client::Factory)
968 }
969
970 /// Creates a new client from the provided stub.
971 ///
972 /// The most common case for calling this function is in tests mocking the
973 /// client's behavior.
974 pub fn from_stub<T>(stub: T) -> Self
975 where
976 T: super::stub::Tasks + 'static,
977 {
978 Self {
979 inner: std::sync::Arc::new(stub),
980 }
981 }
982
983 pub(crate) async fn new(
984 config: gaxi::options::ClientConfig,
985 ) -> gax::client_builder::Result<Self> {
986 let inner = Self::build_inner(config).await?;
987 Ok(Self { inner })
988 }
989
990 async fn build_inner(
991 conf: gaxi::options::ClientConfig,
992 ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::Tasks>> {
993 if gaxi::options::tracing_enabled(&conf) {
994 return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
995 }
996 Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
997 }
998
999 async fn build_transport(
1000 conf: gaxi::options::ClientConfig,
1001 ) -> gax::client_builder::Result<impl super::stub::Tasks> {
1002 super::transport::Tasks::new(conf).await
1003 }
1004
1005 async fn build_with_tracing(
1006 conf: gaxi::options::ClientConfig,
1007 ) -> gax::client_builder::Result<impl super::stub::Tasks> {
1008 Self::build_transport(conf)
1009 .await
1010 .map(super::tracing::Tasks::new)
1011 }
1012
1013 /// Gets information about a Task.
1014 pub fn get_task(&self) -> super::builder::tasks::GetTask {
1015 super::builder::tasks::GetTask::new(self.inner.clone())
1016 }
1017
1018 /// Lists Tasks from an Execution of a Job.
1019 pub fn list_tasks(&self) -> super::builder::tasks::ListTasks {
1020 super::builder::tasks::ListTasks::new(self.inner.clone())
1021 }
1022
1023 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1024 ///
1025 /// [google.longrunning.Operations]: longrunning::client::Operations
1026 pub fn list_operations(&self) -> super::builder::tasks::ListOperations {
1027 super::builder::tasks::ListOperations::new(self.inner.clone())
1028 }
1029
1030 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1031 ///
1032 /// [google.longrunning.Operations]: longrunning::client::Operations
1033 pub fn get_operation(&self) -> super::builder::tasks::GetOperation {
1034 super::builder::tasks::GetOperation::new(self.inner.clone())
1035 }
1036
1037 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1038 ///
1039 /// [google.longrunning.Operations]: longrunning::client::Operations
1040 pub fn delete_operation(&self) -> super::builder::tasks::DeleteOperation {
1041 super::builder::tasks::DeleteOperation::new(self.inner.clone())
1042 }
1043
1044 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1045 ///
1046 /// [google.longrunning.Operations]: longrunning::client::Operations
1047 pub fn wait_operation(&self) -> super::builder::tasks::WaitOperation {
1048 super::builder::tasks::WaitOperation::new(self.inner.clone())
1049 }
1050}
1051
1052/// Implements a client for the Cloud Run Admin API.
1053///
1054/// # Example
1055/// ```
1056/// # tokio_test::block_on(async {
1057/// # use google_cloud_run_v2::client::WorkerPools;
1058/// let client = WorkerPools::builder().build().await?;
1059/// // use `client` to make requests to the Cloud Run Admin API.
1060/// # gax::client_builder::Result::<()>::Ok(()) });
1061/// ```
1062///
1063/// # Service Description
1064///
1065/// Cloud Run WorkerPool Control Plane API.
1066///
1067/// # Configuration
1068///
1069/// To configure `WorkerPools` use the `with_*` methods in the type returned
1070/// by [builder()][WorkerPools::builder]. The default configuration should
1071/// work for most applications. Common configuration changes include
1072///
1073/// * [with_endpoint()]: by default this client uses the global default endpoint
1074/// (`https://run.googleapis.com`). Applications using regional
1075/// endpoints or running in restricted networks (e.g. a network configured
1076// with [Private Google Access with VPC Service Controls]) may want to
1077/// override this default.
1078/// * [with_credentials()]: by default this client uses
1079/// [Application Default Credentials]. Applications using custom
1080/// authentication may need to override this default.
1081///
1082/// [with_endpoint()]: super::builder::worker_pools::ClientBuilder::with_endpoint
1083/// [with_credentials()]: super::builder::worker_pools::ClientBuilder::credentials
1084/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
1085/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
1086///
1087/// # Pooling and Cloning
1088///
1089/// `WorkerPools` holds a connection pool internally, it is advised to
1090/// create one and the reuse it. You do not need to wrap `WorkerPools` in
1091/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
1092/// already uses an `Arc` internally.
1093#[derive(Clone, Debug)]
1094pub struct WorkerPools {
1095 inner: std::sync::Arc<dyn super::stub::dynamic::WorkerPools>,
1096}
1097
1098impl WorkerPools {
1099 /// Returns a builder for [WorkerPools].
1100 ///
1101 /// ```
1102 /// # tokio_test::block_on(async {
1103 /// # use google_cloud_run_v2::client::WorkerPools;
1104 /// let client = WorkerPools::builder().build().await?;
1105 /// # gax::client_builder::Result::<()>::Ok(()) });
1106 /// ```
1107 pub fn builder() -> super::builder::worker_pools::ClientBuilder {
1108 gax::client_builder::internal::new_builder(super::builder::worker_pools::client::Factory)
1109 }
1110
1111 /// Creates a new client from the provided stub.
1112 ///
1113 /// The most common case for calling this function is in tests mocking the
1114 /// client's behavior.
1115 pub fn from_stub<T>(stub: T) -> Self
1116 where
1117 T: super::stub::WorkerPools + 'static,
1118 {
1119 Self {
1120 inner: std::sync::Arc::new(stub),
1121 }
1122 }
1123
1124 pub(crate) async fn new(
1125 config: gaxi::options::ClientConfig,
1126 ) -> gax::client_builder::Result<Self> {
1127 let inner = Self::build_inner(config).await?;
1128 Ok(Self { inner })
1129 }
1130
1131 async fn build_inner(
1132 conf: gaxi::options::ClientConfig,
1133 ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::WorkerPools>> {
1134 if gaxi::options::tracing_enabled(&conf) {
1135 return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
1136 }
1137 Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
1138 }
1139
1140 async fn build_transport(
1141 conf: gaxi::options::ClientConfig,
1142 ) -> gax::client_builder::Result<impl super::stub::WorkerPools> {
1143 super::transport::WorkerPools::new(conf).await
1144 }
1145
1146 async fn build_with_tracing(
1147 conf: gaxi::options::ClientConfig,
1148 ) -> gax::client_builder::Result<impl super::stub::WorkerPools> {
1149 Self::build_transport(conf)
1150 .await
1151 .map(super::tracing::WorkerPools::new)
1152 }
1153
1154 /// Creates a new WorkerPool in a given project and location.
1155 ///
1156 /// # Long running operations
1157 ///
1158 /// This method is used to start, and/or poll a [long-running Operation].
1159 /// The [Working with long-running operations] chapter in the [user guide]
1160 /// covers these operations in detail.
1161 ///
1162 /// [long-running operation]: https://google.aip.dev/151
1163 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1164 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1165 pub fn create_worker_pool(&self) -> super::builder::worker_pools::CreateWorkerPool {
1166 super::builder::worker_pools::CreateWorkerPool::new(self.inner.clone())
1167 }
1168
1169 /// Gets information about a WorkerPool.
1170 pub fn get_worker_pool(&self) -> super::builder::worker_pools::GetWorkerPool {
1171 super::builder::worker_pools::GetWorkerPool::new(self.inner.clone())
1172 }
1173
1174 /// Lists WorkerPools. Results are sorted by creation time, descending.
1175 pub fn list_worker_pools(&self) -> super::builder::worker_pools::ListWorkerPools {
1176 super::builder::worker_pools::ListWorkerPools::new(self.inner.clone())
1177 }
1178
1179 /// Updates a WorkerPool.
1180 ///
1181 /// # Long running operations
1182 ///
1183 /// This method is used to start, and/or poll a [long-running Operation].
1184 /// The [Working with long-running operations] chapter in the [user guide]
1185 /// covers these operations in detail.
1186 ///
1187 /// [long-running operation]: https://google.aip.dev/151
1188 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1189 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1190 pub fn update_worker_pool(&self) -> super::builder::worker_pools::UpdateWorkerPool {
1191 super::builder::worker_pools::UpdateWorkerPool::new(self.inner.clone())
1192 }
1193
1194 /// Deletes a WorkerPool.
1195 ///
1196 /// # Long running operations
1197 ///
1198 /// This method is used to start, and/or poll a [long-running Operation].
1199 /// The [Working with long-running operations] chapter in the [user guide]
1200 /// covers these operations in detail.
1201 ///
1202 /// [long-running operation]: https://google.aip.dev/151
1203 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1204 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1205 pub fn delete_worker_pool(&self) -> super::builder::worker_pools::DeleteWorkerPool {
1206 super::builder::worker_pools::DeleteWorkerPool::new(self.inner.clone())
1207 }
1208
1209 /// Gets the IAM Access Control policy currently in effect for the given
1210 /// Cloud Run WorkerPool. This result does not include any inherited policies.
1211 pub fn get_iam_policy(&self) -> super::builder::worker_pools::GetIamPolicy {
1212 super::builder::worker_pools::GetIamPolicy::new(self.inner.clone())
1213 }
1214
1215 /// Sets the IAM Access control policy for the specified WorkerPool. Overwrites
1216 /// any existing policy.
1217 pub fn set_iam_policy(&self) -> super::builder::worker_pools::SetIamPolicy {
1218 super::builder::worker_pools::SetIamPolicy::new(self.inner.clone())
1219 }
1220
1221 /// Returns permissions that a caller has on the specified Project.
1222 ///
1223 /// There are no permissions required for making this API call.
1224 pub fn test_iam_permissions(&self) -> super::builder::worker_pools::TestIamPermissions {
1225 super::builder::worker_pools::TestIamPermissions::new(self.inner.clone())
1226 }
1227
1228 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1229 ///
1230 /// [google.longrunning.Operations]: longrunning::client::Operations
1231 pub fn list_operations(&self) -> super::builder::worker_pools::ListOperations {
1232 super::builder::worker_pools::ListOperations::new(self.inner.clone())
1233 }
1234
1235 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1236 ///
1237 /// [google.longrunning.Operations]: longrunning::client::Operations
1238 pub fn get_operation(&self) -> super::builder::worker_pools::GetOperation {
1239 super::builder::worker_pools::GetOperation::new(self.inner.clone())
1240 }
1241
1242 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1243 ///
1244 /// [google.longrunning.Operations]: longrunning::client::Operations
1245 pub fn delete_operation(&self) -> super::builder::worker_pools::DeleteOperation {
1246 super::builder::worker_pools::DeleteOperation::new(self.inner.clone())
1247 }
1248
1249 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1250 ///
1251 /// [google.longrunning.Operations]: longrunning::client::Operations
1252 pub fn wait_operation(&self) -> super::builder::worker_pools::WaitOperation {
1253 super::builder::worker_pools::WaitOperation::new(self.inner.clone())
1254 }
1255}