Skip to main content

google_cloud_financialservices_v1/
builder.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
17/// Request and client builders for [Aml][crate::client::Aml].
18pub mod aml {
19    use crate::Result;
20
21    /// A builder for [Aml][crate::client::Aml].
22    ///
23    /// ```
24    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
25    /// # use google_cloud_financialservices_v1::*;
26    /// # use builder::aml::ClientBuilder;
27    /// # use client::Aml;
28    /// let builder : ClientBuilder = Aml::builder();
29    /// let client = builder
30    ///     .with_endpoint("https://financialservices.googleapis.com")
31    ///     .build().await?;
32    /// # Ok(()) }
33    /// ```
34    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
35
36    pub(crate) mod client {
37        use super::super::super::client::Aml;
38        pub struct Factory;
39        impl crate::ClientFactory for Factory {
40            type Client = Aml;
41            type Credentials = gaxi::options::Credentials;
42            async fn build(
43                self,
44                config: gaxi::options::ClientConfig,
45            ) -> crate::ClientBuilderResult<Self::Client> {
46                Self::Client::new(config).await
47            }
48        }
49    }
50
51    /// Common implementation for [crate::client::Aml] request builders.
52    #[derive(Clone, Debug)]
53    pub(crate) struct RequestBuilder<R: std::default::Default> {
54        stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>,
55        request: R,
56        options: crate::RequestOptions,
57    }
58
59    impl<R> RequestBuilder<R>
60    where
61        R: std::default::Default,
62    {
63        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
64            Self {
65                stub,
66                request: R::default(),
67                options: crate::RequestOptions::default(),
68            }
69        }
70    }
71
72    /// The request builder for [Aml::list_instances][crate::client::Aml::list_instances] calls.
73    ///
74    /// # Example
75    /// ```
76    /// # use google_cloud_financialservices_v1::builder::aml::ListInstances;
77    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
78    /// use google_cloud_gax::paginator::ItemPaginator;
79    ///
80    /// let builder = prepare_request_builder();
81    /// let mut items = builder.by_item();
82    /// while let Some(result) = items.next().await {
83    ///   let item = result?;
84    /// }
85    /// # Ok(()) }
86    ///
87    /// fn prepare_request_builder() -> ListInstances {
88    ///   # panic!();
89    ///   // ... details omitted ...
90    /// }
91    /// ```
92    #[derive(Clone, Debug)]
93    pub struct ListInstances(RequestBuilder<crate::model::ListInstancesRequest>);
94
95    impl ListInstances {
96        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
97            Self(RequestBuilder::new(stub))
98        }
99
100        /// Sets the full request, replacing any prior values.
101        pub fn with_request<V: Into<crate::model::ListInstancesRequest>>(mut self, v: V) -> Self {
102            self.0.request = v.into();
103            self
104        }
105
106        /// Sets all the options, replacing any prior values.
107        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
108            self.0.options = v.into();
109            self
110        }
111
112        /// Sends the request.
113        pub async fn send(self) -> Result<crate::model::ListInstancesResponse> {
114            (*self.0.stub)
115                .list_instances(self.0.request, self.0.options)
116                .await
117                .map(crate::Response::into_body)
118        }
119
120        /// Streams each page in the collection.
121        pub fn by_page(
122            self,
123        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListInstancesResponse, crate::Error>
124        {
125            use std::clone::Clone;
126            let token = self.0.request.page_token.clone();
127            let execute = move |token: String| {
128                let mut builder = self.clone();
129                builder.0.request = builder.0.request.set_page_token(token);
130                builder.send()
131            };
132            google_cloud_gax::paginator::internal::new_paginator(token, execute)
133        }
134
135        /// Streams each item in the collection.
136        pub fn by_item(
137            self,
138        ) -> impl google_cloud_gax::paginator::ItemPaginator<
139            crate::model::ListInstancesResponse,
140            crate::Error,
141        > {
142            use google_cloud_gax::paginator::Paginator;
143            self.by_page().items()
144        }
145
146        /// Sets the value of [parent][crate::model::ListInstancesRequest::parent].
147        ///
148        /// This is a **required** field for requests.
149        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
150            self.0.request.parent = v.into();
151            self
152        }
153
154        /// Sets the value of [page_size][crate::model::ListInstancesRequest::page_size].
155        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
156            self.0.request.page_size = v.into();
157            self
158        }
159
160        /// Sets the value of [page_token][crate::model::ListInstancesRequest::page_token].
161        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
162            self.0.request.page_token = v.into();
163            self
164        }
165
166        /// Sets the value of [filter][crate::model::ListInstancesRequest::filter].
167        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
168            self.0.request.filter = v.into();
169            self
170        }
171
172        /// Sets the value of [order_by][crate::model::ListInstancesRequest::order_by].
173        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
174            self.0.request.order_by = v.into();
175            self
176        }
177    }
178
179    #[doc(hidden)]
180    impl crate::RequestBuilder for ListInstances {
181        fn request_options(&mut self) -> &mut crate::RequestOptions {
182            &mut self.0.options
183        }
184    }
185
186    /// The request builder for [Aml::get_instance][crate::client::Aml::get_instance] calls.
187    ///
188    /// # Example
189    /// ```
190    /// # use google_cloud_financialservices_v1::builder::aml::GetInstance;
191    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
192    ///
193    /// let builder = prepare_request_builder();
194    /// let response = builder.send().await?;
195    /// # Ok(()) }
196    ///
197    /// fn prepare_request_builder() -> GetInstance {
198    ///   # panic!();
199    ///   // ... details omitted ...
200    /// }
201    /// ```
202    #[derive(Clone, Debug)]
203    pub struct GetInstance(RequestBuilder<crate::model::GetInstanceRequest>);
204
205    impl GetInstance {
206        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
207            Self(RequestBuilder::new(stub))
208        }
209
210        /// Sets the full request, replacing any prior values.
211        pub fn with_request<V: Into<crate::model::GetInstanceRequest>>(mut self, v: V) -> Self {
212            self.0.request = v.into();
213            self
214        }
215
216        /// Sets all the options, replacing any prior values.
217        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
218            self.0.options = v.into();
219            self
220        }
221
222        /// Sends the request.
223        pub async fn send(self) -> Result<crate::model::Instance> {
224            (*self.0.stub)
225                .get_instance(self.0.request, self.0.options)
226                .await
227                .map(crate::Response::into_body)
228        }
229
230        /// Sets the value of [name][crate::model::GetInstanceRequest::name].
231        ///
232        /// This is a **required** field for requests.
233        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
234            self.0.request.name = v.into();
235            self
236        }
237    }
238
239    #[doc(hidden)]
240    impl crate::RequestBuilder for GetInstance {
241        fn request_options(&mut self) -> &mut crate::RequestOptions {
242            &mut self.0.options
243        }
244    }
245
246    /// The request builder for [Aml::create_instance][crate::client::Aml::create_instance] calls.
247    ///
248    /// # Example
249    /// ```
250    /// # use google_cloud_financialservices_v1::builder::aml::CreateInstance;
251    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
252    /// use google_cloud_lro::Poller;
253    ///
254    /// let builder = prepare_request_builder();
255    /// let response = builder.poller().until_done().await?;
256    /// # Ok(()) }
257    ///
258    /// fn prepare_request_builder() -> CreateInstance {
259    ///   # panic!();
260    ///   // ... details omitted ...
261    /// }
262    /// ```
263    #[derive(Clone, Debug)]
264    pub struct CreateInstance(RequestBuilder<crate::model::CreateInstanceRequest>);
265
266    impl CreateInstance {
267        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
268            Self(RequestBuilder::new(stub))
269        }
270
271        /// Sets the full request, replacing any prior values.
272        pub fn with_request<V: Into<crate::model::CreateInstanceRequest>>(mut self, v: V) -> Self {
273            self.0.request = v.into();
274            self
275        }
276
277        /// Sets all the options, replacing any prior values.
278        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
279            self.0.options = v.into();
280            self
281        }
282
283        /// Sends the request.
284        ///
285        /// # Long running operations
286        ///
287        /// This starts, but does not poll, a longrunning operation. More information
288        /// on [create_instance][crate::client::Aml::create_instance].
289        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
290            (*self.0.stub)
291                .create_instance(self.0.request, self.0.options)
292                .await
293                .map(crate::Response::into_body)
294        }
295
296        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_instance`.
297        pub fn poller(
298            self,
299        ) -> impl google_cloud_lro::Poller<crate::model::Instance, crate::model::OperationMetadata>
300        {
301            type Operation = google_cloud_lro::internal::Operation<
302                crate::model::Instance,
303                crate::model::OperationMetadata,
304            >;
305            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
306            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
307
308            let stub = self.0.stub.clone();
309            let mut options = self.0.options.clone();
310            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
311            let query = move |name| {
312                let stub = stub.clone();
313                let options = options.clone();
314                async {
315                    let op = GetOperation::new(stub)
316                        .set_name(name)
317                        .with_options(options)
318                        .send()
319                        .await?;
320                    Ok(Operation::new(op))
321                }
322            };
323
324            let start = move || async {
325                let op = self.send().await?;
326                Ok(Operation::new(op))
327            };
328
329            google_cloud_lro::internal::new_poller(
330                polling_error_policy,
331                polling_backoff_policy,
332                start,
333                query,
334            )
335        }
336
337        /// Sets the value of [parent][crate::model::CreateInstanceRequest::parent].
338        ///
339        /// This is a **required** field for requests.
340        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
341            self.0.request.parent = v.into();
342            self
343        }
344
345        /// Sets the value of [instance_id][crate::model::CreateInstanceRequest::instance_id].
346        ///
347        /// This is a **required** field for requests.
348        pub fn set_instance_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
349            self.0.request.instance_id = v.into();
350            self
351        }
352
353        /// Sets the value of [instance][crate::model::CreateInstanceRequest::instance].
354        ///
355        /// This is a **required** field for requests.
356        pub fn set_instance<T>(mut self, v: T) -> Self
357        where
358            T: std::convert::Into<crate::model::Instance>,
359        {
360            self.0.request.instance = std::option::Option::Some(v.into());
361            self
362        }
363
364        /// Sets or clears the value of [instance][crate::model::CreateInstanceRequest::instance].
365        ///
366        /// This is a **required** field for requests.
367        pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
368        where
369            T: std::convert::Into<crate::model::Instance>,
370        {
371            self.0.request.instance = v.map(|x| x.into());
372            self
373        }
374
375        /// Sets the value of [request_id][crate::model::CreateInstanceRequest::request_id].
376        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
377            self.0.request.request_id = v.into();
378            self
379        }
380    }
381
382    #[doc(hidden)]
383    impl crate::RequestBuilder for CreateInstance {
384        fn request_options(&mut self) -> &mut crate::RequestOptions {
385            &mut self.0.options
386        }
387    }
388
389    /// The request builder for [Aml::update_instance][crate::client::Aml::update_instance] calls.
390    ///
391    /// # Example
392    /// ```
393    /// # use google_cloud_financialservices_v1::builder::aml::UpdateInstance;
394    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
395    /// use google_cloud_lro::Poller;
396    ///
397    /// let builder = prepare_request_builder();
398    /// let response = builder.poller().until_done().await?;
399    /// # Ok(()) }
400    ///
401    /// fn prepare_request_builder() -> UpdateInstance {
402    ///   # panic!();
403    ///   // ... details omitted ...
404    /// }
405    /// ```
406    #[derive(Clone, Debug)]
407    pub struct UpdateInstance(RequestBuilder<crate::model::UpdateInstanceRequest>);
408
409    impl UpdateInstance {
410        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
411            Self(RequestBuilder::new(stub))
412        }
413
414        /// Sets the full request, replacing any prior values.
415        pub fn with_request<V: Into<crate::model::UpdateInstanceRequest>>(mut self, v: V) -> Self {
416            self.0.request = v.into();
417            self
418        }
419
420        /// Sets all the options, replacing any prior values.
421        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
422            self.0.options = v.into();
423            self
424        }
425
426        /// Sends the request.
427        ///
428        /// # Long running operations
429        ///
430        /// This starts, but does not poll, a longrunning operation. More information
431        /// on [update_instance][crate::client::Aml::update_instance].
432        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
433            (*self.0.stub)
434                .update_instance(self.0.request, self.0.options)
435                .await
436                .map(crate::Response::into_body)
437        }
438
439        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_instance`.
440        pub fn poller(
441            self,
442        ) -> impl google_cloud_lro::Poller<crate::model::Instance, crate::model::OperationMetadata>
443        {
444            type Operation = google_cloud_lro::internal::Operation<
445                crate::model::Instance,
446                crate::model::OperationMetadata,
447            >;
448            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
449            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
450
451            let stub = self.0.stub.clone();
452            let mut options = self.0.options.clone();
453            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
454            let query = move |name| {
455                let stub = stub.clone();
456                let options = options.clone();
457                async {
458                    let op = GetOperation::new(stub)
459                        .set_name(name)
460                        .with_options(options)
461                        .send()
462                        .await?;
463                    Ok(Operation::new(op))
464                }
465            };
466
467            let start = move || async {
468                let op = self.send().await?;
469                Ok(Operation::new(op))
470            };
471
472            google_cloud_lro::internal::new_poller(
473                polling_error_policy,
474                polling_backoff_policy,
475                start,
476                query,
477            )
478        }
479
480        /// Sets the value of [update_mask][crate::model::UpdateInstanceRequest::update_mask].
481        pub fn set_update_mask<T>(mut self, v: T) -> Self
482        where
483            T: std::convert::Into<wkt::FieldMask>,
484        {
485            self.0.request.update_mask = std::option::Option::Some(v.into());
486            self
487        }
488
489        /// Sets or clears the value of [update_mask][crate::model::UpdateInstanceRequest::update_mask].
490        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
491        where
492            T: std::convert::Into<wkt::FieldMask>,
493        {
494            self.0.request.update_mask = v.map(|x| x.into());
495            self
496        }
497
498        /// Sets the value of [instance][crate::model::UpdateInstanceRequest::instance].
499        ///
500        /// This is a **required** field for requests.
501        pub fn set_instance<T>(mut self, v: T) -> Self
502        where
503            T: std::convert::Into<crate::model::Instance>,
504        {
505            self.0.request.instance = std::option::Option::Some(v.into());
506            self
507        }
508
509        /// Sets or clears the value of [instance][crate::model::UpdateInstanceRequest::instance].
510        ///
511        /// This is a **required** field for requests.
512        pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
513        where
514            T: std::convert::Into<crate::model::Instance>,
515        {
516            self.0.request.instance = v.map(|x| x.into());
517            self
518        }
519
520        /// Sets the value of [request_id][crate::model::UpdateInstanceRequest::request_id].
521        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
522            self.0.request.request_id = v.into();
523            self
524        }
525    }
526
527    #[doc(hidden)]
528    impl crate::RequestBuilder for UpdateInstance {
529        fn request_options(&mut self) -> &mut crate::RequestOptions {
530            &mut self.0.options
531        }
532    }
533
534    /// The request builder for [Aml::delete_instance][crate::client::Aml::delete_instance] calls.
535    ///
536    /// # Example
537    /// ```
538    /// # use google_cloud_financialservices_v1::builder::aml::DeleteInstance;
539    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
540    /// use google_cloud_lro::Poller;
541    ///
542    /// let builder = prepare_request_builder();
543    /// let response = builder.poller().until_done().await?;
544    /// # Ok(()) }
545    ///
546    /// fn prepare_request_builder() -> DeleteInstance {
547    ///   # panic!();
548    ///   // ... details omitted ...
549    /// }
550    /// ```
551    #[derive(Clone, Debug)]
552    pub struct DeleteInstance(RequestBuilder<crate::model::DeleteInstanceRequest>);
553
554    impl DeleteInstance {
555        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
556            Self(RequestBuilder::new(stub))
557        }
558
559        /// Sets the full request, replacing any prior values.
560        pub fn with_request<V: Into<crate::model::DeleteInstanceRequest>>(mut self, v: V) -> Self {
561            self.0.request = v.into();
562            self
563        }
564
565        /// Sets all the options, replacing any prior values.
566        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
567            self.0.options = v.into();
568            self
569        }
570
571        /// Sends the request.
572        ///
573        /// # Long running operations
574        ///
575        /// This starts, but does not poll, a longrunning operation. More information
576        /// on [delete_instance][crate::client::Aml::delete_instance].
577        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
578            (*self.0.stub)
579                .delete_instance(self.0.request, self.0.options)
580                .await
581                .map(crate::Response::into_body)
582        }
583
584        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_instance`.
585        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
586            type Operation =
587                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
588            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
589            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
590
591            let stub = self.0.stub.clone();
592            let mut options = self.0.options.clone();
593            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
594            let query = move |name| {
595                let stub = stub.clone();
596                let options = options.clone();
597                async {
598                    let op = GetOperation::new(stub)
599                        .set_name(name)
600                        .with_options(options)
601                        .send()
602                        .await?;
603                    Ok(Operation::new(op))
604                }
605            };
606
607            let start = move || async {
608                let op = self.send().await?;
609                Ok(Operation::new(op))
610            };
611
612            google_cloud_lro::internal::new_unit_response_poller(
613                polling_error_policy,
614                polling_backoff_policy,
615                start,
616                query,
617            )
618        }
619
620        /// Sets the value of [name][crate::model::DeleteInstanceRequest::name].
621        ///
622        /// This is a **required** field for requests.
623        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
624            self.0.request.name = v.into();
625            self
626        }
627
628        /// Sets the value of [request_id][crate::model::DeleteInstanceRequest::request_id].
629        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
630            self.0.request.request_id = v.into();
631            self
632        }
633    }
634
635    #[doc(hidden)]
636    impl crate::RequestBuilder for DeleteInstance {
637        fn request_options(&mut self) -> &mut crate::RequestOptions {
638            &mut self.0.options
639        }
640    }
641
642    /// The request builder for [Aml::import_registered_parties][crate::client::Aml::import_registered_parties] calls.
643    ///
644    /// # Example
645    /// ```
646    /// # use google_cloud_financialservices_v1::builder::aml::ImportRegisteredParties;
647    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
648    /// use google_cloud_lro::Poller;
649    ///
650    /// let builder = prepare_request_builder();
651    /// let response = builder.poller().until_done().await?;
652    /// # Ok(()) }
653    ///
654    /// fn prepare_request_builder() -> ImportRegisteredParties {
655    ///   # panic!();
656    ///   // ... details omitted ...
657    /// }
658    /// ```
659    #[derive(Clone, Debug)]
660    pub struct ImportRegisteredParties(
661        RequestBuilder<crate::model::ImportRegisteredPartiesRequest>,
662    );
663
664    impl ImportRegisteredParties {
665        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
666            Self(RequestBuilder::new(stub))
667        }
668
669        /// Sets the full request, replacing any prior values.
670        pub fn with_request<V: Into<crate::model::ImportRegisteredPartiesRequest>>(
671            mut self,
672            v: V,
673        ) -> Self {
674            self.0.request = v.into();
675            self
676        }
677
678        /// Sets all the options, replacing any prior values.
679        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
680            self.0.options = v.into();
681            self
682        }
683
684        /// Sends the request.
685        ///
686        /// # Long running operations
687        ///
688        /// This starts, but does not poll, a longrunning operation. More information
689        /// on [import_registered_parties][crate::client::Aml::import_registered_parties].
690        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
691            (*self.0.stub)
692                .import_registered_parties(self.0.request, self.0.options)
693                .await
694                .map(crate::Response::into_body)
695        }
696
697        /// Creates a [Poller][google_cloud_lro::Poller] to work with `import_registered_parties`.
698        pub fn poller(
699            self,
700        ) -> impl google_cloud_lro::Poller<
701            crate::model::ImportRegisteredPartiesResponse,
702            crate::model::OperationMetadata,
703        > {
704            type Operation = google_cloud_lro::internal::Operation<
705                crate::model::ImportRegisteredPartiesResponse,
706                crate::model::OperationMetadata,
707            >;
708            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
709            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
710
711            let stub = self.0.stub.clone();
712            let mut options = self.0.options.clone();
713            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
714            let query = move |name| {
715                let stub = stub.clone();
716                let options = options.clone();
717                async {
718                    let op = GetOperation::new(stub)
719                        .set_name(name)
720                        .with_options(options)
721                        .send()
722                        .await?;
723                    Ok(Operation::new(op))
724                }
725            };
726
727            let start = move || async {
728                let op = self.send().await?;
729                Ok(Operation::new(op))
730            };
731
732            google_cloud_lro::internal::new_poller(
733                polling_error_policy,
734                polling_backoff_policy,
735                start,
736                query,
737            )
738        }
739
740        /// Sets the value of [name][crate::model::ImportRegisteredPartiesRequest::name].
741        ///
742        /// This is a **required** field for requests.
743        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
744            self.0.request.name = v.into();
745            self
746        }
747
748        /// Sets the value of [party_tables][crate::model::ImportRegisteredPartiesRequest::party_tables].
749        pub fn set_party_tables<T, V>(mut self, v: T) -> Self
750        where
751            T: std::iter::IntoIterator<Item = V>,
752            V: std::convert::Into<std::string::String>,
753        {
754            use std::iter::Iterator;
755            self.0.request.party_tables = v.into_iter().map(|i| i.into()).collect();
756            self
757        }
758
759        /// Sets the value of [mode][crate::model::ImportRegisteredPartiesRequest::mode].
760        ///
761        /// This is a **required** field for requests.
762        pub fn set_mode<T: Into<crate::model::import_registered_parties_request::UpdateMode>>(
763            mut self,
764            v: T,
765        ) -> Self {
766            self.0.request.mode = v.into();
767            self
768        }
769
770        /// Sets the value of [validate_only][crate::model::ImportRegisteredPartiesRequest::validate_only].
771        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
772            self.0.request.validate_only = v.into();
773            self
774        }
775
776        /// Sets the value of [line_of_business][crate::model::ImportRegisteredPartiesRequest::line_of_business].
777        ///
778        /// This is a **required** field for requests.
779        pub fn set_line_of_business<T: Into<crate::model::LineOfBusiness>>(mut self, v: T) -> Self {
780            self.0.request.line_of_business = v.into();
781            self
782        }
783    }
784
785    #[doc(hidden)]
786    impl crate::RequestBuilder for ImportRegisteredParties {
787        fn request_options(&mut self) -> &mut crate::RequestOptions {
788            &mut self.0.options
789        }
790    }
791
792    /// The request builder for [Aml::export_registered_parties][crate::client::Aml::export_registered_parties] calls.
793    ///
794    /// # Example
795    /// ```
796    /// # use google_cloud_financialservices_v1::builder::aml::ExportRegisteredParties;
797    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
798    /// use google_cloud_lro::Poller;
799    ///
800    /// let builder = prepare_request_builder();
801    /// let response = builder.poller().until_done().await?;
802    /// # Ok(()) }
803    ///
804    /// fn prepare_request_builder() -> ExportRegisteredParties {
805    ///   # panic!();
806    ///   // ... details omitted ...
807    /// }
808    /// ```
809    #[derive(Clone, Debug)]
810    pub struct ExportRegisteredParties(
811        RequestBuilder<crate::model::ExportRegisteredPartiesRequest>,
812    );
813
814    impl ExportRegisteredParties {
815        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
816            Self(RequestBuilder::new(stub))
817        }
818
819        /// Sets the full request, replacing any prior values.
820        pub fn with_request<V: Into<crate::model::ExportRegisteredPartiesRequest>>(
821            mut self,
822            v: V,
823        ) -> Self {
824            self.0.request = v.into();
825            self
826        }
827
828        /// Sets all the options, replacing any prior values.
829        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
830            self.0.options = v.into();
831            self
832        }
833
834        /// Sends the request.
835        ///
836        /// # Long running operations
837        ///
838        /// This starts, but does not poll, a longrunning operation. More information
839        /// on [export_registered_parties][crate::client::Aml::export_registered_parties].
840        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
841            (*self.0.stub)
842                .export_registered_parties(self.0.request, self.0.options)
843                .await
844                .map(crate::Response::into_body)
845        }
846
847        /// Creates a [Poller][google_cloud_lro::Poller] to work with `export_registered_parties`.
848        pub fn poller(
849            self,
850        ) -> impl google_cloud_lro::Poller<
851            crate::model::ExportRegisteredPartiesResponse,
852            crate::model::OperationMetadata,
853        > {
854            type Operation = google_cloud_lro::internal::Operation<
855                crate::model::ExportRegisteredPartiesResponse,
856                crate::model::OperationMetadata,
857            >;
858            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
859            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
860
861            let stub = self.0.stub.clone();
862            let mut options = self.0.options.clone();
863            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
864            let query = move |name| {
865                let stub = stub.clone();
866                let options = options.clone();
867                async {
868                    let op = GetOperation::new(stub)
869                        .set_name(name)
870                        .with_options(options)
871                        .send()
872                        .await?;
873                    Ok(Operation::new(op))
874                }
875            };
876
877            let start = move || async {
878                let op = self.send().await?;
879                Ok(Operation::new(op))
880            };
881
882            google_cloud_lro::internal::new_poller(
883                polling_error_policy,
884                polling_backoff_policy,
885                start,
886                query,
887            )
888        }
889
890        /// Sets the value of [name][crate::model::ExportRegisteredPartiesRequest::name].
891        ///
892        /// This is a **required** field for requests.
893        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
894            self.0.request.name = v.into();
895            self
896        }
897
898        /// Sets the value of [dataset][crate::model::ExportRegisteredPartiesRequest::dataset].
899        ///
900        /// This is a **required** field for requests.
901        pub fn set_dataset<T>(mut self, v: T) -> Self
902        where
903            T: std::convert::Into<crate::model::BigQueryDestination>,
904        {
905            self.0.request.dataset = std::option::Option::Some(v.into());
906            self
907        }
908
909        /// Sets or clears the value of [dataset][crate::model::ExportRegisteredPartiesRequest::dataset].
910        ///
911        /// This is a **required** field for requests.
912        pub fn set_or_clear_dataset<T>(mut self, v: std::option::Option<T>) -> Self
913        where
914            T: std::convert::Into<crate::model::BigQueryDestination>,
915        {
916            self.0.request.dataset = v.map(|x| x.into());
917            self
918        }
919
920        /// Sets the value of [line_of_business][crate::model::ExportRegisteredPartiesRequest::line_of_business].
921        ///
922        /// This is a **required** field for requests.
923        pub fn set_line_of_business<T: Into<crate::model::LineOfBusiness>>(mut self, v: T) -> Self {
924            self.0.request.line_of_business = v.into();
925            self
926        }
927    }
928
929    #[doc(hidden)]
930    impl crate::RequestBuilder for ExportRegisteredParties {
931        fn request_options(&mut self) -> &mut crate::RequestOptions {
932            &mut self.0.options
933        }
934    }
935
936    /// The request builder for [Aml::list_datasets][crate::client::Aml::list_datasets] calls.
937    ///
938    /// # Example
939    /// ```
940    /// # use google_cloud_financialservices_v1::builder::aml::ListDatasets;
941    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
942    /// use google_cloud_gax::paginator::ItemPaginator;
943    ///
944    /// let builder = prepare_request_builder();
945    /// let mut items = builder.by_item();
946    /// while let Some(result) = items.next().await {
947    ///   let item = result?;
948    /// }
949    /// # Ok(()) }
950    ///
951    /// fn prepare_request_builder() -> ListDatasets {
952    ///   # panic!();
953    ///   // ... details omitted ...
954    /// }
955    /// ```
956    #[derive(Clone, Debug)]
957    pub struct ListDatasets(RequestBuilder<crate::model::ListDatasetsRequest>);
958
959    impl ListDatasets {
960        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
961            Self(RequestBuilder::new(stub))
962        }
963
964        /// Sets the full request, replacing any prior values.
965        pub fn with_request<V: Into<crate::model::ListDatasetsRequest>>(mut self, v: V) -> Self {
966            self.0.request = v.into();
967            self
968        }
969
970        /// Sets all the options, replacing any prior values.
971        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
972            self.0.options = v.into();
973            self
974        }
975
976        /// Sends the request.
977        pub async fn send(self) -> Result<crate::model::ListDatasetsResponse> {
978            (*self.0.stub)
979                .list_datasets(self.0.request, self.0.options)
980                .await
981                .map(crate::Response::into_body)
982        }
983
984        /// Streams each page in the collection.
985        pub fn by_page(
986            self,
987        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListDatasetsResponse, crate::Error>
988        {
989            use std::clone::Clone;
990            let token = self.0.request.page_token.clone();
991            let execute = move |token: String| {
992                let mut builder = self.clone();
993                builder.0.request = builder.0.request.set_page_token(token);
994                builder.send()
995            };
996            google_cloud_gax::paginator::internal::new_paginator(token, execute)
997        }
998
999        /// Streams each item in the collection.
1000        pub fn by_item(
1001            self,
1002        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1003            crate::model::ListDatasetsResponse,
1004            crate::Error,
1005        > {
1006            use google_cloud_gax::paginator::Paginator;
1007            self.by_page().items()
1008        }
1009
1010        /// Sets the value of [parent][crate::model::ListDatasetsRequest::parent].
1011        ///
1012        /// This is a **required** field for requests.
1013        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1014            self.0.request.parent = v.into();
1015            self
1016        }
1017
1018        /// Sets the value of [page_size][crate::model::ListDatasetsRequest::page_size].
1019        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1020            self.0.request.page_size = v.into();
1021            self
1022        }
1023
1024        /// Sets the value of [page_token][crate::model::ListDatasetsRequest::page_token].
1025        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1026            self.0.request.page_token = v.into();
1027            self
1028        }
1029
1030        /// Sets the value of [filter][crate::model::ListDatasetsRequest::filter].
1031        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1032            self.0.request.filter = v.into();
1033            self
1034        }
1035
1036        /// Sets the value of [order_by][crate::model::ListDatasetsRequest::order_by].
1037        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1038            self.0.request.order_by = v.into();
1039            self
1040        }
1041    }
1042
1043    #[doc(hidden)]
1044    impl crate::RequestBuilder for ListDatasets {
1045        fn request_options(&mut self) -> &mut crate::RequestOptions {
1046            &mut self.0.options
1047        }
1048    }
1049
1050    /// The request builder for [Aml::get_dataset][crate::client::Aml::get_dataset] calls.
1051    ///
1052    /// # Example
1053    /// ```
1054    /// # use google_cloud_financialservices_v1::builder::aml::GetDataset;
1055    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
1056    ///
1057    /// let builder = prepare_request_builder();
1058    /// let response = builder.send().await?;
1059    /// # Ok(()) }
1060    ///
1061    /// fn prepare_request_builder() -> GetDataset {
1062    ///   # panic!();
1063    ///   // ... details omitted ...
1064    /// }
1065    /// ```
1066    #[derive(Clone, Debug)]
1067    pub struct GetDataset(RequestBuilder<crate::model::GetDatasetRequest>);
1068
1069    impl GetDataset {
1070        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
1071            Self(RequestBuilder::new(stub))
1072        }
1073
1074        /// Sets the full request, replacing any prior values.
1075        pub fn with_request<V: Into<crate::model::GetDatasetRequest>>(mut self, v: V) -> Self {
1076            self.0.request = v.into();
1077            self
1078        }
1079
1080        /// Sets all the options, replacing any prior values.
1081        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1082            self.0.options = v.into();
1083            self
1084        }
1085
1086        /// Sends the request.
1087        pub async fn send(self) -> Result<crate::model::Dataset> {
1088            (*self.0.stub)
1089                .get_dataset(self.0.request, self.0.options)
1090                .await
1091                .map(crate::Response::into_body)
1092        }
1093
1094        /// Sets the value of [name][crate::model::GetDatasetRequest::name].
1095        ///
1096        /// This is a **required** field for requests.
1097        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1098            self.0.request.name = v.into();
1099            self
1100        }
1101    }
1102
1103    #[doc(hidden)]
1104    impl crate::RequestBuilder for GetDataset {
1105        fn request_options(&mut self) -> &mut crate::RequestOptions {
1106            &mut self.0.options
1107        }
1108    }
1109
1110    /// The request builder for [Aml::create_dataset][crate::client::Aml::create_dataset] calls.
1111    ///
1112    /// # Example
1113    /// ```
1114    /// # use google_cloud_financialservices_v1::builder::aml::CreateDataset;
1115    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
1116    /// use google_cloud_lro::Poller;
1117    ///
1118    /// let builder = prepare_request_builder();
1119    /// let response = builder.poller().until_done().await?;
1120    /// # Ok(()) }
1121    ///
1122    /// fn prepare_request_builder() -> CreateDataset {
1123    ///   # panic!();
1124    ///   // ... details omitted ...
1125    /// }
1126    /// ```
1127    #[derive(Clone, Debug)]
1128    pub struct CreateDataset(RequestBuilder<crate::model::CreateDatasetRequest>);
1129
1130    impl CreateDataset {
1131        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
1132            Self(RequestBuilder::new(stub))
1133        }
1134
1135        /// Sets the full request, replacing any prior values.
1136        pub fn with_request<V: Into<crate::model::CreateDatasetRequest>>(mut self, v: V) -> Self {
1137            self.0.request = v.into();
1138            self
1139        }
1140
1141        /// Sets all the options, replacing any prior values.
1142        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1143            self.0.options = v.into();
1144            self
1145        }
1146
1147        /// Sends the request.
1148        ///
1149        /// # Long running operations
1150        ///
1151        /// This starts, but does not poll, a longrunning operation. More information
1152        /// on [create_dataset][crate::client::Aml::create_dataset].
1153        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1154            (*self.0.stub)
1155                .create_dataset(self.0.request, self.0.options)
1156                .await
1157                .map(crate::Response::into_body)
1158        }
1159
1160        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_dataset`.
1161        pub fn poller(
1162            self,
1163        ) -> impl google_cloud_lro::Poller<crate::model::Dataset, crate::model::OperationMetadata>
1164        {
1165            type Operation = google_cloud_lro::internal::Operation<
1166                crate::model::Dataset,
1167                crate::model::OperationMetadata,
1168            >;
1169            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1170            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1171
1172            let stub = self.0.stub.clone();
1173            let mut options = self.0.options.clone();
1174            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1175            let query = move |name| {
1176                let stub = stub.clone();
1177                let options = options.clone();
1178                async {
1179                    let op = GetOperation::new(stub)
1180                        .set_name(name)
1181                        .with_options(options)
1182                        .send()
1183                        .await?;
1184                    Ok(Operation::new(op))
1185                }
1186            };
1187
1188            let start = move || async {
1189                let op = self.send().await?;
1190                Ok(Operation::new(op))
1191            };
1192
1193            google_cloud_lro::internal::new_poller(
1194                polling_error_policy,
1195                polling_backoff_policy,
1196                start,
1197                query,
1198            )
1199        }
1200
1201        /// Sets the value of [parent][crate::model::CreateDatasetRequest::parent].
1202        ///
1203        /// This is a **required** field for requests.
1204        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1205            self.0.request.parent = v.into();
1206            self
1207        }
1208
1209        /// Sets the value of [dataset_id][crate::model::CreateDatasetRequest::dataset_id].
1210        ///
1211        /// This is a **required** field for requests.
1212        pub fn set_dataset_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1213            self.0.request.dataset_id = v.into();
1214            self
1215        }
1216
1217        /// Sets the value of [dataset][crate::model::CreateDatasetRequest::dataset].
1218        ///
1219        /// This is a **required** field for requests.
1220        pub fn set_dataset<T>(mut self, v: T) -> Self
1221        where
1222            T: std::convert::Into<crate::model::Dataset>,
1223        {
1224            self.0.request.dataset = std::option::Option::Some(v.into());
1225            self
1226        }
1227
1228        /// Sets or clears the value of [dataset][crate::model::CreateDatasetRequest::dataset].
1229        ///
1230        /// This is a **required** field for requests.
1231        pub fn set_or_clear_dataset<T>(mut self, v: std::option::Option<T>) -> Self
1232        where
1233            T: std::convert::Into<crate::model::Dataset>,
1234        {
1235            self.0.request.dataset = v.map(|x| x.into());
1236            self
1237        }
1238
1239        /// Sets the value of [request_id][crate::model::CreateDatasetRequest::request_id].
1240        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1241            self.0.request.request_id = v.into();
1242            self
1243        }
1244    }
1245
1246    #[doc(hidden)]
1247    impl crate::RequestBuilder for CreateDataset {
1248        fn request_options(&mut self) -> &mut crate::RequestOptions {
1249            &mut self.0.options
1250        }
1251    }
1252
1253    /// The request builder for [Aml::update_dataset][crate::client::Aml::update_dataset] calls.
1254    ///
1255    /// # Example
1256    /// ```
1257    /// # use google_cloud_financialservices_v1::builder::aml::UpdateDataset;
1258    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
1259    /// use google_cloud_lro::Poller;
1260    ///
1261    /// let builder = prepare_request_builder();
1262    /// let response = builder.poller().until_done().await?;
1263    /// # Ok(()) }
1264    ///
1265    /// fn prepare_request_builder() -> UpdateDataset {
1266    ///   # panic!();
1267    ///   // ... details omitted ...
1268    /// }
1269    /// ```
1270    #[derive(Clone, Debug)]
1271    pub struct UpdateDataset(RequestBuilder<crate::model::UpdateDatasetRequest>);
1272
1273    impl UpdateDataset {
1274        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
1275            Self(RequestBuilder::new(stub))
1276        }
1277
1278        /// Sets the full request, replacing any prior values.
1279        pub fn with_request<V: Into<crate::model::UpdateDatasetRequest>>(mut self, v: V) -> Self {
1280            self.0.request = v.into();
1281            self
1282        }
1283
1284        /// Sets all the options, replacing any prior values.
1285        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1286            self.0.options = v.into();
1287            self
1288        }
1289
1290        /// Sends the request.
1291        ///
1292        /// # Long running operations
1293        ///
1294        /// This starts, but does not poll, a longrunning operation. More information
1295        /// on [update_dataset][crate::client::Aml::update_dataset].
1296        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1297            (*self.0.stub)
1298                .update_dataset(self.0.request, self.0.options)
1299                .await
1300                .map(crate::Response::into_body)
1301        }
1302
1303        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_dataset`.
1304        pub fn poller(
1305            self,
1306        ) -> impl google_cloud_lro::Poller<crate::model::Dataset, crate::model::OperationMetadata>
1307        {
1308            type Operation = google_cloud_lro::internal::Operation<
1309                crate::model::Dataset,
1310                crate::model::OperationMetadata,
1311            >;
1312            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1313            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1314
1315            let stub = self.0.stub.clone();
1316            let mut options = self.0.options.clone();
1317            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1318            let query = move |name| {
1319                let stub = stub.clone();
1320                let options = options.clone();
1321                async {
1322                    let op = GetOperation::new(stub)
1323                        .set_name(name)
1324                        .with_options(options)
1325                        .send()
1326                        .await?;
1327                    Ok(Operation::new(op))
1328                }
1329            };
1330
1331            let start = move || async {
1332                let op = self.send().await?;
1333                Ok(Operation::new(op))
1334            };
1335
1336            google_cloud_lro::internal::new_poller(
1337                polling_error_policy,
1338                polling_backoff_policy,
1339                start,
1340                query,
1341            )
1342        }
1343
1344        /// Sets the value of [update_mask][crate::model::UpdateDatasetRequest::update_mask].
1345        pub fn set_update_mask<T>(mut self, v: T) -> Self
1346        where
1347            T: std::convert::Into<wkt::FieldMask>,
1348        {
1349            self.0.request.update_mask = std::option::Option::Some(v.into());
1350            self
1351        }
1352
1353        /// Sets or clears the value of [update_mask][crate::model::UpdateDatasetRequest::update_mask].
1354        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1355        where
1356            T: std::convert::Into<wkt::FieldMask>,
1357        {
1358            self.0.request.update_mask = v.map(|x| x.into());
1359            self
1360        }
1361
1362        /// Sets the value of [dataset][crate::model::UpdateDatasetRequest::dataset].
1363        ///
1364        /// This is a **required** field for requests.
1365        pub fn set_dataset<T>(mut self, v: T) -> Self
1366        where
1367            T: std::convert::Into<crate::model::Dataset>,
1368        {
1369            self.0.request.dataset = std::option::Option::Some(v.into());
1370            self
1371        }
1372
1373        /// Sets or clears the value of [dataset][crate::model::UpdateDatasetRequest::dataset].
1374        ///
1375        /// This is a **required** field for requests.
1376        pub fn set_or_clear_dataset<T>(mut self, v: std::option::Option<T>) -> Self
1377        where
1378            T: std::convert::Into<crate::model::Dataset>,
1379        {
1380            self.0.request.dataset = v.map(|x| x.into());
1381            self
1382        }
1383
1384        /// Sets the value of [request_id][crate::model::UpdateDatasetRequest::request_id].
1385        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1386            self.0.request.request_id = v.into();
1387            self
1388        }
1389    }
1390
1391    #[doc(hidden)]
1392    impl crate::RequestBuilder for UpdateDataset {
1393        fn request_options(&mut self) -> &mut crate::RequestOptions {
1394            &mut self.0.options
1395        }
1396    }
1397
1398    /// The request builder for [Aml::delete_dataset][crate::client::Aml::delete_dataset] calls.
1399    ///
1400    /// # Example
1401    /// ```
1402    /// # use google_cloud_financialservices_v1::builder::aml::DeleteDataset;
1403    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
1404    /// use google_cloud_lro::Poller;
1405    ///
1406    /// let builder = prepare_request_builder();
1407    /// let response = builder.poller().until_done().await?;
1408    /// # Ok(()) }
1409    ///
1410    /// fn prepare_request_builder() -> DeleteDataset {
1411    ///   # panic!();
1412    ///   // ... details omitted ...
1413    /// }
1414    /// ```
1415    #[derive(Clone, Debug)]
1416    pub struct DeleteDataset(RequestBuilder<crate::model::DeleteDatasetRequest>);
1417
1418    impl DeleteDataset {
1419        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
1420            Self(RequestBuilder::new(stub))
1421        }
1422
1423        /// Sets the full request, replacing any prior values.
1424        pub fn with_request<V: Into<crate::model::DeleteDatasetRequest>>(mut self, v: V) -> Self {
1425            self.0.request = v.into();
1426            self
1427        }
1428
1429        /// Sets all the options, replacing any prior values.
1430        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1431            self.0.options = v.into();
1432            self
1433        }
1434
1435        /// Sends the request.
1436        ///
1437        /// # Long running operations
1438        ///
1439        /// This starts, but does not poll, a longrunning operation. More information
1440        /// on [delete_dataset][crate::client::Aml::delete_dataset].
1441        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1442            (*self.0.stub)
1443                .delete_dataset(self.0.request, self.0.options)
1444                .await
1445                .map(crate::Response::into_body)
1446        }
1447
1448        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_dataset`.
1449        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
1450            type Operation =
1451                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
1452            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1453            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1454
1455            let stub = self.0.stub.clone();
1456            let mut options = self.0.options.clone();
1457            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1458            let query = move |name| {
1459                let stub = stub.clone();
1460                let options = options.clone();
1461                async {
1462                    let op = GetOperation::new(stub)
1463                        .set_name(name)
1464                        .with_options(options)
1465                        .send()
1466                        .await?;
1467                    Ok(Operation::new(op))
1468                }
1469            };
1470
1471            let start = move || async {
1472                let op = self.send().await?;
1473                Ok(Operation::new(op))
1474            };
1475
1476            google_cloud_lro::internal::new_unit_response_poller(
1477                polling_error_policy,
1478                polling_backoff_policy,
1479                start,
1480                query,
1481            )
1482        }
1483
1484        /// Sets the value of [name][crate::model::DeleteDatasetRequest::name].
1485        ///
1486        /// This is a **required** field for requests.
1487        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1488            self.0.request.name = v.into();
1489            self
1490        }
1491
1492        /// Sets the value of [request_id][crate::model::DeleteDatasetRequest::request_id].
1493        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1494            self.0.request.request_id = v.into();
1495            self
1496        }
1497    }
1498
1499    #[doc(hidden)]
1500    impl crate::RequestBuilder for DeleteDataset {
1501        fn request_options(&mut self) -> &mut crate::RequestOptions {
1502            &mut self.0.options
1503        }
1504    }
1505
1506    /// The request builder for [Aml::list_models][crate::client::Aml::list_models] calls.
1507    ///
1508    /// # Example
1509    /// ```
1510    /// # use google_cloud_financialservices_v1::builder::aml::ListModels;
1511    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
1512    /// use google_cloud_gax::paginator::ItemPaginator;
1513    ///
1514    /// let builder = prepare_request_builder();
1515    /// let mut items = builder.by_item();
1516    /// while let Some(result) = items.next().await {
1517    ///   let item = result?;
1518    /// }
1519    /// # Ok(()) }
1520    ///
1521    /// fn prepare_request_builder() -> ListModels {
1522    ///   # panic!();
1523    ///   // ... details omitted ...
1524    /// }
1525    /// ```
1526    #[derive(Clone, Debug)]
1527    pub struct ListModels(RequestBuilder<crate::model::ListModelsRequest>);
1528
1529    impl ListModels {
1530        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
1531            Self(RequestBuilder::new(stub))
1532        }
1533
1534        /// Sets the full request, replacing any prior values.
1535        pub fn with_request<V: Into<crate::model::ListModelsRequest>>(mut self, v: V) -> Self {
1536            self.0.request = v.into();
1537            self
1538        }
1539
1540        /// Sets all the options, replacing any prior values.
1541        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1542            self.0.options = v.into();
1543            self
1544        }
1545
1546        /// Sends the request.
1547        pub async fn send(self) -> Result<crate::model::ListModelsResponse> {
1548            (*self.0.stub)
1549                .list_models(self.0.request, self.0.options)
1550                .await
1551                .map(crate::Response::into_body)
1552        }
1553
1554        /// Streams each page in the collection.
1555        pub fn by_page(
1556            self,
1557        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListModelsResponse, crate::Error>
1558        {
1559            use std::clone::Clone;
1560            let token = self.0.request.page_token.clone();
1561            let execute = move |token: String| {
1562                let mut builder = self.clone();
1563                builder.0.request = builder.0.request.set_page_token(token);
1564                builder.send()
1565            };
1566            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1567        }
1568
1569        /// Streams each item in the collection.
1570        pub fn by_item(
1571            self,
1572        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1573            crate::model::ListModelsResponse,
1574            crate::Error,
1575        > {
1576            use google_cloud_gax::paginator::Paginator;
1577            self.by_page().items()
1578        }
1579
1580        /// Sets the value of [parent][crate::model::ListModelsRequest::parent].
1581        ///
1582        /// This is a **required** field for requests.
1583        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1584            self.0.request.parent = v.into();
1585            self
1586        }
1587
1588        /// Sets the value of [page_size][crate::model::ListModelsRequest::page_size].
1589        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1590            self.0.request.page_size = v.into();
1591            self
1592        }
1593
1594        /// Sets the value of [page_token][crate::model::ListModelsRequest::page_token].
1595        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1596            self.0.request.page_token = v.into();
1597            self
1598        }
1599
1600        /// Sets the value of [filter][crate::model::ListModelsRequest::filter].
1601        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1602            self.0.request.filter = v.into();
1603            self
1604        }
1605
1606        /// Sets the value of [order_by][crate::model::ListModelsRequest::order_by].
1607        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1608            self.0.request.order_by = v.into();
1609            self
1610        }
1611    }
1612
1613    #[doc(hidden)]
1614    impl crate::RequestBuilder for ListModels {
1615        fn request_options(&mut self) -> &mut crate::RequestOptions {
1616            &mut self.0.options
1617        }
1618    }
1619
1620    /// The request builder for [Aml::get_model][crate::client::Aml::get_model] calls.
1621    ///
1622    /// # Example
1623    /// ```
1624    /// # use google_cloud_financialservices_v1::builder::aml::GetModel;
1625    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
1626    ///
1627    /// let builder = prepare_request_builder();
1628    /// let response = builder.send().await?;
1629    /// # Ok(()) }
1630    ///
1631    /// fn prepare_request_builder() -> GetModel {
1632    ///   # panic!();
1633    ///   // ... details omitted ...
1634    /// }
1635    /// ```
1636    #[derive(Clone, Debug)]
1637    pub struct GetModel(RequestBuilder<crate::model::GetModelRequest>);
1638
1639    impl GetModel {
1640        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
1641            Self(RequestBuilder::new(stub))
1642        }
1643
1644        /// Sets the full request, replacing any prior values.
1645        pub fn with_request<V: Into<crate::model::GetModelRequest>>(mut self, v: V) -> Self {
1646            self.0.request = v.into();
1647            self
1648        }
1649
1650        /// Sets all the options, replacing any prior values.
1651        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1652            self.0.options = v.into();
1653            self
1654        }
1655
1656        /// Sends the request.
1657        pub async fn send(self) -> Result<crate::model::Model> {
1658            (*self.0.stub)
1659                .get_model(self.0.request, self.0.options)
1660                .await
1661                .map(crate::Response::into_body)
1662        }
1663
1664        /// Sets the value of [name][crate::model::GetModelRequest::name].
1665        ///
1666        /// This is a **required** field for requests.
1667        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1668            self.0.request.name = v.into();
1669            self
1670        }
1671    }
1672
1673    #[doc(hidden)]
1674    impl crate::RequestBuilder for GetModel {
1675        fn request_options(&mut self) -> &mut crate::RequestOptions {
1676            &mut self.0.options
1677        }
1678    }
1679
1680    /// The request builder for [Aml::create_model][crate::client::Aml::create_model] calls.
1681    ///
1682    /// # Example
1683    /// ```
1684    /// # use google_cloud_financialservices_v1::builder::aml::CreateModel;
1685    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
1686    /// use google_cloud_lro::Poller;
1687    ///
1688    /// let builder = prepare_request_builder();
1689    /// let response = builder.poller().until_done().await?;
1690    /// # Ok(()) }
1691    ///
1692    /// fn prepare_request_builder() -> CreateModel {
1693    ///   # panic!();
1694    ///   // ... details omitted ...
1695    /// }
1696    /// ```
1697    #[derive(Clone, Debug)]
1698    pub struct CreateModel(RequestBuilder<crate::model::CreateModelRequest>);
1699
1700    impl CreateModel {
1701        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
1702            Self(RequestBuilder::new(stub))
1703        }
1704
1705        /// Sets the full request, replacing any prior values.
1706        pub fn with_request<V: Into<crate::model::CreateModelRequest>>(mut self, v: V) -> Self {
1707            self.0.request = v.into();
1708            self
1709        }
1710
1711        /// Sets all the options, replacing any prior values.
1712        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1713            self.0.options = v.into();
1714            self
1715        }
1716
1717        /// Sends the request.
1718        ///
1719        /// # Long running operations
1720        ///
1721        /// This starts, but does not poll, a longrunning operation. More information
1722        /// on [create_model][crate::client::Aml::create_model].
1723        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1724            (*self.0.stub)
1725                .create_model(self.0.request, self.0.options)
1726                .await
1727                .map(crate::Response::into_body)
1728        }
1729
1730        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_model`.
1731        pub fn poller(
1732            self,
1733        ) -> impl google_cloud_lro::Poller<crate::model::Model, crate::model::OperationMetadata>
1734        {
1735            type Operation = google_cloud_lro::internal::Operation<
1736                crate::model::Model,
1737                crate::model::OperationMetadata,
1738            >;
1739            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1740            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1741
1742            let stub = self.0.stub.clone();
1743            let mut options = self.0.options.clone();
1744            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1745            let query = move |name| {
1746                let stub = stub.clone();
1747                let options = options.clone();
1748                async {
1749                    let op = GetOperation::new(stub)
1750                        .set_name(name)
1751                        .with_options(options)
1752                        .send()
1753                        .await?;
1754                    Ok(Operation::new(op))
1755                }
1756            };
1757
1758            let start = move || async {
1759                let op = self.send().await?;
1760                Ok(Operation::new(op))
1761            };
1762
1763            google_cloud_lro::internal::new_poller(
1764                polling_error_policy,
1765                polling_backoff_policy,
1766                start,
1767                query,
1768            )
1769        }
1770
1771        /// Sets the value of [parent][crate::model::CreateModelRequest::parent].
1772        ///
1773        /// This is a **required** field for requests.
1774        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1775            self.0.request.parent = v.into();
1776            self
1777        }
1778
1779        /// Sets the value of [model_id][crate::model::CreateModelRequest::model_id].
1780        ///
1781        /// This is a **required** field for requests.
1782        pub fn set_model_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1783            self.0.request.model_id = v.into();
1784            self
1785        }
1786
1787        /// Sets the value of [model][crate::model::CreateModelRequest::model].
1788        ///
1789        /// This is a **required** field for requests.
1790        pub fn set_model<T>(mut self, v: T) -> Self
1791        where
1792            T: std::convert::Into<crate::model::Model>,
1793        {
1794            self.0.request.model = std::option::Option::Some(v.into());
1795            self
1796        }
1797
1798        /// Sets or clears the value of [model][crate::model::CreateModelRequest::model].
1799        ///
1800        /// This is a **required** field for requests.
1801        pub fn set_or_clear_model<T>(mut self, v: std::option::Option<T>) -> Self
1802        where
1803            T: std::convert::Into<crate::model::Model>,
1804        {
1805            self.0.request.model = v.map(|x| x.into());
1806            self
1807        }
1808
1809        /// Sets the value of [request_id][crate::model::CreateModelRequest::request_id].
1810        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1811            self.0.request.request_id = v.into();
1812            self
1813        }
1814    }
1815
1816    #[doc(hidden)]
1817    impl crate::RequestBuilder for CreateModel {
1818        fn request_options(&mut self) -> &mut crate::RequestOptions {
1819            &mut self.0.options
1820        }
1821    }
1822
1823    /// The request builder for [Aml::update_model][crate::client::Aml::update_model] calls.
1824    ///
1825    /// # Example
1826    /// ```
1827    /// # use google_cloud_financialservices_v1::builder::aml::UpdateModel;
1828    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
1829    /// use google_cloud_lro::Poller;
1830    ///
1831    /// let builder = prepare_request_builder();
1832    /// let response = builder.poller().until_done().await?;
1833    /// # Ok(()) }
1834    ///
1835    /// fn prepare_request_builder() -> UpdateModel {
1836    ///   # panic!();
1837    ///   // ... details omitted ...
1838    /// }
1839    /// ```
1840    #[derive(Clone, Debug)]
1841    pub struct UpdateModel(RequestBuilder<crate::model::UpdateModelRequest>);
1842
1843    impl UpdateModel {
1844        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
1845            Self(RequestBuilder::new(stub))
1846        }
1847
1848        /// Sets the full request, replacing any prior values.
1849        pub fn with_request<V: Into<crate::model::UpdateModelRequest>>(mut self, v: V) -> Self {
1850            self.0.request = v.into();
1851            self
1852        }
1853
1854        /// Sets all the options, replacing any prior values.
1855        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1856            self.0.options = v.into();
1857            self
1858        }
1859
1860        /// Sends the request.
1861        ///
1862        /// # Long running operations
1863        ///
1864        /// This starts, but does not poll, a longrunning operation. More information
1865        /// on [update_model][crate::client::Aml::update_model].
1866        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1867            (*self.0.stub)
1868                .update_model(self.0.request, self.0.options)
1869                .await
1870                .map(crate::Response::into_body)
1871        }
1872
1873        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_model`.
1874        pub fn poller(
1875            self,
1876        ) -> impl google_cloud_lro::Poller<crate::model::Model, crate::model::OperationMetadata>
1877        {
1878            type Operation = google_cloud_lro::internal::Operation<
1879                crate::model::Model,
1880                crate::model::OperationMetadata,
1881            >;
1882            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1883            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1884
1885            let stub = self.0.stub.clone();
1886            let mut options = self.0.options.clone();
1887            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1888            let query = move |name| {
1889                let stub = stub.clone();
1890                let options = options.clone();
1891                async {
1892                    let op = GetOperation::new(stub)
1893                        .set_name(name)
1894                        .with_options(options)
1895                        .send()
1896                        .await?;
1897                    Ok(Operation::new(op))
1898                }
1899            };
1900
1901            let start = move || async {
1902                let op = self.send().await?;
1903                Ok(Operation::new(op))
1904            };
1905
1906            google_cloud_lro::internal::new_poller(
1907                polling_error_policy,
1908                polling_backoff_policy,
1909                start,
1910                query,
1911            )
1912        }
1913
1914        /// Sets the value of [update_mask][crate::model::UpdateModelRequest::update_mask].
1915        pub fn set_update_mask<T>(mut self, v: T) -> Self
1916        where
1917            T: std::convert::Into<wkt::FieldMask>,
1918        {
1919            self.0.request.update_mask = std::option::Option::Some(v.into());
1920            self
1921        }
1922
1923        /// Sets or clears the value of [update_mask][crate::model::UpdateModelRequest::update_mask].
1924        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1925        where
1926            T: std::convert::Into<wkt::FieldMask>,
1927        {
1928            self.0.request.update_mask = v.map(|x| x.into());
1929            self
1930        }
1931
1932        /// Sets the value of [model][crate::model::UpdateModelRequest::model].
1933        ///
1934        /// This is a **required** field for requests.
1935        pub fn set_model<T>(mut self, v: T) -> Self
1936        where
1937            T: std::convert::Into<crate::model::Model>,
1938        {
1939            self.0.request.model = std::option::Option::Some(v.into());
1940            self
1941        }
1942
1943        /// Sets or clears the value of [model][crate::model::UpdateModelRequest::model].
1944        ///
1945        /// This is a **required** field for requests.
1946        pub fn set_or_clear_model<T>(mut self, v: std::option::Option<T>) -> Self
1947        where
1948            T: std::convert::Into<crate::model::Model>,
1949        {
1950            self.0.request.model = v.map(|x| x.into());
1951            self
1952        }
1953
1954        /// Sets the value of [request_id][crate::model::UpdateModelRequest::request_id].
1955        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1956            self.0.request.request_id = v.into();
1957            self
1958        }
1959    }
1960
1961    #[doc(hidden)]
1962    impl crate::RequestBuilder for UpdateModel {
1963        fn request_options(&mut self) -> &mut crate::RequestOptions {
1964            &mut self.0.options
1965        }
1966    }
1967
1968    /// The request builder for [Aml::export_model_metadata][crate::client::Aml::export_model_metadata] calls.
1969    ///
1970    /// # Example
1971    /// ```
1972    /// # use google_cloud_financialservices_v1::builder::aml::ExportModelMetadata;
1973    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
1974    /// use google_cloud_lro::Poller;
1975    ///
1976    /// let builder = prepare_request_builder();
1977    /// let response = builder.poller().until_done().await?;
1978    /// # Ok(()) }
1979    ///
1980    /// fn prepare_request_builder() -> ExportModelMetadata {
1981    ///   # panic!();
1982    ///   // ... details omitted ...
1983    /// }
1984    /// ```
1985    #[derive(Clone, Debug)]
1986    pub struct ExportModelMetadata(RequestBuilder<crate::model::ExportModelMetadataRequest>);
1987
1988    impl ExportModelMetadata {
1989        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
1990            Self(RequestBuilder::new(stub))
1991        }
1992
1993        /// Sets the full request, replacing any prior values.
1994        pub fn with_request<V: Into<crate::model::ExportModelMetadataRequest>>(
1995            mut self,
1996            v: V,
1997        ) -> Self {
1998            self.0.request = v.into();
1999            self
2000        }
2001
2002        /// Sets all the options, replacing any prior values.
2003        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2004            self.0.options = v.into();
2005            self
2006        }
2007
2008        /// Sends the request.
2009        ///
2010        /// # Long running operations
2011        ///
2012        /// This starts, but does not poll, a longrunning operation. More information
2013        /// on [export_model_metadata][crate::client::Aml::export_model_metadata].
2014        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2015            (*self.0.stub)
2016                .export_model_metadata(self.0.request, self.0.options)
2017                .await
2018                .map(crate::Response::into_body)
2019        }
2020
2021        /// Creates a [Poller][google_cloud_lro::Poller] to work with `export_model_metadata`.
2022        pub fn poller(
2023            self,
2024        ) -> impl google_cloud_lro::Poller<
2025            crate::model::ExportModelMetadataResponse,
2026            crate::model::OperationMetadata,
2027        > {
2028            type Operation = google_cloud_lro::internal::Operation<
2029                crate::model::ExportModelMetadataResponse,
2030                crate::model::OperationMetadata,
2031            >;
2032            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2033            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2034
2035            let stub = self.0.stub.clone();
2036            let mut options = self.0.options.clone();
2037            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2038            let query = move |name| {
2039                let stub = stub.clone();
2040                let options = options.clone();
2041                async {
2042                    let op = GetOperation::new(stub)
2043                        .set_name(name)
2044                        .with_options(options)
2045                        .send()
2046                        .await?;
2047                    Ok(Operation::new(op))
2048                }
2049            };
2050
2051            let start = move || async {
2052                let op = self.send().await?;
2053                Ok(Operation::new(op))
2054            };
2055
2056            google_cloud_lro::internal::new_poller(
2057                polling_error_policy,
2058                polling_backoff_policy,
2059                start,
2060                query,
2061            )
2062        }
2063
2064        /// Sets the value of [model][crate::model::ExportModelMetadataRequest::model].
2065        ///
2066        /// This is a **required** field for requests.
2067        pub fn set_model<T: Into<std::string::String>>(mut self, v: T) -> Self {
2068            self.0.request.model = v.into();
2069            self
2070        }
2071
2072        /// Sets the value of [structured_metadata_destination][crate::model::ExportModelMetadataRequest::structured_metadata_destination].
2073        ///
2074        /// This is a **required** field for requests.
2075        pub fn set_structured_metadata_destination<T>(mut self, v: T) -> Self
2076        where
2077            T: std::convert::Into<crate::model::BigQueryDestination>,
2078        {
2079            self.0.request.structured_metadata_destination = std::option::Option::Some(v.into());
2080            self
2081        }
2082
2083        /// Sets or clears the value of [structured_metadata_destination][crate::model::ExportModelMetadataRequest::structured_metadata_destination].
2084        ///
2085        /// This is a **required** field for requests.
2086        pub fn set_or_clear_structured_metadata_destination<T>(
2087            mut self,
2088            v: std::option::Option<T>,
2089        ) -> Self
2090        where
2091            T: std::convert::Into<crate::model::BigQueryDestination>,
2092        {
2093            self.0.request.structured_metadata_destination = v.map(|x| x.into());
2094            self
2095        }
2096    }
2097
2098    #[doc(hidden)]
2099    impl crate::RequestBuilder for ExportModelMetadata {
2100        fn request_options(&mut self) -> &mut crate::RequestOptions {
2101            &mut self.0.options
2102        }
2103    }
2104
2105    /// The request builder for [Aml::delete_model][crate::client::Aml::delete_model] calls.
2106    ///
2107    /// # Example
2108    /// ```
2109    /// # use google_cloud_financialservices_v1::builder::aml::DeleteModel;
2110    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
2111    /// use google_cloud_lro::Poller;
2112    ///
2113    /// let builder = prepare_request_builder();
2114    /// let response = builder.poller().until_done().await?;
2115    /// # Ok(()) }
2116    ///
2117    /// fn prepare_request_builder() -> DeleteModel {
2118    ///   # panic!();
2119    ///   // ... details omitted ...
2120    /// }
2121    /// ```
2122    #[derive(Clone, Debug)]
2123    pub struct DeleteModel(RequestBuilder<crate::model::DeleteModelRequest>);
2124
2125    impl DeleteModel {
2126        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
2127            Self(RequestBuilder::new(stub))
2128        }
2129
2130        /// Sets the full request, replacing any prior values.
2131        pub fn with_request<V: Into<crate::model::DeleteModelRequest>>(mut self, v: V) -> Self {
2132            self.0.request = v.into();
2133            self
2134        }
2135
2136        /// Sets all the options, replacing any prior values.
2137        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2138            self.0.options = v.into();
2139            self
2140        }
2141
2142        /// Sends the request.
2143        ///
2144        /// # Long running operations
2145        ///
2146        /// This starts, but does not poll, a longrunning operation. More information
2147        /// on [delete_model][crate::client::Aml::delete_model].
2148        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2149            (*self.0.stub)
2150                .delete_model(self.0.request, self.0.options)
2151                .await
2152                .map(crate::Response::into_body)
2153        }
2154
2155        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_model`.
2156        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
2157            type Operation =
2158                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2159            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2160            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2161
2162            let stub = self.0.stub.clone();
2163            let mut options = self.0.options.clone();
2164            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2165            let query = move |name| {
2166                let stub = stub.clone();
2167                let options = options.clone();
2168                async {
2169                    let op = GetOperation::new(stub)
2170                        .set_name(name)
2171                        .with_options(options)
2172                        .send()
2173                        .await?;
2174                    Ok(Operation::new(op))
2175                }
2176            };
2177
2178            let start = move || async {
2179                let op = self.send().await?;
2180                Ok(Operation::new(op))
2181            };
2182
2183            google_cloud_lro::internal::new_unit_response_poller(
2184                polling_error_policy,
2185                polling_backoff_policy,
2186                start,
2187                query,
2188            )
2189        }
2190
2191        /// Sets the value of [name][crate::model::DeleteModelRequest::name].
2192        ///
2193        /// This is a **required** field for requests.
2194        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2195            self.0.request.name = v.into();
2196            self
2197        }
2198
2199        /// Sets the value of [request_id][crate::model::DeleteModelRequest::request_id].
2200        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2201            self.0.request.request_id = v.into();
2202            self
2203        }
2204    }
2205
2206    #[doc(hidden)]
2207    impl crate::RequestBuilder for DeleteModel {
2208        fn request_options(&mut self) -> &mut crate::RequestOptions {
2209            &mut self.0.options
2210        }
2211    }
2212
2213    /// The request builder for [Aml::list_engine_configs][crate::client::Aml::list_engine_configs] calls.
2214    ///
2215    /// # Example
2216    /// ```
2217    /// # use google_cloud_financialservices_v1::builder::aml::ListEngineConfigs;
2218    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
2219    /// use google_cloud_gax::paginator::ItemPaginator;
2220    ///
2221    /// let builder = prepare_request_builder();
2222    /// let mut items = builder.by_item();
2223    /// while let Some(result) = items.next().await {
2224    ///   let item = result?;
2225    /// }
2226    /// # Ok(()) }
2227    ///
2228    /// fn prepare_request_builder() -> ListEngineConfigs {
2229    ///   # panic!();
2230    ///   // ... details omitted ...
2231    /// }
2232    /// ```
2233    #[derive(Clone, Debug)]
2234    pub struct ListEngineConfigs(RequestBuilder<crate::model::ListEngineConfigsRequest>);
2235
2236    impl ListEngineConfigs {
2237        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
2238            Self(RequestBuilder::new(stub))
2239        }
2240
2241        /// Sets the full request, replacing any prior values.
2242        pub fn with_request<V: Into<crate::model::ListEngineConfigsRequest>>(
2243            mut self,
2244            v: V,
2245        ) -> Self {
2246            self.0.request = v.into();
2247            self
2248        }
2249
2250        /// Sets all the options, replacing any prior values.
2251        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2252            self.0.options = v.into();
2253            self
2254        }
2255
2256        /// Sends the request.
2257        pub async fn send(self) -> Result<crate::model::ListEngineConfigsResponse> {
2258            (*self.0.stub)
2259                .list_engine_configs(self.0.request, self.0.options)
2260                .await
2261                .map(crate::Response::into_body)
2262        }
2263
2264        /// Streams each page in the collection.
2265        pub fn by_page(
2266            self,
2267        ) -> impl google_cloud_gax::paginator::Paginator<
2268            crate::model::ListEngineConfigsResponse,
2269            crate::Error,
2270        > {
2271            use std::clone::Clone;
2272            let token = self.0.request.page_token.clone();
2273            let execute = move |token: String| {
2274                let mut builder = self.clone();
2275                builder.0.request = builder.0.request.set_page_token(token);
2276                builder.send()
2277            };
2278            google_cloud_gax::paginator::internal::new_paginator(token, execute)
2279        }
2280
2281        /// Streams each item in the collection.
2282        pub fn by_item(
2283            self,
2284        ) -> impl google_cloud_gax::paginator::ItemPaginator<
2285            crate::model::ListEngineConfigsResponse,
2286            crate::Error,
2287        > {
2288            use google_cloud_gax::paginator::Paginator;
2289            self.by_page().items()
2290        }
2291
2292        /// Sets the value of [parent][crate::model::ListEngineConfigsRequest::parent].
2293        ///
2294        /// This is a **required** field for requests.
2295        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2296            self.0.request.parent = v.into();
2297            self
2298        }
2299
2300        /// Sets the value of [page_size][crate::model::ListEngineConfigsRequest::page_size].
2301        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2302            self.0.request.page_size = v.into();
2303            self
2304        }
2305
2306        /// Sets the value of [page_token][crate::model::ListEngineConfigsRequest::page_token].
2307        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2308            self.0.request.page_token = v.into();
2309            self
2310        }
2311
2312        /// Sets the value of [filter][crate::model::ListEngineConfigsRequest::filter].
2313        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2314            self.0.request.filter = v.into();
2315            self
2316        }
2317
2318        /// Sets the value of [order_by][crate::model::ListEngineConfigsRequest::order_by].
2319        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2320            self.0.request.order_by = v.into();
2321            self
2322        }
2323    }
2324
2325    #[doc(hidden)]
2326    impl crate::RequestBuilder for ListEngineConfigs {
2327        fn request_options(&mut self) -> &mut crate::RequestOptions {
2328            &mut self.0.options
2329        }
2330    }
2331
2332    /// The request builder for [Aml::get_engine_config][crate::client::Aml::get_engine_config] calls.
2333    ///
2334    /// # Example
2335    /// ```
2336    /// # use google_cloud_financialservices_v1::builder::aml::GetEngineConfig;
2337    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
2338    ///
2339    /// let builder = prepare_request_builder();
2340    /// let response = builder.send().await?;
2341    /// # Ok(()) }
2342    ///
2343    /// fn prepare_request_builder() -> GetEngineConfig {
2344    ///   # panic!();
2345    ///   // ... details omitted ...
2346    /// }
2347    /// ```
2348    #[derive(Clone, Debug)]
2349    pub struct GetEngineConfig(RequestBuilder<crate::model::GetEngineConfigRequest>);
2350
2351    impl GetEngineConfig {
2352        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
2353            Self(RequestBuilder::new(stub))
2354        }
2355
2356        /// Sets the full request, replacing any prior values.
2357        pub fn with_request<V: Into<crate::model::GetEngineConfigRequest>>(mut self, v: V) -> Self {
2358            self.0.request = v.into();
2359            self
2360        }
2361
2362        /// Sets all the options, replacing any prior values.
2363        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2364            self.0.options = v.into();
2365            self
2366        }
2367
2368        /// Sends the request.
2369        pub async fn send(self) -> Result<crate::model::EngineConfig> {
2370            (*self.0.stub)
2371                .get_engine_config(self.0.request, self.0.options)
2372                .await
2373                .map(crate::Response::into_body)
2374        }
2375
2376        /// Sets the value of [name][crate::model::GetEngineConfigRequest::name].
2377        ///
2378        /// This is a **required** field for requests.
2379        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2380            self.0.request.name = v.into();
2381            self
2382        }
2383    }
2384
2385    #[doc(hidden)]
2386    impl crate::RequestBuilder for GetEngineConfig {
2387        fn request_options(&mut self) -> &mut crate::RequestOptions {
2388            &mut self.0.options
2389        }
2390    }
2391
2392    /// The request builder for [Aml::create_engine_config][crate::client::Aml::create_engine_config] calls.
2393    ///
2394    /// # Example
2395    /// ```
2396    /// # use google_cloud_financialservices_v1::builder::aml::CreateEngineConfig;
2397    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
2398    /// use google_cloud_lro::Poller;
2399    ///
2400    /// let builder = prepare_request_builder();
2401    /// let response = builder.poller().until_done().await?;
2402    /// # Ok(()) }
2403    ///
2404    /// fn prepare_request_builder() -> CreateEngineConfig {
2405    ///   # panic!();
2406    ///   // ... details omitted ...
2407    /// }
2408    /// ```
2409    #[derive(Clone, Debug)]
2410    pub struct CreateEngineConfig(RequestBuilder<crate::model::CreateEngineConfigRequest>);
2411
2412    impl CreateEngineConfig {
2413        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
2414            Self(RequestBuilder::new(stub))
2415        }
2416
2417        /// Sets the full request, replacing any prior values.
2418        pub fn with_request<V: Into<crate::model::CreateEngineConfigRequest>>(
2419            mut self,
2420            v: V,
2421        ) -> Self {
2422            self.0.request = v.into();
2423            self
2424        }
2425
2426        /// Sets all the options, replacing any prior values.
2427        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2428            self.0.options = v.into();
2429            self
2430        }
2431
2432        /// Sends the request.
2433        ///
2434        /// # Long running operations
2435        ///
2436        /// This starts, but does not poll, a longrunning operation. More information
2437        /// on [create_engine_config][crate::client::Aml::create_engine_config].
2438        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2439            (*self.0.stub)
2440                .create_engine_config(self.0.request, self.0.options)
2441                .await
2442                .map(crate::Response::into_body)
2443        }
2444
2445        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_engine_config`.
2446        pub fn poller(
2447            self,
2448        ) -> impl google_cloud_lro::Poller<crate::model::EngineConfig, crate::model::OperationMetadata>
2449        {
2450            type Operation = google_cloud_lro::internal::Operation<
2451                crate::model::EngineConfig,
2452                crate::model::OperationMetadata,
2453            >;
2454            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2455            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2456
2457            let stub = self.0.stub.clone();
2458            let mut options = self.0.options.clone();
2459            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2460            let query = move |name| {
2461                let stub = stub.clone();
2462                let options = options.clone();
2463                async {
2464                    let op = GetOperation::new(stub)
2465                        .set_name(name)
2466                        .with_options(options)
2467                        .send()
2468                        .await?;
2469                    Ok(Operation::new(op))
2470                }
2471            };
2472
2473            let start = move || async {
2474                let op = self.send().await?;
2475                Ok(Operation::new(op))
2476            };
2477
2478            google_cloud_lro::internal::new_poller(
2479                polling_error_policy,
2480                polling_backoff_policy,
2481                start,
2482                query,
2483            )
2484        }
2485
2486        /// Sets the value of [parent][crate::model::CreateEngineConfigRequest::parent].
2487        ///
2488        /// This is a **required** field for requests.
2489        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2490            self.0.request.parent = v.into();
2491            self
2492        }
2493
2494        /// Sets the value of [engine_config_id][crate::model::CreateEngineConfigRequest::engine_config_id].
2495        ///
2496        /// This is a **required** field for requests.
2497        pub fn set_engine_config_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2498            self.0.request.engine_config_id = v.into();
2499            self
2500        }
2501
2502        /// Sets the value of [engine_config][crate::model::CreateEngineConfigRequest::engine_config].
2503        ///
2504        /// This is a **required** field for requests.
2505        pub fn set_engine_config<T>(mut self, v: T) -> Self
2506        where
2507            T: std::convert::Into<crate::model::EngineConfig>,
2508        {
2509            self.0.request.engine_config = std::option::Option::Some(v.into());
2510            self
2511        }
2512
2513        /// Sets or clears the value of [engine_config][crate::model::CreateEngineConfigRequest::engine_config].
2514        ///
2515        /// This is a **required** field for requests.
2516        pub fn set_or_clear_engine_config<T>(mut self, v: std::option::Option<T>) -> Self
2517        where
2518            T: std::convert::Into<crate::model::EngineConfig>,
2519        {
2520            self.0.request.engine_config = v.map(|x| x.into());
2521            self
2522        }
2523
2524        /// Sets the value of [request_id][crate::model::CreateEngineConfigRequest::request_id].
2525        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2526            self.0.request.request_id = v.into();
2527            self
2528        }
2529    }
2530
2531    #[doc(hidden)]
2532    impl crate::RequestBuilder for CreateEngineConfig {
2533        fn request_options(&mut self) -> &mut crate::RequestOptions {
2534            &mut self.0.options
2535        }
2536    }
2537
2538    /// The request builder for [Aml::update_engine_config][crate::client::Aml::update_engine_config] calls.
2539    ///
2540    /// # Example
2541    /// ```
2542    /// # use google_cloud_financialservices_v1::builder::aml::UpdateEngineConfig;
2543    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
2544    /// use google_cloud_lro::Poller;
2545    ///
2546    /// let builder = prepare_request_builder();
2547    /// let response = builder.poller().until_done().await?;
2548    /// # Ok(()) }
2549    ///
2550    /// fn prepare_request_builder() -> UpdateEngineConfig {
2551    ///   # panic!();
2552    ///   // ... details omitted ...
2553    /// }
2554    /// ```
2555    #[derive(Clone, Debug)]
2556    pub struct UpdateEngineConfig(RequestBuilder<crate::model::UpdateEngineConfigRequest>);
2557
2558    impl UpdateEngineConfig {
2559        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
2560            Self(RequestBuilder::new(stub))
2561        }
2562
2563        /// Sets the full request, replacing any prior values.
2564        pub fn with_request<V: Into<crate::model::UpdateEngineConfigRequest>>(
2565            mut self,
2566            v: V,
2567        ) -> Self {
2568            self.0.request = v.into();
2569            self
2570        }
2571
2572        /// Sets all the options, replacing any prior values.
2573        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2574            self.0.options = v.into();
2575            self
2576        }
2577
2578        /// Sends the request.
2579        ///
2580        /// # Long running operations
2581        ///
2582        /// This starts, but does not poll, a longrunning operation. More information
2583        /// on [update_engine_config][crate::client::Aml::update_engine_config].
2584        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2585            (*self.0.stub)
2586                .update_engine_config(self.0.request, self.0.options)
2587                .await
2588                .map(crate::Response::into_body)
2589        }
2590
2591        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_engine_config`.
2592        pub fn poller(
2593            self,
2594        ) -> impl google_cloud_lro::Poller<crate::model::EngineConfig, crate::model::OperationMetadata>
2595        {
2596            type Operation = google_cloud_lro::internal::Operation<
2597                crate::model::EngineConfig,
2598                crate::model::OperationMetadata,
2599            >;
2600            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2601            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2602
2603            let stub = self.0.stub.clone();
2604            let mut options = self.0.options.clone();
2605            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2606            let query = move |name| {
2607                let stub = stub.clone();
2608                let options = options.clone();
2609                async {
2610                    let op = GetOperation::new(stub)
2611                        .set_name(name)
2612                        .with_options(options)
2613                        .send()
2614                        .await?;
2615                    Ok(Operation::new(op))
2616                }
2617            };
2618
2619            let start = move || async {
2620                let op = self.send().await?;
2621                Ok(Operation::new(op))
2622            };
2623
2624            google_cloud_lro::internal::new_poller(
2625                polling_error_policy,
2626                polling_backoff_policy,
2627                start,
2628                query,
2629            )
2630        }
2631
2632        /// Sets the value of [update_mask][crate::model::UpdateEngineConfigRequest::update_mask].
2633        pub fn set_update_mask<T>(mut self, v: T) -> Self
2634        where
2635            T: std::convert::Into<wkt::FieldMask>,
2636        {
2637            self.0.request.update_mask = std::option::Option::Some(v.into());
2638            self
2639        }
2640
2641        /// Sets or clears the value of [update_mask][crate::model::UpdateEngineConfigRequest::update_mask].
2642        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2643        where
2644            T: std::convert::Into<wkt::FieldMask>,
2645        {
2646            self.0.request.update_mask = v.map(|x| x.into());
2647            self
2648        }
2649
2650        /// Sets the value of [engine_config][crate::model::UpdateEngineConfigRequest::engine_config].
2651        ///
2652        /// This is a **required** field for requests.
2653        pub fn set_engine_config<T>(mut self, v: T) -> Self
2654        where
2655            T: std::convert::Into<crate::model::EngineConfig>,
2656        {
2657            self.0.request.engine_config = std::option::Option::Some(v.into());
2658            self
2659        }
2660
2661        /// Sets or clears the value of [engine_config][crate::model::UpdateEngineConfigRequest::engine_config].
2662        ///
2663        /// This is a **required** field for requests.
2664        pub fn set_or_clear_engine_config<T>(mut self, v: std::option::Option<T>) -> Self
2665        where
2666            T: std::convert::Into<crate::model::EngineConfig>,
2667        {
2668            self.0.request.engine_config = v.map(|x| x.into());
2669            self
2670        }
2671
2672        /// Sets the value of [request_id][crate::model::UpdateEngineConfigRequest::request_id].
2673        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2674            self.0.request.request_id = v.into();
2675            self
2676        }
2677    }
2678
2679    #[doc(hidden)]
2680    impl crate::RequestBuilder for UpdateEngineConfig {
2681        fn request_options(&mut self) -> &mut crate::RequestOptions {
2682            &mut self.0.options
2683        }
2684    }
2685
2686    /// The request builder for [Aml::export_engine_config_metadata][crate::client::Aml::export_engine_config_metadata] calls.
2687    ///
2688    /// # Example
2689    /// ```
2690    /// # use google_cloud_financialservices_v1::builder::aml::ExportEngineConfigMetadata;
2691    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
2692    /// use google_cloud_lro::Poller;
2693    ///
2694    /// let builder = prepare_request_builder();
2695    /// let response = builder.poller().until_done().await?;
2696    /// # Ok(()) }
2697    ///
2698    /// fn prepare_request_builder() -> ExportEngineConfigMetadata {
2699    ///   # panic!();
2700    ///   // ... details omitted ...
2701    /// }
2702    /// ```
2703    #[derive(Clone, Debug)]
2704    pub struct ExportEngineConfigMetadata(
2705        RequestBuilder<crate::model::ExportEngineConfigMetadataRequest>,
2706    );
2707
2708    impl ExportEngineConfigMetadata {
2709        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
2710            Self(RequestBuilder::new(stub))
2711        }
2712
2713        /// Sets the full request, replacing any prior values.
2714        pub fn with_request<V: Into<crate::model::ExportEngineConfigMetadataRequest>>(
2715            mut self,
2716            v: V,
2717        ) -> Self {
2718            self.0.request = v.into();
2719            self
2720        }
2721
2722        /// Sets all the options, replacing any prior values.
2723        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2724            self.0.options = v.into();
2725            self
2726        }
2727
2728        /// Sends the request.
2729        ///
2730        /// # Long running operations
2731        ///
2732        /// This starts, but does not poll, a longrunning operation. More information
2733        /// on [export_engine_config_metadata][crate::client::Aml::export_engine_config_metadata].
2734        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2735            (*self.0.stub)
2736                .export_engine_config_metadata(self.0.request, self.0.options)
2737                .await
2738                .map(crate::Response::into_body)
2739        }
2740
2741        /// Creates a [Poller][google_cloud_lro::Poller] to work with `export_engine_config_metadata`.
2742        pub fn poller(
2743            self,
2744        ) -> impl google_cloud_lro::Poller<
2745            crate::model::ExportEngineConfigMetadataResponse,
2746            crate::model::OperationMetadata,
2747        > {
2748            type Operation = google_cloud_lro::internal::Operation<
2749                crate::model::ExportEngineConfigMetadataResponse,
2750                crate::model::OperationMetadata,
2751            >;
2752            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2753            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2754
2755            let stub = self.0.stub.clone();
2756            let mut options = self.0.options.clone();
2757            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2758            let query = move |name| {
2759                let stub = stub.clone();
2760                let options = options.clone();
2761                async {
2762                    let op = GetOperation::new(stub)
2763                        .set_name(name)
2764                        .with_options(options)
2765                        .send()
2766                        .await?;
2767                    Ok(Operation::new(op))
2768                }
2769            };
2770
2771            let start = move || async {
2772                let op = self.send().await?;
2773                Ok(Operation::new(op))
2774            };
2775
2776            google_cloud_lro::internal::new_poller(
2777                polling_error_policy,
2778                polling_backoff_policy,
2779                start,
2780                query,
2781            )
2782        }
2783
2784        /// Sets the value of [engine_config][crate::model::ExportEngineConfigMetadataRequest::engine_config].
2785        ///
2786        /// This is a **required** field for requests.
2787        pub fn set_engine_config<T: Into<std::string::String>>(mut self, v: T) -> Self {
2788            self.0.request.engine_config = v.into();
2789            self
2790        }
2791
2792        /// Sets the value of [structured_metadata_destination][crate::model::ExportEngineConfigMetadataRequest::structured_metadata_destination].
2793        ///
2794        /// This is a **required** field for requests.
2795        pub fn set_structured_metadata_destination<T>(mut self, v: T) -> Self
2796        where
2797            T: std::convert::Into<crate::model::BigQueryDestination>,
2798        {
2799            self.0.request.structured_metadata_destination = std::option::Option::Some(v.into());
2800            self
2801        }
2802
2803        /// Sets or clears the value of [structured_metadata_destination][crate::model::ExportEngineConfigMetadataRequest::structured_metadata_destination].
2804        ///
2805        /// This is a **required** field for requests.
2806        pub fn set_or_clear_structured_metadata_destination<T>(
2807            mut self,
2808            v: std::option::Option<T>,
2809        ) -> Self
2810        where
2811            T: std::convert::Into<crate::model::BigQueryDestination>,
2812        {
2813            self.0.request.structured_metadata_destination = v.map(|x| x.into());
2814            self
2815        }
2816    }
2817
2818    #[doc(hidden)]
2819    impl crate::RequestBuilder for ExportEngineConfigMetadata {
2820        fn request_options(&mut self) -> &mut crate::RequestOptions {
2821            &mut self.0.options
2822        }
2823    }
2824
2825    /// The request builder for [Aml::delete_engine_config][crate::client::Aml::delete_engine_config] calls.
2826    ///
2827    /// # Example
2828    /// ```
2829    /// # use google_cloud_financialservices_v1::builder::aml::DeleteEngineConfig;
2830    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
2831    /// use google_cloud_lro::Poller;
2832    ///
2833    /// let builder = prepare_request_builder();
2834    /// let response = builder.poller().until_done().await?;
2835    /// # Ok(()) }
2836    ///
2837    /// fn prepare_request_builder() -> DeleteEngineConfig {
2838    ///   # panic!();
2839    ///   // ... details omitted ...
2840    /// }
2841    /// ```
2842    #[derive(Clone, Debug)]
2843    pub struct DeleteEngineConfig(RequestBuilder<crate::model::DeleteEngineConfigRequest>);
2844
2845    impl DeleteEngineConfig {
2846        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
2847            Self(RequestBuilder::new(stub))
2848        }
2849
2850        /// Sets the full request, replacing any prior values.
2851        pub fn with_request<V: Into<crate::model::DeleteEngineConfigRequest>>(
2852            mut self,
2853            v: V,
2854        ) -> Self {
2855            self.0.request = v.into();
2856            self
2857        }
2858
2859        /// Sets all the options, replacing any prior values.
2860        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2861            self.0.options = v.into();
2862            self
2863        }
2864
2865        /// Sends the request.
2866        ///
2867        /// # Long running operations
2868        ///
2869        /// This starts, but does not poll, a longrunning operation. More information
2870        /// on [delete_engine_config][crate::client::Aml::delete_engine_config].
2871        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2872            (*self.0.stub)
2873                .delete_engine_config(self.0.request, self.0.options)
2874                .await
2875                .map(crate::Response::into_body)
2876        }
2877
2878        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_engine_config`.
2879        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
2880            type Operation =
2881                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2882            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2883            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2884
2885            let stub = self.0.stub.clone();
2886            let mut options = self.0.options.clone();
2887            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2888            let query = move |name| {
2889                let stub = stub.clone();
2890                let options = options.clone();
2891                async {
2892                    let op = GetOperation::new(stub)
2893                        .set_name(name)
2894                        .with_options(options)
2895                        .send()
2896                        .await?;
2897                    Ok(Operation::new(op))
2898                }
2899            };
2900
2901            let start = move || async {
2902                let op = self.send().await?;
2903                Ok(Operation::new(op))
2904            };
2905
2906            google_cloud_lro::internal::new_unit_response_poller(
2907                polling_error_policy,
2908                polling_backoff_policy,
2909                start,
2910                query,
2911            )
2912        }
2913
2914        /// Sets the value of [name][crate::model::DeleteEngineConfigRequest::name].
2915        ///
2916        /// This is a **required** field for requests.
2917        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2918            self.0.request.name = v.into();
2919            self
2920        }
2921
2922        /// Sets the value of [request_id][crate::model::DeleteEngineConfigRequest::request_id].
2923        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2924            self.0.request.request_id = v.into();
2925            self
2926        }
2927    }
2928
2929    #[doc(hidden)]
2930    impl crate::RequestBuilder for DeleteEngineConfig {
2931        fn request_options(&mut self) -> &mut crate::RequestOptions {
2932            &mut self.0.options
2933        }
2934    }
2935
2936    /// The request builder for [Aml::get_engine_version][crate::client::Aml::get_engine_version] calls.
2937    ///
2938    /// # Example
2939    /// ```
2940    /// # use google_cloud_financialservices_v1::builder::aml::GetEngineVersion;
2941    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
2942    ///
2943    /// let builder = prepare_request_builder();
2944    /// let response = builder.send().await?;
2945    /// # Ok(()) }
2946    ///
2947    /// fn prepare_request_builder() -> GetEngineVersion {
2948    ///   # panic!();
2949    ///   // ... details omitted ...
2950    /// }
2951    /// ```
2952    #[derive(Clone, Debug)]
2953    pub struct GetEngineVersion(RequestBuilder<crate::model::GetEngineVersionRequest>);
2954
2955    impl GetEngineVersion {
2956        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
2957            Self(RequestBuilder::new(stub))
2958        }
2959
2960        /// Sets the full request, replacing any prior values.
2961        pub fn with_request<V: Into<crate::model::GetEngineVersionRequest>>(
2962            mut self,
2963            v: V,
2964        ) -> Self {
2965            self.0.request = v.into();
2966            self
2967        }
2968
2969        /// Sets all the options, replacing any prior values.
2970        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2971            self.0.options = v.into();
2972            self
2973        }
2974
2975        /// Sends the request.
2976        pub async fn send(self) -> Result<crate::model::EngineVersion> {
2977            (*self.0.stub)
2978                .get_engine_version(self.0.request, self.0.options)
2979                .await
2980                .map(crate::Response::into_body)
2981        }
2982
2983        /// Sets the value of [name][crate::model::GetEngineVersionRequest::name].
2984        ///
2985        /// This is a **required** field for requests.
2986        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2987            self.0.request.name = v.into();
2988            self
2989        }
2990    }
2991
2992    #[doc(hidden)]
2993    impl crate::RequestBuilder for GetEngineVersion {
2994        fn request_options(&mut self) -> &mut crate::RequestOptions {
2995            &mut self.0.options
2996        }
2997    }
2998
2999    /// The request builder for [Aml::list_engine_versions][crate::client::Aml::list_engine_versions] calls.
3000    ///
3001    /// # Example
3002    /// ```
3003    /// # use google_cloud_financialservices_v1::builder::aml::ListEngineVersions;
3004    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
3005    /// use google_cloud_gax::paginator::ItemPaginator;
3006    ///
3007    /// let builder = prepare_request_builder();
3008    /// let mut items = builder.by_item();
3009    /// while let Some(result) = items.next().await {
3010    ///   let item = result?;
3011    /// }
3012    /// # Ok(()) }
3013    ///
3014    /// fn prepare_request_builder() -> ListEngineVersions {
3015    ///   # panic!();
3016    ///   // ... details omitted ...
3017    /// }
3018    /// ```
3019    #[derive(Clone, Debug)]
3020    pub struct ListEngineVersions(RequestBuilder<crate::model::ListEngineVersionsRequest>);
3021
3022    impl ListEngineVersions {
3023        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
3024            Self(RequestBuilder::new(stub))
3025        }
3026
3027        /// Sets the full request, replacing any prior values.
3028        pub fn with_request<V: Into<crate::model::ListEngineVersionsRequest>>(
3029            mut self,
3030            v: V,
3031        ) -> Self {
3032            self.0.request = v.into();
3033            self
3034        }
3035
3036        /// Sets all the options, replacing any prior values.
3037        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3038            self.0.options = v.into();
3039            self
3040        }
3041
3042        /// Sends the request.
3043        pub async fn send(self) -> Result<crate::model::ListEngineVersionsResponse> {
3044            (*self.0.stub)
3045                .list_engine_versions(self.0.request, self.0.options)
3046                .await
3047                .map(crate::Response::into_body)
3048        }
3049
3050        /// Streams each page in the collection.
3051        pub fn by_page(
3052            self,
3053        ) -> impl google_cloud_gax::paginator::Paginator<
3054            crate::model::ListEngineVersionsResponse,
3055            crate::Error,
3056        > {
3057            use std::clone::Clone;
3058            let token = self.0.request.page_token.clone();
3059            let execute = move |token: String| {
3060                let mut builder = self.clone();
3061                builder.0.request = builder.0.request.set_page_token(token);
3062                builder.send()
3063            };
3064            google_cloud_gax::paginator::internal::new_paginator(token, execute)
3065        }
3066
3067        /// Streams each item in the collection.
3068        pub fn by_item(
3069            self,
3070        ) -> impl google_cloud_gax::paginator::ItemPaginator<
3071            crate::model::ListEngineVersionsResponse,
3072            crate::Error,
3073        > {
3074            use google_cloud_gax::paginator::Paginator;
3075            self.by_page().items()
3076        }
3077
3078        /// Sets the value of [parent][crate::model::ListEngineVersionsRequest::parent].
3079        ///
3080        /// This is a **required** field for requests.
3081        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3082            self.0.request.parent = v.into();
3083            self
3084        }
3085
3086        /// Sets the value of [page_size][crate::model::ListEngineVersionsRequest::page_size].
3087        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3088            self.0.request.page_size = v.into();
3089            self
3090        }
3091
3092        /// Sets the value of [page_token][crate::model::ListEngineVersionsRequest::page_token].
3093        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3094            self.0.request.page_token = v.into();
3095            self
3096        }
3097
3098        /// Sets the value of [filter][crate::model::ListEngineVersionsRequest::filter].
3099        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3100            self.0.request.filter = v.into();
3101            self
3102        }
3103
3104        /// Sets the value of [order_by][crate::model::ListEngineVersionsRequest::order_by].
3105        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3106            self.0.request.order_by = v.into();
3107            self
3108        }
3109    }
3110
3111    #[doc(hidden)]
3112    impl crate::RequestBuilder for ListEngineVersions {
3113        fn request_options(&mut self) -> &mut crate::RequestOptions {
3114            &mut self.0.options
3115        }
3116    }
3117
3118    /// The request builder for [Aml::list_prediction_results][crate::client::Aml::list_prediction_results] calls.
3119    ///
3120    /// # Example
3121    /// ```
3122    /// # use google_cloud_financialservices_v1::builder::aml::ListPredictionResults;
3123    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
3124    /// use google_cloud_gax::paginator::ItemPaginator;
3125    ///
3126    /// let builder = prepare_request_builder();
3127    /// let mut items = builder.by_item();
3128    /// while let Some(result) = items.next().await {
3129    ///   let item = result?;
3130    /// }
3131    /// # Ok(()) }
3132    ///
3133    /// fn prepare_request_builder() -> ListPredictionResults {
3134    ///   # panic!();
3135    ///   // ... details omitted ...
3136    /// }
3137    /// ```
3138    #[derive(Clone, Debug)]
3139    pub struct ListPredictionResults(RequestBuilder<crate::model::ListPredictionResultsRequest>);
3140
3141    impl ListPredictionResults {
3142        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
3143            Self(RequestBuilder::new(stub))
3144        }
3145
3146        /// Sets the full request, replacing any prior values.
3147        pub fn with_request<V: Into<crate::model::ListPredictionResultsRequest>>(
3148            mut self,
3149            v: V,
3150        ) -> Self {
3151            self.0.request = v.into();
3152            self
3153        }
3154
3155        /// Sets all the options, replacing any prior values.
3156        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3157            self.0.options = v.into();
3158            self
3159        }
3160
3161        /// Sends the request.
3162        pub async fn send(self) -> Result<crate::model::ListPredictionResultsResponse> {
3163            (*self.0.stub)
3164                .list_prediction_results(self.0.request, self.0.options)
3165                .await
3166                .map(crate::Response::into_body)
3167        }
3168
3169        /// Streams each page in the collection.
3170        pub fn by_page(
3171            self,
3172        ) -> impl google_cloud_gax::paginator::Paginator<
3173            crate::model::ListPredictionResultsResponse,
3174            crate::Error,
3175        > {
3176            use std::clone::Clone;
3177            let token = self.0.request.page_token.clone();
3178            let execute = move |token: String| {
3179                let mut builder = self.clone();
3180                builder.0.request = builder.0.request.set_page_token(token);
3181                builder.send()
3182            };
3183            google_cloud_gax::paginator::internal::new_paginator(token, execute)
3184        }
3185
3186        /// Streams each item in the collection.
3187        pub fn by_item(
3188            self,
3189        ) -> impl google_cloud_gax::paginator::ItemPaginator<
3190            crate::model::ListPredictionResultsResponse,
3191            crate::Error,
3192        > {
3193            use google_cloud_gax::paginator::Paginator;
3194            self.by_page().items()
3195        }
3196
3197        /// Sets the value of [parent][crate::model::ListPredictionResultsRequest::parent].
3198        ///
3199        /// This is a **required** field for requests.
3200        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3201            self.0.request.parent = v.into();
3202            self
3203        }
3204
3205        /// Sets the value of [page_size][crate::model::ListPredictionResultsRequest::page_size].
3206        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3207            self.0.request.page_size = v.into();
3208            self
3209        }
3210
3211        /// Sets the value of [page_token][crate::model::ListPredictionResultsRequest::page_token].
3212        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3213            self.0.request.page_token = v.into();
3214            self
3215        }
3216
3217        /// Sets the value of [filter][crate::model::ListPredictionResultsRequest::filter].
3218        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3219            self.0.request.filter = v.into();
3220            self
3221        }
3222
3223        /// Sets the value of [order_by][crate::model::ListPredictionResultsRequest::order_by].
3224        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3225            self.0.request.order_by = v.into();
3226            self
3227        }
3228    }
3229
3230    #[doc(hidden)]
3231    impl crate::RequestBuilder for ListPredictionResults {
3232        fn request_options(&mut self) -> &mut crate::RequestOptions {
3233            &mut self.0.options
3234        }
3235    }
3236
3237    /// The request builder for [Aml::get_prediction_result][crate::client::Aml::get_prediction_result] calls.
3238    ///
3239    /// # Example
3240    /// ```
3241    /// # use google_cloud_financialservices_v1::builder::aml::GetPredictionResult;
3242    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
3243    ///
3244    /// let builder = prepare_request_builder();
3245    /// let response = builder.send().await?;
3246    /// # Ok(()) }
3247    ///
3248    /// fn prepare_request_builder() -> GetPredictionResult {
3249    ///   # panic!();
3250    ///   // ... details omitted ...
3251    /// }
3252    /// ```
3253    #[derive(Clone, Debug)]
3254    pub struct GetPredictionResult(RequestBuilder<crate::model::GetPredictionResultRequest>);
3255
3256    impl GetPredictionResult {
3257        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
3258            Self(RequestBuilder::new(stub))
3259        }
3260
3261        /// Sets the full request, replacing any prior values.
3262        pub fn with_request<V: Into<crate::model::GetPredictionResultRequest>>(
3263            mut self,
3264            v: V,
3265        ) -> Self {
3266            self.0.request = v.into();
3267            self
3268        }
3269
3270        /// Sets all the options, replacing any prior values.
3271        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3272            self.0.options = v.into();
3273            self
3274        }
3275
3276        /// Sends the request.
3277        pub async fn send(self) -> Result<crate::model::PredictionResult> {
3278            (*self.0.stub)
3279                .get_prediction_result(self.0.request, self.0.options)
3280                .await
3281                .map(crate::Response::into_body)
3282        }
3283
3284        /// Sets the value of [name][crate::model::GetPredictionResultRequest::name].
3285        ///
3286        /// This is a **required** field for requests.
3287        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3288            self.0.request.name = v.into();
3289            self
3290        }
3291    }
3292
3293    #[doc(hidden)]
3294    impl crate::RequestBuilder for GetPredictionResult {
3295        fn request_options(&mut self) -> &mut crate::RequestOptions {
3296            &mut self.0.options
3297        }
3298    }
3299
3300    /// The request builder for [Aml::create_prediction_result][crate::client::Aml::create_prediction_result] calls.
3301    ///
3302    /// # Example
3303    /// ```
3304    /// # use google_cloud_financialservices_v1::builder::aml::CreatePredictionResult;
3305    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
3306    /// use google_cloud_lro::Poller;
3307    ///
3308    /// let builder = prepare_request_builder();
3309    /// let response = builder.poller().until_done().await?;
3310    /// # Ok(()) }
3311    ///
3312    /// fn prepare_request_builder() -> CreatePredictionResult {
3313    ///   # panic!();
3314    ///   // ... details omitted ...
3315    /// }
3316    /// ```
3317    #[derive(Clone, Debug)]
3318    pub struct CreatePredictionResult(RequestBuilder<crate::model::CreatePredictionResultRequest>);
3319
3320    impl CreatePredictionResult {
3321        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
3322            Self(RequestBuilder::new(stub))
3323        }
3324
3325        /// Sets the full request, replacing any prior values.
3326        pub fn with_request<V: Into<crate::model::CreatePredictionResultRequest>>(
3327            mut self,
3328            v: V,
3329        ) -> Self {
3330            self.0.request = v.into();
3331            self
3332        }
3333
3334        /// Sets all the options, replacing any prior values.
3335        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3336            self.0.options = v.into();
3337            self
3338        }
3339
3340        /// Sends the request.
3341        ///
3342        /// # Long running operations
3343        ///
3344        /// This starts, but does not poll, a longrunning operation. More information
3345        /// on [create_prediction_result][crate::client::Aml::create_prediction_result].
3346        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3347            (*self.0.stub)
3348                .create_prediction_result(self.0.request, self.0.options)
3349                .await
3350                .map(crate::Response::into_body)
3351        }
3352
3353        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_prediction_result`.
3354        pub fn poller(
3355            self,
3356        ) -> impl google_cloud_lro::Poller<crate::model::PredictionResult, crate::model::OperationMetadata>
3357        {
3358            type Operation = google_cloud_lro::internal::Operation<
3359                crate::model::PredictionResult,
3360                crate::model::OperationMetadata,
3361            >;
3362            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3363            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3364
3365            let stub = self.0.stub.clone();
3366            let mut options = self.0.options.clone();
3367            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3368            let query = move |name| {
3369                let stub = stub.clone();
3370                let options = options.clone();
3371                async {
3372                    let op = GetOperation::new(stub)
3373                        .set_name(name)
3374                        .with_options(options)
3375                        .send()
3376                        .await?;
3377                    Ok(Operation::new(op))
3378                }
3379            };
3380
3381            let start = move || async {
3382                let op = self.send().await?;
3383                Ok(Operation::new(op))
3384            };
3385
3386            google_cloud_lro::internal::new_poller(
3387                polling_error_policy,
3388                polling_backoff_policy,
3389                start,
3390                query,
3391            )
3392        }
3393
3394        /// Sets the value of [parent][crate::model::CreatePredictionResultRequest::parent].
3395        ///
3396        /// This is a **required** field for requests.
3397        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3398            self.0.request.parent = v.into();
3399            self
3400        }
3401
3402        /// Sets the value of [prediction_result_id][crate::model::CreatePredictionResultRequest::prediction_result_id].
3403        ///
3404        /// This is a **required** field for requests.
3405        pub fn set_prediction_result_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3406            self.0.request.prediction_result_id = v.into();
3407            self
3408        }
3409
3410        /// Sets the value of [prediction_result][crate::model::CreatePredictionResultRequest::prediction_result].
3411        ///
3412        /// This is a **required** field for requests.
3413        pub fn set_prediction_result<T>(mut self, v: T) -> Self
3414        where
3415            T: std::convert::Into<crate::model::PredictionResult>,
3416        {
3417            self.0.request.prediction_result = std::option::Option::Some(v.into());
3418            self
3419        }
3420
3421        /// Sets or clears the value of [prediction_result][crate::model::CreatePredictionResultRequest::prediction_result].
3422        ///
3423        /// This is a **required** field for requests.
3424        pub fn set_or_clear_prediction_result<T>(mut self, v: std::option::Option<T>) -> Self
3425        where
3426            T: std::convert::Into<crate::model::PredictionResult>,
3427        {
3428            self.0.request.prediction_result = v.map(|x| x.into());
3429            self
3430        }
3431
3432        /// Sets the value of [request_id][crate::model::CreatePredictionResultRequest::request_id].
3433        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3434            self.0.request.request_id = v.into();
3435            self
3436        }
3437    }
3438
3439    #[doc(hidden)]
3440    impl crate::RequestBuilder for CreatePredictionResult {
3441        fn request_options(&mut self) -> &mut crate::RequestOptions {
3442            &mut self.0.options
3443        }
3444    }
3445
3446    /// The request builder for [Aml::update_prediction_result][crate::client::Aml::update_prediction_result] calls.
3447    ///
3448    /// # Example
3449    /// ```
3450    /// # use google_cloud_financialservices_v1::builder::aml::UpdatePredictionResult;
3451    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
3452    /// use google_cloud_lro::Poller;
3453    ///
3454    /// let builder = prepare_request_builder();
3455    /// let response = builder.poller().until_done().await?;
3456    /// # Ok(()) }
3457    ///
3458    /// fn prepare_request_builder() -> UpdatePredictionResult {
3459    ///   # panic!();
3460    ///   // ... details omitted ...
3461    /// }
3462    /// ```
3463    #[derive(Clone, Debug)]
3464    pub struct UpdatePredictionResult(RequestBuilder<crate::model::UpdatePredictionResultRequest>);
3465
3466    impl UpdatePredictionResult {
3467        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
3468            Self(RequestBuilder::new(stub))
3469        }
3470
3471        /// Sets the full request, replacing any prior values.
3472        pub fn with_request<V: Into<crate::model::UpdatePredictionResultRequest>>(
3473            mut self,
3474            v: V,
3475        ) -> Self {
3476            self.0.request = v.into();
3477            self
3478        }
3479
3480        /// Sets all the options, replacing any prior values.
3481        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3482            self.0.options = v.into();
3483            self
3484        }
3485
3486        /// Sends the request.
3487        ///
3488        /// # Long running operations
3489        ///
3490        /// This starts, but does not poll, a longrunning operation. More information
3491        /// on [update_prediction_result][crate::client::Aml::update_prediction_result].
3492        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3493            (*self.0.stub)
3494                .update_prediction_result(self.0.request, self.0.options)
3495                .await
3496                .map(crate::Response::into_body)
3497        }
3498
3499        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_prediction_result`.
3500        pub fn poller(
3501            self,
3502        ) -> impl google_cloud_lro::Poller<crate::model::PredictionResult, crate::model::OperationMetadata>
3503        {
3504            type Operation = google_cloud_lro::internal::Operation<
3505                crate::model::PredictionResult,
3506                crate::model::OperationMetadata,
3507            >;
3508            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3509            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3510
3511            let stub = self.0.stub.clone();
3512            let mut options = self.0.options.clone();
3513            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3514            let query = move |name| {
3515                let stub = stub.clone();
3516                let options = options.clone();
3517                async {
3518                    let op = GetOperation::new(stub)
3519                        .set_name(name)
3520                        .with_options(options)
3521                        .send()
3522                        .await?;
3523                    Ok(Operation::new(op))
3524                }
3525            };
3526
3527            let start = move || async {
3528                let op = self.send().await?;
3529                Ok(Operation::new(op))
3530            };
3531
3532            google_cloud_lro::internal::new_poller(
3533                polling_error_policy,
3534                polling_backoff_policy,
3535                start,
3536                query,
3537            )
3538        }
3539
3540        /// Sets the value of [update_mask][crate::model::UpdatePredictionResultRequest::update_mask].
3541        pub fn set_update_mask<T>(mut self, v: T) -> Self
3542        where
3543            T: std::convert::Into<wkt::FieldMask>,
3544        {
3545            self.0.request.update_mask = std::option::Option::Some(v.into());
3546            self
3547        }
3548
3549        /// Sets or clears the value of [update_mask][crate::model::UpdatePredictionResultRequest::update_mask].
3550        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3551        where
3552            T: std::convert::Into<wkt::FieldMask>,
3553        {
3554            self.0.request.update_mask = v.map(|x| x.into());
3555            self
3556        }
3557
3558        /// Sets the value of [prediction_result][crate::model::UpdatePredictionResultRequest::prediction_result].
3559        ///
3560        /// This is a **required** field for requests.
3561        pub fn set_prediction_result<T>(mut self, v: T) -> Self
3562        where
3563            T: std::convert::Into<crate::model::PredictionResult>,
3564        {
3565            self.0.request.prediction_result = std::option::Option::Some(v.into());
3566            self
3567        }
3568
3569        /// Sets or clears the value of [prediction_result][crate::model::UpdatePredictionResultRequest::prediction_result].
3570        ///
3571        /// This is a **required** field for requests.
3572        pub fn set_or_clear_prediction_result<T>(mut self, v: std::option::Option<T>) -> Self
3573        where
3574            T: std::convert::Into<crate::model::PredictionResult>,
3575        {
3576            self.0.request.prediction_result = v.map(|x| x.into());
3577            self
3578        }
3579
3580        /// Sets the value of [request_id][crate::model::UpdatePredictionResultRequest::request_id].
3581        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3582            self.0.request.request_id = v.into();
3583            self
3584        }
3585    }
3586
3587    #[doc(hidden)]
3588    impl crate::RequestBuilder for UpdatePredictionResult {
3589        fn request_options(&mut self) -> &mut crate::RequestOptions {
3590            &mut self.0.options
3591        }
3592    }
3593
3594    /// The request builder for [Aml::export_prediction_result_metadata][crate::client::Aml::export_prediction_result_metadata] calls.
3595    ///
3596    /// # Example
3597    /// ```
3598    /// # use google_cloud_financialservices_v1::builder::aml::ExportPredictionResultMetadata;
3599    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
3600    /// use google_cloud_lro::Poller;
3601    ///
3602    /// let builder = prepare_request_builder();
3603    /// let response = builder.poller().until_done().await?;
3604    /// # Ok(()) }
3605    ///
3606    /// fn prepare_request_builder() -> ExportPredictionResultMetadata {
3607    ///   # panic!();
3608    ///   // ... details omitted ...
3609    /// }
3610    /// ```
3611    #[derive(Clone, Debug)]
3612    pub struct ExportPredictionResultMetadata(
3613        RequestBuilder<crate::model::ExportPredictionResultMetadataRequest>,
3614    );
3615
3616    impl ExportPredictionResultMetadata {
3617        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
3618            Self(RequestBuilder::new(stub))
3619        }
3620
3621        /// Sets the full request, replacing any prior values.
3622        pub fn with_request<V: Into<crate::model::ExportPredictionResultMetadataRequest>>(
3623            mut self,
3624            v: V,
3625        ) -> Self {
3626            self.0.request = v.into();
3627            self
3628        }
3629
3630        /// Sets all the options, replacing any prior values.
3631        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3632            self.0.options = v.into();
3633            self
3634        }
3635
3636        /// Sends the request.
3637        ///
3638        /// # Long running operations
3639        ///
3640        /// This starts, but does not poll, a longrunning operation. More information
3641        /// on [export_prediction_result_metadata][crate::client::Aml::export_prediction_result_metadata].
3642        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3643            (*self.0.stub)
3644                .export_prediction_result_metadata(self.0.request, self.0.options)
3645                .await
3646                .map(crate::Response::into_body)
3647        }
3648
3649        /// Creates a [Poller][google_cloud_lro::Poller] to work with `export_prediction_result_metadata`.
3650        pub fn poller(
3651            self,
3652        ) -> impl google_cloud_lro::Poller<
3653            crate::model::ExportPredictionResultMetadataResponse,
3654            crate::model::OperationMetadata,
3655        > {
3656            type Operation = google_cloud_lro::internal::Operation<
3657                crate::model::ExportPredictionResultMetadataResponse,
3658                crate::model::OperationMetadata,
3659            >;
3660            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3661            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3662
3663            let stub = self.0.stub.clone();
3664            let mut options = self.0.options.clone();
3665            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3666            let query = move |name| {
3667                let stub = stub.clone();
3668                let options = options.clone();
3669                async {
3670                    let op = GetOperation::new(stub)
3671                        .set_name(name)
3672                        .with_options(options)
3673                        .send()
3674                        .await?;
3675                    Ok(Operation::new(op))
3676                }
3677            };
3678
3679            let start = move || async {
3680                let op = self.send().await?;
3681                Ok(Operation::new(op))
3682            };
3683
3684            google_cloud_lro::internal::new_poller(
3685                polling_error_policy,
3686                polling_backoff_policy,
3687                start,
3688                query,
3689            )
3690        }
3691
3692        /// Sets the value of [prediction_result][crate::model::ExportPredictionResultMetadataRequest::prediction_result].
3693        ///
3694        /// This is a **required** field for requests.
3695        pub fn set_prediction_result<T: Into<std::string::String>>(mut self, v: T) -> Self {
3696            self.0.request.prediction_result = v.into();
3697            self
3698        }
3699
3700        /// Sets the value of [structured_metadata_destination][crate::model::ExportPredictionResultMetadataRequest::structured_metadata_destination].
3701        ///
3702        /// This is a **required** field for requests.
3703        pub fn set_structured_metadata_destination<T>(mut self, v: T) -> Self
3704        where
3705            T: std::convert::Into<crate::model::BigQueryDestination>,
3706        {
3707            self.0.request.structured_metadata_destination = std::option::Option::Some(v.into());
3708            self
3709        }
3710
3711        /// Sets or clears the value of [structured_metadata_destination][crate::model::ExportPredictionResultMetadataRequest::structured_metadata_destination].
3712        ///
3713        /// This is a **required** field for requests.
3714        pub fn set_or_clear_structured_metadata_destination<T>(
3715            mut self,
3716            v: std::option::Option<T>,
3717        ) -> Self
3718        where
3719            T: std::convert::Into<crate::model::BigQueryDestination>,
3720        {
3721            self.0.request.structured_metadata_destination = v.map(|x| x.into());
3722            self
3723        }
3724    }
3725
3726    #[doc(hidden)]
3727    impl crate::RequestBuilder for ExportPredictionResultMetadata {
3728        fn request_options(&mut self) -> &mut crate::RequestOptions {
3729            &mut self.0.options
3730        }
3731    }
3732
3733    /// The request builder for [Aml::delete_prediction_result][crate::client::Aml::delete_prediction_result] calls.
3734    ///
3735    /// # Example
3736    /// ```
3737    /// # use google_cloud_financialservices_v1::builder::aml::DeletePredictionResult;
3738    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
3739    /// use google_cloud_lro::Poller;
3740    ///
3741    /// let builder = prepare_request_builder();
3742    /// let response = builder.poller().until_done().await?;
3743    /// # Ok(()) }
3744    ///
3745    /// fn prepare_request_builder() -> DeletePredictionResult {
3746    ///   # panic!();
3747    ///   // ... details omitted ...
3748    /// }
3749    /// ```
3750    #[derive(Clone, Debug)]
3751    pub struct DeletePredictionResult(RequestBuilder<crate::model::DeletePredictionResultRequest>);
3752
3753    impl DeletePredictionResult {
3754        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
3755            Self(RequestBuilder::new(stub))
3756        }
3757
3758        /// Sets the full request, replacing any prior values.
3759        pub fn with_request<V: Into<crate::model::DeletePredictionResultRequest>>(
3760            mut self,
3761            v: V,
3762        ) -> Self {
3763            self.0.request = v.into();
3764            self
3765        }
3766
3767        /// Sets all the options, replacing any prior values.
3768        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3769            self.0.options = v.into();
3770            self
3771        }
3772
3773        /// Sends the request.
3774        ///
3775        /// # Long running operations
3776        ///
3777        /// This starts, but does not poll, a longrunning operation. More information
3778        /// on [delete_prediction_result][crate::client::Aml::delete_prediction_result].
3779        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3780            (*self.0.stub)
3781                .delete_prediction_result(self.0.request, self.0.options)
3782                .await
3783                .map(crate::Response::into_body)
3784        }
3785
3786        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_prediction_result`.
3787        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
3788            type Operation =
3789                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3790            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3791            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3792
3793            let stub = self.0.stub.clone();
3794            let mut options = self.0.options.clone();
3795            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3796            let query = move |name| {
3797                let stub = stub.clone();
3798                let options = options.clone();
3799                async {
3800                    let op = GetOperation::new(stub)
3801                        .set_name(name)
3802                        .with_options(options)
3803                        .send()
3804                        .await?;
3805                    Ok(Operation::new(op))
3806                }
3807            };
3808
3809            let start = move || async {
3810                let op = self.send().await?;
3811                Ok(Operation::new(op))
3812            };
3813
3814            google_cloud_lro::internal::new_unit_response_poller(
3815                polling_error_policy,
3816                polling_backoff_policy,
3817                start,
3818                query,
3819            )
3820        }
3821
3822        /// Sets the value of [name][crate::model::DeletePredictionResultRequest::name].
3823        ///
3824        /// This is a **required** field for requests.
3825        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3826            self.0.request.name = v.into();
3827            self
3828        }
3829
3830        /// Sets the value of [request_id][crate::model::DeletePredictionResultRequest::request_id].
3831        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3832            self.0.request.request_id = v.into();
3833            self
3834        }
3835    }
3836
3837    #[doc(hidden)]
3838    impl crate::RequestBuilder for DeletePredictionResult {
3839        fn request_options(&mut self) -> &mut crate::RequestOptions {
3840            &mut self.0.options
3841        }
3842    }
3843
3844    /// The request builder for [Aml::list_backtest_results][crate::client::Aml::list_backtest_results] calls.
3845    ///
3846    /// # Example
3847    /// ```
3848    /// # use google_cloud_financialservices_v1::builder::aml::ListBacktestResults;
3849    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
3850    /// use google_cloud_gax::paginator::ItemPaginator;
3851    ///
3852    /// let builder = prepare_request_builder();
3853    /// let mut items = builder.by_item();
3854    /// while let Some(result) = items.next().await {
3855    ///   let item = result?;
3856    /// }
3857    /// # Ok(()) }
3858    ///
3859    /// fn prepare_request_builder() -> ListBacktestResults {
3860    ///   # panic!();
3861    ///   // ... details omitted ...
3862    /// }
3863    /// ```
3864    #[derive(Clone, Debug)]
3865    pub struct ListBacktestResults(RequestBuilder<crate::model::ListBacktestResultsRequest>);
3866
3867    impl ListBacktestResults {
3868        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
3869            Self(RequestBuilder::new(stub))
3870        }
3871
3872        /// Sets the full request, replacing any prior values.
3873        pub fn with_request<V: Into<crate::model::ListBacktestResultsRequest>>(
3874            mut self,
3875            v: V,
3876        ) -> Self {
3877            self.0.request = v.into();
3878            self
3879        }
3880
3881        /// Sets all the options, replacing any prior values.
3882        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3883            self.0.options = v.into();
3884            self
3885        }
3886
3887        /// Sends the request.
3888        pub async fn send(self) -> Result<crate::model::ListBacktestResultsResponse> {
3889            (*self.0.stub)
3890                .list_backtest_results(self.0.request, self.0.options)
3891                .await
3892                .map(crate::Response::into_body)
3893        }
3894
3895        /// Streams each page in the collection.
3896        pub fn by_page(
3897            self,
3898        ) -> impl google_cloud_gax::paginator::Paginator<
3899            crate::model::ListBacktestResultsResponse,
3900            crate::Error,
3901        > {
3902            use std::clone::Clone;
3903            let token = self.0.request.page_token.clone();
3904            let execute = move |token: String| {
3905                let mut builder = self.clone();
3906                builder.0.request = builder.0.request.set_page_token(token);
3907                builder.send()
3908            };
3909            google_cloud_gax::paginator::internal::new_paginator(token, execute)
3910        }
3911
3912        /// Streams each item in the collection.
3913        pub fn by_item(
3914            self,
3915        ) -> impl google_cloud_gax::paginator::ItemPaginator<
3916            crate::model::ListBacktestResultsResponse,
3917            crate::Error,
3918        > {
3919            use google_cloud_gax::paginator::Paginator;
3920            self.by_page().items()
3921        }
3922
3923        /// Sets the value of [parent][crate::model::ListBacktestResultsRequest::parent].
3924        ///
3925        /// This is a **required** field for requests.
3926        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3927            self.0.request.parent = v.into();
3928            self
3929        }
3930
3931        /// Sets the value of [page_size][crate::model::ListBacktestResultsRequest::page_size].
3932        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3933            self.0.request.page_size = v.into();
3934            self
3935        }
3936
3937        /// Sets the value of [page_token][crate::model::ListBacktestResultsRequest::page_token].
3938        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3939            self.0.request.page_token = v.into();
3940            self
3941        }
3942
3943        /// Sets the value of [filter][crate::model::ListBacktestResultsRequest::filter].
3944        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3945            self.0.request.filter = v.into();
3946            self
3947        }
3948
3949        /// Sets the value of [order_by][crate::model::ListBacktestResultsRequest::order_by].
3950        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3951            self.0.request.order_by = v.into();
3952            self
3953        }
3954    }
3955
3956    #[doc(hidden)]
3957    impl crate::RequestBuilder for ListBacktestResults {
3958        fn request_options(&mut self) -> &mut crate::RequestOptions {
3959            &mut self.0.options
3960        }
3961    }
3962
3963    /// The request builder for [Aml::get_backtest_result][crate::client::Aml::get_backtest_result] calls.
3964    ///
3965    /// # Example
3966    /// ```
3967    /// # use google_cloud_financialservices_v1::builder::aml::GetBacktestResult;
3968    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
3969    ///
3970    /// let builder = prepare_request_builder();
3971    /// let response = builder.send().await?;
3972    /// # Ok(()) }
3973    ///
3974    /// fn prepare_request_builder() -> GetBacktestResult {
3975    ///   # panic!();
3976    ///   // ... details omitted ...
3977    /// }
3978    /// ```
3979    #[derive(Clone, Debug)]
3980    pub struct GetBacktestResult(RequestBuilder<crate::model::GetBacktestResultRequest>);
3981
3982    impl GetBacktestResult {
3983        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
3984            Self(RequestBuilder::new(stub))
3985        }
3986
3987        /// Sets the full request, replacing any prior values.
3988        pub fn with_request<V: Into<crate::model::GetBacktestResultRequest>>(
3989            mut self,
3990            v: V,
3991        ) -> Self {
3992            self.0.request = v.into();
3993            self
3994        }
3995
3996        /// Sets all the options, replacing any prior values.
3997        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3998            self.0.options = v.into();
3999            self
4000        }
4001
4002        /// Sends the request.
4003        pub async fn send(self) -> Result<crate::model::BacktestResult> {
4004            (*self.0.stub)
4005                .get_backtest_result(self.0.request, self.0.options)
4006                .await
4007                .map(crate::Response::into_body)
4008        }
4009
4010        /// Sets the value of [name][crate::model::GetBacktestResultRequest::name].
4011        ///
4012        /// This is a **required** field for requests.
4013        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4014            self.0.request.name = v.into();
4015            self
4016        }
4017    }
4018
4019    #[doc(hidden)]
4020    impl crate::RequestBuilder for GetBacktestResult {
4021        fn request_options(&mut self) -> &mut crate::RequestOptions {
4022            &mut self.0.options
4023        }
4024    }
4025
4026    /// The request builder for [Aml::create_backtest_result][crate::client::Aml::create_backtest_result] calls.
4027    ///
4028    /// # Example
4029    /// ```
4030    /// # use google_cloud_financialservices_v1::builder::aml::CreateBacktestResult;
4031    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
4032    /// use google_cloud_lro::Poller;
4033    ///
4034    /// let builder = prepare_request_builder();
4035    /// let response = builder.poller().until_done().await?;
4036    /// # Ok(()) }
4037    ///
4038    /// fn prepare_request_builder() -> CreateBacktestResult {
4039    ///   # panic!();
4040    ///   // ... details omitted ...
4041    /// }
4042    /// ```
4043    #[derive(Clone, Debug)]
4044    pub struct CreateBacktestResult(RequestBuilder<crate::model::CreateBacktestResultRequest>);
4045
4046    impl CreateBacktestResult {
4047        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
4048            Self(RequestBuilder::new(stub))
4049        }
4050
4051        /// Sets the full request, replacing any prior values.
4052        pub fn with_request<V: Into<crate::model::CreateBacktestResultRequest>>(
4053            mut self,
4054            v: V,
4055        ) -> Self {
4056            self.0.request = v.into();
4057            self
4058        }
4059
4060        /// Sets all the options, replacing any prior values.
4061        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4062            self.0.options = v.into();
4063            self
4064        }
4065
4066        /// Sends the request.
4067        ///
4068        /// # Long running operations
4069        ///
4070        /// This starts, but does not poll, a longrunning operation. More information
4071        /// on [create_backtest_result][crate::client::Aml::create_backtest_result].
4072        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4073            (*self.0.stub)
4074                .create_backtest_result(self.0.request, self.0.options)
4075                .await
4076                .map(crate::Response::into_body)
4077        }
4078
4079        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_backtest_result`.
4080        pub fn poller(
4081            self,
4082        ) -> impl google_cloud_lro::Poller<crate::model::BacktestResult, crate::model::OperationMetadata>
4083        {
4084            type Operation = google_cloud_lro::internal::Operation<
4085                crate::model::BacktestResult,
4086                crate::model::OperationMetadata,
4087            >;
4088            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4089            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4090
4091            let stub = self.0.stub.clone();
4092            let mut options = self.0.options.clone();
4093            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4094            let query = move |name| {
4095                let stub = stub.clone();
4096                let options = options.clone();
4097                async {
4098                    let op = GetOperation::new(stub)
4099                        .set_name(name)
4100                        .with_options(options)
4101                        .send()
4102                        .await?;
4103                    Ok(Operation::new(op))
4104                }
4105            };
4106
4107            let start = move || async {
4108                let op = self.send().await?;
4109                Ok(Operation::new(op))
4110            };
4111
4112            google_cloud_lro::internal::new_poller(
4113                polling_error_policy,
4114                polling_backoff_policy,
4115                start,
4116                query,
4117            )
4118        }
4119
4120        /// Sets the value of [parent][crate::model::CreateBacktestResultRequest::parent].
4121        ///
4122        /// This is a **required** field for requests.
4123        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4124            self.0.request.parent = v.into();
4125            self
4126        }
4127
4128        /// Sets the value of [backtest_result_id][crate::model::CreateBacktestResultRequest::backtest_result_id].
4129        ///
4130        /// This is a **required** field for requests.
4131        pub fn set_backtest_result_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4132            self.0.request.backtest_result_id = v.into();
4133            self
4134        }
4135
4136        /// Sets the value of [backtest_result][crate::model::CreateBacktestResultRequest::backtest_result].
4137        ///
4138        /// This is a **required** field for requests.
4139        pub fn set_backtest_result<T>(mut self, v: T) -> Self
4140        where
4141            T: std::convert::Into<crate::model::BacktestResult>,
4142        {
4143            self.0.request.backtest_result = std::option::Option::Some(v.into());
4144            self
4145        }
4146
4147        /// Sets or clears the value of [backtest_result][crate::model::CreateBacktestResultRequest::backtest_result].
4148        ///
4149        /// This is a **required** field for requests.
4150        pub fn set_or_clear_backtest_result<T>(mut self, v: std::option::Option<T>) -> Self
4151        where
4152            T: std::convert::Into<crate::model::BacktestResult>,
4153        {
4154            self.0.request.backtest_result = v.map(|x| x.into());
4155            self
4156        }
4157
4158        /// Sets the value of [request_id][crate::model::CreateBacktestResultRequest::request_id].
4159        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4160            self.0.request.request_id = v.into();
4161            self
4162        }
4163    }
4164
4165    #[doc(hidden)]
4166    impl crate::RequestBuilder for CreateBacktestResult {
4167        fn request_options(&mut self) -> &mut crate::RequestOptions {
4168            &mut self.0.options
4169        }
4170    }
4171
4172    /// The request builder for [Aml::update_backtest_result][crate::client::Aml::update_backtest_result] calls.
4173    ///
4174    /// # Example
4175    /// ```
4176    /// # use google_cloud_financialservices_v1::builder::aml::UpdateBacktestResult;
4177    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
4178    /// use google_cloud_lro::Poller;
4179    ///
4180    /// let builder = prepare_request_builder();
4181    /// let response = builder.poller().until_done().await?;
4182    /// # Ok(()) }
4183    ///
4184    /// fn prepare_request_builder() -> UpdateBacktestResult {
4185    ///   # panic!();
4186    ///   // ... details omitted ...
4187    /// }
4188    /// ```
4189    #[derive(Clone, Debug)]
4190    pub struct UpdateBacktestResult(RequestBuilder<crate::model::UpdateBacktestResultRequest>);
4191
4192    impl UpdateBacktestResult {
4193        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
4194            Self(RequestBuilder::new(stub))
4195        }
4196
4197        /// Sets the full request, replacing any prior values.
4198        pub fn with_request<V: Into<crate::model::UpdateBacktestResultRequest>>(
4199            mut self,
4200            v: V,
4201        ) -> Self {
4202            self.0.request = v.into();
4203            self
4204        }
4205
4206        /// Sets all the options, replacing any prior values.
4207        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4208            self.0.options = v.into();
4209            self
4210        }
4211
4212        /// Sends the request.
4213        ///
4214        /// # Long running operations
4215        ///
4216        /// This starts, but does not poll, a longrunning operation. More information
4217        /// on [update_backtest_result][crate::client::Aml::update_backtest_result].
4218        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4219            (*self.0.stub)
4220                .update_backtest_result(self.0.request, self.0.options)
4221                .await
4222                .map(crate::Response::into_body)
4223        }
4224
4225        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_backtest_result`.
4226        pub fn poller(
4227            self,
4228        ) -> impl google_cloud_lro::Poller<crate::model::BacktestResult, crate::model::OperationMetadata>
4229        {
4230            type Operation = google_cloud_lro::internal::Operation<
4231                crate::model::BacktestResult,
4232                crate::model::OperationMetadata,
4233            >;
4234            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4235            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4236
4237            let stub = self.0.stub.clone();
4238            let mut options = self.0.options.clone();
4239            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4240            let query = move |name| {
4241                let stub = stub.clone();
4242                let options = options.clone();
4243                async {
4244                    let op = GetOperation::new(stub)
4245                        .set_name(name)
4246                        .with_options(options)
4247                        .send()
4248                        .await?;
4249                    Ok(Operation::new(op))
4250                }
4251            };
4252
4253            let start = move || async {
4254                let op = self.send().await?;
4255                Ok(Operation::new(op))
4256            };
4257
4258            google_cloud_lro::internal::new_poller(
4259                polling_error_policy,
4260                polling_backoff_policy,
4261                start,
4262                query,
4263            )
4264        }
4265
4266        /// Sets the value of [update_mask][crate::model::UpdateBacktestResultRequest::update_mask].
4267        pub fn set_update_mask<T>(mut self, v: T) -> Self
4268        where
4269            T: std::convert::Into<wkt::FieldMask>,
4270        {
4271            self.0.request.update_mask = std::option::Option::Some(v.into());
4272            self
4273        }
4274
4275        /// Sets or clears the value of [update_mask][crate::model::UpdateBacktestResultRequest::update_mask].
4276        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4277        where
4278            T: std::convert::Into<wkt::FieldMask>,
4279        {
4280            self.0.request.update_mask = v.map(|x| x.into());
4281            self
4282        }
4283
4284        /// Sets the value of [backtest_result][crate::model::UpdateBacktestResultRequest::backtest_result].
4285        ///
4286        /// This is a **required** field for requests.
4287        pub fn set_backtest_result<T>(mut self, v: T) -> Self
4288        where
4289            T: std::convert::Into<crate::model::BacktestResult>,
4290        {
4291            self.0.request.backtest_result = std::option::Option::Some(v.into());
4292            self
4293        }
4294
4295        /// Sets or clears the value of [backtest_result][crate::model::UpdateBacktestResultRequest::backtest_result].
4296        ///
4297        /// This is a **required** field for requests.
4298        pub fn set_or_clear_backtest_result<T>(mut self, v: std::option::Option<T>) -> Self
4299        where
4300            T: std::convert::Into<crate::model::BacktestResult>,
4301        {
4302            self.0.request.backtest_result = v.map(|x| x.into());
4303            self
4304        }
4305
4306        /// Sets the value of [request_id][crate::model::UpdateBacktestResultRequest::request_id].
4307        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4308            self.0.request.request_id = v.into();
4309            self
4310        }
4311    }
4312
4313    #[doc(hidden)]
4314    impl crate::RequestBuilder for UpdateBacktestResult {
4315        fn request_options(&mut self) -> &mut crate::RequestOptions {
4316            &mut self.0.options
4317        }
4318    }
4319
4320    /// The request builder for [Aml::export_backtest_result_metadata][crate::client::Aml::export_backtest_result_metadata] calls.
4321    ///
4322    /// # Example
4323    /// ```
4324    /// # use google_cloud_financialservices_v1::builder::aml::ExportBacktestResultMetadata;
4325    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
4326    /// use google_cloud_lro::Poller;
4327    ///
4328    /// let builder = prepare_request_builder();
4329    /// let response = builder.poller().until_done().await?;
4330    /// # Ok(()) }
4331    ///
4332    /// fn prepare_request_builder() -> ExportBacktestResultMetadata {
4333    ///   # panic!();
4334    ///   // ... details omitted ...
4335    /// }
4336    /// ```
4337    #[derive(Clone, Debug)]
4338    pub struct ExportBacktestResultMetadata(
4339        RequestBuilder<crate::model::ExportBacktestResultMetadataRequest>,
4340    );
4341
4342    impl ExportBacktestResultMetadata {
4343        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
4344            Self(RequestBuilder::new(stub))
4345        }
4346
4347        /// Sets the full request, replacing any prior values.
4348        pub fn with_request<V: Into<crate::model::ExportBacktestResultMetadataRequest>>(
4349            mut self,
4350            v: V,
4351        ) -> Self {
4352            self.0.request = v.into();
4353            self
4354        }
4355
4356        /// Sets all the options, replacing any prior values.
4357        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4358            self.0.options = v.into();
4359            self
4360        }
4361
4362        /// Sends the request.
4363        ///
4364        /// # Long running operations
4365        ///
4366        /// This starts, but does not poll, a longrunning operation. More information
4367        /// on [export_backtest_result_metadata][crate::client::Aml::export_backtest_result_metadata].
4368        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4369            (*self.0.stub)
4370                .export_backtest_result_metadata(self.0.request, self.0.options)
4371                .await
4372                .map(crate::Response::into_body)
4373        }
4374
4375        /// Creates a [Poller][google_cloud_lro::Poller] to work with `export_backtest_result_metadata`.
4376        pub fn poller(
4377            self,
4378        ) -> impl google_cloud_lro::Poller<
4379            crate::model::ExportBacktestResultMetadataResponse,
4380            crate::model::OperationMetadata,
4381        > {
4382            type Operation = google_cloud_lro::internal::Operation<
4383                crate::model::ExportBacktestResultMetadataResponse,
4384                crate::model::OperationMetadata,
4385            >;
4386            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4387            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4388
4389            let stub = self.0.stub.clone();
4390            let mut options = self.0.options.clone();
4391            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4392            let query = move |name| {
4393                let stub = stub.clone();
4394                let options = options.clone();
4395                async {
4396                    let op = GetOperation::new(stub)
4397                        .set_name(name)
4398                        .with_options(options)
4399                        .send()
4400                        .await?;
4401                    Ok(Operation::new(op))
4402                }
4403            };
4404
4405            let start = move || async {
4406                let op = self.send().await?;
4407                Ok(Operation::new(op))
4408            };
4409
4410            google_cloud_lro::internal::new_poller(
4411                polling_error_policy,
4412                polling_backoff_policy,
4413                start,
4414                query,
4415            )
4416        }
4417
4418        /// Sets the value of [backtest_result][crate::model::ExportBacktestResultMetadataRequest::backtest_result].
4419        ///
4420        /// This is a **required** field for requests.
4421        pub fn set_backtest_result<T: Into<std::string::String>>(mut self, v: T) -> Self {
4422            self.0.request.backtest_result = v.into();
4423            self
4424        }
4425
4426        /// Sets the value of [structured_metadata_destination][crate::model::ExportBacktestResultMetadataRequest::structured_metadata_destination].
4427        ///
4428        /// This is a **required** field for requests.
4429        pub fn set_structured_metadata_destination<T>(mut self, v: T) -> Self
4430        where
4431            T: std::convert::Into<crate::model::BigQueryDestination>,
4432        {
4433            self.0.request.structured_metadata_destination = std::option::Option::Some(v.into());
4434            self
4435        }
4436
4437        /// Sets or clears the value of [structured_metadata_destination][crate::model::ExportBacktestResultMetadataRequest::structured_metadata_destination].
4438        ///
4439        /// This is a **required** field for requests.
4440        pub fn set_or_clear_structured_metadata_destination<T>(
4441            mut self,
4442            v: std::option::Option<T>,
4443        ) -> Self
4444        where
4445            T: std::convert::Into<crate::model::BigQueryDestination>,
4446        {
4447            self.0.request.structured_metadata_destination = v.map(|x| x.into());
4448            self
4449        }
4450    }
4451
4452    #[doc(hidden)]
4453    impl crate::RequestBuilder for ExportBacktestResultMetadata {
4454        fn request_options(&mut self) -> &mut crate::RequestOptions {
4455            &mut self.0.options
4456        }
4457    }
4458
4459    /// The request builder for [Aml::delete_backtest_result][crate::client::Aml::delete_backtest_result] calls.
4460    ///
4461    /// # Example
4462    /// ```
4463    /// # use google_cloud_financialservices_v1::builder::aml::DeleteBacktestResult;
4464    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
4465    /// use google_cloud_lro::Poller;
4466    ///
4467    /// let builder = prepare_request_builder();
4468    /// let response = builder.poller().until_done().await?;
4469    /// # Ok(()) }
4470    ///
4471    /// fn prepare_request_builder() -> DeleteBacktestResult {
4472    ///   # panic!();
4473    ///   // ... details omitted ...
4474    /// }
4475    /// ```
4476    #[derive(Clone, Debug)]
4477    pub struct DeleteBacktestResult(RequestBuilder<crate::model::DeleteBacktestResultRequest>);
4478
4479    impl DeleteBacktestResult {
4480        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
4481            Self(RequestBuilder::new(stub))
4482        }
4483
4484        /// Sets the full request, replacing any prior values.
4485        pub fn with_request<V: Into<crate::model::DeleteBacktestResultRequest>>(
4486            mut self,
4487            v: V,
4488        ) -> Self {
4489            self.0.request = v.into();
4490            self
4491        }
4492
4493        /// Sets all the options, replacing any prior values.
4494        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4495            self.0.options = v.into();
4496            self
4497        }
4498
4499        /// Sends the request.
4500        ///
4501        /// # Long running operations
4502        ///
4503        /// This starts, but does not poll, a longrunning operation. More information
4504        /// on [delete_backtest_result][crate::client::Aml::delete_backtest_result].
4505        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4506            (*self.0.stub)
4507                .delete_backtest_result(self.0.request, self.0.options)
4508                .await
4509                .map(crate::Response::into_body)
4510        }
4511
4512        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_backtest_result`.
4513        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
4514            type Operation =
4515                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
4516            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4517            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4518
4519            let stub = self.0.stub.clone();
4520            let mut options = self.0.options.clone();
4521            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4522            let query = move |name| {
4523                let stub = stub.clone();
4524                let options = options.clone();
4525                async {
4526                    let op = GetOperation::new(stub)
4527                        .set_name(name)
4528                        .with_options(options)
4529                        .send()
4530                        .await?;
4531                    Ok(Operation::new(op))
4532                }
4533            };
4534
4535            let start = move || async {
4536                let op = self.send().await?;
4537                Ok(Operation::new(op))
4538            };
4539
4540            google_cloud_lro::internal::new_unit_response_poller(
4541                polling_error_policy,
4542                polling_backoff_policy,
4543                start,
4544                query,
4545            )
4546        }
4547
4548        /// Sets the value of [name][crate::model::DeleteBacktestResultRequest::name].
4549        ///
4550        /// This is a **required** field for requests.
4551        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4552            self.0.request.name = v.into();
4553            self
4554        }
4555
4556        /// Sets the value of [request_id][crate::model::DeleteBacktestResultRequest::request_id].
4557        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4558            self.0.request.request_id = v.into();
4559            self
4560        }
4561    }
4562
4563    #[doc(hidden)]
4564    impl crate::RequestBuilder for DeleteBacktestResult {
4565        fn request_options(&mut self) -> &mut crate::RequestOptions {
4566            &mut self.0.options
4567        }
4568    }
4569
4570    /// The request builder for [Aml::list_locations][crate::client::Aml::list_locations] calls.
4571    ///
4572    /// # Example
4573    /// ```
4574    /// # use google_cloud_financialservices_v1::builder::aml::ListLocations;
4575    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
4576    /// use google_cloud_gax::paginator::ItemPaginator;
4577    ///
4578    /// let builder = prepare_request_builder();
4579    /// let mut items = builder.by_item();
4580    /// while let Some(result) = items.next().await {
4581    ///   let item = result?;
4582    /// }
4583    /// # Ok(()) }
4584    ///
4585    /// fn prepare_request_builder() -> ListLocations {
4586    ///   # panic!();
4587    ///   // ... details omitted ...
4588    /// }
4589    /// ```
4590    #[derive(Clone, Debug)]
4591    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
4592
4593    impl ListLocations {
4594        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
4595            Self(RequestBuilder::new(stub))
4596        }
4597
4598        /// Sets the full request, replacing any prior values.
4599        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
4600            mut self,
4601            v: V,
4602        ) -> Self {
4603            self.0.request = v.into();
4604            self
4605        }
4606
4607        /// Sets all the options, replacing any prior values.
4608        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4609            self.0.options = v.into();
4610            self
4611        }
4612
4613        /// Sends the request.
4614        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
4615            (*self.0.stub)
4616                .list_locations(self.0.request, self.0.options)
4617                .await
4618                .map(crate::Response::into_body)
4619        }
4620
4621        /// Streams each page in the collection.
4622        pub fn by_page(
4623            self,
4624        ) -> impl google_cloud_gax::paginator::Paginator<
4625            google_cloud_location::model::ListLocationsResponse,
4626            crate::Error,
4627        > {
4628            use std::clone::Clone;
4629            let token = self.0.request.page_token.clone();
4630            let execute = move |token: String| {
4631                let mut builder = self.clone();
4632                builder.0.request = builder.0.request.set_page_token(token);
4633                builder.send()
4634            };
4635            google_cloud_gax::paginator::internal::new_paginator(token, execute)
4636        }
4637
4638        /// Streams each item in the collection.
4639        pub fn by_item(
4640            self,
4641        ) -> impl google_cloud_gax::paginator::ItemPaginator<
4642            google_cloud_location::model::ListLocationsResponse,
4643            crate::Error,
4644        > {
4645            use google_cloud_gax::paginator::Paginator;
4646            self.by_page().items()
4647        }
4648
4649        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
4650        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4651            self.0.request.name = v.into();
4652            self
4653        }
4654
4655        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
4656        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4657            self.0.request.filter = v.into();
4658            self
4659        }
4660
4661        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
4662        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4663            self.0.request.page_size = v.into();
4664            self
4665        }
4666
4667        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
4668        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4669            self.0.request.page_token = v.into();
4670            self
4671        }
4672    }
4673
4674    #[doc(hidden)]
4675    impl crate::RequestBuilder for ListLocations {
4676        fn request_options(&mut self) -> &mut crate::RequestOptions {
4677            &mut self.0.options
4678        }
4679    }
4680
4681    /// The request builder for [Aml::get_location][crate::client::Aml::get_location] calls.
4682    ///
4683    /// # Example
4684    /// ```
4685    /// # use google_cloud_financialservices_v1::builder::aml::GetLocation;
4686    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
4687    ///
4688    /// let builder = prepare_request_builder();
4689    /// let response = builder.send().await?;
4690    /// # Ok(()) }
4691    ///
4692    /// fn prepare_request_builder() -> GetLocation {
4693    ///   # panic!();
4694    ///   // ... details omitted ...
4695    /// }
4696    /// ```
4697    #[derive(Clone, Debug)]
4698    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
4699
4700    impl GetLocation {
4701        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
4702            Self(RequestBuilder::new(stub))
4703        }
4704
4705        /// Sets the full request, replacing any prior values.
4706        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
4707            mut self,
4708            v: V,
4709        ) -> Self {
4710            self.0.request = v.into();
4711            self
4712        }
4713
4714        /// Sets all the options, replacing any prior values.
4715        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4716            self.0.options = v.into();
4717            self
4718        }
4719
4720        /// Sends the request.
4721        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
4722            (*self.0.stub)
4723                .get_location(self.0.request, self.0.options)
4724                .await
4725                .map(crate::Response::into_body)
4726        }
4727
4728        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
4729        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4730            self.0.request.name = v.into();
4731            self
4732        }
4733    }
4734
4735    #[doc(hidden)]
4736    impl crate::RequestBuilder for GetLocation {
4737        fn request_options(&mut self) -> &mut crate::RequestOptions {
4738            &mut self.0.options
4739        }
4740    }
4741
4742    /// The request builder for [Aml::list_operations][crate::client::Aml::list_operations] calls.
4743    ///
4744    /// # Example
4745    /// ```
4746    /// # use google_cloud_financialservices_v1::builder::aml::ListOperations;
4747    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
4748    /// use google_cloud_gax::paginator::ItemPaginator;
4749    ///
4750    /// let builder = prepare_request_builder();
4751    /// let mut items = builder.by_item();
4752    /// while let Some(result) = items.next().await {
4753    ///   let item = result?;
4754    /// }
4755    /// # Ok(()) }
4756    ///
4757    /// fn prepare_request_builder() -> ListOperations {
4758    ///   # panic!();
4759    ///   // ... details omitted ...
4760    /// }
4761    /// ```
4762    #[derive(Clone, Debug)]
4763    pub struct ListOperations(
4764        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
4765    );
4766
4767    impl ListOperations {
4768        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
4769            Self(RequestBuilder::new(stub))
4770        }
4771
4772        /// Sets the full request, replacing any prior values.
4773        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
4774            mut self,
4775            v: V,
4776        ) -> Self {
4777            self.0.request = v.into();
4778            self
4779        }
4780
4781        /// Sets all the options, replacing any prior values.
4782        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4783            self.0.options = v.into();
4784            self
4785        }
4786
4787        /// Sends the request.
4788        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
4789            (*self.0.stub)
4790                .list_operations(self.0.request, self.0.options)
4791                .await
4792                .map(crate::Response::into_body)
4793        }
4794
4795        /// Streams each page in the collection.
4796        pub fn by_page(
4797            self,
4798        ) -> impl google_cloud_gax::paginator::Paginator<
4799            google_cloud_longrunning::model::ListOperationsResponse,
4800            crate::Error,
4801        > {
4802            use std::clone::Clone;
4803            let token = self.0.request.page_token.clone();
4804            let execute = move |token: String| {
4805                let mut builder = self.clone();
4806                builder.0.request = builder.0.request.set_page_token(token);
4807                builder.send()
4808            };
4809            google_cloud_gax::paginator::internal::new_paginator(token, execute)
4810        }
4811
4812        /// Streams each item in the collection.
4813        pub fn by_item(
4814            self,
4815        ) -> impl google_cloud_gax::paginator::ItemPaginator<
4816            google_cloud_longrunning::model::ListOperationsResponse,
4817            crate::Error,
4818        > {
4819            use google_cloud_gax::paginator::Paginator;
4820            self.by_page().items()
4821        }
4822
4823        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
4824        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4825            self.0.request.name = v.into();
4826            self
4827        }
4828
4829        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
4830        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4831            self.0.request.filter = v.into();
4832            self
4833        }
4834
4835        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
4836        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4837            self.0.request.page_size = v.into();
4838            self
4839        }
4840
4841        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
4842        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4843            self.0.request.page_token = v.into();
4844            self
4845        }
4846
4847        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
4848        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
4849            self.0.request.return_partial_success = v.into();
4850            self
4851        }
4852    }
4853
4854    #[doc(hidden)]
4855    impl crate::RequestBuilder for ListOperations {
4856        fn request_options(&mut self) -> &mut crate::RequestOptions {
4857            &mut self.0.options
4858        }
4859    }
4860
4861    /// The request builder for [Aml::get_operation][crate::client::Aml::get_operation] calls.
4862    ///
4863    /// # Example
4864    /// ```
4865    /// # use google_cloud_financialservices_v1::builder::aml::GetOperation;
4866    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
4867    ///
4868    /// let builder = prepare_request_builder();
4869    /// let response = builder.send().await?;
4870    /// # Ok(()) }
4871    ///
4872    /// fn prepare_request_builder() -> GetOperation {
4873    ///   # panic!();
4874    ///   // ... details omitted ...
4875    /// }
4876    /// ```
4877    #[derive(Clone, Debug)]
4878    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
4879
4880    impl GetOperation {
4881        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
4882            Self(RequestBuilder::new(stub))
4883        }
4884
4885        /// Sets the full request, replacing any prior values.
4886        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
4887            mut self,
4888            v: V,
4889        ) -> Self {
4890            self.0.request = v.into();
4891            self
4892        }
4893
4894        /// Sets all the options, replacing any prior values.
4895        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4896            self.0.options = v.into();
4897            self
4898        }
4899
4900        /// Sends the request.
4901        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4902            (*self.0.stub)
4903                .get_operation(self.0.request, self.0.options)
4904                .await
4905                .map(crate::Response::into_body)
4906        }
4907
4908        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
4909        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4910            self.0.request.name = v.into();
4911            self
4912        }
4913    }
4914
4915    #[doc(hidden)]
4916    impl crate::RequestBuilder for GetOperation {
4917        fn request_options(&mut self) -> &mut crate::RequestOptions {
4918            &mut self.0.options
4919        }
4920    }
4921
4922    /// The request builder for [Aml::delete_operation][crate::client::Aml::delete_operation] calls.
4923    ///
4924    /// # Example
4925    /// ```
4926    /// # use google_cloud_financialservices_v1::builder::aml::DeleteOperation;
4927    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
4928    ///
4929    /// let builder = prepare_request_builder();
4930    /// let response = builder.send().await?;
4931    /// # Ok(()) }
4932    ///
4933    /// fn prepare_request_builder() -> DeleteOperation {
4934    ///   # panic!();
4935    ///   // ... details omitted ...
4936    /// }
4937    /// ```
4938    #[derive(Clone, Debug)]
4939    pub struct DeleteOperation(
4940        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
4941    );
4942
4943    impl DeleteOperation {
4944        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
4945            Self(RequestBuilder::new(stub))
4946        }
4947
4948        /// Sets the full request, replacing any prior values.
4949        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
4950            mut self,
4951            v: V,
4952        ) -> Self {
4953            self.0.request = v.into();
4954            self
4955        }
4956
4957        /// Sets all the options, replacing any prior values.
4958        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4959            self.0.options = v.into();
4960            self
4961        }
4962
4963        /// Sends the request.
4964        pub async fn send(self) -> Result<()> {
4965            (*self.0.stub)
4966                .delete_operation(self.0.request, self.0.options)
4967                .await
4968                .map(crate::Response::into_body)
4969        }
4970
4971        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
4972        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4973            self.0.request.name = v.into();
4974            self
4975        }
4976    }
4977
4978    #[doc(hidden)]
4979    impl crate::RequestBuilder for DeleteOperation {
4980        fn request_options(&mut self) -> &mut crate::RequestOptions {
4981            &mut self.0.options
4982        }
4983    }
4984
4985    /// The request builder for [Aml::cancel_operation][crate::client::Aml::cancel_operation] calls.
4986    ///
4987    /// # Example
4988    /// ```
4989    /// # use google_cloud_financialservices_v1::builder::aml::CancelOperation;
4990    /// # async fn sample() -> google_cloud_financialservices_v1::Result<()> {
4991    ///
4992    /// let builder = prepare_request_builder();
4993    /// let response = builder.send().await?;
4994    /// # Ok(()) }
4995    ///
4996    /// fn prepare_request_builder() -> CancelOperation {
4997    ///   # panic!();
4998    ///   // ... details omitted ...
4999    /// }
5000    /// ```
5001    #[derive(Clone, Debug)]
5002    pub struct CancelOperation(
5003        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
5004    );
5005
5006    impl CancelOperation {
5007        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Aml>) -> Self {
5008            Self(RequestBuilder::new(stub))
5009        }
5010
5011        /// Sets the full request, replacing any prior values.
5012        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
5013            mut self,
5014            v: V,
5015        ) -> Self {
5016            self.0.request = v.into();
5017            self
5018        }
5019
5020        /// Sets all the options, replacing any prior values.
5021        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5022            self.0.options = v.into();
5023            self
5024        }
5025
5026        /// Sends the request.
5027        pub async fn send(self) -> Result<()> {
5028            (*self.0.stub)
5029                .cancel_operation(self.0.request, self.0.options)
5030                .await
5031                .map(crate::Response::into_body)
5032        }
5033
5034        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
5035        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5036            self.0.request.name = v.into();
5037            self
5038        }
5039    }
5040
5041    #[doc(hidden)]
5042    impl crate::RequestBuilder for CancelOperation {
5043        fn request_options(&mut self) -> &mut crate::RequestOptions {
5044            &mut self.0.options
5045        }
5046    }
5047}