google_cloud_storage/generated/gapic/
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 storage_control {
18    use crate::Result;
19
20    /// Common implementation for [crate::client::StorageControl] request builders.
21    #[derive(Clone, Debug)]
22    pub(crate) struct RequestBuilder<R: std::default::Default> {
23        stub: std::sync::Arc<dyn super::super::stub::dynamic::StorageControl>,
24        request: R,
25        options: gax::options::RequestOptions,
26    }
27
28    impl<R> RequestBuilder<R>
29    where
30        R: std::default::Default,
31    {
32        pub(crate) fn new(
33            stub: std::sync::Arc<dyn super::super::stub::dynamic::StorageControl>,
34        ) -> Self {
35            Self {
36                stub,
37                request: R::default(),
38                options: gax::options::RequestOptions::default(),
39            }
40        }
41    }
42
43    /// The request builder for [StorageControl::delete_bucket][crate::client::StorageControl::delete_bucket] calls.
44    ///
45    /// # Example
46    /// ```no_run
47    /// # use google_cloud_storage::builder;
48    /// use builder::storage_control::DeleteBucket;
49    /// # tokio_test::block_on(async {
50    ///
51    /// let builder = prepare_request_builder();
52    /// let response = builder.send().await?;
53    /// # gax::Result::<()>::Ok(()) });
54    ///
55    /// fn prepare_request_builder() -> DeleteBucket {
56    ///   # panic!();
57    ///   // ... details omitted ...
58    /// }
59    /// ```
60    #[derive(Clone, Debug)]
61    pub struct DeleteBucket(RequestBuilder<crate::model::DeleteBucketRequest>);
62
63    impl DeleteBucket {
64        pub(crate) fn new(
65            stub: std::sync::Arc<dyn super::super::stub::dynamic::StorageControl>,
66        ) -> Self {
67            Self(RequestBuilder::new(stub))
68        }
69
70        /// Sets the full request, replacing any prior values.
71        pub fn with_request<V: Into<crate::model::DeleteBucketRequest>>(mut self, v: V) -> Self {
72            self.0.request = v.into();
73            self
74        }
75
76        /// Sets all the options, replacing any prior values.
77        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
78            self.0.options = v.into();
79            self
80        }
81
82        /// Sends the request.
83        pub async fn send(self) -> Result<()> {
84            (*self.0.stub)
85                .delete_bucket(self.0.request, self.0.options)
86                .await
87                .map(gax::response::Response::into_body)
88        }
89
90        /// Sets the value of [name][crate::model::DeleteBucketRequest::name].
91        ///
92        /// This is a **required** field for requests.
93        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
94            self.0.request.name = v.into();
95            self
96        }
97
98        /// Sets the value of [if_metageneration_match][crate::model::DeleteBucketRequest::if_metageneration_match].
99        pub fn set_if_metageneration_match<T>(mut self, v: T) -> Self
100        where
101            T: std::convert::Into<i64>,
102        {
103            self.0.request.if_metageneration_match = std::option::Option::Some(v.into());
104            self
105        }
106
107        /// Sets or clears the value of [if_metageneration_match][crate::model::DeleteBucketRequest::if_metageneration_match].
108        pub fn set_or_clear_if_metageneration_match<T>(mut self, v: std::option::Option<T>) -> Self
109        where
110            T: std::convert::Into<i64>,
111        {
112            self.0.request.if_metageneration_match = v.map(|x| x.into());
113            self
114        }
115
116        /// Sets the value of [if_metageneration_not_match][crate::model::DeleteBucketRequest::if_metageneration_not_match].
117        pub fn set_if_metageneration_not_match<T>(mut self, v: T) -> Self
118        where
119            T: std::convert::Into<i64>,
120        {
121            self.0.request.if_metageneration_not_match = std::option::Option::Some(v.into());
122            self
123        }
124
125        /// Sets or clears the value of [if_metageneration_not_match][crate::model::DeleteBucketRequest::if_metageneration_not_match].
126        pub fn set_or_clear_if_metageneration_not_match<T>(
127            mut self,
128            v: std::option::Option<T>,
129        ) -> Self
130        where
131            T: std::convert::Into<i64>,
132        {
133            self.0.request.if_metageneration_not_match = v.map(|x| x.into());
134            self
135        }
136    }
137
138    #[doc(hidden)]
139    impl gax::options::internal::RequestBuilder for DeleteBucket {
140        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
141            &mut self.0.options
142        }
143    }
144
145    /// The request builder for [StorageControl::get_bucket][crate::client::StorageControl::get_bucket] calls.
146    ///
147    /// # Example
148    /// ```no_run
149    /// # use google_cloud_storage::builder;
150    /// use builder::storage_control::GetBucket;
151    /// # tokio_test::block_on(async {
152    ///
153    /// let builder = prepare_request_builder();
154    /// let response = builder.send().await?;
155    /// # gax::Result::<()>::Ok(()) });
156    ///
157    /// fn prepare_request_builder() -> GetBucket {
158    ///   # panic!();
159    ///   // ... details omitted ...
160    /// }
161    /// ```
162    #[derive(Clone, Debug)]
163    pub struct GetBucket(RequestBuilder<crate::model::GetBucketRequest>);
164
165    impl GetBucket {
166        pub(crate) fn new(
167            stub: std::sync::Arc<dyn super::super::stub::dynamic::StorageControl>,
168        ) -> Self {
169            Self(RequestBuilder::new(stub))
170        }
171
172        /// Sets the full request, replacing any prior values.
173        pub fn with_request<V: Into<crate::model::GetBucketRequest>>(mut self, v: V) -> Self {
174            self.0.request = v.into();
175            self
176        }
177
178        /// Sets all the options, replacing any prior values.
179        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
180            self.0.options = v.into();
181            self
182        }
183
184        /// Sends the request.
185        pub async fn send(self) -> Result<crate::model::Bucket> {
186            (*self.0.stub)
187                .get_bucket(self.0.request, self.0.options)
188                .await
189                .map(gax::response::Response::into_body)
190        }
191
192        /// Sets the value of [name][crate::model::GetBucketRequest::name].
193        ///
194        /// This is a **required** field for requests.
195        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
196            self.0.request.name = v.into();
197            self
198        }
199
200        /// Sets the value of [if_metageneration_match][crate::model::GetBucketRequest::if_metageneration_match].
201        pub fn set_if_metageneration_match<T>(mut self, v: T) -> Self
202        where
203            T: std::convert::Into<i64>,
204        {
205            self.0.request.if_metageneration_match = std::option::Option::Some(v.into());
206            self
207        }
208
209        /// Sets or clears the value of [if_metageneration_match][crate::model::GetBucketRequest::if_metageneration_match].
210        pub fn set_or_clear_if_metageneration_match<T>(mut self, v: std::option::Option<T>) -> Self
211        where
212            T: std::convert::Into<i64>,
213        {
214            self.0.request.if_metageneration_match = v.map(|x| x.into());
215            self
216        }
217
218        /// Sets the value of [if_metageneration_not_match][crate::model::GetBucketRequest::if_metageneration_not_match].
219        pub fn set_if_metageneration_not_match<T>(mut self, v: T) -> Self
220        where
221            T: std::convert::Into<i64>,
222        {
223            self.0.request.if_metageneration_not_match = std::option::Option::Some(v.into());
224            self
225        }
226
227        /// Sets or clears the value of [if_metageneration_not_match][crate::model::GetBucketRequest::if_metageneration_not_match].
228        pub fn set_or_clear_if_metageneration_not_match<T>(
229            mut self,
230            v: std::option::Option<T>,
231        ) -> Self
232        where
233            T: std::convert::Into<i64>,
234        {
235            self.0.request.if_metageneration_not_match = v.map(|x| x.into());
236            self
237        }
238
239        /// Sets the value of [read_mask][crate::model::GetBucketRequest::read_mask].
240        pub fn set_read_mask<T>(mut self, v: T) -> Self
241        where
242            T: std::convert::Into<wkt::FieldMask>,
243        {
244            self.0.request.read_mask = std::option::Option::Some(v.into());
245            self
246        }
247
248        /// Sets or clears the value of [read_mask][crate::model::GetBucketRequest::read_mask].
249        pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
250        where
251            T: std::convert::Into<wkt::FieldMask>,
252        {
253            self.0.request.read_mask = v.map(|x| x.into());
254            self
255        }
256    }
257
258    #[doc(hidden)]
259    impl gax::options::internal::RequestBuilder for GetBucket {
260        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
261            &mut self.0.options
262        }
263    }
264
265    /// The request builder for [StorageControl::create_bucket][crate::client::StorageControl::create_bucket] calls.
266    ///
267    /// # Example
268    /// ```no_run
269    /// # use google_cloud_storage::builder;
270    /// use builder::storage_control::CreateBucket;
271    /// # tokio_test::block_on(async {
272    ///
273    /// let builder = prepare_request_builder();
274    /// let response = builder.send().await?;
275    /// # gax::Result::<()>::Ok(()) });
276    ///
277    /// fn prepare_request_builder() -> CreateBucket {
278    ///   # panic!();
279    ///   // ... details omitted ...
280    /// }
281    /// ```
282    #[derive(Clone, Debug)]
283    pub struct CreateBucket(RequestBuilder<crate::model::CreateBucketRequest>);
284
285    impl CreateBucket {
286        pub(crate) fn new(
287            stub: std::sync::Arc<dyn super::super::stub::dynamic::StorageControl>,
288        ) -> Self {
289            Self(RequestBuilder::new(stub))
290        }
291
292        /// Sets the full request, replacing any prior values.
293        pub fn with_request<V: Into<crate::model::CreateBucketRequest>>(mut self, v: V) -> Self {
294            self.0.request = v.into();
295            self
296        }
297
298        /// Sets all the options, replacing any prior values.
299        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
300            self.0.options = v.into();
301            self
302        }
303
304        /// Sends the request.
305        pub async fn send(self) -> Result<crate::model::Bucket> {
306            (*self.0.stub)
307                .create_bucket(self.0.request, self.0.options)
308                .await
309                .map(gax::response::Response::into_body)
310        }
311
312        /// Sets the value of [parent][crate::model::CreateBucketRequest::parent].
313        ///
314        /// This is a **required** field for requests.
315        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
316            self.0.request.parent = v.into();
317            self
318        }
319
320        /// Sets the value of [bucket][crate::model::CreateBucketRequest::bucket].
321        pub fn set_bucket<T>(mut self, v: T) -> Self
322        where
323            T: std::convert::Into<crate::model::Bucket>,
324        {
325            self.0.request.bucket = std::option::Option::Some(v.into());
326            self
327        }
328
329        /// Sets or clears the value of [bucket][crate::model::CreateBucketRequest::bucket].
330        pub fn set_or_clear_bucket<T>(mut self, v: std::option::Option<T>) -> Self
331        where
332            T: std::convert::Into<crate::model::Bucket>,
333        {
334            self.0.request.bucket = v.map(|x| x.into());
335            self
336        }
337
338        /// Sets the value of [bucket_id][crate::model::CreateBucketRequest::bucket_id].
339        ///
340        /// This is a **required** field for requests.
341        pub fn set_bucket_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
342            self.0.request.bucket_id = v.into();
343            self
344        }
345
346        /// Sets the value of [predefined_acl][crate::model::CreateBucketRequest::predefined_acl].
347        pub fn set_predefined_acl<T: Into<std::string::String>>(mut self, v: T) -> Self {
348            self.0.request.predefined_acl = v.into();
349            self
350        }
351
352        /// Sets the value of [predefined_default_object_acl][crate::model::CreateBucketRequest::predefined_default_object_acl].
353        pub fn set_predefined_default_object_acl<T: Into<std::string::String>>(
354            mut self,
355            v: T,
356        ) -> Self {
357            self.0.request.predefined_default_object_acl = v.into();
358            self
359        }
360
361        /// Sets the value of [enable_object_retention][crate::model::CreateBucketRequest::enable_object_retention].
362        pub fn set_enable_object_retention<T: Into<bool>>(mut self, v: T) -> Self {
363            self.0.request.enable_object_retention = v.into();
364            self
365        }
366    }
367
368    #[doc(hidden)]
369    impl gax::options::internal::RequestBuilder for CreateBucket {
370        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
371            &mut self.0.options
372        }
373    }
374
375    /// The request builder for [StorageControl::list_buckets][crate::client::StorageControl::list_buckets] calls.
376    ///
377    /// # Example
378    /// ```no_run
379    /// # use google_cloud_storage::builder;
380    /// use builder::storage_control::ListBuckets;
381    /// # tokio_test::block_on(async {
382    /// use gax::paginator::ItemPaginator;
383    ///
384    /// let builder = prepare_request_builder();
385    /// let mut items = builder.by_item();
386    /// while let Some(result) = items.next().await {
387    ///   let item = result?;
388    /// }
389    /// # gax::Result::<()>::Ok(()) });
390    ///
391    /// fn prepare_request_builder() -> ListBuckets {
392    ///   # panic!();
393    ///   // ... details omitted ...
394    /// }
395    /// ```
396    #[derive(Clone, Debug)]
397    pub struct ListBuckets(RequestBuilder<crate::model::ListBucketsRequest>);
398
399    impl ListBuckets {
400        pub(crate) fn new(
401            stub: std::sync::Arc<dyn super::super::stub::dynamic::StorageControl>,
402        ) -> Self {
403            Self(RequestBuilder::new(stub))
404        }
405
406        /// Sets the full request, replacing any prior values.
407        pub fn with_request<V: Into<crate::model::ListBucketsRequest>>(mut self, v: V) -> Self {
408            self.0.request = v.into();
409            self
410        }
411
412        /// Sets all the options, replacing any prior values.
413        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
414            self.0.options = v.into();
415            self
416        }
417
418        /// Sends the request.
419        pub async fn send(self) -> Result<crate::model::ListBucketsResponse> {
420            (*self.0.stub)
421                .list_buckets(self.0.request, self.0.options)
422                .await
423                .map(gax::response::Response::into_body)
424        }
425
426        /// Streams each page in the collection.
427        pub fn by_page(
428            self,
429        ) -> impl gax::paginator::Paginator<crate::model::ListBucketsResponse, gax::error::Error>
430        {
431            use std::clone::Clone;
432            let token = self.0.request.page_token.clone();
433            let execute = move |token: String| {
434                let mut builder = self.clone();
435                builder.0.request = builder.0.request.set_page_token(token);
436                builder.send()
437            };
438            gax::paginator::internal::new_paginator(token, execute)
439        }
440
441        /// Streams each item in the collection.
442        pub fn by_item(
443            self,
444        ) -> impl gax::paginator::ItemPaginator<crate::model::ListBucketsResponse, gax::error::Error>
445        {
446            use gax::paginator::Paginator;
447            self.by_page().items()
448        }
449
450        /// Sets the value of [parent][crate::model::ListBucketsRequest::parent].
451        ///
452        /// This is a **required** field for requests.
453        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
454            self.0.request.parent = v.into();
455            self
456        }
457
458        /// Sets the value of [page_size][crate::model::ListBucketsRequest::page_size].
459        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
460            self.0.request.page_size = v.into();
461            self
462        }
463
464        /// Sets the value of [page_token][crate::model::ListBucketsRequest::page_token].
465        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
466            self.0.request.page_token = v.into();
467            self
468        }
469
470        /// Sets the value of [prefix][crate::model::ListBucketsRequest::prefix].
471        pub fn set_prefix<T: Into<std::string::String>>(mut self, v: T) -> Self {
472            self.0.request.prefix = v.into();
473            self
474        }
475
476        /// Sets the value of [read_mask][crate::model::ListBucketsRequest::read_mask].
477        pub fn set_read_mask<T>(mut self, v: T) -> Self
478        where
479            T: std::convert::Into<wkt::FieldMask>,
480        {
481            self.0.request.read_mask = std::option::Option::Some(v.into());
482            self
483        }
484
485        /// Sets or clears the value of [read_mask][crate::model::ListBucketsRequest::read_mask].
486        pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
487        where
488            T: std::convert::Into<wkt::FieldMask>,
489        {
490            self.0.request.read_mask = v.map(|x| x.into());
491            self
492        }
493    }
494
495    #[doc(hidden)]
496    impl gax::options::internal::RequestBuilder for ListBuckets {
497        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
498            &mut self.0.options
499        }
500    }
501
502    /// The request builder for [StorageControl::lock_bucket_retention_policy][crate::client::StorageControl::lock_bucket_retention_policy] calls.
503    ///
504    /// # Example
505    /// ```no_run
506    /// # use google_cloud_storage::builder;
507    /// use builder::storage_control::LockBucketRetentionPolicy;
508    /// # tokio_test::block_on(async {
509    ///
510    /// let builder = prepare_request_builder();
511    /// let response = builder.send().await?;
512    /// # gax::Result::<()>::Ok(()) });
513    ///
514    /// fn prepare_request_builder() -> LockBucketRetentionPolicy {
515    ///   # panic!();
516    ///   // ... details omitted ...
517    /// }
518    /// ```
519    #[derive(Clone, Debug)]
520    pub struct LockBucketRetentionPolicy(
521        RequestBuilder<crate::model::LockBucketRetentionPolicyRequest>,
522    );
523
524    impl LockBucketRetentionPolicy {
525        pub(crate) fn new(
526            stub: std::sync::Arc<dyn super::super::stub::dynamic::StorageControl>,
527        ) -> Self {
528            Self(RequestBuilder::new(stub))
529        }
530
531        /// Sets the full request, replacing any prior values.
532        pub fn with_request<V: Into<crate::model::LockBucketRetentionPolicyRequest>>(
533            mut self,
534            v: V,
535        ) -> Self {
536            self.0.request = v.into();
537            self
538        }
539
540        /// Sets all the options, replacing any prior values.
541        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
542            self.0.options = v.into();
543            self
544        }
545
546        /// Sends the request.
547        pub async fn send(self) -> Result<crate::model::Bucket> {
548            (*self.0.stub)
549                .lock_bucket_retention_policy(self.0.request, self.0.options)
550                .await
551                .map(gax::response::Response::into_body)
552        }
553
554        /// Sets the value of [bucket][crate::model::LockBucketRetentionPolicyRequest::bucket].
555        ///
556        /// This is a **required** field for requests.
557        pub fn set_bucket<T: Into<std::string::String>>(mut self, v: T) -> Self {
558            self.0.request.bucket = v.into();
559            self
560        }
561
562        /// Sets the value of [if_metageneration_match][crate::model::LockBucketRetentionPolicyRequest::if_metageneration_match].
563        ///
564        /// This is a **required** field for requests.
565        pub fn set_if_metageneration_match<T: Into<i64>>(mut self, v: T) -> Self {
566            self.0.request.if_metageneration_match = v.into();
567            self
568        }
569    }
570
571    #[doc(hidden)]
572    impl gax::options::internal::RequestBuilder for LockBucketRetentionPolicy {
573        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
574            &mut self.0.options
575        }
576    }
577
578    /// The request builder for [StorageControl::get_iam_policy][crate::client::StorageControl::get_iam_policy] calls.
579    ///
580    /// # Example
581    /// ```no_run
582    /// # use google_cloud_storage::builder;
583    /// use builder::storage_control::GetIamPolicy;
584    /// # tokio_test::block_on(async {
585    ///
586    /// let builder = prepare_request_builder();
587    /// let response = builder.send().await?;
588    /// # gax::Result::<()>::Ok(()) });
589    ///
590    /// fn prepare_request_builder() -> GetIamPolicy {
591    ///   # panic!();
592    ///   // ... details omitted ...
593    /// }
594    /// ```
595    #[derive(Clone, Debug)]
596    pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
597
598    impl GetIamPolicy {
599        pub(crate) fn new(
600            stub: std::sync::Arc<dyn super::super::stub::dynamic::StorageControl>,
601        ) -> Self {
602            Self(RequestBuilder::new(stub))
603        }
604
605        /// Sets the full request, replacing any prior values.
606        pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
607            self.0.request = v.into();
608            self
609        }
610
611        /// Sets all the options, replacing any prior values.
612        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
613            self.0.options = v.into();
614            self
615        }
616
617        /// Sends the request.
618        pub async fn send(self) -> Result<iam_v1::model::Policy> {
619            (*self.0.stub)
620                .get_iam_policy(self.0.request, self.0.options)
621                .await
622                .map(gax::response::Response::into_body)
623        }
624
625        /// Sets the value of [resource][iam_v1::model::GetIamPolicyRequest::resource].
626        ///
627        /// This is a **required** field for requests.
628        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
629            self.0.request.resource = v.into();
630            self
631        }
632
633        /// Sets the value of [options][iam_v1::model::GetIamPolicyRequest::options].
634        pub fn set_options<T>(mut self, v: T) -> Self
635        where
636            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
637        {
638            self.0.request.options = std::option::Option::Some(v.into());
639            self
640        }
641
642        /// Sets or clears the value of [options][iam_v1::model::GetIamPolicyRequest::options].
643        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
644        where
645            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
646        {
647            self.0.request.options = v.map(|x| x.into());
648            self
649        }
650    }
651
652    #[doc(hidden)]
653    impl gax::options::internal::RequestBuilder for GetIamPolicy {
654        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
655            &mut self.0.options
656        }
657    }
658
659    /// The request builder for [StorageControl::set_iam_policy][crate::client::StorageControl::set_iam_policy] calls.
660    ///
661    /// # Example
662    /// ```no_run
663    /// # use google_cloud_storage::builder;
664    /// use builder::storage_control::SetIamPolicy;
665    /// # tokio_test::block_on(async {
666    ///
667    /// let builder = prepare_request_builder();
668    /// let response = builder.send().await?;
669    /// # gax::Result::<()>::Ok(()) });
670    ///
671    /// fn prepare_request_builder() -> SetIamPolicy {
672    ///   # panic!();
673    ///   // ... details omitted ...
674    /// }
675    /// ```
676    #[derive(Clone, Debug)]
677    pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
678
679    impl SetIamPolicy {
680        pub(crate) fn new(
681            stub: std::sync::Arc<dyn super::super::stub::dynamic::StorageControl>,
682        ) -> Self {
683            Self(RequestBuilder::new(stub))
684        }
685
686        /// Sets the full request, replacing any prior values.
687        pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
688            self.0.request = v.into();
689            self
690        }
691
692        /// Sets all the options, replacing any prior values.
693        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
694            self.0.options = v.into();
695            self
696        }
697
698        /// Sends the request.
699        pub async fn send(self) -> Result<iam_v1::model::Policy> {
700            (*self.0.stub)
701                .set_iam_policy(self.0.request, self.0.options)
702                .await
703                .map(gax::response::Response::into_body)
704        }
705
706        /// Sets the value of [resource][iam_v1::model::SetIamPolicyRequest::resource].
707        ///
708        /// This is a **required** field for requests.
709        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
710            self.0.request.resource = v.into();
711            self
712        }
713
714        /// Sets the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
715        ///
716        /// This is a **required** field for requests.
717        pub fn set_policy<T>(mut self, v: T) -> Self
718        where
719            T: std::convert::Into<iam_v1::model::Policy>,
720        {
721            self.0.request.policy = std::option::Option::Some(v.into());
722            self
723        }
724
725        /// Sets or clears the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
726        ///
727        /// This is a **required** field for requests.
728        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
729        where
730            T: std::convert::Into<iam_v1::model::Policy>,
731        {
732            self.0.request.policy = v.map(|x| x.into());
733            self
734        }
735
736        /// Sets the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
737        pub fn set_update_mask<T>(mut self, v: T) -> Self
738        where
739            T: std::convert::Into<wkt::FieldMask>,
740        {
741            self.0.request.update_mask = std::option::Option::Some(v.into());
742            self
743        }
744
745        /// Sets or clears the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
746        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
747        where
748            T: std::convert::Into<wkt::FieldMask>,
749        {
750            self.0.request.update_mask = v.map(|x| x.into());
751            self
752        }
753    }
754
755    #[doc(hidden)]
756    impl gax::options::internal::RequestBuilder for SetIamPolicy {
757        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
758            &mut self.0.options
759        }
760    }
761
762    /// The request builder for [StorageControl::test_iam_permissions][crate::client::StorageControl::test_iam_permissions] calls.
763    ///
764    /// # Example
765    /// ```no_run
766    /// # use google_cloud_storage::builder;
767    /// use builder::storage_control::TestIamPermissions;
768    /// # tokio_test::block_on(async {
769    ///
770    /// let builder = prepare_request_builder();
771    /// let response = builder.send().await?;
772    /// # gax::Result::<()>::Ok(()) });
773    ///
774    /// fn prepare_request_builder() -> TestIamPermissions {
775    ///   # panic!();
776    ///   // ... details omitted ...
777    /// }
778    /// ```
779    #[derive(Clone, Debug)]
780    pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
781
782    impl TestIamPermissions {
783        pub(crate) fn new(
784            stub: std::sync::Arc<dyn super::super::stub::dynamic::StorageControl>,
785        ) -> Self {
786            Self(RequestBuilder::new(stub))
787        }
788
789        /// Sets the full request, replacing any prior values.
790        pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
791            mut self,
792            v: V,
793        ) -> Self {
794            self.0.request = v.into();
795            self
796        }
797
798        /// Sets all the options, replacing any prior values.
799        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
800            self.0.options = v.into();
801            self
802        }
803
804        /// Sends the request.
805        pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
806            (*self.0.stub)
807                .test_iam_permissions(self.0.request, self.0.options)
808                .await
809                .map(gax::response::Response::into_body)
810        }
811
812        /// Sets the value of [resource][iam_v1::model::TestIamPermissionsRequest::resource].
813        ///
814        /// This is a **required** field for requests.
815        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
816            self.0.request.resource = v.into();
817            self
818        }
819
820        /// Sets the value of [permissions][iam_v1::model::TestIamPermissionsRequest::permissions].
821        ///
822        /// This is a **required** field for requests.
823        pub fn set_permissions<T, V>(mut self, v: T) -> Self
824        where
825            T: std::iter::IntoIterator<Item = V>,
826            V: std::convert::Into<std::string::String>,
827        {
828            use std::iter::Iterator;
829            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
830            self
831        }
832    }
833
834    #[doc(hidden)]
835    impl gax::options::internal::RequestBuilder for TestIamPermissions {
836        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
837            &mut self.0.options
838        }
839    }
840
841    /// The request builder for [StorageControl::update_bucket][crate::client::StorageControl::update_bucket] calls.
842    ///
843    /// # Example
844    /// ```no_run
845    /// # use google_cloud_storage::builder;
846    /// use builder::storage_control::UpdateBucket;
847    /// # tokio_test::block_on(async {
848    ///
849    /// let builder = prepare_request_builder();
850    /// let response = builder.send().await?;
851    /// # gax::Result::<()>::Ok(()) });
852    ///
853    /// fn prepare_request_builder() -> UpdateBucket {
854    ///   # panic!();
855    ///   // ... details omitted ...
856    /// }
857    /// ```
858    #[derive(Clone, Debug)]
859    pub struct UpdateBucket(RequestBuilder<crate::model::UpdateBucketRequest>);
860
861    impl UpdateBucket {
862        pub(crate) fn new(
863            stub: std::sync::Arc<dyn super::super::stub::dynamic::StorageControl>,
864        ) -> Self {
865            Self(RequestBuilder::new(stub))
866        }
867
868        /// Sets the full request, replacing any prior values.
869        pub fn with_request<V: Into<crate::model::UpdateBucketRequest>>(mut self, v: V) -> Self {
870            self.0.request = v.into();
871            self
872        }
873
874        /// Sets all the options, replacing any prior values.
875        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
876            self.0.options = v.into();
877            self
878        }
879
880        /// Sends the request.
881        pub async fn send(self) -> Result<crate::model::Bucket> {
882            (*self.0.stub)
883                .update_bucket(self.0.request, self.0.options)
884                .await
885                .map(gax::response::Response::into_body)
886        }
887
888        /// Sets the value of [bucket][crate::model::UpdateBucketRequest::bucket].
889        ///
890        /// This is a **required** field for requests.
891        pub fn set_bucket<T>(mut self, v: T) -> Self
892        where
893            T: std::convert::Into<crate::model::Bucket>,
894        {
895            self.0.request.bucket = std::option::Option::Some(v.into());
896            self
897        }
898
899        /// Sets or clears the value of [bucket][crate::model::UpdateBucketRequest::bucket].
900        ///
901        /// This is a **required** field for requests.
902        pub fn set_or_clear_bucket<T>(mut self, v: std::option::Option<T>) -> Self
903        where
904            T: std::convert::Into<crate::model::Bucket>,
905        {
906            self.0.request.bucket = v.map(|x| x.into());
907            self
908        }
909
910        /// Sets the value of [if_metageneration_match][crate::model::UpdateBucketRequest::if_metageneration_match].
911        pub fn set_if_metageneration_match<T>(mut self, v: T) -> Self
912        where
913            T: std::convert::Into<i64>,
914        {
915            self.0.request.if_metageneration_match = std::option::Option::Some(v.into());
916            self
917        }
918
919        /// Sets or clears the value of [if_metageneration_match][crate::model::UpdateBucketRequest::if_metageneration_match].
920        pub fn set_or_clear_if_metageneration_match<T>(mut self, v: std::option::Option<T>) -> Self
921        where
922            T: std::convert::Into<i64>,
923        {
924            self.0.request.if_metageneration_match = v.map(|x| x.into());
925            self
926        }
927
928        /// Sets the value of [if_metageneration_not_match][crate::model::UpdateBucketRequest::if_metageneration_not_match].
929        pub fn set_if_metageneration_not_match<T>(mut self, v: T) -> Self
930        where
931            T: std::convert::Into<i64>,
932        {
933            self.0.request.if_metageneration_not_match = std::option::Option::Some(v.into());
934            self
935        }
936
937        /// Sets or clears the value of [if_metageneration_not_match][crate::model::UpdateBucketRequest::if_metageneration_not_match].
938        pub fn set_or_clear_if_metageneration_not_match<T>(
939            mut self,
940            v: std::option::Option<T>,
941        ) -> Self
942        where
943            T: std::convert::Into<i64>,
944        {
945            self.0.request.if_metageneration_not_match = v.map(|x| x.into());
946            self
947        }
948
949        /// Sets the value of [predefined_acl][crate::model::UpdateBucketRequest::predefined_acl].
950        pub fn set_predefined_acl<T: Into<std::string::String>>(mut self, v: T) -> Self {
951            self.0.request.predefined_acl = v.into();
952            self
953        }
954
955        /// Sets the value of [predefined_default_object_acl][crate::model::UpdateBucketRequest::predefined_default_object_acl].
956        pub fn set_predefined_default_object_acl<T: Into<std::string::String>>(
957            mut self,
958            v: T,
959        ) -> Self {
960            self.0.request.predefined_default_object_acl = v.into();
961            self
962        }
963
964        /// Sets the value of [update_mask][crate::model::UpdateBucketRequest::update_mask].
965        ///
966        /// This is a **required** field for requests.
967        pub fn set_update_mask<T>(mut self, v: T) -> Self
968        where
969            T: std::convert::Into<wkt::FieldMask>,
970        {
971            self.0.request.update_mask = std::option::Option::Some(v.into());
972            self
973        }
974
975        /// Sets or clears the value of [update_mask][crate::model::UpdateBucketRequest::update_mask].
976        ///
977        /// This is a **required** field for requests.
978        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
979        where
980            T: std::convert::Into<wkt::FieldMask>,
981        {
982            self.0.request.update_mask = v.map(|x| x.into());
983            self
984        }
985    }
986
987    #[doc(hidden)]
988    impl gax::options::internal::RequestBuilder for UpdateBucket {
989        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
990            &mut self.0.options
991        }
992    }
993
994    /// The request builder for [StorageControl::compose_object][crate::client::StorageControl::compose_object] calls.
995    ///
996    /// # Example
997    /// ```no_run
998    /// # use google_cloud_storage::builder;
999    /// use builder::storage_control::ComposeObject;
1000    /// # tokio_test::block_on(async {
1001    ///
1002    /// let builder = prepare_request_builder();
1003    /// let response = builder.send().await?;
1004    /// # gax::Result::<()>::Ok(()) });
1005    ///
1006    /// fn prepare_request_builder() -> ComposeObject {
1007    ///   # panic!();
1008    ///   // ... details omitted ...
1009    /// }
1010    /// ```
1011    #[derive(Clone, Debug)]
1012    pub struct ComposeObject(RequestBuilder<crate::model::ComposeObjectRequest>);
1013
1014    impl ComposeObject {
1015        pub(crate) fn new(
1016            stub: std::sync::Arc<dyn super::super::stub::dynamic::StorageControl>,
1017        ) -> Self {
1018            Self(RequestBuilder::new(stub))
1019        }
1020
1021        /// Sets the full request, replacing any prior values.
1022        pub fn with_request<V: Into<crate::model::ComposeObjectRequest>>(mut self, v: V) -> Self {
1023            self.0.request = v.into();
1024            self
1025        }
1026
1027        /// Sets all the options, replacing any prior values.
1028        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1029            self.0.options = v.into();
1030            self
1031        }
1032
1033        /// Sends the request.
1034        pub async fn send(self) -> Result<crate::model::Object> {
1035            (*self.0.stub)
1036                .compose_object(self.0.request, self.0.options)
1037                .await
1038                .map(gax::response::Response::into_body)
1039        }
1040
1041        /// Sets the value of [destination][crate::model::ComposeObjectRequest::destination].
1042        ///
1043        /// This is a **required** field for requests.
1044        pub fn set_destination<T>(mut self, v: T) -> Self
1045        where
1046            T: std::convert::Into<crate::model::Object>,
1047        {
1048            self.0.request.destination = std::option::Option::Some(v.into());
1049            self
1050        }
1051
1052        /// Sets or clears the value of [destination][crate::model::ComposeObjectRequest::destination].
1053        ///
1054        /// This is a **required** field for requests.
1055        pub fn set_or_clear_destination<T>(mut self, v: std::option::Option<T>) -> Self
1056        where
1057            T: std::convert::Into<crate::model::Object>,
1058        {
1059            self.0.request.destination = v.map(|x| x.into());
1060            self
1061        }
1062
1063        /// Sets the value of [source_objects][crate::model::ComposeObjectRequest::source_objects].
1064        pub fn set_source_objects<T, V>(mut self, v: T) -> Self
1065        where
1066            T: std::iter::IntoIterator<Item = V>,
1067            V: std::convert::Into<crate::model::compose_object_request::SourceObject>,
1068        {
1069            use std::iter::Iterator;
1070            self.0.request.source_objects = v.into_iter().map(|i| i.into()).collect();
1071            self
1072        }
1073
1074        /// Sets the value of [destination_predefined_acl][crate::model::ComposeObjectRequest::destination_predefined_acl].
1075        pub fn set_destination_predefined_acl<T: Into<std::string::String>>(
1076            mut self,
1077            v: T,
1078        ) -> Self {
1079            self.0.request.destination_predefined_acl = v.into();
1080            self
1081        }
1082
1083        /// Sets the value of [if_generation_match][crate::model::ComposeObjectRequest::if_generation_match].
1084        pub fn set_if_generation_match<T>(mut self, v: T) -> Self
1085        where
1086            T: std::convert::Into<i64>,
1087        {
1088            self.0.request.if_generation_match = std::option::Option::Some(v.into());
1089            self
1090        }
1091
1092        /// Sets or clears the value of [if_generation_match][crate::model::ComposeObjectRequest::if_generation_match].
1093        pub fn set_or_clear_if_generation_match<T>(mut self, v: std::option::Option<T>) -> Self
1094        where
1095            T: std::convert::Into<i64>,
1096        {
1097            self.0.request.if_generation_match = v.map(|x| x.into());
1098            self
1099        }
1100
1101        /// Sets the value of [if_metageneration_match][crate::model::ComposeObjectRequest::if_metageneration_match].
1102        pub fn set_if_metageneration_match<T>(mut self, v: T) -> Self
1103        where
1104            T: std::convert::Into<i64>,
1105        {
1106            self.0.request.if_metageneration_match = std::option::Option::Some(v.into());
1107            self
1108        }
1109
1110        /// Sets or clears the value of [if_metageneration_match][crate::model::ComposeObjectRequest::if_metageneration_match].
1111        pub fn set_or_clear_if_metageneration_match<T>(mut self, v: std::option::Option<T>) -> Self
1112        where
1113            T: std::convert::Into<i64>,
1114        {
1115            self.0.request.if_metageneration_match = v.map(|x| x.into());
1116            self
1117        }
1118
1119        /// Sets the value of [kms_key][crate::model::ComposeObjectRequest::kms_key].
1120        pub fn set_kms_key<T: Into<std::string::String>>(mut self, v: T) -> Self {
1121            self.0.request.kms_key = v.into();
1122            self
1123        }
1124
1125        /// Sets the value of [common_object_request_params][crate::model::ComposeObjectRequest::common_object_request_params].
1126        pub fn set_common_object_request_params<T>(mut self, v: T) -> Self
1127        where
1128            T: std::convert::Into<crate::model::CommonObjectRequestParams>,
1129        {
1130            self.0.request.common_object_request_params = std::option::Option::Some(v.into());
1131            self
1132        }
1133
1134        /// Sets or clears the value of [common_object_request_params][crate::model::ComposeObjectRequest::common_object_request_params].
1135        pub fn set_or_clear_common_object_request_params<T>(
1136            mut self,
1137            v: std::option::Option<T>,
1138        ) -> Self
1139        where
1140            T: std::convert::Into<crate::model::CommonObjectRequestParams>,
1141        {
1142            self.0.request.common_object_request_params = v.map(|x| x.into());
1143            self
1144        }
1145
1146        /// Sets the value of [object_checksums][crate::model::ComposeObjectRequest::object_checksums].
1147        pub fn set_object_checksums<T>(mut self, v: T) -> Self
1148        where
1149            T: std::convert::Into<crate::model::ObjectChecksums>,
1150        {
1151            self.0.request.object_checksums = std::option::Option::Some(v.into());
1152            self
1153        }
1154
1155        /// Sets or clears the value of [object_checksums][crate::model::ComposeObjectRequest::object_checksums].
1156        pub fn set_or_clear_object_checksums<T>(mut self, v: std::option::Option<T>) -> Self
1157        where
1158            T: std::convert::Into<crate::model::ObjectChecksums>,
1159        {
1160            self.0.request.object_checksums = v.map(|x| x.into());
1161            self
1162        }
1163    }
1164
1165    #[doc(hidden)]
1166    impl gax::options::internal::RequestBuilder for ComposeObject {
1167        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1168            &mut self.0.options
1169        }
1170    }
1171
1172    /// The request builder for [StorageControl::delete_object][crate::client::StorageControl::delete_object] calls.
1173    ///
1174    /// # Example
1175    /// ```no_run
1176    /// # use google_cloud_storage::builder;
1177    /// use builder::storage_control::DeleteObject;
1178    /// # tokio_test::block_on(async {
1179    ///
1180    /// let builder = prepare_request_builder();
1181    /// let response = builder.send().await?;
1182    /// # gax::Result::<()>::Ok(()) });
1183    ///
1184    /// fn prepare_request_builder() -> DeleteObject {
1185    ///   # panic!();
1186    ///   // ... details omitted ...
1187    /// }
1188    /// ```
1189    #[derive(Clone, Debug)]
1190    pub struct DeleteObject(RequestBuilder<crate::model::DeleteObjectRequest>);
1191
1192    impl DeleteObject {
1193        pub(crate) fn new(
1194            stub: std::sync::Arc<dyn super::super::stub::dynamic::StorageControl>,
1195        ) -> Self {
1196            Self(RequestBuilder::new(stub))
1197        }
1198
1199        /// Sets the full request, replacing any prior values.
1200        pub fn with_request<V: Into<crate::model::DeleteObjectRequest>>(mut self, v: V) -> Self {
1201            self.0.request = v.into();
1202            self
1203        }
1204
1205        /// Sets all the options, replacing any prior values.
1206        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1207            self.0.options = v.into();
1208            self
1209        }
1210
1211        /// Sends the request.
1212        pub async fn send(self) -> Result<()> {
1213            (*self.0.stub)
1214                .delete_object(self.0.request, self.0.options)
1215                .await
1216                .map(gax::response::Response::into_body)
1217        }
1218
1219        /// Sets the value of [bucket][crate::model::DeleteObjectRequest::bucket].
1220        ///
1221        /// This is a **required** field for requests.
1222        pub fn set_bucket<T: Into<std::string::String>>(mut self, v: T) -> Self {
1223            self.0.request.bucket = v.into();
1224            self
1225        }
1226
1227        /// Sets the value of [object][crate::model::DeleteObjectRequest::object].
1228        ///
1229        /// This is a **required** field for requests.
1230        pub fn set_object<T: Into<std::string::String>>(mut self, v: T) -> Self {
1231            self.0.request.object = v.into();
1232            self
1233        }
1234
1235        /// Sets the value of [generation][crate::model::DeleteObjectRequest::generation].
1236        pub fn set_generation<T: Into<i64>>(mut self, v: T) -> Self {
1237            self.0.request.generation = v.into();
1238            self
1239        }
1240
1241        /// Sets the value of [if_generation_match][crate::model::DeleteObjectRequest::if_generation_match].
1242        pub fn set_if_generation_match<T>(mut self, v: T) -> Self
1243        where
1244            T: std::convert::Into<i64>,
1245        {
1246            self.0.request.if_generation_match = std::option::Option::Some(v.into());
1247            self
1248        }
1249
1250        /// Sets or clears the value of [if_generation_match][crate::model::DeleteObjectRequest::if_generation_match].
1251        pub fn set_or_clear_if_generation_match<T>(mut self, v: std::option::Option<T>) -> Self
1252        where
1253            T: std::convert::Into<i64>,
1254        {
1255            self.0.request.if_generation_match = v.map(|x| x.into());
1256            self
1257        }
1258
1259        /// Sets the value of [if_generation_not_match][crate::model::DeleteObjectRequest::if_generation_not_match].
1260        pub fn set_if_generation_not_match<T>(mut self, v: T) -> Self
1261        where
1262            T: std::convert::Into<i64>,
1263        {
1264            self.0.request.if_generation_not_match = std::option::Option::Some(v.into());
1265            self
1266        }
1267
1268        /// Sets or clears the value of [if_generation_not_match][crate::model::DeleteObjectRequest::if_generation_not_match].
1269        pub fn set_or_clear_if_generation_not_match<T>(mut self, v: std::option::Option<T>) -> Self
1270        where
1271            T: std::convert::Into<i64>,
1272        {
1273            self.0.request.if_generation_not_match = v.map(|x| x.into());
1274            self
1275        }
1276
1277        /// Sets the value of [if_metageneration_match][crate::model::DeleteObjectRequest::if_metageneration_match].
1278        pub fn set_if_metageneration_match<T>(mut self, v: T) -> Self
1279        where
1280            T: std::convert::Into<i64>,
1281        {
1282            self.0.request.if_metageneration_match = std::option::Option::Some(v.into());
1283            self
1284        }
1285
1286        /// Sets or clears the value of [if_metageneration_match][crate::model::DeleteObjectRequest::if_metageneration_match].
1287        pub fn set_or_clear_if_metageneration_match<T>(mut self, v: std::option::Option<T>) -> Self
1288        where
1289            T: std::convert::Into<i64>,
1290        {
1291            self.0.request.if_metageneration_match = v.map(|x| x.into());
1292            self
1293        }
1294
1295        /// Sets the value of [if_metageneration_not_match][crate::model::DeleteObjectRequest::if_metageneration_not_match].
1296        pub fn set_if_metageneration_not_match<T>(mut self, v: T) -> Self
1297        where
1298            T: std::convert::Into<i64>,
1299        {
1300            self.0.request.if_metageneration_not_match = std::option::Option::Some(v.into());
1301            self
1302        }
1303
1304        /// Sets or clears the value of [if_metageneration_not_match][crate::model::DeleteObjectRequest::if_metageneration_not_match].
1305        pub fn set_or_clear_if_metageneration_not_match<T>(
1306            mut self,
1307            v: std::option::Option<T>,
1308        ) -> Self
1309        where
1310            T: std::convert::Into<i64>,
1311        {
1312            self.0.request.if_metageneration_not_match = v.map(|x| x.into());
1313            self
1314        }
1315
1316        /// Sets the value of [common_object_request_params][crate::model::DeleteObjectRequest::common_object_request_params].
1317        pub fn set_common_object_request_params<T>(mut self, v: T) -> Self
1318        where
1319            T: std::convert::Into<crate::model::CommonObjectRequestParams>,
1320        {
1321            self.0.request.common_object_request_params = std::option::Option::Some(v.into());
1322            self
1323        }
1324
1325        /// Sets or clears the value of [common_object_request_params][crate::model::DeleteObjectRequest::common_object_request_params].
1326        pub fn set_or_clear_common_object_request_params<T>(
1327            mut self,
1328            v: std::option::Option<T>,
1329        ) -> Self
1330        where
1331            T: std::convert::Into<crate::model::CommonObjectRequestParams>,
1332        {
1333            self.0.request.common_object_request_params = v.map(|x| x.into());
1334            self
1335        }
1336    }
1337
1338    #[doc(hidden)]
1339    impl gax::options::internal::RequestBuilder for DeleteObject {
1340        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1341            &mut self.0.options
1342        }
1343    }
1344
1345    /// The request builder for [StorageControl::restore_object][crate::client::StorageControl::restore_object] calls.
1346    ///
1347    /// # Example
1348    /// ```no_run
1349    /// # use google_cloud_storage::builder;
1350    /// use builder::storage_control::RestoreObject;
1351    /// # tokio_test::block_on(async {
1352    ///
1353    /// let builder = prepare_request_builder();
1354    /// let response = builder.send().await?;
1355    /// # gax::Result::<()>::Ok(()) });
1356    ///
1357    /// fn prepare_request_builder() -> RestoreObject {
1358    ///   # panic!();
1359    ///   // ... details omitted ...
1360    /// }
1361    /// ```
1362    #[derive(Clone, Debug)]
1363    pub struct RestoreObject(RequestBuilder<crate::model::RestoreObjectRequest>);
1364
1365    impl RestoreObject {
1366        pub(crate) fn new(
1367            stub: std::sync::Arc<dyn super::super::stub::dynamic::StorageControl>,
1368        ) -> Self {
1369            Self(RequestBuilder::new(stub))
1370        }
1371
1372        /// Sets the full request, replacing any prior values.
1373        pub fn with_request<V: Into<crate::model::RestoreObjectRequest>>(mut self, v: V) -> Self {
1374            self.0.request = v.into();
1375            self
1376        }
1377
1378        /// Sets all the options, replacing any prior values.
1379        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1380            self.0.options = v.into();
1381            self
1382        }
1383
1384        /// Sends the request.
1385        pub async fn send(self) -> Result<crate::model::Object> {
1386            (*self.0.stub)
1387                .restore_object(self.0.request, self.0.options)
1388                .await
1389                .map(gax::response::Response::into_body)
1390        }
1391
1392        /// Sets the value of [bucket][crate::model::RestoreObjectRequest::bucket].
1393        ///
1394        /// This is a **required** field for requests.
1395        pub fn set_bucket<T: Into<std::string::String>>(mut self, v: T) -> Self {
1396            self.0.request.bucket = v.into();
1397            self
1398        }
1399
1400        /// Sets the value of [object][crate::model::RestoreObjectRequest::object].
1401        ///
1402        /// This is a **required** field for requests.
1403        pub fn set_object<T: Into<std::string::String>>(mut self, v: T) -> Self {
1404            self.0.request.object = v.into();
1405            self
1406        }
1407
1408        /// Sets the value of [generation][crate::model::RestoreObjectRequest::generation].
1409        ///
1410        /// This is a **required** field for requests.
1411        pub fn set_generation<T: Into<i64>>(mut self, v: T) -> Self {
1412            self.0.request.generation = v.into();
1413            self
1414        }
1415
1416        /// Sets the value of [restore_token][crate::model::RestoreObjectRequest::restore_token].
1417        pub fn set_restore_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1418            self.0.request.restore_token = v.into();
1419            self
1420        }
1421
1422        /// Sets the value of [if_generation_match][crate::model::RestoreObjectRequest::if_generation_match].
1423        pub fn set_if_generation_match<T>(mut self, v: T) -> Self
1424        where
1425            T: std::convert::Into<i64>,
1426        {
1427            self.0.request.if_generation_match = std::option::Option::Some(v.into());
1428            self
1429        }
1430
1431        /// Sets or clears the value of [if_generation_match][crate::model::RestoreObjectRequest::if_generation_match].
1432        pub fn set_or_clear_if_generation_match<T>(mut self, v: std::option::Option<T>) -> Self
1433        where
1434            T: std::convert::Into<i64>,
1435        {
1436            self.0.request.if_generation_match = v.map(|x| x.into());
1437            self
1438        }
1439
1440        /// Sets the value of [if_generation_not_match][crate::model::RestoreObjectRequest::if_generation_not_match].
1441        pub fn set_if_generation_not_match<T>(mut self, v: T) -> Self
1442        where
1443            T: std::convert::Into<i64>,
1444        {
1445            self.0.request.if_generation_not_match = std::option::Option::Some(v.into());
1446            self
1447        }
1448
1449        /// Sets or clears the value of [if_generation_not_match][crate::model::RestoreObjectRequest::if_generation_not_match].
1450        pub fn set_or_clear_if_generation_not_match<T>(mut self, v: std::option::Option<T>) -> Self
1451        where
1452            T: std::convert::Into<i64>,
1453        {
1454            self.0.request.if_generation_not_match = v.map(|x| x.into());
1455            self
1456        }
1457
1458        /// Sets the value of [if_metageneration_match][crate::model::RestoreObjectRequest::if_metageneration_match].
1459        pub fn set_if_metageneration_match<T>(mut self, v: T) -> Self
1460        where
1461            T: std::convert::Into<i64>,
1462        {
1463            self.0.request.if_metageneration_match = std::option::Option::Some(v.into());
1464            self
1465        }
1466
1467        /// Sets or clears the value of [if_metageneration_match][crate::model::RestoreObjectRequest::if_metageneration_match].
1468        pub fn set_or_clear_if_metageneration_match<T>(mut self, v: std::option::Option<T>) -> Self
1469        where
1470            T: std::convert::Into<i64>,
1471        {
1472            self.0.request.if_metageneration_match = v.map(|x| x.into());
1473            self
1474        }
1475
1476        /// Sets the value of [if_metageneration_not_match][crate::model::RestoreObjectRequest::if_metageneration_not_match].
1477        pub fn set_if_metageneration_not_match<T>(mut self, v: T) -> Self
1478        where
1479            T: std::convert::Into<i64>,
1480        {
1481            self.0.request.if_metageneration_not_match = std::option::Option::Some(v.into());
1482            self
1483        }
1484
1485        /// Sets or clears the value of [if_metageneration_not_match][crate::model::RestoreObjectRequest::if_metageneration_not_match].
1486        pub fn set_or_clear_if_metageneration_not_match<T>(
1487            mut self,
1488            v: std::option::Option<T>,
1489        ) -> Self
1490        where
1491            T: std::convert::Into<i64>,
1492        {
1493            self.0.request.if_metageneration_not_match = v.map(|x| x.into());
1494            self
1495        }
1496
1497        /// Sets the value of [copy_source_acl][crate::model::RestoreObjectRequest::copy_source_acl].
1498        pub fn set_copy_source_acl<T>(mut self, v: T) -> Self
1499        where
1500            T: std::convert::Into<bool>,
1501        {
1502            self.0.request.copy_source_acl = std::option::Option::Some(v.into());
1503            self
1504        }
1505
1506        /// Sets or clears the value of [copy_source_acl][crate::model::RestoreObjectRequest::copy_source_acl].
1507        pub fn set_or_clear_copy_source_acl<T>(mut self, v: std::option::Option<T>) -> Self
1508        where
1509            T: std::convert::Into<bool>,
1510        {
1511            self.0.request.copy_source_acl = v.map(|x| x.into());
1512            self
1513        }
1514
1515        /// Sets the value of [common_object_request_params][crate::model::RestoreObjectRequest::common_object_request_params].
1516        pub fn set_common_object_request_params<T>(mut self, v: T) -> Self
1517        where
1518            T: std::convert::Into<crate::model::CommonObjectRequestParams>,
1519        {
1520            self.0.request.common_object_request_params = std::option::Option::Some(v.into());
1521            self
1522        }
1523
1524        /// Sets or clears the value of [common_object_request_params][crate::model::RestoreObjectRequest::common_object_request_params].
1525        pub fn set_or_clear_common_object_request_params<T>(
1526            mut self,
1527            v: std::option::Option<T>,
1528        ) -> Self
1529        where
1530            T: std::convert::Into<crate::model::CommonObjectRequestParams>,
1531        {
1532            self.0.request.common_object_request_params = v.map(|x| x.into());
1533            self
1534        }
1535    }
1536
1537    #[doc(hidden)]
1538    impl gax::options::internal::RequestBuilder for RestoreObject {
1539        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1540            &mut self.0.options
1541        }
1542    }
1543
1544    /// The request builder for [StorageControl::get_object][crate::client::StorageControl::get_object] calls.
1545    ///
1546    /// # Example
1547    /// ```no_run
1548    /// # use google_cloud_storage::builder;
1549    /// use builder::storage_control::GetObject;
1550    /// # tokio_test::block_on(async {
1551    ///
1552    /// let builder = prepare_request_builder();
1553    /// let response = builder.send().await?;
1554    /// # gax::Result::<()>::Ok(()) });
1555    ///
1556    /// fn prepare_request_builder() -> GetObject {
1557    ///   # panic!();
1558    ///   // ... details omitted ...
1559    /// }
1560    /// ```
1561    #[derive(Clone, Debug)]
1562    pub struct GetObject(RequestBuilder<crate::model::GetObjectRequest>);
1563
1564    impl GetObject {
1565        pub(crate) fn new(
1566            stub: std::sync::Arc<dyn super::super::stub::dynamic::StorageControl>,
1567        ) -> Self {
1568            Self(RequestBuilder::new(stub))
1569        }
1570
1571        /// Sets the full request, replacing any prior values.
1572        pub fn with_request<V: Into<crate::model::GetObjectRequest>>(mut self, v: V) -> Self {
1573            self.0.request = v.into();
1574            self
1575        }
1576
1577        /// Sets all the options, replacing any prior values.
1578        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1579            self.0.options = v.into();
1580            self
1581        }
1582
1583        /// Sends the request.
1584        pub async fn send(self) -> Result<crate::model::Object> {
1585            (*self.0.stub)
1586                .get_object(self.0.request, self.0.options)
1587                .await
1588                .map(gax::response::Response::into_body)
1589        }
1590
1591        /// Sets the value of [bucket][crate::model::GetObjectRequest::bucket].
1592        ///
1593        /// This is a **required** field for requests.
1594        pub fn set_bucket<T: Into<std::string::String>>(mut self, v: T) -> Self {
1595            self.0.request.bucket = v.into();
1596            self
1597        }
1598
1599        /// Sets the value of [object][crate::model::GetObjectRequest::object].
1600        ///
1601        /// This is a **required** field for requests.
1602        pub fn set_object<T: Into<std::string::String>>(mut self, v: T) -> Self {
1603            self.0.request.object = v.into();
1604            self
1605        }
1606
1607        /// Sets the value of [generation][crate::model::GetObjectRequest::generation].
1608        pub fn set_generation<T: Into<i64>>(mut self, v: T) -> Self {
1609            self.0.request.generation = v.into();
1610            self
1611        }
1612
1613        /// Sets the value of [soft_deleted][crate::model::GetObjectRequest::soft_deleted].
1614        pub fn set_soft_deleted<T>(mut self, v: T) -> Self
1615        where
1616            T: std::convert::Into<bool>,
1617        {
1618            self.0.request.soft_deleted = std::option::Option::Some(v.into());
1619            self
1620        }
1621
1622        /// Sets or clears the value of [soft_deleted][crate::model::GetObjectRequest::soft_deleted].
1623        pub fn set_or_clear_soft_deleted<T>(mut self, v: std::option::Option<T>) -> Self
1624        where
1625            T: std::convert::Into<bool>,
1626        {
1627            self.0.request.soft_deleted = v.map(|x| x.into());
1628            self
1629        }
1630
1631        /// Sets the value of [if_generation_match][crate::model::GetObjectRequest::if_generation_match].
1632        pub fn set_if_generation_match<T>(mut self, v: T) -> Self
1633        where
1634            T: std::convert::Into<i64>,
1635        {
1636            self.0.request.if_generation_match = std::option::Option::Some(v.into());
1637            self
1638        }
1639
1640        /// Sets or clears the value of [if_generation_match][crate::model::GetObjectRequest::if_generation_match].
1641        pub fn set_or_clear_if_generation_match<T>(mut self, v: std::option::Option<T>) -> Self
1642        where
1643            T: std::convert::Into<i64>,
1644        {
1645            self.0.request.if_generation_match = v.map(|x| x.into());
1646            self
1647        }
1648
1649        /// Sets the value of [if_generation_not_match][crate::model::GetObjectRequest::if_generation_not_match].
1650        pub fn set_if_generation_not_match<T>(mut self, v: T) -> Self
1651        where
1652            T: std::convert::Into<i64>,
1653        {
1654            self.0.request.if_generation_not_match = std::option::Option::Some(v.into());
1655            self
1656        }
1657
1658        /// Sets or clears the value of [if_generation_not_match][crate::model::GetObjectRequest::if_generation_not_match].
1659        pub fn set_or_clear_if_generation_not_match<T>(mut self, v: std::option::Option<T>) -> Self
1660        where
1661            T: std::convert::Into<i64>,
1662        {
1663            self.0.request.if_generation_not_match = v.map(|x| x.into());
1664            self
1665        }
1666
1667        /// Sets the value of [if_metageneration_match][crate::model::GetObjectRequest::if_metageneration_match].
1668        pub fn set_if_metageneration_match<T>(mut self, v: T) -> Self
1669        where
1670            T: std::convert::Into<i64>,
1671        {
1672            self.0.request.if_metageneration_match = std::option::Option::Some(v.into());
1673            self
1674        }
1675
1676        /// Sets or clears the value of [if_metageneration_match][crate::model::GetObjectRequest::if_metageneration_match].
1677        pub fn set_or_clear_if_metageneration_match<T>(mut self, v: std::option::Option<T>) -> Self
1678        where
1679            T: std::convert::Into<i64>,
1680        {
1681            self.0.request.if_metageneration_match = v.map(|x| x.into());
1682            self
1683        }
1684
1685        /// Sets the value of [if_metageneration_not_match][crate::model::GetObjectRequest::if_metageneration_not_match].
1686        pub fn set_if_metageneration_not_match<T>(mut self, v: T) -> Self
1687        where
1688            T: std::convert::Into<i64>,
1689        {
1690            self.0.request.if_metageneration_not_match = std::option::Option::Some(v.into());
1691            self
1692        }
1693
1694        /// Sets or clears the value of [if_metageneration_not_match][crate::model::GetObjectRequest::if_metageneration_not_match].
1695        pub fn set_or_clear_if_metageneration_not_match<T>(
1696            mut self,
1697            v: std::option::Option<T>,
1698        ) -> Self
1699        where
1700            T: std::convert::Into<i64>,
1701        {
1702            self.0.request.if_metageneration_not_match = v.map(|x| x.into());
1703            self
1704        }
1705
1706        /// Sets the value of [common_object_request_params][crate::model::GetObjectRequest::common_object_request_params].
1707        pub fn set_common_object_request_params<T>(mut self, v: T) -> Self
1708        where
1709            T: std::convert::Into<crate::model::CommonObjectRequestParams>,
1710        {
1711            self.0.request.common_object_request_params = std::option::Option::Some(v.into());
1712            self
1713        }
1714
1715        /// Sets or clears the value of [common_object_request_params][crate::model::GetObjectRequest::common_object_request_params].
1716        pub fn set_or_clear_common_object_request_params<T>(
1717            mut self,
1718            v: std::option::Option<T>,
1719        ) -> Self
1720        where
1721            T: std::convert::Into<crate::model::CommonObjectRequestParams>,
1722        {
1723            self.0.request.common_object_request_params = v.map(|x| x.into());
1724            self
1725        }
1726
1727        /// Sets the value of [read_mask][crate::model::GetObjectRequest::read_mask].
1728        pub fn set_read_mask<T>(mut self, v: T) -> Self
1729        where
1730            T: std::convert::Into<wkt::FieldMask>,
1731        {
1732            self.0.request.read_mask = std::option::Option::Some(v.into());
1733            self
1734        }
1735
1736        /// Sets or clears the value of [read_mask][crate::model::GetObjectRequest::read_mask].
1737        pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
1738        where
1739            T: std::convert::Into<wkt::FieldMask>,
1740        {
1741            self.0.request.read_mask = v.map(|x| x.into());
1742            self
1743        }
1744
1745        /// Sets the value of [restore_token][crate::model::GetObjectRequest::restore_token].
1746        pub fn set_restore_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1747            self.0.request.restore_token = v.into();
1748            self
1749        }
1750    }
1751
1752    #[doc(hidden)]
1753    impl gax::options::internal::RequestBuilder for GetObject {
1754        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1755            &mut self.0.options
1756        }
1757    }
1758
1759    /// The request builder for [StorageControl::update_object][crate::client::StorageControl::update_object] calls.
1760    ///
1761    /// # Example
1762    /// ```no_run
1763    /// # use google_cloud_storage::builder;
1764    /// use builder::storage_control::UpdateObject;
1765    /// # tokio_test::block_on(async {
1766    ///
1767    /// let builder = prepare_request_builder();
1768    /// let response = builder.send().await?;
1769    /// # gax::Result::<()>::Ok(()) });
1770    ///
1771    /// fn prepare_request_builder() -> UpdateObject {
1772    ///   # panic!();
1773    ///   // ... details omitted ...
1774    /// }
1775    /// ```
1776    #[derive(Clone, Debug)]
1777    pub struct UpdateObject(RequestBuilder<crate::model::UpdateObjectRequest>);
1778
1779    impl UpdateObject {
1780        pub(crate) fn new(
1781            stub: std::sync::Arc<dyn super::super::stub::dynamic::StorageControl>,
1782        ) -> Self {
1783            Self(RequestBuilder::new(stub))
1784        }
1785
1786        /// Sets the full request, replacing any prior values.
1787        pub fn with_request<V: Into<crate::model::UpdateObjectRequest>>(mut self, v: V) -> Self {
1788            self.0.request = v.into();
1789            self
1790        }
1791
1792        /// Sets all the options, replacing any prior values.
1793        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1794            self.0.options = v.into();
1795            self
1796        }
1797
1798        /// Sends the request.
1799        pub async fn send(self) -> Result<crate::model::Object> {
1800            (*self.0.stub)
1801                .update_object(self.0.request, self.0.options)
1802                .await
1803                .map(gax::response::Response::into_body)
1804        }
1805
1806        /// Sets the value of [object][crate::model::UpdateObjectRequest::object].
1807        ///
1808        /// This is a **required** field for requests.
1809        pub fn set_object<T>(mut self, v: T) -> Self
1810        where
1811            T: std::convert::Into<crate::model::Object>,
1812        {
1813            self.0.request.object = std::option::Option::Some(v.into());
1814            self
1815        }
1816
1817        /// Sets or clears the value of [object][crate::model::UpdateObjectRequest::object].
1818        ///
1819        /// This is a **required** field for requests.
1820        pub fn set_or_clear_object<T>(mut self, v: std::option::Option<T>) -> Self
1821        where
1822            T: std::convert::Into<crate::model::Object>,
1823        {
1824            self.0.request.object = v.map(|x| x.into());
1825            self
1826        }
1827
1828        /// Sets the value of [if_generation_match][crate::model::UpdateObjectRequest::if_generation_match].
1829        pub fn set_if_generation_match<T>(mut self, v: T) -> Self
1830        where
1831            T: std::convert::Into<i64>,
1832        {
1833            self.0.request.if_generation_match = std::option::Option::Some(v.into());
1834            self
1835        }
1836
1837        /// Sets or clears the value of [if_generation_match][crate::model::UpdateObjectRequest::if_generation_match].
1838        pub fn set_or_clear_if_generation_match<T>(mut self, v: std::option::Option<T>) -> Self
1839        where
1840            T: std::convert::Into<i64>,
1841        {
1842            self.0.request.if_generation_match = v.map(|x| x.into());
1843            self
1844        }
1845
1846        /// Sets the value of [if_generation_not_match][crate::model::UpdateObjectRequest::if_generation_not_match].
1847        pub fn set_if_generation_not_match<T>(mut self, v: T) -> Self
1848        where
1849            T: std::convert::Into<i64>,
1850        {
1851            self.0.request.if_generation_not_match = std::option::Option::Some(v.into());
1852            self
1853        }
1854
1855        /// Sets or clears the value of [if_generation_not_match][crate::model::UpdateObjectRequest::if_generation_not_match].
1856        pub fn set_or_clear_if_generation_not_match<T>(mut self, v: std::option::Option<T>) -> Self
1857        where
1858            T: std::convert::Into<i64>,
1859        {
1860            self.0.request.if_generation_not_match = v.map(|x| x.into());
1861            self
1862        }
1863
1864        /// Sets the value of [if_metageneration_match][crate::model::UpdateObjectRequest::if_metageneration_match].
1865        pub fn set_if_metageneration_match<T>(mut self, v: T) -> Self
1866        where
1867            T: std::convert::Into<i64>,
1868        {
1869            self.0.request.if_metageneration_match = std::option::Option::Some(v.into());
1870            self
1871        }
1872
1873        /// Sets or clears the value of [if_metageneration_match][crate::model::UpdateObjectRequest::if_metageneration_match].
1874        pub fn set_or_clear_if_metageneration_match<T>(mut self, v: std::option::Option<T>) -> Self
1875        where
1876            T: std::convert::Into<i64>,
1877        {
1878            self.0.request.if_metageneration_match = v.map(|x| x.into());
1879            self
1880        }
1881
1882        /// Sets the value of [if_metageneration_not_match][crate::model::UpdateObjectRequest::if_metageneration_not_match].
1883        pub fn set_if_metageneration_not_match<T>(mut self, v: T) -> Self
1884        where
1885            T: std::convert::Into<i64>,
1886        {
1887            self.0.request.if_metageneration_not_match = std::option::Option::Some(v.into());
1888            self
1889        }
1890
1891        /// Sets or clears the value of [if_metageneration_not_match][crate::model::UpdateObjectRequest::if_metageneration_not_match].
1892        pub fn set_or_clear_if_metageneration_not_match<T>(
1893            mut self,
1894            v: std::option::Option<T>,
1895        ) -> Self
1896        where
1897            T: std::convert::Into<i64>,
1898        {
1899            self.0.request.if_metageneration_not_match = v.map(|x| x.into());
1900            self
1901        }
1902
1903        /// Sets the value of [predefined_acl][crate::model::UpdateObjectRequest::predefined_acl].
1904        pub fn set_predefined_acl<T: Into<std::string::String>>(mut self, v: T) -> Self {
1905            self.0.request.predefined_acl = v.into();
1906            self
1907        }
1908
1909        /// Sets the value of [update_mask][crate::model::UpdateObjectRequest::update_mask].
1910        ///
1911        /// This is a **required** field for requests.
1912        pub fn set_update_mask<T>(mut self, v: T) -> Self
1913        where
1914            T: std::convert::Into<wkt::FieldMask>,
1915        {
1916            self.0.request.update_mask = std::option::Option::Some(v.into());
1917            self
1918        }
1919
1920        /// Sets or clears the value of [update_mask][crate::model::UpdateObjectRequest::update_mask].
1921        ///
1922        /// This is a **required** field for requests.
1923        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1924        where
1925            T: std::convert::Into<wkt::FieldMask>,
1926        {
1927            self.0.request.update_mask = v.map(|x| x.into());
1928            self
1929        }
1930
1931        /// Sets the value of [common_object_request_params][crate::model::UpdateObjectRequest::common_object_request_params].
1932        pub fn set_common_object_request_params<T>(mut self, v: T) -> Self
1933        where
1934            T: std::convert::Into<crate::model::CommonObjectRequestParams>,
1935        {
1936            self.0.request.common_object_request_params = std::option::Option::Some(v.into());
1937            self
1938        }
1939
1940        /// Sets or clears the value of [common_object_request_params][crate::model::UpdateObjectRequest::common_object_request_params].
1941        pub fn set_or_clear_common_object_request_params<T>(
1942            mut self,
1943            v: std::option::Option<T>,
1944        ) -> Self
1945        where
1946            T: std::convert::Into<crate::model::CommonObjectRequestParams>,
1947        {
1948            self.0.request.common_object_request_params = v.map(|x| x.into());
1949            self
1950        }
1951
1952        /// Sets the value of [override_unlocked_retention][crate::model::UpdateObjectRequest::override_unlocked_retention].
1953        pub fn set_override_unlocked_retention<T: Into<bool>>(mut self, v: T) -> Self {
1954            self.0.request.override_unlocked_retention = v.into();
1955            self
1956        }
1957    }
1958
1959    #[doc(hidden)]
1960    impl gax::options::internal::RequestBuilder for UpdateObject {
1961        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1962            &mut self.0.options
1963        }
1964    }
1965
1966    /// The request builder for [StorageControl::list_objects][crate::client::StorageControl::list_objects] calls.
1967    ///
1968    /// # Example
1969    /// ```no_run
1970    /// # use google_cloud_storage::builder;
1971    /// use builder::storage_control::ListObjects;
1972    /// # tokio_test::block_on(async {
1973    /// use gax::paginator::ItemPaginator;
1974    ///
1975    /// let builder = prepare_request_builder();
1976    /// let mut items = builder.by_item();
1977    /// while let Some(result) = items.next().await {
1978    ///   let item = result?;
1979    /// }
1980    /// # gax::Result::<()>::Ok(()) });
1981    ///
1982    /// fn prepare_request_builder() -> ListObjects {
1983    ///   # panic!();
1984    ///   // ... details omitted ...
1985    /// }
1986    /// ```
1987    #[derive(Clone, Debug)]
1988    pub struct ListObjects(RequestBuilder<crate::model::ListObjectsRequest>);
1989
1990    impl ListObjects {
1991        pub(crate) fn new(
1992            stub: std::sync::Arc<dyn super::super::stub::dynamic::StorageControl>,
1993        ) -> Self {
1994            Self(RequestBuilder::new(stub))
1995        }
1996
1997        /// Sets the full request, replacing any prior values.
1998        pub fn with_request<V: Into<crate::model::ListObjectsRequest>>(mut self, v: V) -> Self {
1999            self.0.request = v.into();
2000            self
2001        }
2002
2003        /// Sets all the options, replacing any prior values.
2004        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2005            self.0.options = v.into();
2006            self
2007        }
2008
2009        /// Sends the request.
2010        pub async fn send(self) -> Result<crate::model::ListObjectsResponse> {
2011            (*self.0.stub)
2012                .list_objects(self.0.request, self.0.options)
2013                .await
2014                .map(gax::response::Response::into_body)
2015        }
2016
2017        /// Streams each page in the collection.
2018        pub fn by_page(
2019            self,
2020        ) -> impl gax::paginator::Paginator<crate::model::ListObjectsResponse, gax::error::Error>
2021        {
2022            use std::clone::Clone;
2023            let token = self.0.request.page_token.clone();
2024            let execute = move |token: String| {
2025                let mut builder = self.clone();
2026                builder.0.request = builder.0.request.set_page_token(token);
2027                builder.send()
2028            };
2029            gax::paginator::internal::new_paginator(token, execute)
2030        }
2031
2032        /// Streams each item in the collection.
2033        pub fn by_item(
2034            self,
2035        ) -> impl gax::paginator::ItemPaginator<crate::model::ListObjectsResponse, gax::error::Error>
2036        {
2037            use gax::paginator::Paginator;
2038            self.by_page().items()
2039        }
2040
2041        /// Sets the value of [parent][crate::model::ListObjectsRequest::parent].
2042        ///
2043        /// This is a **required** field for requests.
2044        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2045            self.0.request.parent = v.into();
2046            self
2047        }
2048
2049        /// Sets the value of [page_size][crate::model::ListObjectsRequest::page_size].
2050        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2051            self.0.request.page_size = v.into();
2052            self
2053        }
2054
2055        /// Sets the value of [page_token][crate::model::ListObjectsRequest::page_token].
2056        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2057            self.0.request.page_token = v.into();
2058            self
2059        }
2060
2061        /// Sets the value of [delimiter][crate::model::ListObjectsRequest::delimiter].
2062        pub fn set_delimiter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2063            self.0.request.delimiter = v.into();
2064            self
2065        }
2066
2067        /// Sets the value of [include_trailing_delimiter][crate::model::ListObjectsRequest::include_trailing_delimiter].
2068        pub fn set_include_trailing_delimiter<T: Into<bool>>(mut self, v: T) -> Self {
2069            self.0.request.include_trailing_delimiter = v.into();
2070            self
2071        }
2072
2073        /// Sets the value of [prefix][crate::model::ListObjectsRequest::prefix].
2074        pub fn set_prefix<T: Into<std::string::String>>(mut self, v: T) -> Self {
2075            self.0.request.prefix = v.into();
2076            self
2077        }
2078
2079        /// Sets the value of [versions][crate::model::ListObjectsRequest::versions].
2080        pub fn set_versions<T: Into<bool>>(mut self, v: T) -> Self {
2081            self.0.request.versions = v.into();
2082            self
2083        }
2084
2085        /// Sets the value of [read_mask][crate::model::ListObjectsRequest::read_mask].
2086        pub fn set_read_mask<T>(mut self, v: T) -> Self
2087        where
2088            T: std::convert::Into<wkt::FieldMask>,
2089        {
2090            self.0.request.read_mask = std::option::Option::Some(v.into());
2091            self
2092        }
2093
2094        /// Sets or clears the value of [read_mask][crate::model::ListObjectsRequest::read_mask].
2095        pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
2096        where
2097            T: std::convert::Into<wkt::FieldMask>,
2098        {
2099            self.0.request.read_mask = v.map(|x| x.into());
2100            self
2101        }
2102
2103        /// Sets the value of [lexicographic_start][crate::model::ListObjectsRequest::lexicographic_start].
2104        pub fn set_lexicographic_start<T: Into<std::string::String>>(mut self, v: T) -> Self {
2105            self.0.request.lexicographic_start = v.into();
2106            self
2107        }
2108
2109        /// Sets the value of [lexicographic_end][crate::model::ListObjectsRequest::lexicographic_end].
2110        pub fn set_lexicographic_end<T: Into<std::string::String>>(mut self, v: T) -> Self {
2111            self.0.request.lexicographic_end = v.into();
2112            self
2113        }
2114
2115        /// Sets the value of [soft_deleted][crate::model::ListObjectsRequest::soft_deleted].
2116        pub fn set_soft_deleted<T: Into<bool>>(mut self, v: T) -> Self {
2117            self.0.request.soft_deleted = v.into();
2118            self
2119        }
2120
2121        /// Sets the value of [include_folders_as_prefixes][crate::model::ListObjectsRequest::include_folders_as_prefixes].
2122        pub fn set_include_folders_as_prefixes<T: Into<bool>>(mut self, v: T) -> Self {
2123            self.0.request.include_folders_as_prefixes = v.into();
2124            self
2125        }
2126
2127        /// Sets the value of [match_glob][crate::model::ListObjectsRequest::match_glob].
2128        pub fn set_match_glob<T: Into<std::string::String>>(mut self, v: T) -> Self {
2129            self.0.request.match_glob = v.into();
2130            self
2131        }
2132
2133        /// Sets the value of [filter][crate::model::ListObjectsRequest::filter].
2134        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2135            self.0.request.filter = v.into();
2136            self
2137        }
2138    }
2139
2140    #[doc(hidden)]
2141    impl gax::options::internal::RequestBuilder for ListObjects {
2142        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2143            &mut self.0.options
2144        }
2145    }
2146
2147    /// The request builder for [StorageControl::rewrite_object][crate::client::StorageControl::rewrite_object] calls.
2148    ///
2149    /// # Example
2150    /// ```no_run
2151    /// # use google_cloud_storage::builder;
2152    /// use builder::storage_control::RewriteObject;
2153    /// # tokio_test::block_on(async {
2154    ///
2155    /// let builder = prepare_request_builder();
2156    /// let response = builder.send().await?;
2157    /// # gax::Result::<()>::Ok(()) });
2158    ///
2159    /// fn prepare_request_builder() -> RewriteObject {
2160    ///   # panic!();
2161    ///   // ... details omitted ...
2162    /// }
2163    /// ```
2164    #[derive(Clone, Debug)]
2165    pub struct RewriteObject(RequestBuilder<crate::model::RewriteObjectRequest>);
2166
2167    impl RewriteObject {
2168        pub(crate) fn new(
2169            stub: std::sync::Arc<dyn super::super::stub::dynamic::StorageControl>,
2170        ) -> Self {
2171            Self(RequestBuilder::new(stub))
2172        }
2173
2174        /// Sets the full request, replacing any prior values.
2175        pub fn with_request<V: Into<crate::model::RewriteObjectRequest>>(mut self, v: V) -> Self {
2176            self.0.request = v.into();
2177            self
2178        }
2179
2180        /// Sets all the options, replacing any prior values.
2181        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2182            self.0.options = v.into();
2183            self
2184        }
2185
2186        /// Sends the request.
2187        pub async fn send(self) -> Result<crate::model::RewriteResponse> {
2188            (*self.0.stub)
2189                .rewrite_object(self.0.request, self.0.options)
2190                .await
2191                .map(gax::response::Response::into_body)
2192        }
2193
2194        /// Sets the value of [destination_name][crate::model::RewriteObjectRequest::destination_name].
2195        ///
2196        /// This is a **required** field for requests.
2197        pub fn set_destination_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2198            self.0.request.destination_name = v.into();
2199            self
2200        }
2201
2202        /// Sets the value of [destination_bucket][crate::model::RewriteObjectRequest::destination_bucket].
2203        ///
2204        /// This is a **required** field for requests.
2205        pub fn set_destination_bucket<T: Into<std::string::String>>(mut self, v: T) -> Self {
2206            self.0.request.destination_bucket = v.into();
2207            self
2208        }
2209
2210        /// Sets the value of [destination_kms_key][crate::model::RewriteObjectRequest::destination_kms_key].
2211        pub fn set_destination_kms_key<T: Into<std::string::String>>(mut self, v: T) -> Self {
2212            self.0.request.destination_kms_key = v.into();
2213            self
2214        }
2215
2216        /// Sets the value of [destination][crate::model::RewriteObjectRequest::destination].
2217        pub fn set_destination<T>(mut self, v: T) -> Self
2218        where
2219            T: std::convert::Into<crate::model::Object>,
2220        {
2221            self.0.request.destination = std::option::Option::Some(v.into());
2222            self
2223        }
2224
2225        /// Sets or clears the value of [destination][crate::model::RewriteObjectRequest::destination].
2226        pub fn set_or_clear_destination<T>(mut self, v: std::option::Option<T>) -> Self
2227        where
2228            T: std::convert::Into<crate::model::Object>,
2229        {
2230            self.0.request.destination = v.map(|x| x.into());
2231            self
2232        }
2233
2234        /// Sets the value of [source_bucket][crate::model::RewriteObjectRequest::source_bucket].
2235        ///
2236        /// This is a **required** field for requests.
2237        pub fn set_source_bucket<T: Into<std::string::String>>(mut self, v: T) -> Self {
2238            self.0.request.source_bucket = v.into();
2239            self
2240        }
2241
2242        /// Sets the value of [source_object][crate::model::RewriteObjectRequest::source_object].
2243        ///
2244        /// This is a **required** field for requests.
2245        pub fn set_source_object<T: Into<std::string::String>>(mut self, v: T) -> Self {
2246            self.0.request.source_object = v.into();
2247            self
2248        }
2249
2250        /// Sets the value of [source_generation][crate::model::RewriteObjectRequest::source_generation].
2251        pub fn set_source_generation<T: Into<i64>>(mut self, v: T) -> Self {
2252            self.0.request.source_generation = v.into();
2253            self
2254        }
2255
2256        /// Sets the value of [rewrite_token][crate::model::RewriteObjectRequest::rewrite_token].
2257        pub fn set_rewrite_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2258            self.0.request.rewrite_token = v.into();
2259            self
2260        }
2261
2262        /// Sets the value of [destination_predefined_acl][crate::model::RewriteObjectRequest::destination_predefined_acl].
2263        pub fn set_destination_predefined_acl<T: Into<std::string::String>>(
2264            mut self,
2265            v: T,
2266        ) -> Self {
2267            self.0.request.destination_predefined_acl = v.into();
2268            self
2269        }
2270
2271        /// Sets the value of [if_generation_match][crate::model::RewriteObjectRequest::if_generation_match].
2272        pub fn set_if_generation_match<T>(mut self, v: T) -> Self
2273        where
2274            T: std::convert::Into<i64>,
2275        {
2276            self.0.request.if_generation_match = std::option::Option::Some(v.into());
2277            self
2278        }
2279
2280        /// Sets or clears the value of [if_generation_match][crate::model::RewriteObjectRequest::if_generation_match].
2281        pub fn set_or_clear_if_generation_match<T>(mut self, v: std::option::Option<T>) -> Self
2282        where
2283            T: std::convert::Into<i64>,
2284        {
2285            self.0.request.if_generation_match = v.map(|x| x.into());
2286            self
2287        }
2288
2289        /// Sets the value of [if_generation_not_match][crate::model::RewriteObjectRequest::if_generation_not_match].
2290        pub fn set_if_generation_not_match<T>(mut self, v: T) -> Self
2291        where
2292            T: std::convert::Into<i64>,
2293        {
2294            self.0.request.if_generation_not_match = std::option::Option::Some(v.into());
2295            self
2296        }
2297
2298        /// Sets or clears the value of [if_generation_not_match][crate::model::RewriteObjectRequest::if_generation_not_match].
2299        pub fn set_or_clear_if_generation_not_match<T>(mut self, v: std::option::Option<T>) -> Self
2300        where
2301            T: std::convert::Into<i64>,
2302        {
2303            self.0.request.if_generation_not_match = v.map(|x| x.into());
2304            self
2305        }
2306
2307        /// Sets the value of [if_metageneration_match][crate::model::RewriteObjectRequest::if_metageneration_match].
2308        pub fn set_if_metageneration_match<T>(mut self, v: T) -> Self
2309        where
2310            T: std::convert::Into<i64>,
2311        {
2312            self.0.request.if_metageneration_match = std::option::Option::Some(v.into());
2313            self
2314        }
2315
2316        /// Sets or clears the value of [if_metageneration_match][crate::model::RewriteObjectRequest::if_metageneration_match].
2317        pub fn set_or_clear_if_metageneration_match<T>(mut self, v: std::option::Option<T>) -> Self
2318        where
2319            T: std::convert::Into<i64>,
2320        {
2321            self.0.request.if_metageneration_match = v.map(|x| x.into());
2322            self
2323        }
2324
2325        /// Sets the value of [if_metageneration_not_match][crate::model::RewriteObjectRequest::if_metageneration_not_match].
2326        pub fn set_if_metageneration_not_match<T>(mut self, v: T) -> Self
2327        where
2328            T: std::convert::Into<i64>,
2329        {
2330            self.0.request.if_metageneration_not_match = std::option::Option::Some(v.into());
2331            self
2332        }
2333
2334        /// Sets or clears the value of [if_metageneration_not_match][crate::model::RewriteObjectRequest::if_metageneration_not_match].
2335        pub fn set_or_clear_if_metageneration_not_match<T>(
2336            mut self,
2337            v: std::option::Option<T>,
2338        ) -> Self
2339        where
2340            T: std::convert::Into<i64>,
2341        {
2342            self.0.request.if_metageneration_not_match = v.map(|x| x.into());
2343            self
2344        }
2345
2346        /// Sets the value of [if_source_generation_match][crate::model::RewriteObjectRequest::if_source_generation_match].
2347        pub fn set_if_source_generation_match<T>(mut self, v: T) -> Self
2348        where
2349            T: std::convert::Into<i64>,
2350        {
2351            self.0.request.if_source_generation_match = std::option::Option::Some(v.into());
2352            self
2353        }
2354
2355        /// Sets or clears the value of [if_source_generation_match][crate::model::RewriteObjectRequest::if_source_generation_match].
2356        pub fn set_or_clear_if_source_generation_match<T>(
2357            mut self,
2358            v: std::option::Option<T>,
2359        ) -> Self
2360        where
2361            T: std::convert::Into<i64>,
2362        {
2363            self.0.request.if_source_generation_match = v.map(|x| x.into());
2364            self
2365        }
2366
2367        /// Sets the value of [if_source_generation_not_match][crate::model::RewriteObjectRequest::if_source_generation_not_match].
2368        pub fn set_if_source_generation_not_match<T>(mut self, v: T) -> Self
2369        where
2370            T: std::convert::Into<i64>,
2371        {
2372            self.0.request.if_source_generation_not_match = std::option::Option::Some(v.into());
2373            self
2374        }
2375
2376        /// Sets or clears the value of [if_source_generation_not_match][crate::model::RewriteObjectRequest::if_source_generation_not_match].
2377        pub fn set_or_clear_if_source_generation_not_match<T>(
2378            mut self,
2379            v: std::option::Option<T>,
2380        ) -> Self
2381        where
2382            T: std::convert::Into<i64>,
2383        {
2384            self.0.request.if_source_generation_not_match = v.map(|x| x.into());
2385            self
2386        }
2387
2388        /// Sets the value of [if_source_metageneration_match][crate::model::RewriteObjectRequest::if_source_metageneration_match].
2389        pub fn set_if_source_metageneration_match<T>(mut self, v: T) -> Self
2390        where
2391            T: std::convert::Into<i64>,
2392        {
2393            self.0.request.if_source_metageneration_match = std::option::Option::Some(v.into());
2394            self
2395        }
2396
2397        /// Sets or clears the value of [if_source_metageneration_match][crate::model::RewriteObjectRequest::if_source_metageneration_match].
2398        pub fn set_or_clear_if_source_metageneration_match<T>(
2399            mut self,
2400            v: std::option::Option<T>,
2401        ) -> Self
2402        where
2403            T: std::convert::Into<i64>,
2404        {
2405            self.0.request.if_source_metageneration_match = v.map(|x| x.into());
2406            self
2407        }
2408
2409        /// Sets the value of [if_source_metageneration_not_match][crate::model::RewriteObjectRequest::if_source_metageneration_not_match].
2410        pub fn set_if_source_metageneration_not_match<T>(mut self, v: T) -> Self
2411        where
2412            T: std::convert::Into<i64>,
2413        {
2414            self.0.request.if_source_metageneration_not_match = std::option::Option::Some(v.into());
2415            self
2416        }
2417
2418        /// Sets or clears the value of [if_source_metageneration_not_match][crate::model::RewriteObjectRequest::if_source_metageneration_not_match].
2419        pub fn set_or_clear_if_source_metageneration_not_match<T>(
2420            mut self,
2421            v: std::option::Option<T>,
2422        ) -> Self
2423        where
2424            T: std::convert::Into<i64>,
2425        {
2426            self.0.request.if_source_metageneration_not_match = v.map(|x| x.into());
2427            self
2428        }
2429
2430        /// Sets the value of [max_bytes_rewritten_per_call][crate::model::RewriteObjectRequest::max_bytes_rewritten_per_call].
2431        pub fn set_max_bytes_rewritten_per_call<T: Into<i64>>(mut self, v: T) -> Self {
2432            self.0.request.max_bytes_rewritten_per_call = v.into();
2433            self
2434        }
2435
2436        /// Sets the value of [copy_source_encryption_algorithm][crate::model::RewriteObjectRequest::copy_source_encryption_algorithm].
2437        pub fn set_copy_source_encryption_algorithm<T: Into<std::string::String>>(
2438            mut self,
2439            v: T,
2440        ) -> Self {
2441            self.0.request.copy_source_encryption_algorithm = v.into();
2442            self
2443        }
2444
2445        /// Sets the value of [copy_source_encryption_key_bytes][crate::model::RewriteObjectRequest::copy_source_encryption_key_bytes].
2446        pub fn set_copy_source_encryption_key_bytes<T: Into<::bytes::Bytes>>(
2447            mut self,
2448            v: T,
2449        ) -> Self {
2450            self.0.request.copy_source_encryption_key_bytes = v.into();
2451            self
2452        }
2453
2454        /// Sets the value of [copy_source_encryption_key_sha256_bytes][crate::model::RewriteObjectRequest::copy_source_encryption_key_sha256_bytes].
2455        pub fn set_copy_source_encryption_key_sha256_bytes<T: Into<::bytes::Bytes>>(
2456            mut self,
2457            v: T,
2458        ) -> Self {
2459            self.0.request.copy_source_encryption_key_sha256_bytes = v.into();
2460            self
2461        }
2462
2463        /// Sets the value of [common_object_request_params][crate::model::RewriteObjectRequest::common_object_request_params].
2464        pub fn set_common_object_request_params<T>(mut self, v: T) -> Self
2465        where
2466            T: std::convert::Into<crate::model::CommonObjectRequestParams>,
2467        {
2468            self.0.request.common_object_request_params = std::option::Option::Some(v.into());
2469            self
2470        }
2471
2472        /// Sets or clears the value of [common_object_request_params][crate::model::RewriteObjectRequest::common_object_request_params].
2473        pub fn set_or_clear_common_object_request_params<T>(
2474            mut self,
2475            v: std::option::Option<T>,
2476        ) -> Self
2477        where
2478            T: std::convert::Into<crate::model::CommonObjectRequestParams>,
2479        {
2480            self.0.request.common_object_request_params = v.map(|x| x.into());
2481            self
2482        }
2483
2484        /// Sets the value of [object_checksums][crate::model::RewriteObjectRequest::object_checksums].
2485        pub fn set_object_checksums<T>(mut self, v: T) -> Self
2486        where
2487            T: std::convert::Into<crate::model::ObjectChecksums>,
2488        {
2489            self.0.request.object_checksums = std::option::Option::Some(v.into());
2490            self
2491        }
2492
2493        /// Sets or clears the value of [object_checksums][crate::model::RewriteObjectRequest::object_checksums].
2494        pub fn set_or_clear_object_checksums<T>(mut self, v: std::option::Option<T>) -> Self
2495        where
2496            T: std::convert::Into<crate::model::ObjectChecksums>,
2497        {
2498            self.0.request.object_checksums = v.map(|x| x.into());
2499            self
2500        }
2501    }
2502
2503    #[doc(hidden)]
2504    impl gax::options::internal::RequestBuilder for RewriteObject {
2505        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2506            &mut self.0.options
2507        }
2508    }
2509
2510    /// The request builder for [StorageControl::move_object][crate::client::StorageControl::move_object] calls.
2511    ///
2512    /// # Example
2513    /// ```no_run
2514    /// # use google_cloud_storage::builder;
2515    /// use builder::storage_control::MoveObject;
2516    /// # tokio_test::block_on(async {
2517    ///
2518    /// let builder = prepare_request_builder();
2519    /// let response = builder.send().await?;
2520    /// # gax::Result::<()>::Ok(()) });
2521    ///
2522    /// fn prepare_request_builder() -> MoveObject {
2523    ///   # panic!();
2524    ///   // ... details omitted ...
2525    /// }
2526    /// ```
2527    #[derive(Clone, Debug)]
2528    pub struct MoveObject(RequestBuilder<crate::model::MoveObjectRequest>);
2529
2530    impl MoveObject {
2531        pub(crate) fn new(
2532            stub: std::sync::Arc<dyn super::super::stub::dynamic::StorageControl>,
2533        ) -> Self {
2534            Self(RequestBuilder::new(stub))
2535        }
2536
2537        /// Sets the full request, replacing any prior values.
2538        pub fn with_request<V: Into<crate::model::MoveObjectRequest>>(mut self, v: V) -> Self {
2539            self.0.request = v.into();
2540            self
2541        }
2542
2543        /// Sets all the options, replacing any prior values.
2544        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2545            self.0.options = v.into();
2546            self
2547        }
2548
2549        /// Sends the request.
2550        pub async fn send(self) -> Result<crate::model::Object> {
2551            (*self.0.stub)
2552                .move_object(self.0.request, self.0.options)
2553                .await
2554                .map(gax::response::Response::into_body)
2555        }
2556
2557        /// Sets the value of [bucket][crate::model::MoveObjectRequest::bucket].
2558        ///
2559        /// This is a **required** field for requests.
2560        pub fn set_bucket<T: Into<std::string::String>>(mut self, v: T) -> Self {
2561            self.0.request.bucket = v.into();
2562            self
2563        }
2564
2565        /// Sets the value of [source_object][crate::model::MoveObjectRequest::source_object].
2566        ///
2567        /// This is a **required** field for requests.
2568        pub fn set_source_object<T: Into<std::string::String>>(mut self, v: T) -> Self {
2569            self.0.request.source_object = v.into();
2570            self
2571        }
2572
2573        /// Sets the value of [destination_object][crate::model::MoveObjectRequest::destination_object].
2574        ///
2575        /// This is a **required** field for requests.
2576        pub fn set_destination_object<T: Into<std::string::String>>(mut self, v: T) -> Self {
2577            self.0.request.destination_object = v.into();
2578            self
2579        }
2580
2581        /// Sets the value of [if_source_generation_match][crate::model::MoveObjectRequest::if_source_generation_match].
2582        pub fn set_if_source_generation_match<T>(mut self, v: T) -> Self
2583        where
2584            T: std::convert::Into<i64>,
2585        {
2586            self.0.request.if_source_generation_match = std::option::Option::Some(v.into());
2587            self
2588        }
2589
2590        /// Sets or clears the value of [if_source_generation_match][crate::model::MoveObjectRequest::if_source_generation_match].
2591        pub fn set_or_clear_if_source_generation_match<T>(
2592            mut self,
2593            v: std::option::Option<T>,
2594        ) -> Self
2595        where
2596            T: std::convert::Into<i64>,
2597        {
2598            self.0.request.if_source_generation_match = v.map(|x| x.into());
2599            self
2600        }
2601
2602        /// Sets the value of [if_source_generation_not_match][crate::model::MoveObjectRequest::if_source_generation_not_match].
2603        pub fn set_if_source_generation_not_match<T>(mut self, v: T) -> Self
2604        where
2605            T: std::convert::Into<i64>,
2606        {
2607            self.0.request.if_source_generation_not_match = std::option::Option::Some(v.into());
2608            self
2609        }
2610
2611        /// Sets or clears the value of [if_source_generation_not_match][crate::model::MoveObjectRequest::if_source_generation_not_match].
2612        pub fn set_or_clear_if_source_generation_not_match<T>(
2613            mut self,
2614            v: std::option::Option<T>,
2615        ) -> Self
2616        where
2617            T: std::convert::Into<i64>,
2618        {
2619            self.0.request.if_source_generation_not_match = v.map(|x| x.into());
2620            self
2621        }
2622
2623        /// Sets the value of [if_source_metageneration_match][crate::model::MoveObjectRequest::if_source_metageneration_match].
2624        pub fn set_if_source_metageneration_match<T>(mut self, v: T) -> Self
2625        where
2626            T: std::convert::Into<i64>,
2627        {
2628            self.0.request.if_source_metageneration_match = std::option::Option::Some(v.into());
2629            self
2630        }
2631
2632        /// Sets or clears the value of [if_source_metageneration_match][crate::model::MoveObjectRequest::if_source_metageneration_match].
2633        pub fn set_or_clear_if_source_metageneration_match<T>(
2634            mut self,
2635            v: std::option::Option<T>,
2636        ) -> Self
2637        where
2638            T: std::convert::Into<i64>,
2639        {
2640            self.0.request.if_source_metageneration_match = v.map(|x| x.into());
2641            self
2642        }
2643
2644        /// Sets the value of [if_source_metageneration_not_match][crate::model::MoveObjectRequest::if_source_metageneration_not_match].
2645        pub fn set_if_source_metageneration_not_match<T>(mut self, v: T) -> Self
2646        where
2647            T: std::convert::Into<i64>,
2648        {
2649            self.0.request.if_source_metageneration_not_match = std::option::Option::Some(v.into());
2650            self
2651        }
2652
2653        /// Sets or clears the value of [if_source_metageneration_not_match][crate::model::MoveObjectRequest::if_source_metageneration_not_match].
2654        pub fn set_or_clear_if_source_metageneration_not_match<T>(
2655            mut self,
2656            v: std::option::Option<T>,
2657        ) -> Self
2658        where
2659            T: std::convert::Into<i64>,
2660        {
2661            self.0.request.if_source_metageneration_not_match = v.map(|x| x.into());
2662            self
2663        }
2664
2665        /// Sets the value of [if_generation_match][crate::model::MoveObjectRequest::if_generation_match].
2666        pub fn set_if_generation_match<T>(mut self, v: T) -> Self
2667        where
2668            T: std::convert::Into<i64>,
2669        {
2670            self.0.request.if_generation_match = std::option::Option::Some(v.into());
2671            self
2672        }
2673
2674        /// Sets or clears the value of [if_generation_match][crate::model::MoveObjectRequest::if_generation_match].
2675        pub fn set_or_clear_if_generation_match<T>(mut self, v: std::option::Option<T>) -> Self
2676        where
2677            T: std::convert::Into<i64>,
2678        {
2679            self.0.request.if_generation_match = v.map(|x| x.into());
2680            self
2681        }
2682
2683        /// Sets the value of [if_generation_not_match][crate::model::MoveObjectRequest::if_generation_not_match].
2684        pub fn set_if_generation_not_match<T>(mut self, v: T) -> Self
2685        where
2686            T: std::convert::Into<i64>,
2687        {
2688            self.0.request.if_generation_not_match = std::option::Option::Some(v.into());
2689            self
2690        }
2691
2692        /// Sets or clears the value of [if_generation_not_match][crate::model::MoveObjectRequest::if_generation_not_match].
2693        pub fn set_or_clear_if_generation_not_match<T>(mut self, v: std::option::Option<T>) -> Self
2694        where
2695            T: std::convert::Into<i64>,
2696        {
2697            self.0.request.if_generation_not_match = v.map(|x| x.into());
2698            self
2699        }
2700
2701        /// Sets the value of [if_metageneration_match][crate::model::MoveObjectRequest::if_metageneration_match].
2702        pub fn set_if_metageneration_match<T>(mut self, v: T) -> Self
2703        where
2704            T: std::convert::Into<i64>,
2705        {
2706            self.0.request.if_metageneration_match = std::option::Option::Some(v.into());
2707            self
2708        }
2709
2710        /// Sets or clears the value of [if_metageneration_match][crate::model::MoveObjectRequest::if_metageneration_match].
2711        pub fn set_or_clear_if_metageneration_match<T>(mut self, v: std::option::Option<T>) -> Self
2712        where
2713            T: std::convert::Into<i64>,
2714        {
2715            self.0.request.if_metageneration_match = v.map(|x| x.into());
2716            self
2717        }
2718
2719        /// Sets the value of [if_metageneration_not_match][crate::model::MoveObjectRequest::if_metageneration_not_match].
2720        pub fn set_if_metageneration_not_match<T>(mut self, v: T) -> Self
2721        where
2722            T: std::convert::Into<i64>,
2723        {
2724            self.0.request.if_metageneration_not_match = std::option::Option::Some(v.into());
2725            self
2726        }
2727
2728        /// Sets or clears the value of [if_metageneration_not_match][crate::model::MoveObjectRequest::if_metageneration_not_match].
2729        pub fn set_or_clear_if_metageneration_not_match<T>(
2730            mut self,
2731            v: std::option::Option<T>,
2732        ) -> Self
2733        where
2734            T: std::convert::Into<i64>,
2735        {
2736            self.0.request.if_metageneration_not_match = v.map(|x| x.into());
2737            self
2738        }
2739    }
2740
2741    #[doc(hidden)]
2742    impl gax::options::internal::RequestBuilder for MoveObject {
2743        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2744            &mut self.0.options
2745        }
2746    }
2747}