google_cloud_security_privateca_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 Certificate Authority API.
20///
21/// # Example
22/// ```
23/// # tokio_test::block_on(async {
24/// # use google_cloud_security_privateca_v1::client::CertificateAuthorityService;
25/// let client = CertificateAuthorityService::builder().build().await?;
26/// // use `client` to make requests to the Certificate Authority API.
27/// # gax::client_builder::Result::<()>::Ok(()) });
28/// ```
29///
30/// # Service Description
31///
32/// [Certificate Authority
33/// Service][google.cloud.security.privateca.v1.CertificateAuthorityService]
34/// manages private certificate authorities and issued certificates.
35///
36/// [google.cloud.security.privateca.v1.CertificateAuthorityService]: crate::client::CertificateAuthorityService
37///
38/// # Configuration
39///
40/// To configure `CertificateAuthorityService` use the `with_*` methods in the type returned
41/// by [builder()][CertificateAuthorityService::builder]. The default configuration should
42/// work for most applications. Common configuration changes include
43///
44/// * [with_endpoint()]: by default this client uses the global default endpoint
45/// (`https://privateca.googleapis.com`). Applications using regional
46/// endpoints or running in restricted networks (e.g. a network configured
47// with [Private Google Access with VPC Service Controls]) may want to
48/// override this default.
49/// * [with_credentials()]: by default this client uses
50/// [Application Default Credentials]. Applications using custom
51/// authentication may need to override this default.
52///
53/// [with_endpoint()]: super::builder::certificate_authority_service::ClientBuilder::with_endpoint
54/// [with_credentials()]: super::builder::certificate_authority_service::ClientBuilder::credentials
55/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
56/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
57///
58/// # Pooling and Cloning
59///
60/// `CertificateAuthorityService` holds a connection pool internally, it is advised to
61/// create one and the reuse it. You do not need to wrap `CertificateAuthorityService` in
62/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
63/// already uses an `Arc` internally.
64#[derive(Clone, Debug)]
65pub struct CertificateAuthorityService {
66 inner: std::sync::Arc<dyn super::stub::dynamic::CertificateAuthorityService>,
67}
68
69impl CertificateAuthorityService {
70 /// Returns a builder for [CertificateAuthorityService].
71 ///
72 /// ```
73 /// # tokio_test::block_on(async {
74 /// # use google_cloud_security_privateca_v1::client::CertificateAuthorityService;
75 /// let client = CertificateAuthorityService::builder().build().await?;
76 /// # gax::client_builder::Result::<()>::Ok(()) });
77 /// ```
78 pub fn builder() -> super::builder::certificate_authority_service::ClientBuilder {
79 gax::client_builder::internal::new_builder(
80 super::builder::certificate_authority_service::client::Factory,
81 )
82 }
83
84 /// Creates a new client from the provided stub.
85 ///
86 /// The most common case for calling this function is in tests mocking the
87 /// client's behavior.
88 pub fn from_stub<T>(stub: T) -> Self
89 where
90 T: super::stub::CertificateAuthorityService + 'static,
91 {
92 Self {
93 inner: std::sync::Arc::new(stub),
94 }
95 }
96
97 pub(crate) async fn new(
98 config: gaxi::options::ClientConfig,
99 ) -> gax::client_builder::Result<Self> {
100 let inner = Self::build_inner(config).await?;
101 Ok(Self { inner })
102 }
103
104 async fn build_inner(
105 conf: gaxi::options::ClientConfig,
106 ) -> gax::client_builder::Result<
107 std::sync::Arc<dyn super::stub::dynamic::CertificateAuthorityService>,
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 ) -> gax::client_builder::Result<impl super::stub::CertificateAuthorityService> {
118 super::transport::CertificateAuthorityService::new(conf).await
119 }
120
121 async fn build_with_tracing(
122 conf: gaxi::options::ClientConfig,
123 ) -> gax::client_builder::Result<impl super::stub::CertificateAuthorityService> {
124 Self::build_transport(conf)
125 .await
126 .map(super::tracing::CertificateAuthorityService::new)
127 }
128
129 /// Create a new [Certificate][google.cloud.security.privateca.v1.Certificate]
130 /// in a given Project, Location from a particular
131 /// [CaPool][google.cloud.security.privateca.v1.CaPool].
132 ///
133 /// [google.cloud.security.privateca.v1.CaPool]: crate::model::CaPool
134 /// [google.cloud.security.privateca.v1.Certificate]: crate::model::Certificate
135 pub fn create_certificate(
136 &self,
137 ) -> super::builder::certificate_authority_service::CreateCertificate {
138 super::builder::certificate_authority_service::CreateCertificate::new(self.inner.clone())
139 }
140
141 /// Returns a [Certificate][google.cloud.security.privateca.v1.Certificate].
142 ///
143 /// [google.cloud.security.privateca.v1.Certificate]: crate::model::Certificate
144 pub fn get_certificate(&self) -> super::builder::certificate_authority_service::GetCertificate {
145 super::builder::certificate_authority_service::GetCertificate::new(self.inner.clone())
146 }
147
148 /// Lists [Certificates][google.cloud.security.privateca.v1.Certificate].
149 ///
150 /// [google.cloud.security.privateca.v1.Certificate]: crate::model::Certificate
151 pub fn list_certificates(
152 &self,
153 ) -> super::builder::certificate_authority_service::ListCertificates {
154 super::builder::certificate_authority_service::ListCertificates::new(self.inner.clone())
155 }
156
157 /// Revoke a [Certificate][google.cloud.security.privateca.v1.Certificate].
158 ///
159 /// [google.cloud.security.privateca.v1.Certificate]: crate::model::Certificate
160 pub fn revoke_certificate(
161 &self,
162 ) -> super::builder::certificate_authority_service::RevokeCertificate {
163 super::builder::certificate_authority_service::RevokeCertificate::new(self.inner.clone())
164 }
165
166 /// Update a [Certificate][google.cloud.security.privateca.v1.Certificate].
167 /// Currently, the only field you can update is the
168 /// [labels][google.cloud.security.privateca.v1.Certificate.labels] field.
169 ///
170 /// [google.cloud.security.privateca.v1.Certificate]: crate::model::Certificate
171 /// [google.cloud.security.privateca.v1.Certificate.labels]: crate::model::Certificate::labels
172 pub fn update_certificate(
173 &self,
174 ) -> super::builder::certificate_authority_service::UpdateCertificate {
175 super::builder::certificate_authority_service::UpdateCertificate::new(self.inner.clone())
176 }
177
178 /// Activate a
179 /// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
180 /// that is in state
181 /// [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION]
182 /// and is of type
183 /// [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE].
184 /// After the parent Certificate Authority signs a certificate signing request
185 /// from
186 /// [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr],
187 /// this method can complete the activation process.
188 ///
189 /// [google.cloud.security.privateca.v1.CertificateAuthority]: crate::model::CertificateAuthority
190 /// [google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION]: crate::model::certificate_authority::State::AwaitingUserActivation
191 /// [google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]: crate::model::certificate_authority::Type::Subordinate
192 /// [google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr]: crate::client::CertificateAuthorityService::fetch_certificate_authority_csr
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 activate_certificate_authority(
204 &self,
205 ) -> super::builder::certificate_authority_service::ActivateCertificateAuthority {
206 super::builder::certificate_authority_service::ActivateCertificateAuthority::new(
207 self.inner.clone(),
208 )
209 }
210
211 /// Create a new
212 /// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
213 /// in a given Project and Location.
214 ///
215 /// [google.cloud.security.privateca.v1.CertificateAuthority]: crate::model::CertificateAuthority
216 ///
217 /// # Long running operations
218 ///
219 /// This method is used to start, and/or poll a [long-running Operation].
220 /// The [Working with long-running operations] chapter in the [user guide]
221 /// covers these operations in detail.
222 ///
223 /// [long-running operation]: https://google.aip.dev/151
224 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
225 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
226 pub fn create_certificate_authority(
227 &self,
228 ) -> super::builder::certificate_authority_service::CreateCertificateAuthority {
229 super::builder::certificate_authority_service::CreateCertificateAuthority::new(
230 self.inner.clone(),
231 )
232 }
233
234 /// Disable a
235 /// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
236 ///
237 /// [google.cloud.security.privateca.v1.CertificateAuthority]: crate::model::CertificateAuthority
238 ///
239 /// # Long running operations
240 ///
241 /// This method is used to start, and/or poll a [long-running Operation].
242 /// The [Working with long-running operations] chapter in the [user guide]
243 /// covers these operations in detail.
244 ///
245 /// [long-running operation]: https://google.aip.dev/151
246 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
247 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
248 pub fn disable_certificate_authority(
249 &self,
250 ) -> super::builder::certificate_authority_service::DisableCertificateAuthority {
251 super::builder::certificate_authority_service::DisableCertificateAuthority::new(
252 self.inner.clone(),
253 )
254 }
255
256 /// Enable a
257 /// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
258 ///
259 /// [google.cloud.security.privateca.v1.CertificateAuthority]: crate::model::CertificateAuthority
260 ///
261 /// # Long running operations
262 ///
263 /// This method is used to start, and/or poll a [long-running Operation].
264 /// The [Working with long-running operations] chapter in the [user guide]
265 /// covers these operations in detail.
266 ///
267 /// [long-running operation]: https://google.aip.dev/151
268 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
269 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
270 pub fn enable_certificate_authority(
271 &self,
272 ) -> super::builder::certificate_authority_service::EnableCertificateAuthority {
273 super::builder::certificate_authority_service::EnableCertificateAuthority::new(
274 self.inner.clone(),
275 )
276 }
277
278 /// Fetch a certificate signing request (CSR) from a
279 /// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
280 /// that is in state
281 /// [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION]
282 /// and is of type
283 /// [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE].
284 /// The CSR must then be signed by the desired parent Certificate Authority,
285 /// which could be another
286 /// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
287 /// resource, or could be an on-prem certificate authority. See also
288 /// [ActivateCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority].
289 ///
290 /// [google.cloud.security.privateca.v1.CertificateAuthority]: crate::model::CertificateAuthority
291 /// [google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION]: crate::model::certificate_authority::State::AwaitingUserActivation
292 /// [google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]: crate::model::certificate_authority::Type::Subordinate
293 /// [google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority]: crate::client::CertificateAuthorityService::activate_certificate_authority
294 pub fn fetch_certificate_authority_csr(
295 &self,
296 ) -> super::builder::certificate_authority_service::FetchCertificateAuthorityCsr {
297 super::builder::certificate_authority_service::FetchCertificateAuthorityCsr::new(
298 self.inner.clone(),
299 )
300 }
301
302 /// Returns a
303 /// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
304 ///
305 /// [google.cloud.security.privateca.v1.CertificateAuthority]: crate::model::CertificateAuthority
306 pub fn get_certificate_authority(
307 &self,
308 ) -> super::builder::certificate_authority_service::GetCertificateAuthority {
309 super::builder::certificate_authority_service::GetCertificateAuthority::new(
310 self.inner.clone(),
311 )
312 }
313
314 /// Lists
315 /// [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority].
316 ///
317 /// [google.cloud.security.privateca.v1.CertificateAuthority]: crate::model::CertificateAuthority
318 pub fn list_certificate_authorities(
319 &self,
320 ) -> super::builder::certificate_authority_service::ListCertificateAuthorities {
321 super::builder::certificate_authority_service::ListCertificateAuthorities::new(
322 self.inner.clone(),
323 )
324 }
325
326 /// Undelete a
327 /// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
328 /// that has been deleted.
329 ///
330 /// [google.cloud.security.privateca.v1.CertificateAuthority]: crate::model::CertificateAuthority
331 ///
332 /// # Long running operations
333 ///
334 /// This method is used to start, and/or poll a [long-running Operation].
335 /// The [Working with long-running operations] chapter in the [user guide]
336 /// covers these operations in detail.
337 ///
338 /// [long-running operation]: https://google.aip.dev/151
339 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
340 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
341 pub fn undelete_certificate_authority(
342 &self,
343 ) -> super::builder::certificate_authority_service::UndeleteCertificateAuthority {
344 super::builder::certificate_authority_service::UndeleteCertificateAuthority::new(
345 self.inner.clone(),
346 )
347 }
348
349 /// Delete a
350 /// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
351 ///
352 /// [google.cloud.security.privateca.v1.CertificateAuthority]: crate::model::CertificateAuthority
353 ///
354 /// # Long running operations
355 ///
356 /// This method is used to start, and/or poll a [long-running Operation].
357 /// The [Working with long-running operations] chapter in the [user guide]
358 /// covers these operations in detail.
359 ///
360 /// [long-running operation]: https://google.aip.dev/151
361 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
362 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
363 pub fn delete_certificate_authority(
364 &self,
365 ) -> super::builder::certificate_authority_service::DeleteCertificateAuthority {
366 super::builder::certificate_authority_service::DeleteCertificateAuthority::new(
367 self.inner.clone(),
368 )
369 }
370
371 /// Update a
372 /// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
373 ///
374 /// [google.cloud.security.privateca.v1.CertificateAuthority]: crate::model::CertificateAuthority
375 ///
376 /// # Long running operations
377 ///
378 /// This method is used to start, and/or poll a [long-running Operation].
379 /// The [Working with long-running operations] chapter in the [user guide]
380 /// covers these operations in detail.
381 ///
382 /// [long-running operation]: https://google.aip.dev/151
383 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
384 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
385 pub fn update_certificate_authority(
386 &self,
387 ) -> super::builder::certificate_authority_service::UpdateCertificateAuthority {
388 super::builder::certificate_authority_service::UpdateCertificateAuthority::new(
389 self.inner.clone(),
390 )
391 }
392
393 /// Create a [CaPool][google.cloud.security.privateca.v1.CaPool].
394 ///
395 /// [google.cloud.security.privateca.v1.CaPool]: crate::model::CaPool
396 ///
397 /// # Long running operations
398 ///
399 /// This method is used to start, and/or poll a [long-running Operation].
400 /// The [Working with long-running operations] chapter in the [user guide]
401 /// covers these operations in detail.
402 ///
403 /// [long-running operation]: https://google.aip.dev/151
404 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
405 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
406 pub fn create_ca_pool(&self) -> super::builder::certificate_authority_service::CreateCaPool {
407 super::builder::certificate_authority_service::CreateCaPool::new(self.inner.clone())
408 }
409
410 /// Update a [CaPool][google.cloud.security.privateca.v1.CaPool].
411 ///
412 /// [google.cloud.security.privateca.v1.CaPool]: crate::model::CaPool
413 ///
414 /// # Long running operations
415 ///
416 /// This method is used to start, and/or poll a [long-running Operation].
417 /// The [Working with long-running operations] chapter in the [user guide]
418 /// covers these operations in detail.
419 ///
420 /// [long-running operation]: https://google.aip.dev/151
421 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
422 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
423 pub fn update_ca_pool(&self) -> super::builder::certificate_authority_service::UpdateCaPool {
424 super::builder::certificate_authority_service::UpdateCaPool::new(self.inner.clone())
425 }
426
427 /// Returns a [CaPool][google.cloud.security.privateca.v1.CaPool].
428 ///
429 /// [google.cloud.security.privateca.v1.CaPool]: crate::model::CaPool
430 pub fn get_ca_pool(&self) -> super::builder::certificate_authority_service::GetCaPool {
431 super::builder::certificate_authority_service::GetCaPool::new(self.inner.clone())
432 }
433
434 /// Lists [CaPools][google.cloud.security.privateca.v1.CaPool].
435 ///
436 /// [google.cloud.security.privateca.v1.CaPool]: crate::model::CaPool
437 pub fn list_ca_pools(&self) -> super::builder::certificate_authority_service::ListCaPools {
438 super::builder::certificate_authority_service::ListCaPools::new(self.inner.clone())
439 }
440
441 /// Delete a [CaPool][google.cloud.security.privateca.v1.CaPool].
442 ///
443 /// [google.cloud.security.privateca.v1.CaPool]: crate::model::CaPool
444 ///
445 /// # Long running operations
446 ///
447 /// This method is used to start, and/or poll a [long-running Operation].
448 /// The [Working with long-running operations] chapter in the [user guide]
449 /// covers these operations in detail.
450 ///
451 /// [long-running operation]: https://google.aip.dev/151
452 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
453 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
454 pub fn delete_ca_pool(&self) -> super::builder::certificate_authority_service::DeleteCaPool {
455 super::builder::certificate_authority_service::DeleteCaPool::new(self.inner.clone())
456 }
457
458 /// FetchCaCerts returns the current trust anchor for the
459 /// [CaPool][google.cloud.security.privateca.v1.CaPool]. This will include CA
460 /// certificate chains for all certificate authorities in the ENABLED,
461 /// DISABLED, or STAGED states.
462 ///
463 /// [google.cloud.security.privateca.v1.CaPool]: crate::model::CaPool
464 pub fn fetch_ca_certs(&self) -> super::builder::certificate_authority_service::FetchCaCerts {
465 super::builder::certificate_authority_service::FetchCaCerts::new(self.inner.clone())
466 }
467
468 /// Returns a
469 /// [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList].
470 ///
471 /// [google.cloud.security.privateca.v1.CertificateRevocationList]: crate::model::CertificateRevocationList
472 pub fn get_certificate_revocation_list(
473 &self,
474 ) -> super::builder::certificate_authority_service::GetCertificateRevocationList {
475 super::builder::certificate_authority_service::GetCertificateRevocationList::new(
476 self.inner.clone(),
477 )
478 }
479
480 /// Lists
481 /// [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList].
482 ///
483 /// [google.cloud.security.privateca.v1.CertificateRevocationList]: crate::model::CertificateRevocationList
484 pub fn list_certificate_revocation_lists(
485 &self,
486 ) -> super::builder::certificate_authority_service::ListCertificateRevocationLists {
487 super::builder::certificate_authority_service::ListCertificateRevocationLists::new(
488 self.inner.clone(),
489 )
490 }
491
492 /// Update a
493 /// [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList].
494 ///
495 /// [google.cloud.security.privateca.v1.CertificateRevocationList]: crate::model::CertificateRevocationList
496 ///
497 /// # Long running operations
498 ///
499 /// This method is used to start, and/or poll a [long-running Operation].
500 /// The [Working with long-running operations] chapter in the [user guide]
501 /// covers these operations in detail.
502 ///
503 /// [long-running operation]: https://google.aip.dev/151
504 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
505 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
506 pub fn update_certificate_revocation_list(
507 &self,
508 ) -> super::builder::certificate_authority_service::UpdateCertificateRevocationList {
509 super::builder::certificate_authority_service::UpdateCertificateRevocationList::new(
510 self.inner.clone(),
511 )
512 }
513
514 /// Create a new
515 /// [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
516 /// in a given Project and Location.
517 ///
518 /// [google.cloud.security.privateca.v1.CertificateTemplate]: crate::model::CertificateTemplate
519 ///
520 /// # Long running operations
521 ///
522 /// This method is used to start, and/or poll a [long-running Operation].
523 /// The [Working with long-running operations] chapter in the [user guide]
524 /// covers these operations in detail.
525 ///
526 /// [long-running operation]: https://google.aip.dev/151
527 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
528 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
529 pub fn create_certificate_template(
530 &self,
531 ) -> super::builder::certificate_authority_service::CreateCertificateTemplate {
532 super::builder::certificate_authority_service::CreateCertificateTemplate::new(
533 self.inner.clone(),
534 )
535 }
536
537 /// DeleteCertificateTemplate deletes a
538 /// [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].
539 ///
540 /// [google.cloud.security.privateca.v1.CertificateTemplate]: crate::model::CertificateTemplate
541 ///
542 /// # Long running operations
543 ///
544 /// This method is used to start, and/or poll a [long-running Operation].
545 /// The [Working with long-running operations] chapter in the [user guide]
546 /// covers these operations in detail.
547 ///
548 /// [long-running operation]: https://google.aip.dev/151
549 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
550 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
551 pub fn delete_certificate_template(
552 &self,
553 ) -> super::builder::certificate_authority_service::DeleteCertificateTemplate {
554 super::builder::certificate_authority_service::DeleteCertificateTemplate::new(
555 self.inner.clone(),
556 )
557 }
558
559 /// Returns a
560 /// [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].
561 ///
562 /// [google.cloud.security.privateca.v1.CertificateTemplate]: crate::model::CertificateTemplate
563 pub fn get_certificate_template(
564 &self,
565 ) -> super::builder::certificate_authority_service::GetCertificateTemplate {
566 super::builder::certificate_authority_service::GetCertificateTemplate::new(
567 self.inner.clone(),
568 )
569 }
570
571 /// Lists
572 /// [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate].
573 ///
574 /// [google.cloud.security.privateca.v1.CertificateTemplate]: crate::model::CertificateTemplate
575 pub fn list_certificate_templates(
576 &self,
577 ) -> super::builder::certificate_authority_service::ListCertificateTemplates {
578 super::builder::certificate_authority_service::ListCertificateTemplates::new(
579 self.inner.clone(),
580 )
581 }
582
583 /// Update a
584 /// [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].
585 ///
586 /// [google.cloud.security.privateca.v1.CertificateTemplate]: crate::model::CertificateTemplate
587 ///
588 /// # Long running operations
589 ///
590 /// This method is used to start, and/or poll a [long-running Operation].
591 /// The [Working with long-running operations] chapter in the [user guide]
592 /// covers these operations in detail.
593 ///
594 /// [long-running operation]: https://google.aip.dev/151
595 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
596 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
597 pub fn update_certificate_template(
598 &self,
599 ) -> super::builder::certificate_authority_service::UpdateCertificateTemplate {
600 super::builder::certificate_authority_service::UpdateCertificateTemplate::new(
601 self.inner.clone(),
602 )
603 }
604
605 /// Lists information about the supported locations for this service.
606 pub fn list_locations(&self) -> super::builder::certificate_authority_service::ListLocations {
607 super::builder::certificate_authority_service::ListLocations::new(self.inner.clone())
608 }
609
610 /// Gets information about a location.
611 pub fn get_location(&self) -> super::builder::certificate_authority_service::GetLocation {
612 super::builder::certificate_authority_service::GetLocation::new(self.inner.clone())
613 }
614
615 /// Sets the access control policy on the specified resource. Replaces
616 /// any existing policy.
617 ///
618 /// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
619 /// errors.
620 pub fn set_iam_policy(&self) -> super::builder::certificate_authority_service::SetIamPolicy {
621 super::builder::certificate_authority_service::SetIamPolicy::new(self.inner.clone())
622 }
623
624 /// Gets the access control policy for a resource. Returns an empty policy
625 /// if the resource exists and does not have a policy set.
626 pub fn get_iam_policy(&self) -> super::builder::certificate_authority_service::GetIamPolicy {
627 super::builder::certificate_authority_service::GetIamPolicy::new(self.inner.clone())
628 }
629
630 /// Returns permissions that a caller has on the specified resource. If the
631 /// resource does not exist, this will return an empty set of
632 /// permissions, not a `NOT_FOUND` error.
633 ///
634 /// Note: This operation is designed to be used for building
635 /// permission-aware UIs and command-line tools, not for authorization
636 /// checking. This operation may "fail open" without warning.
637 pub fn test_iam_permissions(
638 &self,
639 ) -> super::builder::certificate_authority_service::TestIamPermissions {
640 super::builder::certificate_authority_service::TestIamPermissions::new(self.inner.clone())
641 }
642
643 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
644 ///
645 /// [google.longrunning.Operations]: longrunning::client::Operations
646 pub fn list_operations(&self) -> super::builder::certificate_authority_service::ListOperations {
647 super::builder::certificate_authority_service::ListOperations::new(self.inner.clone())
648 }
649
650 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
651 ///
652 /// [google.longrunning.Operations]: longrunning::client::Operations
653 pub fn get_operation(&self) -> super::builder::certificate_authority_service::GetOperation {
654 super::builder::certificate_authority_service::GetOperation::new(self.inner.clone())
655 }
656
657 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
658 ///
659 /// [google.longrunning.Operations]: longrunning::client::Operations
660 pub fn delete_operation(
661 &self,
662 ) -> super::builder::certificate_authority_service::DeleteOperation {
663 super::builder::certificate_authority_service::DeleteOperation::new(self.inner.clone())
664 }
665
666 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
667 ///
668 /// [google.longrunning.Operations]: longrunning::client::Operations
669 pub fn cancel_operation(
670 &self,
671 ) -> super::builder::certificate_authority_service::CancelOperation {
672 super::builder::certificate_authority_service::CancelOperation::new(self.inner.clone())
673 }
674}