google_cloud_bigquery_migration_v2/
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
17pub mod migration_service {
18    use crate::Result;
19
20    /// A builder for [MigrationService][crate::client::MigrationService].
21    ///
22    /// ```
23    /// # tokio_test::block_on(async {
24    /// # use google_cloud_bigquery_migration_v2::*;
25    /// # use builder::migration_service::ClientBuilder;
26    /// # use client::MigrationService;
27    /// let builder : ClientBuilder = MigrationService::builder();
28    /// let client = builder
29    ///     .with_endpoint("https://bigquerymigration.googleapis.com")
30    ///     .build().await?;
31    /// # gax::client_builder::Result::<()>::Ok(()) });
32    /// ```
33    pub type ClientBuilder =
34        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
35
36    pub(crate) mod client {
37        use super::super::super::client::MigrationService;
38        pub struct Factory;
39        impl gax::client_builder::internal::ClientFactory for Factory {
40            type Client = MigrationService;
41            type Credentials = gaxi::options::Credentials;
42            async fn build(
43                self,
44                config: gaxi::options::ClientConfig,
45            ) -> gax::client_builder::Result<Self::Client> {
46                Self::Client::new(config).await
47            }
48        }
49    }
50
51    /// Common implementation for [crate::client::MigrationService] 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::MigrationService>,
55        request: R,
56        options: gax::options::RequestOptions,
57    }
58
59    impl<R> RequestBuilder<R>
60    where
61        R: std::default::Default,
62    {
63        pub(crate) fn new(
64            stub: std::sync::Arc<dyn super::super::stub::dynamic::MigrationService>,
65        ) -> Self {
66            Self {
67                stub,
68                request: R::default(),
69                options: gax::options::RequestOptions::default(),
70            }
71        }
72    }
73
74    /// The request builder for [MigrationService::create_migration_workflow][crate::client::MigrationService::create_migration_workflow] calls.
75    ///
76    /// # Example
77    /// ```no_run
78    /// # use google_cloud_bigquery_migration_v2::builder;
79    /// use builder::migration_service::CreateMigrationWorkflow;
80    /// # tokio_test::block_on(async {
81    ///
82    /// let builder = prepare_request_builder();
83    /// let response = builder.send().await?;
84    /// # gax::Result::<()>::Ok(()) });
85    ///
86    /// fn prepare_request_builder() -> CreateMigrationWorkflow {
87    ///   # panic!();
88    ///   // ... details omitted ...
89    /// }
90    /// ```
91    #[derive(Clone, Debug)]
92    pub struct CreateMigrationWorkflow(
93        RequestBuilder<crate::model::CreateMigrationWorkflowRequest>,
94    );
95
96    impl CreateMigrationWorkflow {
97        pub(crate) fn new(
98            stub: std::sync::Arc<dyn super::super::stub::dynamic::MigrationService>,
99        ) -> Self {
100            Self(RequestBuilder::new(stub))
101        }
102
103        /// Sets the full request, replacing any prior values.
104        pub fn with_request<V: Into<crate::model::CreateMigrationWorkflowRequest>>(
105            mut self,
106            v: V,
107        ) -> Self {
108            self.0.request = v.into();
109            self
110        }
111
112        /// Sets all the options, replacing any prior values.
113        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
114            self.0.options = v.into();
115            self
116        }
117
118        /// Sends the request.
119        pub async fn send(self) -> Result<crate::model::MigrationWorkflow> {
120            (*self.0.stub)
121                .create_migration_workflow(self.0.request, self.0.options)
122                .await
123                .map(gax::response::Response::into_body)
124        }
125
126        /// Sets the value of [parent][crate::model::CreateMigrationWorkflowRequest::parent].
127        ///
128        /// This is a **required** field for requests.
129        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
130            self.0.request.parent = v.into();
131            self
132        }
133
134        /// Sets the value of [migration_workflow][crate::model::CreateMigrationWorkflowRequest::migration_workflow].
135        ///
136        /// This is a **required** field for requests.
137        pub fn set_migration_workflow<T>(mut self, v: T) -> Self
138        where
139            T: std::convert::Into<crate::model::MigrationWorkflow>,
140        {
141            self.0.request.migration_workflow = std::option::Option::Some(v.into());
142            self
143        }
144
145        /// Sets or clears the value of [migration_workflow][crate::model::CreateMigrationWorkflowRequest::migration_workflow].
146        ///
147        /// This is a **required** field for requests.
148        pub fn set_or_clear_migration_workflow<T>(mut self, v: std::option::Option<T>) -> Self
149        where
150            T: std::convert::Into<crate::model::MigrationWorkflow>,
151        {
152            self.0.request.migration_workflow = v.map(|x| x.into());
153            self
154        }
155    }
156
157    #[doc(hidden)]
158    impl gax::options::internal::RequestBuilder for CreateMigrationWorkflow {
159        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
160            &mut self.0.options
161        }
162    }
163
164    /// The request builder for [MigrationService::get_migration_workflow][crate::client::MigrationService::get_migration_workflow] calls.
165    ///
166    /// # Example
167    /// ```no_run
168    /// # use google_cloud_bigquery_migration_v2::builder;
169    /// use builder::migration_service::GetMigrationWorkflow;
170    /// # tokio_test::block_on(async {
171    ///
172    /// let builder = prepare_request_builder();
173    /// let response = builder.send().await?;
174    /// # gax::Result::<()>::Ok(()) });
175    ///
176    /// fn prepare_request_builder() -> GetMigrationWorkflow {
177    ///   # panic!();
178    ///   // ... details omitted ...
179    /// }
180    /// ```
181    #[derive(Clone, Debug)]
182    pub struct GetMigrationWorkflow(RequestBuilder<crate::model::GetMigrationWorkflowRequest>);
183
184    impl GetMigrationWorkflow {
185        pub(crate) fn new(
186            stub: std::sync::Arc<dyn super::super::stub::dynamic::MigrationService>,
187        ) -> Self {
188            Self(RequestBuilder::new(stub))
189        }
190
191        /// Sets the full request, replacing any prior values.
192        pub fn with_request<V: Into<crate::model::GetMigrationWorkflowRequest>>(
193            mut self,
194            v: V,
195        ) -> Self {
196            self.0.request = v.into();
197            self
198        }
199
200        /// Sets all the options, replacing any prior values.
201        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
202            self.0.options = v.into();
203            self
204        }
205
206        /// Sends the request.
207        pub async fn send(self) -> Result<crate::model::MigrationWorkflow> {
208            (*self.0.stub)
209                .get_migration_workflow(self.0.request, self.0.options)
210                .await
211                .map(gax::response::Response::into_body)
212        }
213
214        /// Sets the value of [name][crate::model::GetMigrationWorkflowRequest::name].
215        ///
216        /// This is a **required** field for requests.
217        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
218            self.0.request.name = v.into();
219            self
220        }
221
222        /// Sets the value of [read_mask][crate::model::GetMigrationWorkflowRequest::read_mask].
223        pub fn set_read_mask<T>(mut self, v: T) -> Self
224        where
225            T: std::convert::Into<wkt::FieldMask>,
226        {
227            self.0.request.read_mask = std::option::Option::Some(v.into());
228            self
229        }
230
231        /// Sets or clears the value of [read_mask][crate::model::GetMigrationWorkflowRequest::read_mask].
232        pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
233        where
234            T: std::convert::Into<wkt::FieldMask>,
235        {
236            self.0.request.read_mask = v.map(|x| x.into());
237            self
238        }
239    }
240
241    #[doc(hidden)]
242    impl gax::options::internal::RequestBuilder for GetMigrationWorkflow {
243        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
244            &mut self.0.options
245        }
246    }
247
248    /// The request builder for [MigrationService::list_migration_workflows][crate::client::MigrationService::list_migration_workflows] calls.
249    ///
250    /// # Example
251    /// ```no_run
252    /// # use google_cloud_bigquery_migration_v2::builder;
253    /// use builder::migration_service::ListMigrationWorkflows;
254    /// # tokio_test::block_on(async {
255    /// use gax::paginator::ItemPaginator;
256    ///
257    /// let builder = prepare_request_builder();
258    /// let mut items = builder.by_item();
259    /// while let Some(result) = items.next().await {
260    ///   let item = result?;
261    /// }
262    /// # gax::Result::<()>::Ok(()) });
263    ///
264    /// fn prepare_request_builder() -> ListMigrationWorkflows {
265    ///   # panic!();
266    ///   // ... details omitted ...
267    /// }
268    /// ```
269    #[derive(Clone, Debug)]
270    pub struct ListMigrationWorkflows(RequestBuilder<crate::model::ListMigrationWorkflowsRequest>);
271
272    impl ListMigrationWorkflows {
273        pub(crate) fn new(
274            stub: std::sync::Arc<dyn super::super::stub::dynamic::MigrationService>,
275        ) -> Self {
276            Self(RequestBuilder::new(stub))
277        }
278
279        /// Sets the full request, replacing any prior values.
280        pub fn with_request<V: Into<crate::model::ListMigrationWorkflowsRequest>>(
281            mut self,
282            v: V,
283        ) -> Self {
284            self.0.request = v.into();
285            self
286        }
287
288        /// Sets all the options, replacing any prior values.
289        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
290            self.0.options = v.into();
291            self
292        }
293
294        /// Sends the request.
295        pub async fn send(self) -> Result<crate::model::ListMigrationWorkflowsResponse> {
296            (*self.0.stub)
297                .list_migration_workflows(self.0.request, self.0.options)
298                .await
299                .map(gax::response::Response::into_body)
300        }
301
302        /// Streams each page in the collection.
303        pub fn by_page(
304            self,
305        ) -> impl gax::paginator::Paginator<
306            crate::model::ListMigrationWorkflowsResponse,
307            gax::error::Error,
308        > {
309            use std::clone::Clone;
310            let token = self.0.request.page_token.clone();
311            let execute = move |token: String| {
312                let mut builder = self.clone();
313                builder.0.request = builder.0.request.set_page_token(token);
314                builder.send()
315            };
316            gax::paginator::internal::new_paginator(token, execute)
317        }
318
319        /// Streams each item in the collection.
320        pub fn by_item(
321            self,
322        ) -> impl gax::paginator::ItemPaginator<
323            crate::model::ListMigrationWorkflowsResponse,
324            gax::error::Error,
325        > {
326            use gax::paginator::Paginator;
327            self.by_page().items()
328        }
329
330        /// Sets the value of [parent][crate::model::ListMigrationWorkflowsRequest::parent].
331        ///
332        /// This is a **required** field for requests.
333        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
334            self.0.request.parent = v.into();
335            self
336        }
337
338        /// Sets the value of [read_mask][crate::model::ListMigrationWorkflowsRequest::read_mask].
339        pub fn set_read_mask<T>(mut self, v: T) -> Self
340        where
341            T: std::convert::Into<wkt::FieldMask>,
342        {
343            self.0.request.read_mask = std::option::Option::Some(v.into());
344            self
345        }
346
347        /// Sets or clears the value of [read_mask][crate::model::ListMigrationWorkflowsRequest::read_mask].
348        pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
349        where
350            T: std::convert::Into<wkt::FieldMask>,
351        {
352            self.0.request.read_mask = v.map(|x| x.into());
353            self
354        }
355
356        /// Sets the value of [page_size][crate::model::ListMigrationWorkflowsRequest::page_size].
357        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
358            self.0.request.page_size = v.into();
359            self
360        }
361
362        /// Sets the value of [page_token][crate::model::ListMigrationWorkflowsRequest::page_token].
363        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
364            self.0.request.page_token = v.into();
365            self
366        }
367    }
368
369    #[doc(hidden)]
370    impl gax::options::internal::RequestBuilder for ListMigrationWorkflows {
371        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
372            &mut self.0.options
373        }
374    }
375
376    /// The request builder for [MigrationService::delete_migration_workflow][crate::client::MigrationService::delete_migration_workflow] calls.
377    ///
378    /// # Example
379    /// ```no_run
380    /// # use google_cloud_bigquery_migration_v2::builder;
381    /// use builder::migration_service::DeleteMigrationWorkflow;
382    /// # tokio_test::block_on(async {
383    ///
384    /// let builder = prepare_request_builder();
385    /// let response = builder.send().await?;
386    /// # gax::Result::<()>::Ok(()) });
387    ///
388    /// fn prepare_request_builder() -> DeleteMigrationWorkflow {
389    ///   # panic!();
390    ///   // ... details omitted ...
391    /// }
392    /// ```
393    #[derive(Clone, Debug)]
394    pub struct DeleteMigrationWorkflow(
395        RequestBuilder<crate::model::DeleteMigrationWorkflowRequest>,
396    );
397
398    impl DeleteMigrationWorkflow {
399        pub(crate) fn new(
400            stub: std::sync::Arc<dyn super::super::stub::dynamic::MigrationService>,
401        ) -> Self {
402            Self(RequestBuilder::new(stub))
403        }
404
405        /// Sets the full request, replacing any prior values.
406        pub fn with_request<V: Into<crate::model::DeleteMigrationWorkflowRequest>>(
407            mut self,
408            v: V,
409        ) -> Self {
410            self.0.request = v.into();
411            self
412        }
413
414        /// Sets all the options, replacing any prior values.
415        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
416            self.0.options = v.into();
417            self
418        }
419
420        /// Sends the request.
421        pub async fn send(self) -> Result<()> {
422            (*self.0.stub)
423                .delete_migration_workflow(self.0.request, self.0.options)
424                .await
425                .map(gax::response::Response::into_body)
426        }
427
428        /// Sets the value of [name][crate::model::DeleteMigrationWorkflowRequest::name].
429        ///
430        /// This is a **required** field for requests.
431        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
432            self.0.request.name = v.into();
433            self
434        }
435    }
436
437    #[doc(hidden)]
438    impl gax::options::internal::RequestBuilder for DeleteMigrationWorkflow {
439        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
440            &mut self.0.options
441        }
442    }
443
444    /// The request builder for [MigrationService::start_migration_workflow][crate::client::MigrationService::start_migration_workflow] calls.
445    ///
446    /// # Example
447    /// ```no_run
448    /// # use google_cloud_bigquery_migration_v2::builder;
449    /// use builder::migration_service::StartMigrationWorkflow;
450    /// # tokio_test::block_on(async {
451    ///
452    /// let builder = prepare_request_builder();
453    /// let response = builder.send().await?;
454    /// # gax::Result::<()>::Ok(()) });
455    ///
456    /// fn prepare_request_builder() -> StartMigrationWorkflow {
457    ///   # panic!();
458    ///   // ... details omitted ...
459    /// }
460    /// ```
461    #[derive(Clone, Debug)]
462    pub struct StartMigrationWorkflow(RequestBuilder<crate::model::StartMigrationWorkflowRequest>);
463
464    impl StartMigrationWorkflow {
465        pub(crate) fn new(
466            stub: std::sync::Arc<dyn super::super::stub::dynamic::MigrationService>,
467        ) -> Self {
468            Self(RequestBuilder::new(stub))
469        }
470
471        /// Sets the full request, replacing any prior values.
472        pub fn with_request<V: Into<crate::model::StartMigrationWorkflowRequest>>(
473            mut self,
474            v: V,
475        ) -> Self {
476            self.0.request = v.into();
477            self
478        }
479
480        /// Sets all the options, replacing any prior values.
481        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
482            self.0.options = v.into();
483            self
484        }
485
486        /// Sends the request.
487        pub async fn send(self) -> Result<()> {
488            (*self.0.stub)
489                .start_migration_workflow(self.0.request, self.0.options)
490                .await
491                .map(gax::response::Response::into_body)
492        }
493
494        /// Sets the value of [name][crate::model::StartMigrationWorkflowRequest::name].
495        ///
496        /// This is a **required** field for requests.
497        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
498            self.0.request.name = v.into();
499            self
500        }
501    }
502
503    #[doc(hidden)]
504    impl gax::options::internal::RequestBuilder for StartMigrationWorkflow {
505        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
506            &mut self.0.options
507        }
508    }
509
510    /// The request builder for [MigrationService::get_migration_subtask][crate::client::MigrationService::get_migration_subtask] calls.
511    ///
512    /// # Example
513    /// ```no_run
514    /// # use google_cloud_bigquery_migration_v2::builder;
515    /// use builder::migration_service::GetMigrationSubtask;
516    /// # tokio_test::block_on(async {
517    ///
518    /// let builder = prepare_request_builder();
519    /// let response = builder.send().await?;
520    /// # gax::Result::<()>::Ok(()) });
521    ///
522    /// fn prepare_request_builder() -> GetMigrationSubtask {
523    ///   # panic!();
524    ///   // ... details omitted ...
525    /// }
526    /// ```
527    #[derive(Clone, Debug)]
528    pub struct GetMigrationSubtask(RequestBuilder<crate::model::GetMigrationSubtaskRequest>);
529
530    impl GetMigrationSubtask {
531        pub(crate) fn new(
532            stub: std::sync::Arc<dyn super::super::stub::dynamic::MigrationService>,
533        ) -> Self {
534            Self(RequestBuilder::new(stub))
535        }
536
537        /// Sets the full request, replacing any prior values.
538        pub fn with_request<V: Into<crate::model::GetMigrationSubtaskRequest>>(
539            mut self,
540            v: V,
541        ) -> Self {
542            self.0.request = v.into();
543            self
544        }
545
546        /// Sets all the options, replacing any prior values.
547        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
548            self.0.options = v.into();
549            self
550        }
551
552        /// Sends the request.
553        pub async fn send(self) -> Result<crate::model::MigrationSubtask> {
554            (*self.0.stub)
555                .get_migration_subtask(self.0.request, self.0.options)
556                .await
557                .map(gax::response::Response::into_body)
558        }
559
560        /// Sets the value of [name][crate::model::GetMigrationSubtaskRequest::name].
561        ///
562        /// This is a **required** field for requests.
563        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
564            self.0.request.name = v.into();
565            self
566        }
567
568        /// Sets the value of [read_mask][crate::model::GetMigrationSubtaskRequest::read_mask].
569        pub fn set_read_mask<T>(mut self, v: T) -> Self
570        where
571            T: std::convert::Into<wkt::FieldMask>,
572        {
573            self.0.request.read_mask = std::option::Option::Some(v.into());
574            self
575        }
576
577        /// Sets or clears the value of [read_mask][crate::model::GetMigrationSubtaskRequest::read_mask].
578        pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
579        where
580            T: std::convert::Into<wkt::FieldMask>,
581        {
582            self.0.request.read_mask = v.map(|x| x.into());
583            self
584        }
585    }
586
587    #[doc(hidden)]
588    impl gax::options::internal::RequestBuilder for GetMigrationSubtask {
589        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
590            &mut self.0.options
591        }
592    }
593
594    /// The request builder for [MigrationService::list_migration_subtasks][crate::client::MigrationService::list_migration_subtasks] calls.
595    ///
596    /// # Example
597    /// ```no_run
598    /// # use google_cloud_bigquery_migration_v2::builder;
599    /// use builder::migration_service::ListMigrationSubtasks;
600    /// # tokio_test::block_on(async {
601    /// use gax::paginator::ItemPaginator;
602    ///
603    /// let builder = prepare_request_builder();
604    /// let mut items = builder.by_item();
605    /// while let Some(result) = items.next().await {
606    ///   let item = result?;
607    /// }
608    /// # gax::Result::<()>::Ok(()) });
609    ///
610    /// fn prepare_request_builder() -> ListMigrationSubtasks {
611    ///   # panic!();
612    ///   // ... details omitted ...
613    /// }
614    /// ```
615    #[derive(Clone, Debug)]
616    pub struct ListMigrationSubtasks(RequestBuilder<crate::model::ListMigrationSubtasksRequest>);
617
618    impl ListMigrationSubtasks {
619        pub(crate) fn new(
620            stub: std::sync::Arc<dyn super::super::stub::dynamic::MigrationService>,
621        ) -> Self {
622            Self(RequestBuilder::new(stub))
623        }
624
625        /// Sets the full request, replacing any prior values.
626        pub fn with_request<V: Into<crate::model::ListMigrationSubtasksRequest>>(
627            mut self,
628            v: V,
629        ) -> Self {
630            self.0.request = v.into();
631            self
632        }
633
634        /// Sets all the options, replacing any prior values.
635        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
636            self.0.options = v.into();
637            self
638        }
639
640        /// Sends the request.
641        pub async fn send(self) -> Result<crate::model::ListMigrationSubtasksResponse> {
642            (*self.0.stub)
643                .list_migration_subtasks(self.0.request, self.0.options)
644                .await
645                .map(gax::response::Response::into_body)
646        }
647
648        /// Streams each page in the collection.
649        pub fn by_page(
650            self,
651        ) -> impl gax::paginator::Paginator<crate::model::ListMigrationSubtasksResponse, gax::error::Error>
652        {
653            use std::clone::Clone;
654            let token = self.0.request.page_token.clone();
655            let execute = move |token: String| {
656                let mut builder = self.clone();
657                builder.0.request = builder.0.request.set_page_token(token);
658                builder.send()
659            };
660            gax::paginator::internal::new_paginator(token, execute)
661        }
662
663        /// Streams each item in the collection.
664        pub fn by_item(
665            self,
666        ) -> impl gax::paginator::ItemPaginator<
667            crate::model::ListMigrationSubtasksResponse,
668            gax::error::Error,
669        > {
670            use gax::paginator::Paginator;
671            self.by_page().items()
672        }
673
674        /// Sets the value of [parent][crate::model::ListMigrationSubtasksRequest::parent].
675        ///
676        /// This is a **required** field for requests.
677        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
678            self.0.request.parent = v.into();
679            self
680        }
681
682        /// Sets the value of [read_mask][crate::model::ListMigrationSubtasksRequest::read_mask].
683        pub fn set_read_mask<T>(mut self, v: T) -> Self
684        where
685            T: std::convert::Into<wkt::FieldMask>,
686        {
687            self.0.request.read_mask = std::option::Option::Some(v.into());
688            self
689        }
690
691        /// Sets or clears the value of [read_mask][crate::model::ListMigrationSubtasksRequest::read_mask].
692        pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
693        where
694            T: std::convert::Into<wkt::FieldMask>,
695        {
696            self.0.request.read_mask = v.map(|x| x.into());
697            self
698        }
699
700        /// Sets the value of [page_size][crate::model::ListMigrationSubtasksRequest::page_size].
701        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
702            self.0.request.page_size = v.into();
703            self
704        }
705
706        /// Sets the value of [page_token][crate::model::ListMigrationSubtasksRequest::page_token].
707        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
708            self.0.request.page_token = v.into();
709            self
710        }
711
712        /// Sets the value of [filter][crate::model::ListMigrationSubtasksRequest::filter].
713        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
714            self.0.request.filter = v.into();
715            self
716        }
717    }
718
719    #[doc(hidden)]
720    impl gax::options::internal::RequestBuilder for ListMigrationSubtasks {
721        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
722            &mut self.0.options
723        }
724    }
725}