Skip to main content

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