Skip to main content

google_cloud_binaryauthorization_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 Binary Authorization API.
20///
21/// # Example
22/// ```
23/// # use google_cloud_binaryauthorization_v1::client::BinauthzManagementServiceV1;
24/// use google_cloud_gax::paginator::ItemPaginator as _;
25/// # async fn sample() -> Result<(), Box<dyn std::error::Error>> {
26///     let client = BinauthzManagementServiceV1::builder().build().await?;
27///     let parent = "parent_value";
28///     let mut list = client.list_attestors()
29///         .set_parent(parent)
30///         .by_item();
31///     while let Some(item) = list.next().await.transpose()? {
32///         println!("{:?}", item);
33///     }
34/// # Ok(()) }
35/// ```
36///
37/// # Service Description
38///
39/// Google Cloud Management Service for Binary Authorization admission policies
40/// and attestation authorities.
41///
42/// This API implements a REST model with the following objects:
43///
44/// * [Policy][google.cloud.binaryauthorization.v1.Policy]
45/// * [Attestor][google.cloud.binaryauthorization.v1.Attestor]
46///
47/// [google.cloud.binaryauthorization.v1.Attestor]: crate::model::Attestor
48/// [google.cloud.binaryauthorization.v1.Policy]: crate::model::Policy
49///
50/// # Configuration
51///
52/// To configure `BinauthzManagementServiceV1` use the `with_*` methods in the type returned
53/// by [builder()][BinauthzManagementServiceV1::builder]. The default configuration should
54/// work for most applications. Common configuration changes include
55///
56/// * [with_endpoint()]: by default this client uses the global default endpoint
57///   (`https://binaryauthorization.googleapis.com`). Applications using regional
58///   endpoints or running in restricted networks (e.g. a network configured
59//    with [Private Google Access with VPC Service Controls]) may want to
60///   override this default.
61/// * [with_credentials()]: by default this client uses
62///   [Application Default Credentials]. Applications using custom
63///   authentication may need to override this default.
64///
65/// [with_endpoint()]: super::builder::binauthz_management_service_v_1::ClientBuilder::with_endpoint
66/// [with_credentials()]: super::builder::binauthz_management_service_v_1::ClientBuilder::with_credentials
67/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
68/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
69///
70/// # Pooling and Cloning
71///
72/// `BinauthzManagementServiceV1` holds a connection pool internally, it is advised to
73/// create one and reuse it. You do not need to wrap `BinauthzManagementServiceV1` in
74/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
75/// already uses an `Arc` internally.
76#[derive(Clone, Debug)]
77pub struct BinauthzManagementServiceV1 {
78    inner: std::sync::Arc<dyn super::stub::dynamic::BinauthzManagementServiceV1>,
79}
80
81impl BinauthzManagementServiceV1 {
82    /// Returns a builder for [BinauthzManagementServiceV1].
83    ///
84    /// ```
85    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
86    /// # use google_cloud_binaryauthorization_v1::client::BinauthzManagementServiceV1;
87    /// let client = BinauthzManagementServiceV1::builder().build().await?;
88    /// # Ok(()) }
89    /// ```
90    pub fn builder() -> super::builder::binauthz_management_service_v_1::ClientBuilder {
91        crate::new_client_builder(super::builder::binauthz_management_service_v_1::client::Factory)
92    }
93
94    /// Creates a new client from the provided stub.
95    ///
96    /// The most common case for calling this function is in tests mocking the
97    /// client's behavior.
98    pub fn from_stub<T>(stub: T) -> Self
99    where
100        T: super::stub::BinauthzManagementServiceV1 + 'static,
101    {
102        Self {
103            inner: std::sync::Arc::new(stub),
104        }
105    }
106
107    pub(crate) async fn new(
108        config: gaxi::options::ClientConfig,
109    ) -> crate::ClientBuilderResult<Self> {
110        let inner = Self::build_inner(config).await?;
111        Ok(Self { inner })
112    }
113
114    async fn build_inner(
115        conf: gaxi::options::ClientConfig,
116    ) -> crate::ClientBuilderResult<
117        std::sync::Arc<dyn super::stub::dynamic::BinauthzManagementServiceV1>,
118    > {
119        if gaxi::options::tracing_enabled(&conf) {
120            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
121        }
122        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
123    }
124
125    async fn build_transport(
126        conf: gaxi::options::ClientConfig,
127    ) -> crate::ClientBuilderResult<impl super::stub::BinauthzManagementServiceV1> {
128        super::transport::BinauthzManagementServiceV1::new(conf).await
129    }
130
131    async fn build_with_tracing(
132        conf: gaxi::options::ClientConfig,
133    ) -> crate::ClientBuilderResult<impl super::stub::BinauthzManagementServiceV1> {
134        Self::build_transport(conf)
135            .await
136            .map(super::tracing::BinauthzManagementServiceV1::new)
137    }
138
139    /// A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to
140    /// a container image, before the project is allowed to deploy that
141    /// image. There is at most one policy per project. All image admission
142    /// requests are permitted if a project has no policy.
143    ///
144    /// Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a default
145    /// [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one.
146    ///
147    /// [google.cloud.binaryauthorization.v1.Attestor]: crate::model::Attestor
148    /// [google.cloud.binaryauthorization.v1.Policy]: crate::model::Policy
149    ///
150    /// # Example
151    /// ```
152    /// # use google_cloud_binaryauthorization_v1::client::BinauthzManagementServiceV1;
153    /// use google_cloud_binaryauthorization_v1::Result;
154    /// async fn sample(
155    ///    client: &BinauthzManagementServiceV1, name: &str
156    /// ) -> Result<()> {
157    ///     let response = client.get_policy()
158    ///         .set_name(name)
159    ///         .send().await?;
160    ///     println!("response {:?}", response);
161    ///     Ok(())
162    /// }
163    /// ```
164    pub fn get_policy(&self) -> super::builder::binauthz_management_service_v_1::GetPolicy {
165        super::builder::binauthz_management_service_v_1::GetPolicy::new(self.inner.clone())
166    }
167
168    /// Creates or updates a project's [policy][google.cloud.binaryauthorization.v1.Policy], and returns a copy of the
169    /// new [policy][google.cloud.binaryauthorization.v1.Policy]. A policy is always updated as a whole, to avoid race
170    /// conditions with concurrent policy enforcement (or management!)
171    /// requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT
172    /// if the request is malformed.
173    ///
174    /// [google.cloud.binaryauthorization.v1.Policy]: crate::model::Policy
175    ///
176    /// # Example
177    /// ```
178    /// # use google_cloud_binaryauthorization_v1::client::BinauthzManagementServiceV1;
179    /// use google_cloud_binaryauthorization_v1::model::Policy;
180    /// use google_cloud_binaryauthorization_v1::Result;
181    /// async fn sample(
182    ///    client: &BinauthzManagementServiceV1, name: &str
183    /// ) -> Result<()> {
184    ///     let response = client.update_policy()
185    ///         .set_policy(
186    ///             Policy::new().set_name(name)/* set fields */
187    ///         )
188    ///         .send().await?;
189    ///     println!("response {:?}", response);
190    ///     Ok(())
191    /// }
192    /// ```
193    pub fn update_policy(&self) -> super::builder::binauthz_management_service_v_1::UpdatePolicy {
194        super::builder::binauthz_management_service_v_1::UpdatePolicy::new(self.inner.clone())
195    }
196
197    /// Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the new
198    /// [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project does not exist,
199    /// INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the
200    /// [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists.
201    ///
202    /// [google.cloud.binaryauthorization.v1.Attestor]: crate::model::Attestor
203    ///
204    /// # Example
205    /// ```
206    /// # use google_cloud_binaryauthorization_v1::client::BinauthzManagementServiceV1;
207    /// use google_cloud_binaryauthorization_v1::model::Attestor;
208    /// use google_cloud_binaryauthorization_v1::Result;
209    /// async fn sample(
210    ///    client: &BinauthzManagementServiceV1, parent: &str
211    /// ) -> Result<()> {
212    ///     let response = client.create_attestor()
213    ///         .set_parent(parent)
214    ///         .set_attestor_id("attestor_id_value")
215    ///         .set_attestor(
216    ///             Attestor::new()/* set fields */
217    ///         )
218    ///         .send().await?;
219    ///     println!("response {:?}", response);
220    ///     Ok(())
221    /// }
222    /// ```
223    pub fn create_attestor(
224        &self,
225    ) -> super::builder::binauthz_management_service_v_1::CreateAttestor {
226        super::builder::binauthz_management_service_v_1::CreateAttestor::new(self.inner.clone())
227    }
228
229    /// Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor].
230    /// Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
231    ///
232    /// [google.cloud.binaryauthorization.v1.Attestor]: crate::model::Attestor
233    ///
234    /// # Example
235    /// ```
236    /// # use google_cloud_binaryauthorization_v1::client::BinauthzManagementServiceV1;
237    /// use google_cloud_binaryauthorization_v1::Result;
238    /// async fn sample(
239    ///    client: &BinauthzManagementServiceV1, name: &str
240    /// ) -> Result<()> {
241    ///     let response = client.get_attestor()
242    ///         .set_name(name)
243    ///         .send().await?;
244    ///     println!("response {:?}", response);
245    ///     Ok(())
246    /// }
247    /// ```
248    pub fn get_attestor(&self) -> super::builder::binauthz_management_service_v_1::GetAttestor {
249        super::builder::binauthz_management_service_v_1::GetAttestor::new(self.inner.clone())
250    }
251
252    /// Updates an [attestor][google.cloud.binaryauthorization.v1.Attestor].
253    /// Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
254    ///
255    /// [google.cloud.binaryauthorization.v1.Attestor]: crate::model::Attestor
256    ///
257    /// # Example
258    /// ```
259    /// # use google_cloud_binaryauthorization_v1::client::BinauthzManagementServiceV1;
260    /// use google_cloud_binaryauthorization_v1::model::Attestor;
261    /// use google_cloud_binaryauthorization_v1::Result;
262    /// async fn sample(
263    ///    client: &BinauthzManagementServiceV1, name: &str
264    /// ) -> Result<()> {
265    ///     let response = client.update_attestor()
266    ///         .set_attestor(
267    ///             Attestor::new().set_name(name)/* set fields */
268    ///         )
269    ///         .send().await?;
270    ///     println!("response {:?}", response);
271    ///     Ok(())
272    /// }
273    /// ```
274    pub fn update_attestor(
275        &self,
276    ) -> super::builder::binauthz_management_service_v_1::UpdateAttestor {
277        super::builder::binauthz_management_service_v_1::UpdateAttestor::new(self.inner.clone())
278    }
279
280    /// Lists [attestors][google.cloud.binaryauthorization.v1.Attestor].
281    /// Returns INVALID_ARGUMENT if the project does not exist.
282    ///
283    /// [google.cloud.binaryauthorization.v1.Attestor]: crate::model::Attestor
284    ///
285    /// # Example
286    /// ```
287    /// # use google_cloud_binaryauthorization_v1::client::BinauthzManagementServiceV1;
288    /// use google_cloud_gax::paginator::ItemPaginator as _;
289    /// use google_cloud_binaryauthorization_v1::Result;
290    /// async fn sample(
291    ///    client: &BinauthzManagementServiceV1, parent: &str
292    /// ) -> Result<()> {
293    ///     let mut list = client.list_attestors()
294    ///         .set_parent(parent)
295    ///         .by_item();
296    ///     while let Some(item) = list.next().await.transpose()? {
297    ///         println!("{:?}", item);
298    ///     }
299    ///     Ok(())
300    /// }
301    /// ```
302    pub fn list_attestors(&self) -> super::builder::binauthz_management_service_v_1::ListAttestors {
303        super::builder::binauthz_management_service_v_1::ListAttestors::new(self.inner.clone())
304    }
305
306    /// Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the
307    /// [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
308    ///
309    /// [google.cloud.binaryauthorization.v1.Attestor]: crate::model::Attestor
310    ///
311    /// # Example
312    /// ```
313    /// # use google_cloud_binaryauthorization_v1::client::BinauthzManagementServiceV1;
314    /// use google_cloud_binaryauthorization_v1::Result;
315    /// async fn sample(
316    ///    client: &BinauthzManagementServiceV1, name: &str
317    /// ) -> Result<()> {
318    ///     client.delete_attestor()
319    ///         .set_name(name)
320    ///         .send().await?;
321    ///     Ok(())
322    /// }
323    /// ```
324    pub fn delete_attestor(
325        &self,
326    ) -> super::builder::binauthz_management_service_v_1::DeleteAttestor {
327        super::builder::binauthz_management_service_v_1::DeleteAttestor::new(self.inner.clone())
328    }
329}
330
331/// Implements a client for the Binary Authorization API.
332///
333/// # Example
334/// ```
335/// # use google_cloud_binaryauthorization_v1::client::SystemPolicyV1;
336/// # async fn sample() -> Result<(), Box<dyn std::error::Error>> {
337///     let client = SystemPolicyV1::builder().build().await?;
338///     let name = "name_value";
339///     let response = client.get_system_policy()
340///         .set_name(name)
341///         .send().await?;
342///     println!("response {:?}", response);
343/// # Ok(()) }
344/// ```
345///
346/// # Service Description
347///
348/// API for working with the system policy.
349///
350/// # Configuration
351///
352/// To configure `SystemPolicyV1` use the `with_*` methods in the type returned
353/// by [builder()][SystemPolicyV1::builder]. The default configuration should
354/// work for most applications. Common configuration changes include
355///
356/// * [with_endpoint()]: by default this client uses the global default endpoint
357///   (`https://binaryauthorization.googleapis.com`). Applications using regional
358///   endpoints or running in restricted networks (e.g. a network configured
359//    with [Private Google Access with VPC Service Controls]) may want to
360///   override this default.
361/// * [with_credentials()]: by default this client uses
362///   [Application Default Credentials]. Applications using custom
363///   authentication may need to override this default.
364///
365/// [with_endpoint()]: super::builder::system_policy_v_1::ClientBuilder::with_endpoint
366/// [with_credentials()]: super::builder::system_policy_v_1::ClientBuilder::with_credentials
367/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
368/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
369///
370/// # Pooling and Cloning
371///
372/// `SystemPolicyV1` holds a connection pool internally, it is advised to
373/// create one and reuse it. You do not need to wrap `SystemPolicyV1` in
374/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
375/// already uses an `Arc` internally.
376#[derive(Clone, Debug)]
377pub struct SystemPolicyV1 {
378    inner: std::sync::Arc<dyn super::stub::dynamic::SystemPolicyV1>,
379}
380
381impl SystemPolicyV1 {
382    /// Returns a builder for [SystemPolicyV1].
383    ///
384    /// ```
385    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
386    /// # use google_cloud_binaryauthorization_v1::client::SystemPolicyV1;
387    /// let client = SystemPolicyV1::builder().build().await?;
388    /// # Ok(()) }
389    /// ```
390    pub fn builder() -> super::builder::system_policy_v_1::ClientBuilder {
391        crate::new_client_builder(super::builder::system_policy_v_1::client::Factory)
392    }
393
394    /// Creates a new client from the provided stub.
395    ///
396    /// The most common case for calling this function is in tests mocking the
397    /// client's behavior.
398    pub fn from_stub<T>(stub: T) -> Self
399    where
400        T: super::stub::SystemPolicyV1 + 'static,
401    {
402        Self {
403            inner: std::sync::Arc::new(stub),
404        }
405    }
406
407    pub(crate) async fn new(
408        config: gaxi::options::ClientConfig,
409    ) -> crate::ClientBuilderResult<Self> {
410        let inner = Self::build_inner(config).await?;
411        Ok(Self { inner })
412    }
413
414    async fn build_inner(
415        conf: gaxi::options::ClientConfig,
416    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::SystemPolicyV1>> {
417        if gaxi::options::tracing_enabled(&conf) {
418            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
419        }
420        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
421    }
422
423    async fn build_transport(
424        conf: gaxi::options::ClientConfig,
425    ) -> crate::ClientBuilderResult<impl super::stub::SystemPolicyV1> {
426        super::transport::SystemPolicyV1::new(conf).await
427    }
428
429    async fn build_with_tracing(
430        conf: gaxi::options::ClientConfig,
431    ) -> crate::ClientBuilderResult<impl super::stub::SystemPolicyV1> {
432        Self::build_transport(conf)
433            .await
434            .map(super::tracing::SystemPolicyV1::new)
435    }
436
437    /// Gets the current system policy in the specified location.
438    ///
439    /// # Example
440    /// ```
441    /// # use google_cloud_binaryauthorization_v1::client::SystemPolicyV1;
442    /// use google_cloud_binaryauthorization_v1::Result;
443    /// async fn sample(
444    ///    client: &SystemPolicyV1, name: &str
445    /// ) -> Result<()> {
446    ///     let response = client.get_system_policy()
447    ///         .set_name(name)
448    ///         .send().await?;
449    ///     println!("response {:?}", response);
450    ///     Ok(())
451    /// }
452    /// ```
453    pub fn get_system_policy(&self) -> super::builder::system_policy_v_1::GetSystemPolicy {
454        super::builder::system_policy_v_1::GetSystemPolicy::new(self.inner.clone())
455    }
456}
457
458/// Implements a client for the Binary Authorization API.
459///
460/// # Example
461/// ```
462/// # use google_cloud_binaryauthorization_v1::client::ValidationHelperV1;
463/// # async fn sample() -> Result<(), Box<dyn std::error::Error>> {
464///     let client = ValidationHelperV1::builder().build().await?;
465///     let response = client.validate_attestation_occurrence()
466///         /* set fields */
467///         .send().await?;
468///     println!("response {:?}", response);
469/// # Ok(()) }
470/// ```
471///
472/// # Service Description
473///
474/// BinAuthz Attestor verification
475///
476/// # Configuration
477///
478/// To configure `ValidationHelperV1` use the `with_*` methods in the type returned
479/// by [builder()][ValidationHelperV1::builder]. The default configuration should
480/// work for most applications. Common configuration changes include
481///
482/// * [with_endpoint()]: by default this client uses the global default endpoint
483///   (`https://binaryauthorization.googleapis.com`). Applications using regional
484///   endpoints or running in restricted networks (e.g. a network configured
485//    with [Private Google Access with VPC Service Controls]) may want to
486///   override this default.
487/// * [with_credentials()]: by default this client uses
488///   [Application Default Credentials]. Applications using custom
489///   authentication may need to override this default.
490///
491/// [with_endpoint()]: super::builder::validation_helper_v_1::ClientBuilder::with_endpoint
492/// [with_credentials()]: super::builder::validation_helper_v_1::ClientBuilder::with_credentials
493/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
494/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
495///
496/// # Pooling and Cloning
497///
498/// `ValidationHelperV1` holds a connection pool internally, it is advised to
499/// create one and reuse it. You do not need to wrap `ValidationHelperV1` in
500/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
501/// already uses an `Arc` internally.
502#[derive(Clone, Debug)]
503pub struct ValidationHelperV1 {
504    inner: std::sync::Arc<dyn super::stub::dynamic::ValidationHelperV1>,
505}
506
507impl ValidationHelperV1 {
508    /// Returns a builder for [ValidationHelperV1].
509    ///
510    /// ```
511    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
512    /// # use google_cloud_binaryauthorization_v1::client::ValidationHelperV1;
513    /// let client = ValidationHelperV1::builder().build().await?;
514    /// # Ok(()) }
515    /// ```
516    pub fn builder() -> super::builder::validation_helper_v_1::ClientBuilder {
517        crate::new_client_builder(super::builder::validation_helper_v_1::client::Factory)
518    }
519
520    /// Creates a new client from the provided stub.
521    ///
522    /// The most common case for calling this function is in tests mocking the
523    /// client's behavior.
524    pub fn from_stub<T>(stub: T) -> Self
525    where
526        T: super::stub::ValidationHelperV1 + 'static,
527    {
528        Self {
529            inner: std::sync::Arc::new(stub),
530        }
531    }
532
533    pub(crate) async fn new(
534        config: gaxi::options::ClientConfig,
535    ) -> crate::ClientBuilderResult<Self> {
536        let inner = Self::build_inner(config).await?;
537        Ok(Self { inner })
538    }
539
540    async fn build_inner(
541        conf: gaxi::options::ClientConfig,
542    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::ValidationHelperV1>>
543    {
544        if gaxi::options::tracing_enabled(&conf) {
545            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
546        }
547        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
548    }
549
550    async fn build_transport(
551        conf: gaxi::options::ClientConfig,
552    ) -> crate::ClientBuilderResult<impl super::stub::ValidationHelperV1> {
553        super::transport::ValidationHelperV1::new(conf).await
554    }
555
556    async fn build_with_tracing(
557        conf: gaxi::options::ClientConfig,
558    ) -> crate::ClientBuilderResult<impl super::stub::ValidationHelperV1> {
559        Self::build_transport(conf)
560            .await
561            .map(super::tracing::ValidationHelperV1::new)
562    }
563
564    /// Returns whether the given Attestation for the given image URI
565    /// was signed by the given Attestor
566    ///
567    /// # Example
568    /// ```
569    /// # use google_cloud_binaryauthorization_v1::client::ValidationHelperV1;
570    /// use google_cloud_binaryauthorization_v1::Result;
571    /// async fn sample(
572    ///    client: &ValidationHelperV1
573    /// ) -> Result<()> {
574    ///     let response = client.validate_attestation_occurrence()
575    ///         /* set fields */
576    ///         .send().await?;
577    ///     println!("response {:?}", response);
578    ///     Ok(())
579    /// }
580    /// ```
581    pub fn validate_attestation_occurrence(
582        &self,
583    ) -> super::builder::validation_helper_v_1::ValidateAttestationOccurrence {
584        super::builder::validation_helper_v_1::ValidateAttestationOccurrence::new(
585            self.inner.clone(),
586        )
587    }
588}