1#![allow(rustdoc::redundant_explicit_links)]
18#![allow(rustdoc::broken_intra_doc_links)]
19
20mod debug;
21mod deserialize;
22mod serialize;
23
24#[derive(Clone, Default, PartialEq)]
26#[non_exhaustive]
27pub struct DeleteBucketRequest {
28 pub name: std::string::String,
30
31 pub if_metageneration_match: std::option::Option<i64>,
33
34 pub if_metageneration_not_match: std::option::Option<i64>,
37
38 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
39}
40
41impl DeleteBucketRequest {
42 pub fn new() -> Self {
43 std::default::Default::default()
44 }
45
46 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
48 self.name = v.into();
49 self
50 }
51
52 pub fn set_if_metageneration_match<T>(mut self, v: T) -> Self
54 where
55 T: std::convert::Into<i64>,
56 {
57 self.if_metageneration_match = std::option::Option::Some(v.into());
58 self
59 }
60
61 pub fn set_or_clear_if_metageneration_match<T>(mut self, v: std::option::Option<T>) -> Self
63 where
64 T: std::convert::Into<i64>,
65 {
66 self.if_metageneration_match = v.map(|x| x.into());
67 self
68 }
69
70 pub fn set_if_metageneration_not_match<T>(mut self, v: T) -> Self
72 where
73 T: std::convert::Into<i64>,
74 {
75 self.if_metageneration_not_match = std::option::Option::Some(v.into());
76 self
77 }
78
79 pub fn set_or_clear_if_metageneration_not_match<T>(mut self, v: std::option::Option<T>) -> Self
81 where
82 T: std::convert::Into<i64>,
83 {
84 self.if_metageneration_not_match = v.map(|x| x.into());
85 self
86 }
87}
88
89impl wkt::message::Message for DeleteBucketRequest {
90 fn typename() -> &'static str {
91 "type.googleapis.com/google.storage.v2.DeleteBucketRequest"
92 }
93}
94
95#[derive(Clone, Default, PartialEq)]
97#[non_exhaustive]
98pub struct GetBucketRequest {
99 pub name: std::string::String,
101
102 pub if_metageneration_match: std::option::Option<i64>,
105
106 pub if_metageneration_not_match: std::option::Option<i64>,
109
110 pub read_mask: std::option::Option<wkt::FieldMask>,
114
115 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
116}
117
118impl GetBucketRequest {
119 pub fn new() -> Self {
120 std::default::Default::default()
121 }
122
123 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
125 self.name = v.into();
126 self
127 }
128
129 pub fn set_if_metageneration_match<T>(mut self, v: T) -> Self
131 where
132 T: std::convert::Into<i64>,
133 {
134 self.if_metageneration_match = std::option::Option::Some(v.into());
135 self
136 }
137
138 pub fn set_or_clear_if_metageneration_match<T>(mut self, v: std::option::Option<T>) -> Self
140 where
141 T: std::convert::Into<i64>,
142 {
143 self.if_metageneration_match = v.map(|x| x.into());
144 self
145 }
146
147 pub fn set_if_metageneration_not_match<T>(mut self, v: T) -> Self
149 where
150 T: std::convert::Into<i64>,
151 {
152 self.if_metageneration_not_match = std::option::Option::Some(v.into());
153 self
154 }
155
156 pub fn set_or_clear_if_metageneration_not_match<T>(mut self, v: std::option::Option<T>) -> Self
158 where
159 T: std::convert::Into<i64>,
160 {
161 self.if_metageneration_not_match = v.map(|x| x.into());
162 self
163 }
164
165 pub fn set_read_mask<T>(mut self, v: T) -> Self
167 where
168 T: std::convert::Into<wkt::FieldMask>,
169 {
170 self.read_mask = std::option::Option::Some(v.into());
171 self
172 }
173
174 pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
176 where
177 T: std::convert::Into<wkt::FieldMask>,
178 {
179 self.read_mask = v.map(|x| x.into());
180 self
181 }
182}
183
184impl wkt::message::Message for GetBucketRequest {
185 fn typename() -> &'static str {
186 "type.googleapis.com/google.storage.v2.GetBucketRequest"
187 }
188}
189
190#[derive(Clone, Default, PartialEq)]
192#[non_exhaustive]
193pub struct CreateBucketRequest {
194 pub parent: std::string::String,
198
199 pub bucket: std::option::Option<crate::model::Bucket>,
207
208 pub bucket_id: std::string::String,
212
213 pub predefined_acl: std::string::String,
217
218 pub predefined_default_object_acl: std::string::String,
222
223 pub enable_object_retention: bool,
225
226 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
227}
228
229impl CreateBucketRequest {
230 pub fn new() -> Self {
231 std::default::Default::default()
232 }
233
234 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
236 self.parent = v.into();
237 self
238 }
239
240 pub fn set_bucket<T>(mut self, v: T) -> Self
242 where
243 T: std::convert::Into<crate::model::Bucket>,
244 {
245 self.bucket = std::option::Option::Some(v.into());
246 self
247 }
248
249 pub fn set_or_clear_bucket<T>(mut self, v: std::option::Option<T>) -> Self
251 where
252 T: std::convert::Into<crate::model::Bucket>,
253 {
254 self.bucket = v.map(|x| x.into());
255 self
256 }
257
258 pub fn set_bucket_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
260 self.bucket_id = v.into();
261 self
262 }
263
264 pub fn set_predefined_acl<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
266 self.predefined_acl = v.into();
267 self
268 }
269
270 pub fn set_predefined_default_object_acl<T: std::convert::Into<std::string::String>>(
272 mut self,
273 v: T,
274 ) -> Self {
275 self.predefined_default_object_acl = v.into();
276 self
277 }
278
279 pub fn set_enable_object_retention<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
281 self.enable_object_retention = v.into();
282 self
283 }
284}
285
286impl wkt::message::Message for CreateBucketRequest {
287 fn typename() -> &'static str {
288 "type.googleapis.com/google.storage.v2.CreateBucketRequest"
289 }
290}
291
292#[derive(Clone, Default, PartialEq)]
294#[non_exhaustive]
295pub struct ListBucketsRequest {
296 pub parent: std::string::String,
298
299 pub page_size: i32,
304
305 pub page_token: std::string::String,
308
309 pub prefix: std::string::String,
311
312 pub read_mask: std::option::Option<wkt::FieldMask>,
318
319 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
320}
321
322impl ListBucketsRequest {
323 pub fn new() -> Self {
324 std::default::Default::default()
325 }
326
327 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
329 self.parent = v.into();
330 self
331 }
332
333 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
335 self.page_size = v.into();
336 self
337 }
338
339 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
341 self.page_token = v.into();
342 self
343 }
344
345 pub fn set_prefix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
347 self.prefix = v.into();
348 self
349 }
350
351 pub fn set_read_mask<T>(mut self, v: T) -> Self
353 where
354 T: std::convert::Into<wkt::FieldMask>,
355 {
356 self.read_mask = std::option::Option::Some(v.into());
357 self
358 }
359
360 pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
362 where
363 T: std::convert::Into<wkt::FieldMask>,
364 {
365 self.read_mask = v.map(|x| x.into());
366 self
367 }
368}
369
370impl wkt::message::Message for ListBucketsRequest {
371 fn typename() -> &'static str {
372 "type.googleapis.com/google.storage.v2.ListBucketsRequest"
373 }
374}
375
376#[derive(Clone, Default, PartialEq)]
378#[non_exhaustive]
379pub struct ListBucketsResponse {
380 pub buckets: std::vec::Vec<crate::model::Bucket>,
382
383 pub next_page_token: std::string::String,
386
387 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
388}
389
390impl ListBucketsResponse {
391 pub fn new() -> Self {
392 std::default::Default::default()
393 }
394
395 pub fn set_buckets<T, V>(mut self, v: T) -> Self
397 where
398 T: std::iter::IntoIterator<Item = V>,
399 V: std::convert::Into<crate::model::Bucket>,
400 {
401 use std::iter::Iterator;
402 self.buckets = v.into_iter().map(|i| i.into()).collect();
403 self
404 }
405
406 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
408 self.next_page_token = v.into();
409 self
410 }
411}
412
413impl wkt::message::Message for ListBucketsResponse {
414 fn typename() -> &'static str {
415 "type.googleapis.com/google.storage.v2.ListBucketsResponse"
416 }
417}
418
419#[doc(hidden)]
420impl gax::paginator::internal::PageableResponse for ListBucketsResponse {
421 type PageItem = crate::model::Bucket;
422
423 fn items(self) -> std::vec::Vec<Self::PageItem> {
424 self.buckets
425 }
426
427 fn next_page_token(&self) -> std::string::String {
428 use std::clone::Clone;
429 self.next_page_token.clone()
430 }
431}
432
433#[derive(Clone, Default, PartialEq)]
435#[non_exhaustive]
436pub struct LockBucketRetentionPolicyRequest {
437 pub bucket: std::string::String,
439
440 pub if_metageneration_match: i64,
443
444 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
445}
446
447impl LockBucketRetentionPolicyRequest {
448 pub fn new() -> Self {
449 std::default::Default::default()
450 }
451
452 pub fn set_bucket<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
454 self.bucket = v.into();
455 self
456 }
457
458 pub fn set_if_metageneration_match<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
460 self.if_metageneration_match = v.into();
461 self
462 }
463}
464
465impl wkt::message::Message for LockBucketRetentionPolicyRequest {
466 fn typename() -> &'static str {
467 "type.googleapis.com/google.storage.v2.LockBucketRetentionPolicyRequest"
468 }
469}
470
471#[derive(Clone, Default, PartialEq)]
473#[non_exhaustive]
474pub struct UpdateBucketRequest {
475 pub bucket: std::option::Option<crate::model::Bucket>,
478
479 pub if_metageneration_match: std::option::Option<i64>,
482
483 pub if_metageneration_not_match: std::option::Option<i64>,
486
487 pub predefined_acl: std::string::String,
491
492 pub predefined_default_object_acl: std::string::String,
496
497 pub update_mask: std::option::Option<wkt::FieldMask>,
506
507 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
508}
509
510impl UpdateBucketRequest {
511 pub fn new() -> Self {
512 std::default::Default::default()
513 }
514
515 pub fn set_bucket<T>(mut self, v: T) -> Self
517 where
518 T: std::convert::Into<crate::model::Bucket>,
519 {
520 self.bucket = std::option::Option::Some(v.into());
521 self
522 }
523
524 pub fn set_or_clear_bucket<T>(mut self, v: std::option::Option<T>) -> Self
526 where
527 T: std::convert::Into<crate::model::Bucket>,
528 {
529 self.bucket = v.map(|x| x.into());
530 self
531 }
532
533 pub fn set_if_metageneration_match<T>(mut self, v: T) -> Self
535 where
536 T: std::convert::Into<i64>,
537 {
538 self.if_metageneration_match = std::option::Option::Some(v.into());
539 self
540 }
541
542 pub fn set_or_clear_if_metageneration_match<T>(mut self, v: std::option::Option<T>) -> Self
544 where
545 T: std::convert::Into<i64>,
546 {
547 self.if_metageneration_match = v.map(|x| x.into());
548 self
549 }
550
551 pub fn set_if_metageneration_not_match<T>(mut self, v: T) -> Self
553 where
554 T: std::convert::Into<i64>,
555 {
556 self.if_metageneration_not_match = std::option::Option::Some(v.into());
557 self
558 }
559
560 pub fn set_or_clear_if_metageneration_not_match<T>(mut self, v: std::option::Option<T>) -> Self
562 where
563 T: std::convert::Into<i64>,
564 {
565 self.if_metageneration_not_match = v.map(|x| x.into());
566 self
567 }
568
569 pub fn set_predefined_acl<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
571 self.predefined_acl = v.into();
572 self
573 }
574
575 pub fn set_predefined_default_object_acl<T: std::convert::Into<std::string::String>>(
577 mut self,
578 v: T,
579 ) -> Self {
580 self.predefined_default_object_acl = v.into();
581 self
582 }
583
584 pub fn set_update_mask<T>(mut self, v: T) -> Self
586 where
587 T: std::convert::Into<wkt::FieldMask>,
588 {
589 self.update_mask = std::option::Option::Some(v.into());
590 self
591 }
592
593 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
595 where
596 T: std::convert::Into<wkt::FieldMask>,
597 {
598 self.update_mask = v.map(|x| x.into());
599 self
600 }
601}
602
603impl wkt::message::Message for UpdateBucketRequest {
604 fn typename() -> &'static str {
605 "type.googleapis.com/google.storage.v2.UpdateBucketRequest"
606 }
607}
608
609#[derive(Clone, Default, PartialEq)]
611#[non_exhaustive]
612pub struct ComposeObjectRequest {
613 pub destination: std::option::Option<crate::model::Object>,
615
616 pub source_objects: std::vec::Vec<crate::model::compose_object_request::SourceObject>,
619
620 pub destination_predefined_acl: std::string::String,
624
625 pub if_generation_match: std::option::Option<i64>,
629
630 pub if_metageneration_match: std::option::Option<i64>,
633
634 pub kms_key: std::string::String,
639
640 pub common_object_request_params: std::option::Option<crate::model::CommonObjectRequestParams>,
643
644 pub object_checksums: std::option::Option<crate::model::ObjectChecksums>,
647
648 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
649}
650
651impl ComposeObjectRequest {
652 pub fn new() -> Self {
653 std::default::Default::default()
654 }
655
656 pub fn set_destination<T>(mut self, v: T) -> Self
658 where
659 T: std::convert::Into<crate::model::Object>,
660 {
661 self.destination = std::option::Option::Some(v.into());
662 self
663 }
664
665 pub fn set_or_clear_destination<T>(mut self, v: std::option::Option<T>) -> Self
667 where
668 T: std::convert::Into<crate::model::Object>,
669 {
670 self.destination = v.map(|x| x.into());
671 self
672 }
673
674 pub fn set_source_objects<T, V>(mut self, v: T) -> Self
676 where
677 T: std::iter::IntoIterator<Item = V>,
678 V: std::convert::Into<crate::model::compose_object_request::SourceObject>,
679 {
680 use std::iter::Iterator;
681 self.source_objects = v.into_iter().map(|i| i.into()).collect();
682 self
683 }
684
685 pub fn set_destination_predefined_acl<T: std::convert::Into<std::string::String>>(
687 mut self,
688 v: T,
689 ) -> Self {
690 self.destination_predefined_acl = v.into();
691 self
692 }
693
694 pub fn set_if_generation_match<T>(mut self, v: T) -> Self
696 where
697 T: std::convert::Into<i64>,
698 {
699 self.if_generation_match = std::option::Option::Some(v.into());
700 self
701 }
702
703 pub fn set_or_clear_if_generation_match<T>(mut self, v: std::option::Option<T>) -> Self
705 where
706 T: std::convert::Into<i64>,
707 {
708 self.if_generation_match = v.map(|x| x.into());
709 self
710 }
711
712 pub fn set_if_metageneration_match<T>(mut self, v: T) -> Self
714 where
715 T: std::convert::Into<i64>,
716 {
717 self.if_metageneration_match = std::option::Option::Some(v.into());
718 self
719 }
720
721 pub fn set_or_clear_if_metageneration_match<T>(mut self, v: std::option::Option<T>) -> Self
723 where
724 T: std::convert::Into<i64>,
725 {
726 self.if_metageneration_match = v.map(|x| x.into());
727 self
728 }
729
730 pub fn set_kms_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
732 self.kms_key = v.into();
733 self
734 }
735
736 pub fn set_common_object_request_params<T>(mut self, v: T) -> Self
738 where
739 T: std::convert::Into<crate::model::CommonObjectRequestParams>,
740 {
741 self.common_object_request_params = std::option::Option::Some(v.into());
742 self
743 }
744
745 pub fn set_or_clear_common_object_request_params<T>(mut self, v: std::option::Option<T>) -> Self
747 where
748 T: std::convert::Into<crate::model::CommonObjectRequestParams>,
749 {
750 self.common_object_request_params = v.map(|x| x.into());
751 self
752 }
753
754 pub fn set_object_checksums<T>(mut self, v: T) -> Self
756 where
757 T: std::convert::Into<crate::model::ObjectChecksums>,
758 {
759 self.object_checksums = std::option::Option::Some(v.into());
760 self
761 }
762
763 pub fn set_or_clear_object_checksums<T>(mut self, v: std::option::Option<T>) -> Self
765 where
766 T: std::convert::Into<crate::model::ObjectChecksums>,
767 {
768 self.object_checksums = v.map(|x| x.into());
769 self
770 }
771}
772
773impl wkt::message::Message for ComposeObjectRequest {
774 fn typename() -> &'static str {
775 "type.googleapis.com/google.storage.v2.ComposeObjectRequest"
776 }
777}
778
779pub mod compose_object_request {
781 #[allow(unused_imports)]
782 use super::*;
783
784 #[derive(Clone, Default, PartialEq)]
786 #[non_exhaustive]
787 pub struct SourceObject {
788 pub name: std::string::String,
791
792 pub generation: i64,
794
795 pub object_preconditions: std::option::Option<
797 crate::model::compose_object_request::source_object::ObjectPreconditions,
798 >,
799
800 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
801 }
802
803 impl SourceObject {
804 pub fn new() -> Self {
805 std::default::Default::default()
806 }
807
808 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
810 self.name = v.into();
811 self
812 }
813
814 pub fn set_generation<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
816 self.generation = v.into();
817 self
818 }
819
820 pub fn set_object_preconditions<T>(mut self, v: T) -> Self
822 where
823 T: std::convert::Into<
824 crate::model::compose_object_request::source_object::ObjectPreconditions,
825 >,
826 {
827 self.object_preconditions = std::option::Option::Some(v.into());
828 self
829 }
830
831 pub fn set_or_clear_object_preconditions<T>(mut self, v: std::option::Option<T>) -> Self
833 where
834 T: std::convert::Into<
835 crate::model::compose_object_request::source_object::ObjectPreconditions,
836 >,
837 {
838 self.object_preconditions = v.map(|x| x.into());
839 self
840 }
841 }
842
843 impl wkt::message::Message for SourceObject {
844 fn typename() -> &'static str {
845 "type.googleapis.com/google.storage.v2.ComposeObjectRequest.SourceObject"
846 }
847 }
848
849 pub mod source_object {
851 #[allow(unused_imports)]
852 use super::*;
853
854 #[derive(Clone, Default, PartialEq)]
856 #[non_exhaustive]
857 pub struct ObjectPreconditions {
858 pub if_generation_match: std::option::Option<i64>,
862
863 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
864 }
865
866 impl ObjectPreconditions {
867 pub fn new() -> Self {
868 std::default::Default::default()
869 }
870
871 pub fn set_if_generation_match<T>(mut self, v: T) -> Self
873 where
874 T: std::convert::Into<i64>,
875 {
876 self.if_generation_match = std::option::Option::Some(v.into());
877 self
878 }
879
880 pub fn set_or_clear_if_generation_match<T>(mut self, v: std::option::Option<T>) -> Self
882 where
883 T: std::convert::Into<i64>,
884 {
885 self.if_generation_match = v.map(|x| x.into());
886 self
887 }
888 }
889
890 impl wkt::message::Message for ObjectPreconditions {
891 fn typename() -> &'static str {
892 "type.googleapis.com/google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions"
893 }
894 }
895 }
896}
897
898#[derive(Clone, Default, PartialEq)]
901#[non_exhaustive]
902pub struct DeleteObjectRequest {
903 pub bucket: std::string::String,
905
906 pub object: std::string::String,
910
911 pub generation: i64,
914
915 pub if_generation_match: std::option::Option<i64>,
919
920 pub if_generation_not_match: std::option::Option<i64>,
925
926 pub if_metageneration_match: std::option::Option<i64>,
929
930 pub if_metageneration_not_match: std::option::Option<i64>,
933
934 pub common_object_request_params: std::option::Option<crate::model::CommonObjectRequestParams>,
937
938 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
939}
940
941impl DeleteObjectRequest {
942 pub fn new() -> Self {
943 std::default::Default::default()
944 }
945
946 pub fn set_bucket<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
948 self.bucket = v.into();
949 self
950 }
951
952 pub fn set_object<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
954 self.object = v.into();
955 self
956 }
957
958 pub fn set_generation<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
960 self.generation = v.into();
961 self
962 }
963
964 pub fn set_if_generation_match<T>(mut self, v: T) -> Self
966 where
967 T: std::convert::Into<i64>,
968 {
969 self.if_generation_match = std::option::Option::Some(v.into());
970 self
971 }
972
973 pub fn set_or_clear_if_generation_match<T>(mut self, v: std::option::Option<T>) -> Self
975 where
976 T: std::convert::Into<i64>,
977 {
978 self.if_generation_match = v.map(|x| x.into());
979 self
980 }
981
982 pub fn set_if_generation_not_match<T>(mut self, v: T) -> Self
984 where
985 T: std::convert::Into<i64>,
986 {
987 self.if_generation_not_match = std::option::Option::Some(v.into());
988 self
989 }
990
991 pub fn set_or_clear_if_generation_not_match<T>(mut self, v: std::option::Option<T>) -> Self
993 where
994 T: std::convert::Into<i64>,
995 {
996 self.if_generation_not_match = v.map(|x| x.into());
997 self
998 }
999
1000 pub fn set_if_metageneration_match<T>(mut self, v: T) -> Self
1002 where
1003 T: std::convert::Into<i64>,
1004 {
1005 self.if_metageneration_match = std::option::Option::Some(v.into());
1006 self
1007 }
1008
1009 pub fn set_or_clear_if_metageneration_match<T>(mut self, v: std::option::Option<T>) -> Self
1011 where
1012 T: std::convert::Into<i64>,
1013 {
1014 self.if_metageneration_match = v.map(|x| x.into());
1015 self
1016 }
1017
1018 pub fn set_if_metageneration_not_match<T>(mut self, v: T) -> Self
1020 where
1021 T: std::convert::Into<i64>,
1022 {
1023 self.if_metageneration_not_match = std::option::Option::Some(v.into());
1024 self
1025 }
1026
1027 pub fn set_or_clear_if_metageneration_not_match<T>(mut self, v: std::option::Option<T>) -> Self
1029 where
1030 T: std::convert::Into<i64>,
1031 {
1032 self.if_metageneration_not_match = v.map(|x| x.into());
1033 self
1034 }
1035
1036 pub fn set_common_object_request_params<T>(mut self, v: T) -> Self
1038 where
1039 T: std::convert::Into<crate::model::CommonObjectRequestParams>,
1040 {
1041 self.common_object_request_params = std::option::Option::Some(v.into());
1042 self
1043 }
1044
1045 pub fn set_or_clear_common_object_request_params<T>(mut self, v: std::option::Option<T>) -> Self
1047 where
1048 T: std::convert::Into<crate::model::CommonObjectRequestParams>,
1049 {
1050 self.common_object_request_params = v.map(|x| x.into());
1051 self
1052 }
1053}
1054
1055impl wkt::message::Message for DeleteObjectRequest {
1056 fn typename() -> &'static str {
1057 "type.googleapis.com/google.storage.v2.DeleteObjectRequest"
1058 }
1059}
1060
1061#[derive(Clone, Default, PartialEq)]
1064#[non_exhaustive]
1065pub struct RestoreObjectRequest {
1066 pub bucket: std::string::String,
1068
1069 pub object: std::string::String,
1071
1072 pub generation: i64,
1074
1075 pub restore_token: std::string::String,
1081
1082 pub if_generation_match: std::option::Option<i64>,
1086
1087 pub if_generation_not_match: std::option::Option<i64>,
1092
1093 pub if_metageneration_match: std::option::Option<i64>,
1096
1097 pub if_metageneration_not_match: std::option::Option<i64>,
1100
1101 pub copy_source_acl: std::option::Option<bool>,
1105
1106 pub common_object_request_params: std::option::Option<crate::model::CommonObjectRequestParams>,
1109
1110 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1111}
1112
1113impl RestoreObjectRequest {
1114 pub fn new() -> Self {
1115 std::default::Default::default()
1116 }
1117
1118 pub fn set_bucket<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1120 self.bucket = v.into();
1121 self
1122 }
1123
1124 pub fn set_object<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1126 self.object = v.into();
1127 self
1128 }
1129
1130 pub fn set_generation<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
1132 self.generation = v.into();
1133 self
1134 }
1135
1136 pub fn set_restore_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1138 self.restore_token = v.into();
1139 self
1140 }
1141
1142 pub fn set_if_generation_match<T>(mut self, v: T) -> Self
1144 where
1145 T: std::convert::Into<i64>,
1146 {
1147 self.if_generation_match = std::option::Option::Some(v.into());
1148 self
1149 }
1150
1151 pub fn set_or_clear_if_generation_match<T>(mut self, v: std::option::Option<T>) -> Self
1153 where
1154 T: std::convert::Into<i64>,
1155 {
1156 self.if_generation_match = v.map(|x| x.into());
1157 self
1158 }
1159
1160 pub fn set_if_generation_not_match<T>(mut self, v: T) -> Self
1162 where
1163 T: std::convert::Into<i64>,
1164 {
1165 self.if_generation_not_match = std::option::Option::Some(v.into());
1166 self
1167 }
1168
1169 pub fn set_or_clear_if_generation_not_match<T>(mut self, v: std::option::Option<T>) -> Self
1171 where
1172 T: std::convert::Into<i64>,
1173 {
1174 self.if_generation_not_match = v.map(|x| x.into());
1175 self
1176 }
1177
1178 pub fn set_if_metageneration_match<T>(mut self, v: T) -> Self
1180 where
1181 T: std::convert::Into<i64>,
1182 {
1183 self.if_metageneration_match = std::option::Option::Some(v.into());
1184 self
1185 }
1186
1187 pub fn set_or_clear_if_metageneration_match<T>(mut self, v: std::option::Option<T>) -> Self
1189 where
1190 T: std::convert::Into<i64>,
1191 {
1192 self.if_metageneration_match = v.map(|x| x.into());
1193 self
1194 }
1195
1196 pub fn set_if_metageneration_not_match<T>(mut self, v: T) -> Self
1198 where
1199 T: std::convert::Into<i64>,
1200 {
1201 self.if_metageneration_not_match = std::option::Option::Some(v.into());
1202 self
1203 }
1204
1205 pub fn set_or_clear_if_metageneration_not_match<T>(mut self, v: std::option::Option<T>) -> Self
1207 where
1208 T: std::convert::Into<i64>,
1209 {
1210 self.if_metageneration_not_match = v.map(|x| x.into());
1211 self
1212 }
1213
1214 pub fn set_copy_source_acl<T>(mut self, v: T) -> Self
1216 where
1217 T: std::convert::Into<bool>,
1218 {
1219 self.copy_source_acl = std::option::Option::Some(v.into());
1220 self
1221 }
1222
1223 pub fn set_or_clear_copy_source_acl<T>(mut self, v: std::option::Option<T>) -> Self
1225 where
1226 T: std::convert::Into<bool>,
1227 {
1228 self.copy_source_acl = v.map(|x| x.into());
1229 self
1230 }
1231
1232 pub fn set_common_object_request_params<T>(mut self, v: T) -> Self
1234 where
1235 T: std::convert::Into<crate::model::CommonObjectRequestParams>,
1236 {
1237 self.common_object_request_params = std::option::Option::Some(v.into());
1238 self
1239 }
1240
1241 pub fn set_or_clear_common_object_request_params<T>(mut self, v: std::option::Option<T>) -> Self
1243 where
1244 T: std::convert::Into<crate::model::CommonObjectRequestParams>,
1245 {
1246 self.common_object_request_params = v.map(|x| x.into());
1247 self
1248 }
1249}
1250
1251impl wkt::message::Message for RestoreObjectRequest {
1252 fn typename() -> &'static str {
1253 "type.googleapis.com/google.storage.v2.RestoreObjectRequest"
1254 }
1255}
1256
1257#[derive(Clone, Default, PartialEq)]
1259#[non_exhaustive]
1260pub struct ReadObjectRequest {
1261 pub bucket: std::string::String,
1263
1264 pub object: std::string::String,
1266
1267 pub generation: i64,
1270
1271 pub read_offset: i64,
1281
1282 pub read_limit: i64,
1291
1292 pub if_generation_match: std::option::Option<i64>,
1296
1297 pub if_generation_not_match: std::option::Option<i64>,
1302
1303 pub if_metageneration_match: std::option::Option<i64>,
1306
1307 pub if_metageneration_not_match: std::option::Option<i64>,
1310
1311 pub common_object_request_params: std::option::Option<crate::model::CommonObjectRequestParams>,
1314
1315 pub read_mask: std::option::Option<wkt::FieldMask>,
1322
1323 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1324}
1325
1326impl ReadObjectRequest {
1327 pub fn new() -> Self {
1328 std::default::Default::default()
1329 }
1330
1331 pub fn set_bucket<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1333 self.bucket = v.into();
1334 self
1335 }
1336
1337 pub fn set_object<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1339 self.object = v.into();
1340 self
1341 }
1342
1343 pub fn set_generation<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
1345 self.generation = v.into();
1346 self
1347 }
1348
1349 pub fn set_read_offset<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
1351 self.read_offset = v.into();
1352 self
1353 }
1354
1355 pub fn set_read_limit<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
1357 self.read_limit = v.into();
1358 self
1359 }
1360
1361 pub fn set_if_generation_match<T>(mut self, v: T) -> Self
1363 where
1364 T: std::convert::Into<i64>,
1365 {
1366 self.if_generation_match = std::option::Option::Some(v.into());
1367 self
1368 }
1369
1370 pub fn set_or_clear_if_generation_match<T>(mut self, v: std::option::Option<T>) -> Self
1372 where
1373 T: std::convert::Into<i64>,
1374 {
1375 self.if_generation_match = v.map(|x| x.into());
1376 self
1377 }
1378
1379 pub fn set_if_generation_not_match<T>(mut self, v: T) -> Self
1381 where
1382 T: std::convert::Into<i64>,
1383 {
1384 self.if_generation_not_match = std::option::Option::Some(v.into());
1385 self
1386 }
1387
1388 pub fn set_or_clear_if_generation_not_match<T>(mut self, v: std::option::Option<T>) -> Self
1390 where
1391 T: std::convert::Into<i64>,
1392 {
1393 self.if_generation_not_match = v.map(|x| x.into());
1394 self
1395 }
1396
1397 pub fn set_if_metageneration_match<T>(mut self, v: T) -> Self
1399 where
1400 T: std::convert::Into<i64>,
1401 {
1402 self.if_metageneration_match = std::option::Option::Some(v.into());
1403 self
1404 }
1405
1406 pub fn set_or_clear_if_metageneration_match<T>(mut self, v: std::option::Option<T>) -> Self
1408 where
1409 T: std::convert::Into<i64>,
1410 {
1411 self.if_metageneration_match = v.map(|x| x.into());
1412 self
1413 }
1414
1415 pub fn set_if_metageneration_not_match<T>(mut self, v: T) -> Self
1417 where
1418 T: std::convert::Into<i64>,
1419 {
1420 self.if_metageneration_not_match = std::option::Option::Some(v.into());
1421 self
1422 }
1423
1424 pub fn set_or_clear_if_metageneration_not_match<T>(mut self, v: std::option::Option<T>) -> Self
1426 where
1427 T: std::convert::Into<i64>,
1428 {
1429 self.if_metageneration_not_match = v.map(|x| x.into());
1430 self
1431 }
1432
1433 pub fn set_common_object_request_params<T>(mut self, v: T) -> Self
1435 where
1436 T: std::convert::Into<crate::model::CommonObjectRequestParams>,
1437 {
1438 self.common_object_request_params = std::option::Option::Some(v.into());
1439 self
1440 }
1441
1442 pub fn set_or_clear_common_object_request_params<T>(mut self, v: std::option::Option<T>) -> Self
1444 where
1445 T: std::convert::Into<crate::model::CommonObjectRequestParams>,
1446 {
1447 self.common_object_request_params = v.map(|x| x.into());
1448 self
1449 }
1450
1451 pub fn set_read_mask<T>(mut self, v: T) -> Self
1453 where
1454 T: std::convert::Into<wkt::FieldMask>,
1455 {
1456 self.read_mask = std::option::Option::Some(v.into());
1457 self
1458 }
1459
1460 pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
1462 where
1463 T: std::convert::Into<wkt::FieldMask>,
1464 {
1465 self.read_mask = v.map(|x| x.into());
1466 self
1467 }
1468}
1469
1470impl wkt::message::Message for ReadObjectRequest {
1471 fn typename() -> &'static str {
1472 "type.googleapis.com/google.storage.v2.ReadObjectRequest"
1473 }
1474}
1475
1476#[derive(Clone, Default, PartialEq)]
1478#[non_exhaustive]
1479pub struct GetObjectRequest {
1480 pub bucket: std::string::String,
1482
1483 pub object: std::string::String,
1485
1486 pub generation: i64,
1489
1490 pub soft_deleted: std::option::Option<bool>,
1492
1493 pub if_generation_match: std::option::Option<i64>,
1497
1498 pub if_generation_not_match: std::option::Option<i64>,
1503
1504 pub if_metageneration_match: std::option::Option<i64>,
1507
1508 pub if_metageneration_not_match: std::option::Option<i64>,
1511
1512 pub common_object_request_params: std::option::Option<crate::model::CommonObjectRequestParams>,
1515
1516 pub read_mask: std::option::Option<wkt::FieldMask>,
1522
1523 pub restore_token: std::string::String,
1529
1530 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1531}
1532
1533impl GetObjectRequest {
1534 pub fn new() -> Self {
1535 std::default::Default::default()
1536 }
1537
1538 pub fn set_bucket<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1540 self.bucket = v.into();
1541 self
1542 }
1543
1544 pub fn set_object<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1546 self.object = v.into();
1547 self
1548 }
1549
1550 pub fn set_generation<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
1552 self.generation = v.into();
1553 self
1554 }
1555
1556 pub fn set_soft_deleted<T>(mut self, v: T) -> Self
1558 where
1559 T: std::convert::Into<bool>,
1560 {
1561 self.soft_deleted = std::option::Option::Some(v.into());
1562 self
1563 }
1564
1565 pub fn set_or_clear_soft_deleted<T>(mut self, v: std::option::Option<T>) -> Self
1567 where
1568 T: std::convert::Into<bool>,
1569 {
1570 self.soft_deleted = v.map(|x| x.into());
1571 self
1572 }
1573
1574 pub fn set_if_generation_match<T>(mut self, v: T) -> Self
1576 where
1577 T: std::convert::Into<i64>,
1578 {
1579 self.if_generation_match = std::option::Option::Some(v.into());
1580 self
1581 }
1582
1583 pub fn set_or_clear_if_generation_match<T>(mut self, v: std::option::Option<T>) -> Self
1585 where
1586 T: std::convert::Into<i64>,
1587 {
1588 self.if_generation_match = v.map(|x| x.into());
1589 self
1590 }
1591
1592 pub fn set_if_generation_not_match<T>(mut self, v: T) -> Self
1594 where
1595 T: std::convert::Into<i64>,
1596 {
1597 self.if_generation_not_match = std::option::Option::Some(v.into());
1598 self
1599 }
1600
1601 pub fn set_or_clear_if_generation_not_match<T>(mut self, v: std::option::Option<T>) -> Self
1603 where
1604 T: std::convert::Into<i64>,
1605 {
1606 self.if_generation_not_match = v.map(|x| x.into());
1607 self
1608 }
1609
1610 pub fn set_if_metageneration_match<T>(mut self, v: T) -> Self
1612 where
1613 T: std::convert::Into<i64>,
1614 {
1615 self.if_metageneration_match = std::option::Option::Some(v.into());
1616 self
1617 }
1618
1619 pub fn set_or_clear_if_metageneration_match<T>(mut self, v: std::option::Option<T>) -> Self
1621 where
1622 T: std::convert::Into<i64>,
1623 {
1624 self.if_metageneration_match = v.map(|x| x.into());
1625 self
1626 }
1627
1628 pub fn set_if_metageneration_not_match<T>(mut self, v: T) -> Self
1630 where
1631 T: std::convert::Into<i64>,
1632 {
1633 self.if_metageneration_not_match = std::option::Option::Some(v.into());
1634 self
1635 }
1636
1637 pub fn set_or_clear_if_metageneration_not_match<T>(mut self, v: std::option::Option<T>) -> Self
1639 where
1640 T: std::convert::Into<i64>,
1641 {
1642 self.if_metageneration_not_match = v.map(|x| x.into());
1643 self
1644 }
1645
1646 pub fn set_common_object_request_params<T>(mut self, v: T) -> Self
1648 where
1649 T: std::convert::Into<crate::model::CommonObjectRequestParams>,
1650 {
1651 self.common_object_request_params = std::option::Option::Some(v.into());
1652 self
1653 }
1654
1655 pub fn set_or_clear_common_object_request_params<T>(mut self, v: std::option::Option<T>) -> Self
1657 where
1658 T: std::convert::Into<crate::model::CommonObjectRequestParams>,
1659 {
1660 self.common_object_request_params = v.map(|x| x.into());
1661 self
1662 }
1663
1664 pub fn set_read_mask<T>(mut self, v: T) -> Self
1666 where
1667 T: std::convert::Into<wkt::FieldMask>,
1668 {
1669 self.read_mask = std::option::Option::Some(v.into());
1670 self
1671 }
1672
1673 pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
1675 where
1676 T: std::convert::Into<wkt::FieldMask>,
1677 {
1678 self.read_mask = v.map(|x| x.into());
1679 self
1680 }
1681
1682 pub fn set_restore_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1684 self.restore_token = v.into();
1685 self
1686 }
1687}
1688
1689impl wkt::message::Message for GetObjectRequest {
1690 fn typename() -> &'static str {
1691 "type.googleapis.com/google.storage.v2.GetObjectRequest"
1692 }
1693}
1694
1695#[derive(Clone, Default, PartialEq)]
1697#[non_exhaustive]
1698pub struct WriteObjectSpec {
1699 pub resource: std::option::Option<crate::model::Object>,
1701
1702 pub predefined_acl: std::string::String,
1706
1707 pub if_generation_match: std::option::Option<i64>,
1711
1712 pub if_generation_not_match: std::option::Option<i64>,
1717
1718 pub if_metageneration_match: std::option::Option<i64>,
1721
1722 pub if_metageneration_not_match: std::option::Option<i64>,
1725
1726 pub object_size: std::option::Option<i64>,
1734
1735 pub appendable: std::option::Option<bool>,
1738
1739 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1740}
1741
1742impl WriteObjectSpec {
1743 pub fn new() -> Self {
1744 std::default::Default::default()
1745 }
1746
1747 pub fn set_resource<T>(mut self, v: T) -> Self
1749 where
1750 T: std::convert::Into<crate::model::Object>,
1751 {
1752 self.resource = std::option::Option::Some(v.into());
1753 self
1754 }
1755
1756 pub fn set_or_clear_resource<T>(mut self, v: std::option::Option<T>) -> Self
1758 where
1759 T: std::convert::Into<crate::model::Object>,
1760 {
1761 self.resource = v.map(|x| x.into());
1762 self
1763 }
1764
1765 pub fn set_predefined_acl<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1767 self.predefined_acl = v.into();
1768 self
1769 }
1770
1771 pub fn set_if_generation_match<T>(mut self, v: T) -> Self
1773 where
1774 T: std::convert::Into<i64>,
1775 {
1776 self.if_generation_match = std::option::Option::Some(v.into());
1777 self
1778 }
1779
1780 pub fn set_or_clear_if_generation_match<T>(mut self, v: std::option::Option<T>) -> Self
1782 where
1783 T: std::convert::Into<i64>,
1784 {
1785 self.if_generation_match = v.map(|x| x.into());
1786 self
1787 }
1788
1789 pub fn set_if_generation_not_match<T>(mut self, v: T) -> Self
1791 where
1792 T: std::convert::Into<i64>,
1793 {
1794 self.if_generation_not_match = std::option::Option::Some(v.into());
1795 self
1796 }
1797
1798 pub fn set_or_clear_if_generation_not_match<T>(mut self, v: std::option::Option<T>) -> Self
1800 where
1801 T: std::convert::Into<i64>,
1802 {
1803 self.if_generation_not_match = v.map(|x| x.into());
1804 self
1805 }
1806
1807 pub fn set_if_metageneration_match<T>(mut self, v: T) -> Self
1809 where
1810 T: std::convert::Into<i64>,
1811 {
1812 self.if_metageneration_match = std::option::Option::Some(v.into());
1813 self
1814 }
1815
1816 pub fn set_or_clear_if_metageneration_match<T>(mut self, v: std::option::Option<T>) -> Self
1818 where
1819 T: std::convert::Into<i64>,
1820 {
1821 self.if_metageneration_match = v.map(|x| x.into());
1822 self
1823 }
1824
1825 pub fn set_if_metageneration_not_match<T>(mut self, v: T) -> Self
1827 where
1828 T: std::convert::Into<i64>,
1829 {
1830 self.if_metageneration_not_match = std::option::Option::Some(v.into());
1831 self
1832 }
1833
1834 pub fn set_or_clear_if_metageneration_not_match<T>(mut self, v: std::option::Option<T>) -> Self
1836 where
1837 T: std::convert::Into<i64>,
1838 {
1839 self.if_metageneration_not_match = v.map(|x| x.into());
1840 self
1841 }
1842
1843 pub fn set_object_size<T>(mut self, v: T) -> Self
1845 where
1846 T: std::convert::Into<i64>,
1847 {
1848 self.object_size = std::option::Option::Some(v.into());
1849 self
1850 }
1851
1852 pub fn set_or_clear_object_size<T>(mut self, v: std::option::Option<T>) -> Self
1854 where
1855 T: std::convert::Into<i64>,
1856 {
1857 self.object_size = v.map(|x| x.into());
1858 self
1859 }
1860
1861 pub fn set_appendable<T>(mut self, v: T) -> Self
1863 where
1864 T: std::convert::Into<bool>,
1865 {
1866 self.appendable = std::option::Option::Some(v.into());
1867 self
1868 }
1869
1870 pub fn set_or_clear_appendable<T>(mut self, v: std::option::Option<T>) -> Self
1872 where
1873 T: std::convert::Into<bool>,
1874 {
1875 self.appendable = v.map(|x| x.into());
1876 self
1877 }
1878}
1879
1880impl wkt::message::Message for WriteObjectSpec {
1881 fn typename() -> &'static str {
1882 "type.googleapis.com/google.storage.v2.WriteObjectSpec"
1883 }
1884}
1885
1886#[derive(Clone, Default, PartialEq)]
1888#[non_exhaustive]
1889pub struct ListObjectsRequest {
1890 pub parent: std::string::String,
1892
1893 pub page_size: i32,
1898
1899 pub page_token: std::string::String,
1902
1903 pub delimiter: std::string::String,
1909
1910 pub include_trailing_delimiter: bool,
1914
1915 pub prefix: std::string::String,
1917
1918 pub versions: bool,
1923
1924 pub read_mask: std::option::Option<wkt::FieldMask>,
1930
1931 pub lexicographic_start: std::string::String,
1936
1937 pub lexicographic_end: std::string::String,
1942
1943 pub soft_deleted: bool,
1946
1947 pub include_folders_as_prefixes: bool,
1950
1951 pub match_glob: std::string::String,
1956
1957 pub filter: std::string::String,
1961
1962 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1963}
1964
1965impl ListObjectsRequest {
1966 pub fn new() -> Self {
1967 std::default::Default::default()
1968 }
1969
1970 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1972 self.parent = v.into();
1973 self
1974 }
1975
1976 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1978 self.page_size = v.into();
1979 self
1980 }
1981
1982 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1984 self.page_token = v.into();
1985 self
1986 }
1987
1988 pub fn set_delimiter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1990 self.delimiter = v.into();
1991 self
1992 }
1993
1994 pub fn set_include_trailing_delimiter<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1996 self.include_trailing_delimiter = v.into();
1997 self
1998 }
1999
2000 pub fn set_prefix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2002 self.prefix = v.into();
2003 self
2004 }
2005
2006 pub fn set_versions<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2008 self.versions = v.into();
2009 self
2010 }
2011
2012 pub fn set_read_mask<T>(mut self, v: T) -> Self
2014 where
2015 T: std::convert::Into<wkt::FieldMask>,
2016 {
2017 self.read_mask = std::option::Option::Some(v.into());
2018 self
2019 }
2020
2021 pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
2023 where
2024 T: std::convert::Into<wkt::FieldMask>,
2025 {
2026 self.read_mask = v.map(|x| x.into());
2027 self
2028 }
2029
2030 pub fn set_lexicographic_start<T: std::convert::Into<std::string::String>>(
2032 mut self,
2033 v: T,
2034 ) -> Self {
2035 self.lexicographic_start = v.into();
2036 self
2037 }
2038
2039 pub fn set_lexicographic_end<T: std::convert::Into<std::string::String>>(
2041 mut self,
2042 v: T,
2043 ) -> Self {
2044 self.lexicographic_end = v.into();
2045 self
2046 }
2047
2048 pub fn set_soft_deleted<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2050 self.soft_deleted = v.into();
2051 self
2052 }
2053
2054 pub fn set_include_folders_as_prefixes<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2056 self.include_folders_as_prefixes = v.into();
2057 self
2058 }
2059
2060 pub fn set_match_glob<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2062 self.match_glob = v.into();
2063 self
2064 }
2065
2066 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2068 self.filter = v.into();
2069 self
2070 }
2071}
2072
2073impl wkt::message::Message for ListObjectsRequest {
2074 fn typename() -> &'static str {
2075 "type.googleapis.com/google.storage.v2.ListObjectsRequest"
2076 }
2077}
2078
2079#[derive(Clone, Default, PartialEq)]
2088#[non_exhaustive]
2089pub struct RewriteObjectRequest {
2090 pub destination_name: std::string::String,
2098
2099 pub destination_bucket: std::string::String,
2102
2103 pub destination_kms_key: std::string::String,
2109
2110 pub destination: std::option::Option<crate::model::Object>,
2118
2119 pub source_bucket: std::string::String,
2121
2122 pub source_object: std::string::String,
2124
2125 pub source_generation: i64,
2128
2129 pub rewrite_token: std::string::String,
2135
2136 pub destination_predefined_acl: std::string::String,
2140
2141 pub if_generation_match: std::option::Option<i64>,
2145
2146 pub if_generation_not_match: std::option::Option<i64>,
2151
2152 pub if_metageneration_match: std::option::Option<i64>,
2155
2156 pub if_metageneration_not_match: std::option::Option<i64>,
2159
2160 pub if_source_generation_match: std::option::Option<i64>,
2163
2164 pub if_source_generation_not_match: std::option::Option<i64>,
2167
2168 pub if_source_metageneration_match: std::option::Option<i64>,
2171
2172 pub if_source_metageneration_not_match: std::option::Option<i64>,
2175
2176 pub max_bytes_rewritten_per_call: i64,
2184
2185 pub copy_source_encryption_algorithm: std::string::String,
2188
2189 pub copy_source_encryption_key_bytes: ::bytes::Bytes,
2193
2194 pub copy_source_encryption_key_sha256_bytes: ::bytes::Bytes,
2198
2199 pub common_object_request_params: std::option::Option<crate::model::CommonObjectRequestParams>,
2202
2203 pub object_checksums: std::option::Option<crate::model::ObjectChecksums>,
2206
2207 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2208}
2209
2210impl RewriteObjectRequest {
2211 pub fn new() -> Self {
2212 std::default::Default::default()
2213 }
2214
2215 pub fn set_destination_name<T: std::convert::Into<std::string::String>>(
2217 mut self,
2218 v: T,
2219 ) -> Self {
2220 self.destination_name = v.into();
2221 self
2222 }
2223
2224 pub fn set_destination_bucket<T: std::convert::Into<std::string::String>>(
2226 mut self,
2227 v: T,
2228 ) -> Self {
2229 self.destination_bucket = v.into();
2230 self
2231 }
2232
2233 pub fn set_destination_kms_key<T: std::convert::Into<std::string::String>>(
2235 mut self,
2236 v: T,
2237 ) -> Self {
2238 self.destination_kms_key = v.into();
2239 self
2240 }
2241
2242 pub fn set_destination<T>(mut self, v: T) -> Self
2244 where
2245 T: std::convert::Into<crate::model::Object>,
2246 {
2247 self.destination = std::option::Option::Some(v.into());
2248 self
2249 }
2250
2251 pub fn set_or_clear_destination<T>(mut self, v: std::option::Option<T>) -> Self
2253 where
2254 T: std::convert::Into<crate::model::Object>,
2255 {
2256 self.destination = v.map(|x| x.into());
2257 self
2258 }
2259
2260 pub fn set_source_bucket<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2262 self.source_bucket = v.into();
2263 self
2264 }
2265
2266 pub fn set_source_object<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2268 self.source_object = v.into();
2269 self
2270 }
2271
2272 pub fn set_source_generation<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
2274 self.source_generation = v.into();
2275 self
2276 }
2277
2278 pub fn set_rewrite_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2280 self.rewrite_token = v.into();
2281 self
2282 }
2283
2284 pub fn set_destination_predefined_acl<T: std::convert::Into<std::string::String>>(
2286 mut self,
2287 v: T,
2288 ) -> Self {
2289 self.destination_predefined_acl = v.into();
2290 self
2291 }
2292
2293 pub fn set_if_generation_match<T>(mut self, v: T) -> Self
2295 where
2296 T: std::convert::Into<i64>,
2297 {
2298 self.if_generation_match = std::option::Option::Some(v.into());
2299 self
2300 }
2301
2302 pub fn set_or_clear_if_generation_match<T>(mut self, v: std::option::Option<T>) -> Self
2304 where
2305 T: std::convert::Into<i64>,
2306 {
2307 self.if_generation_match = v.map(|x| x.into());
2308 self
2309 }
2310
2311 pub fn set_if_generation_not_match<T>(mut self, v: T) -> Self
2313 where
2314 T: std::convert::Into<i64>,
2315 {
2316 self.if_generation_not_match = std::option::Option::Some(v.into());
2317 self
2318 }
2319
2320 pub fn set_or_clear_if_generation_not_match<T>(mut self, v: std::option::Option<T>) -> Self
2322 where
2323 T: std::convert::Into<i64>,
2324 {
2325 self.if_generation_not_match = v.map(|x| x.into());
2326 self
2327 }
2328
2329 pub fn set_if_metageneration_match<T>(mut self, v: T) -> Self
2331 where
2332 T: std::convert::Into<i64>,
2333 {
2334 self.if_metageneration_match = std::option::Option::Some(v.into());
2335 self
2336 }
2337
2338 pub fn set_or_clear_if_metageneration_match<T>(mut self, v: std::option::Option<T>) -> Self
2340 where
2341 T: std::convert::Into<i64>,
2342 {
2343 self.if_metageneration_match = v.map(|x| x.into());
2344 self
2345 }
2346
2347 pub fn set_if_metageneration_not_match<T>(mut self, v: T) -> Self
2349 where
2350 T: std::convert::Into<i64>,
2351 {
2352 self.if_metageneration_not_match = std::option::Option::Some(v.into());
2353 self
2354 }
2355
2356 pub fn set_or_clear_if_metageneration_not_match<T>(mut self, v: std::option::Option<T>) -> Self
2358 where
2359 T: std::convert::Into<i64>,
2360 {
2361 self.if_metageneration_not_match = v.map(|x| x.into());
2362 self
2363 }
2364
2365 pub fn set_if_source_generation_match<T>(mut self, v: T) -> Self
2367 where
2368 T: std::convert::Into<i64>,
2369 {
2370 self.if_source_generation_match = std::option::Option::Some(v.into());
2371 self
2372 }
2373
2374 pub fn set_or_clear_if_source_generation_match<T>(mut self, v: std::option::Option<T>) -> Self
2376 where
2377 T: std::convert::Into<i64>,
2378 {
2379 self.if_source_generation_match = v.map(|x| x.into());
2380 self
2381 }
2382
2383 pub fn set_if_source_generation_not_match<T>(mut self, v: T) -> Self
2385 where
2386 T: std::convert::Into<i64>,
2387 {
2388 self.if_source_generation_not_match = std::option::Option::Some(v.into());
2389 self
2390 }
2391
2392 pub fn set_or_clear_if_source_generation_not_match<T>(
2394 mut self,
2395 v: std::option::Option<T>,
2396 ) -> Self
2397 where
2398 T: std::convert::Into<i64>,
2399 {
2400 self.if_source_generation_not_match = v.map(|x| x.into());
2401 self
2402 }
2403
2404 pub fn set_if_source_metageneration_match<T>(mut self, v: T) -> Self
2406 where
2407 T: std::convert::Into<i64>,
2408 {
2409 self.if_source_metageneration_match = std::option::Option::Some(v.into());
2410 self
2411 }
2412
2413 pub fn set_or_clear_if_source_metageneration_match<T>(
2415 mut self,
2416 v: std::option::Option<T>,
2417 ) -> Self
2418 where
2419 T: std::convert::Into<i64>,
2420 {
2421 self.if_source_metageneration_match = v.map(|x| x.into());
2422 self
2423 }
2424
2425 pub fn set_if_source_metageneration_not_match<T>(mut self, v: T) -> Self
2427 where
2428 T: std::convert::Into<i64>,
2429 {
2430 self.if_source_metageneration_not_match = std::option::Option::Some(v.into());
2431 self
2432 }
2433
2434 pub fn set_or_clear_if_source_metageneration_not_match<T>(
2436 mut self,
2437 v: std::option::Option<T>,
2438 ) -> Self
2439 where
2440 T: std::convert::Into<i64>,
2441 {
2442 self.if_source_metageneration_not_match = v.map(|x| x.into());
2443 self
2444 }
2445
2446 pub fn set_max_bytes_rewritten_per_call<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
2448 self.max_bytes_rewritten_per_call = v.into();
2449 self
2450 }
2451
2452 pub fn set_copy_source_encryption_algorithm<T: std::convert::Into<std::string::String>>(
2454 mut self,
2455 v: T,
2456 ) -> Self {
2457 self.copy_source_encryption_algorithm = v.into();
2458 self
2459 }
2460
2461 pub fn set_copy_source_encryption_key_bytes<T: std::convert::Into<::bytes::Bytes>>(
2463 mut self,
2464 v: T,
2465 ) -> Self {
2466 self.copy_source_encryption_key_bytes = v.into();
2467 self
2468 }
2469
2470 pub fn set_copy_source_encryption_key_sha256_bytes<T: std::convert::Into<::bytes::Bytes>>(
2472 mut self,
2473 v: T,
2474 ) -> Self {
2475 self.copy_source_encryption_key_sha256_bytes = v.into();
2476 self
2477 }
2478
2479 pub fn set_common_object_request_params<T>(mut self, v: T) -> Self
2481 where
2482 T: std::convert::Into<crate::model::CommonObjectRequestParams>,
2483 {
2484 self.common_object_request_params = std::option::Option::Some(v.into());
2485 self
2486 }
2487
2488 pub fn set_or_clear_common_object_request_params<T>(mut self, v: std::option::Option<T>) -> Self
2490 where
2491 T: std::convert::Into<crate::model::CommonObjectRequestParams>,
2492 {
2493 self.common_object_request_params = v.map(|x| x.into());
2494 self
2495 }
2496
2497 pub fn set_object_checksums<T>(mut self, v: T) -> Self
2499 where
2500 T: std::convert::Into<crate::model::ObjectChecksums>,
2501 {
2502 self.object_checksums = std::option::Option::Some(v.into());
2503 self
2504 }
2505
2506 pub fn set_or_clear_object_checksums<T>(mut self, v: std::option::Option<T>) -> Self
2508 where
2509 T: std::convert::Into<crate::model::ObjectChecksums>,
2510 {
2511 self.object_checksums = v.map(|x| x.into());
2512 self
2513 }
2514}
2515
2516impl wkt::message::Message for RewriteObjectRequest {
2517 fn typename() -> &'static str {
2518 "type.googleapis.com/google.storage.v2.RewriteObjectRequest"
2519 }
2520}
2521
2522#[derive(Clone, Default, PartialEq)]
2524#[non_exhaustive]
2525pub struct RewriteResponse {
2526 pub total_bytes_rewritten: i64,
2529
2530 pub object_size: i64,
2533
2534 pub done: bool,
2537
2538 pub rewrite_token: std::string::String,
2541
2542 pub resource: std::option::Option<crate::model::Object>,
2545
2546 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2547}
2548
2549impl RewriteResponse {
2550 pub fn new() -> Self {
2551 std::default::Default::default()
2552 }
2553
2554 pub fn set_total_bytes_rewritten<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
2556 self.total_bytes_rewritten = v.into();
2557 self
2558 }
2559
2560 pub fn set_object_size<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
2562 self.object_size = v.into();
2563 self
2564 }
2565
2566 pub fn set_done<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2568 self.done = v.into();
2569 self
2570 }
2571
2572 pub fn set_rewrite_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2574 self.rewrite_token = v.into();
2575 self
2576 }
2577
2578 pub fn set_resource<T>(mut self, v: T) -> Self
2580 where
2581 T: std::convert::Into<crate::model::Object>,
2582 {
2583 self.resource = std::option::Option::Some(v.into());
2584 self
2585 }
2586
2587 pub fn set_or_clear_resource<T>(mut self, v: std::option::Option<T>) -> Self
2589 where
2590 T: std::convert::Into<crate::model::Object>,
2591 {
2592 self.resource = v.map(|x| x.into());
2593 self
2594 }
2595}
2596
2597impl wkt::message::Message for RewriteResponse {
2598 fn typename() -> &'static str {
2599 "type.googleapis.com/google.storage.v2.RewriteResponse"
2600 }
2601}
2602
2603#[derive(Clone, Default, PartialEq)]
2605#[non_exhaustive]
2606pub struct MoveObjectRequest {
2607 pub bucket: std::string::String,
2609
2610 pub source_object: std::string::String,
2612
2613 pub destination_object: std::string::String,
2615
2616 pub if_source_generation_match: std::option::Option<i64>,
2621
2622 pub if_source_generation_not_match: std::option::Option<i64>,
2628
2629 pub if_source_metageneration_match: std::option::Option<i64>,
2635
2636 pub if_source_metageneration_not_match: std::option::Option<i64>,
2642
2643 pub if_generation_match: std::option::Option<i64>,
2649
2650 pub if_generation_not_match: std::option::Option<i64>,
2657
2658 pub if_metageneration_match: std::option::Option<i64>,
2664
2665 pub if_metageneration_not_match: std::option::Option<i64>,
2671
2672 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2673}
2674
2675impl MoveObjectRequest {
2676 pub fn new() -> Self {
2677 std::default::Default::default()
2678 }
2679
2680 pub fn set_bucket<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2682 self.bucket = v.into();
2683 self
2684 }
2685
2686 pub fn set_source_object<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2688 self.source_object = v.into();
2689 self
2690 }
2691
2692 pub fn set_destination_object<T: std::convert::Into<std::string::String>>(
2694 mut self,
2695 v: T,
2696 ) -> Self {
2697 self.destination_object = v.into();
2698 self
2699 }
2700
2701 pub fn set_if_source_generation_match<T>(mut self, v: T) -> Self
2703 where
2704 T: std::convert::Into<i64>,
2705 {
2706 self.if_source_generation_match = std::option::Option::Some(v.into());
2707 self
2708 }
2709
2710 pub fn set_or_clear_if_source_generation_match<T>(mut self, v: std::option::Option<T>) -> Self
2712 where
2713 T: std::convert::Into<i64>,
2714 {
2715 self.if_source_generation_match = v.map(|x| x.into());
2716 self
2717 }
2718
2719 pub fn set_if_source_generation_not_match<T>(mut self, v: T) -> Self
2721 where
2722 T: std::convert::Into<i64>,
2723 {
2724 self.if_source_generation_not_match = std::option::Option::Some(v.into());
2725 self
2726 }
2727
2728 pub fn set_or_clear_if_source_generation_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.if_source_generation_not_match = v.map(|x| x.into());
2737 self
2738 }
2739
2740 pub fn set_if_source_metageneration_match<T>(mut self, v: T) -> Self
2742 where
2743 T: std::convert::Into<i64>,
2744 {
2745 self.if_source_metageneration_match = std::option::Option::Some(v.into());
2746 self
2747 }
2748
2749 pub fn set_or_clear_if_source_metageneration_match<T>(
2751 mut self,
2752 v: std::option::Option<T>,
2753 ) -> Self
2754 where
2755 T: std::convert::Into<i64>,
2756 {
2757 self.if_source_metageneration_match = v.map(|x| x.into());
2758 self
2759 }
2760
2761 pub fn set_if_source_metageneration_not_match<T>(mut self, v: T) -> Self
2763 where
2764 T: std::convert::Into<i64>,
2765 {
2766 self.if_source_metageneration_not_match = std::option::Option::Some(v.into());
2767 self
2768 }
2769
2770 pub fn set_or_clear_if_source_metageneration_not_match<T>(
2772 mut self,
2773 v: std::option::Option<T>,
2774 ) -> Self
2775 where
2776 T: std::convert::Into<i64>,
2777 {
2778 self.if_source_metageneration_not_match = v.map(|x| x.into());
2779 self
2780 }
2781
2782 pub fn set_if_generation_match<T>(mut self, v: T) -> Self
2784 where
2785 T: std::convert::Into<i64>,
2786 {
2787 self.if_generation_match = std::option::Option::Some(v.into());
2788 self
2789 }
2790
2791 pub fn set_or_clear_if_generation_match<T>(mut self, v: std::option::Option<T>) -> Self
2793 where
2794 T: std::convert::Into<i64>,
2795 {
2796 self.if_generation_match = v.map(|x| x.into());
2797 self
2798 }
2799
2800 pub fn set_if_generation_not_match<T>(mut self, v: T) -> Self
2802 where
2803 T: std::convert::Into<i64>,
2804 {
2805 self.if_generation_not_match = std::option::Option::Some(v.into());
2806 self
2807 }
2808
2809 pub fn set_or_clear_if_generation_not_match<T>(mut self, v: std::option::Option<T>) -> Self
2811 where
2812 T: std::convert::Into<i64>,
2813 {
2814 self.if_generation_not_match = v.map(|x| x.into());
2815 self
2816 }
2817
2818 pub fn set_if_metageneration_match<T>(mut self, v: T) -> Self
2820 where
2821 T: std::convert::Into<i64>,
2822 {
2823 self.if_metageneration_match = std::option::Option::Some(v.into());
2824 self
2825 }
2826
2827 pub fn set_or_clear_if_metageneration_match<T>(mut self, v: std::option::Option<T>) -> Self
2829 where
2830 T: std::convert::Into<i64>,
2831 {
2832 self.if_metageneration_match = v.map(|x| x.into());
2833 self
2834 }
2835
2836 pub fn set_if_metageneration_not_match<T>(mut self, v: T) -> Self
2838 where
2839 T: std::convert::Into<i64>,
2840 {
2841 self.if_metageneration_not_match = std::option::Option::Some(v.into());
2842 self
2843 }
2844
2845 pub fn set_or_clear_if_metageneration_not_match<T>(mut self, v: std::option::Option<T>) -> Self
2847 where
2848 T: std::convert::Into<i64>,
2849 {
2850 self.if_metageneration_not_match = v.map(|x| x.into());
2851 self
2852 }
2853}
2854
2855impl wkt::message::Message for MoveObjectRequest {
2856 fn typename() -> &'static str {
2857 "type.googleapis.com/google.storage.v2.MoveObjectRequest"
2858 }
2859}
2860
2861#[derive(Clone, Default, PartialEq)]
2863#[non_exhaustive]
2864pub struct UpdateObjectRequest {
2865 pub object: std::option::Option<crate::model::Object>,
2871
2872 pub if_generation_match: std::option::Option<i64>,
2876
2877 pub if_generation_not_match: std::option::Option<i64>,
2882
2883 pub if_metageneration_match: std::option::Option<i64>,
2886
2887 pub if_metageneration_not_match: std::option::Option<i64>,
2890
2891 pub predefined_acl: std::string::String,
2895
2896 pub update_mask: std::option::Option<wkt::FieldMask>,
2905
2906 pub common_object_request_params: std::option::Option<crate::model::CommonObjectRequestParams>,
2909
2910 pub override_unlocked_retention: bool,
2912
2913 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2914}
2915
2916impl UpdateObjectRequest {
2917 pub fn new() -> Self {
2918 std::default::Default::default()
2919 }
2920
2921 pub fn set_object<T>(mut self, v: T) -> Self
2923 where
2924 T: std::convert::Into<crate::model::Object>,
2925 {
2926 self.object = std::option::Option::Some(v.into());
2927 self
2928 }
2929
2930 pub fn set_or_clear_object<T>(mut self, v: std::option::Option<T>) -> Self
2932 where
2933 T: std::convert::Into<crate::model::Object>,
2934 {
2935 self.object = v.map(|x| x.into());
2936 self
2937 }
2938
2939 pub fn set_if_generation_match<T>(mut self, v: T) -> Self
2941 where
2942 T: std::convert::Into<i64>,
2943 {
2944 self.if_generation_match = std::option::Option::Some(v.into());
2945 self
2946 }
2947
2948 pub fn set_or_clear_if_generation_match<T>(mut self, v: std::option::Option<T>) -> Self
2950 where
2951 T: std::convert::Into<i64>,
2952 {
2953 self.if_generation_match = v.map(|x| x.into());
2954 self
2955 }
2956
2957 pub fn set_if_generation_not_match<T>(mut self, v: T) -> Self
2959 where
2960 T: std::convert::Into<i64>,
2961 {
2962 self.if_generation_not_match = std::option::Option::Some(v.into());
2963 self
2964 }
2965
2966 pub fn set_or_clear_if_generation_not_match<T>(mut self, v: std::option::Option<T>) -> Self
2968 where
2969 T: std::convert::Into<i64>,
2970 {
2971 self.if_generation_not_match = v.map(|x| x.into());
2972 self
2973 }
2974
2975 pub fn set_if_metageneration_match<T>(mut self, v: T) -> Self
2977 where
2978 T: std::convert::Into<i64>,
2979 {
2980 self.if_metageneration_match = std::option::Option::Some(v.into());
2981 self
2982 }
2983
2984 pub fn set_or_clear_if_metageneration_match<T>(mut self, v: std::option::Option<T>) -> Self
2986 where
2987 T: std::convert::Into<i64>,
2988 {
2989 self.if_metageneration_match = v.map(|x| x.into());
2990 self
2991 }
2992
2993 pub fn set_if_metageneration_not_match<T>(mut self, v: T) -> Self
2995 where
2996 T: std::convert::Into<i64>,
2997 {
2998 self.if_metageneration_not_match = std::option::Option::Some(v.into());
2999 self
3000 }
3001
3002 pub fn set_or_clear_if_metageneration_not_match<T>(mut self, v: std::option::Option<T>) -> Self
3004 where
3005 T: std::convert::Into<i64>,
3006 {
3007 self.if_metageneration_not_match = v.map(|x| x.into());
3008 self
3009 }
3010
3011 pub fn set_predefined_acl<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3013 self.predefined_acl = v.into();
3014 self
3015 }
3016
3017 pub fn set_update_mask<T>(mut self, v: T) -> Self
3019 where
3020 T: std::convert::Into<wkt::FieldMask>,
3021 {
3022 self.update_mask = std::option::Option::Some(v.into());
3023 self
3024 }
3025
3026 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3028 where
3029 T: std::convert::Into<wkt::FieldMask>,
3030 {
3031 self.update_mask = v.map(|x| x.into());
3032 self
3033 }
3034
3035 pub fn set_common_object_request_params<T>(mut self, v: T) -> Self
3037 where
3038 T: std::convert::Into<crate::model::CommonObjectRequestParams>,
3039 {
3040 self.common_object_request_params = std::option::Option::Some(v.into());
3041 self
3042 }
3043
3044 pub fn set_or_clear_common_object_request_params<T>(mut self, v: std::option::Option<T>) -> Self
3046 where
3047 T: std::convert::Into<crate::model::CommonObjectRequestParams>,
3048 {
3049 self.common_object_request_params = v.map(|x| x.into());
3050 self
3051 }
3052
3053 pub fn set_override_unlocked_retention<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3055 self.override_unlocked_retention = v.into();
3056 self
3057 }
3058}
3059
3060impl wkt::message::Message for UpdateObjectRequest {
3061 fn typename() -> &'static str {
3062 "type.googleapis.com/google.storage.v2.UpdateObjectRequest"
3063 }
3064}
3065
3066#[derive(Clone, Default, PartialEq)]
3068#[non_exhaustive]
3069pub struct CommonObjectRequestParams {
3070 pub encryption_algorithm: std::string::String,
3073
3074 pub encryption_key_bytes: ::bytes::Bytes,
3077
3078 pub encryption_key_sha256_bytes: ::bytes::Bytes,
3081
3082 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3083}
3084
3085impl CommonObjectRequestParams {
3086 pub fn new() -> Self {
3087 std::default::Default::default()
3088 }
3089
3090 pub fn set_encryption_algorithm<T: std::convert::Into<std::string::String>>(
3092 mut self,
3093 v: T,
3094 ) -> Self {
3095 self.encryption_algorithm = v.into();
3096 self
3097 }
3098
3099 pub fn set_encryption_key_bytes<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
3101 self.encryption_key_bytes = v.into();
3102 self
3103 }
3104
3105 pub fn set_encryption_key_sha256_bytes<T: std::convert::Into<::bytes::Bytes>>(
3107 mut self,
3108 v: T,
3109 ) -> Self {
3110 self.encryption_key_sha256_bytes = v.into();
3111 self
3112 }
3113}
3114
3115impl wkt::message::Message for CommonObjectRequestParams {
3116 fn typename() -> &'static str {
3117 "type.googleapis.com/google.storage.v2.CommonObjectRequestParams"
3118 }
3119}
3120
3121#[derive(Clone, Default, PartialEq)]
3123#[non_exhaustive]
3124pub struct Bucket {
3125 pub name: std::string::String,
3128
3129 pub bucket_id: std::string::String,
3133
3134 pub etag: std::string::String,
3138
3139 pub project: std::string::String,
3144
3145 pub metageneration: i64,
3147
3148 pub location: std::string::String,
3155
3156 pub location_type: std::string::String,
3159
3160 pub storage_class: std::string::String,
3167
3168 pub rpo: std::string::String,
3175
3176 pub acl: std::vec::Vec<crate::model::BucketAccessControl>,
3180
3181 pub default_object_acl: std::vec::Vec<crate::model::ObjectAccessControl>,
3185
3186 pub lifecycle: std::option::Option<crate::model::bucket::Lifecycle>,
3190
3191 pub create_time: std::option::Option<wkt::Timestamp>,
3193
3194 pub cors: std::vec::Vec<crate::model::bucket::Cors>,
3197
3198 pub update_time: std::option::Option<wkt::Timestamp>,
3200
3201 pub default_event_based_hold: bool,
3215
3216 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
3218
3219 pub website: std::option::Option<crate::model::bucket::Website>,
3224
3225 pub versioning: std::option::Option<crate::model::bucket::Versioning>,
3227
3228 pub logging: std::option::Option<crate::model::bucket::Logging>,
3231
3232 pub owner: std::option::Option<crate::model::Owner>,
3235
3236 pub encryption: std::option::Option<crate::model::bucket::Encryption>,
3238
3239 pub billing: std::option::Option<crate::model::bucket::Billing>,
3241
3242 pub retention_policy: std::option::Option<crate::model::bucket::RetentionPolicy>,
3252
3253 pub iam_config: std::option::Option<crate::model::bucket::IamConfig>,
3255
3256 pub satisfies_pzs: bool,
3258
3259 pub custom_placement_config: std::option::Option<crate::model::bucket::CustomPlacementConfig>,
3264
3265 pub autoclass: std::option::Option<crate::model::bucket::Autoclass>,
3269
3270 pub hierarchical_namespace: std::option::Option<crate::model::bucket::HierarchicalNamespace>,
3274
3275 pub soft_delete_policy: std::option::Option<crate::model::bucket::SoftDeletePolicy>,
3278
3279 pub object_retention: std::option::Option<crate::model::bucket::ObjectRetention>,
3282
3283 pub ip_filter: std::option::Option<crate::model::bucket::IpFilter>,
3285
3286 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3287}
3288
3289impl Bucket {
3290 pub fn new() -> Self {
3291 std::default::Default::default()
3292 }
3293
3294 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3296 self.name = v.into();
3297 self
3298 }
3299
3300 pub fn set_bucket_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3302 self.bucket_id = v.into();
3303 self
3304 }
3305
3306 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3308 self.etag = v.into();
3309 self
3310 }
3311
3312 pub fn set_project<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3314 self.project = v.into();
3315 self
3316 }
3317
3318 pub fn set_metageneration<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
3320 self.metageneration = v.into();
3321 self
3322 }
3323
3324 pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3326 self.location = v.into();
3327 self
3328 }
3329
3330 pub fn set_location_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3332 self.location_type = v.into();
3333 self
3334 }
3335
3336 pub fn set_storage_class<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3338 self.storage_class = v.into();
3339 self
3340 }
3341
3342 pub fn set_rpo<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3344 self.rpo = v.into();
3345 self
3346 }
3347
3348 pub fn set_acl<T, V>(mut self, v: T) -> Self
3350 where
3351 T: std::iter::IntoIterator<Item = V>,
3352 V: std::convert::Into<crate::model::BucketAccessControl>,
3353 {
3354 use std::iter::Iterator;
3355 self.acl = v.into_iter().map(|i| i.into()).collect();
3356 self
3357 }
3358
3359 pub fn set_default_object_acl<T, V>(mut self, v: T) -> Self
3361 where
3362 T: std::iter::IntoIterator<Item = V>,
3363 V: std::convert::Into<crate::model::ObjectAccessControl>,
3364 {
3365 use std::iter::Iterator;
3366 self.default_object_acl = v.into_iter().map(|i| i.into()).collect();
3367 self
3368 }
3369
3370 pub fn set_lifecycle<T>(mut self, v: T) -> Self
3372 where
3373 T: std::convert::Into<crate::model::bucket::Lifecycle>,
3374 {
3375 self.lifecycle = std::option::Option::Some(v.into());
3376 self
3377 }
3378
3379 pub fn set_or_clear_lifecycle<T>(mut self, v: std::option::Option<T>) -> Self
3381 where
3382 T: std::convert::Into<crate::model::bucket::Lifecycle>,
3383 {
3384 self.lifecycle = v.map(|x| x.into());
3385 self
3386 }
3387
3388 pub fn set_create_time<T>(mut self, v: T) -> Self
3390 where
3391 T: std::convert::Into<wkt::Timestamp>,
3392 {
3393 self.create_time = std::option::Option::Some(v.into());
3394 self
3395 }
3396
3397 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
3399 where
3400 T: std::convert::Into<wkt::Timestamp>,
3401 {
3402 self.create_time = v.map(|x| x.into());
3403 self
3404 }
3405
3406 pub fn set_cors<T, V>(mut self, v: T) -> Self
3408 where
3409 T: std::iter::IntoIterator<Item = V>,
3410 V: std::convert::Into<crate::model::bucket::Cors>,
3411 {
3412 use std::iter::Iterator;
3413 self.cors = v.into_iter().map(|i| i.into()).collect();
3414 self
3415 }
3416
3417 pub fn set_update_time<T>(mut self, v: T) -> Self
3419 where
3420 T: std::convert::Into<wkt::Timestamp>,
3421 {
3422 self.update_time = std::option::Option::Some(v.into());
3423 self
3424 }
3425
3426 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
3428 where
3429 T: std::convert::Into<wkt::Timestamp>,
3430 {
3431 self.update_time = v.map(|x| x.into());
3432 self
3433 }
3434
3435 pub fn set_default_event_based_hold<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3437 self.default_event_based_hold = v.into();
3438 self
3439 }
3440
3441 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
3443 where
3444 T: std::iter::IntoIterator<Item = (K, V)>,
3445 K: std::convert::Into<std::string::String>,
3446 V: std::convert::Into<std::string::String>,
3447 {
3448 use std::iter::Iterator;
3449 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
3450 self
3451 }
3452
3453 pub fn set_website<T>(mut self, v: T) -> Self
3455 where
3456 T: std::convert::Into<crate::model::bucket::Website>,
3457 {
3458 self.website = std::option::Option::Some(v.into());
3459 self
3460 }
3461
3462 pub fn set_or_clear_website<T>(mut self, v: std::option::Option<T>) -> Self
3464 where
3465 T: std::convert::Into<crate::model::bucket::Website>,
3466 {
3467 self.website = v.map(|x| x.into());
3468 self
3469 }
3470
3471 pub fn set_versioning<T>(mut self, v: T) -> Self
3473 where
3474 T: std::convert::Into<crate::model::bucket::Versioning>,
3475 {
3476 self.versioning = std::option::Option::Some(v.into());
3477 self
3478 }
3479
3480 pub fn set_or_clear_versioning<T>(mut self, v: std::option::Option<T>) -> Self
3482 where
3483 T: std::convert::Into<crate::model::bucket::Versioning>,
3484 {
3485 self.versioning = v.map(|x| x.into());
3486 self
3487 }
3488
3489 pub fn set_logging<T>(mut self, v: T) -> Self
3491 where
3492 T: std::convert::Into<crate::model::bucket::Logging>,
3493 {
3494 self.logging = std::option::Option::Some(v.into());
3495 self
3496 }
3497
3498 pub fn set_or_clear_logging<T>(mut self, v: std::option::Option<T>) -> Self
3500 where
3501 T: std::convert::Into<crate::model::bucket::Logging>,
3502 {
3503 self.logging = v.map(|x| x.into());
3504 self
3505 }
3506
3507 pub fn set_owner<T>(mut self, v: T) -> Self
3509 where
3510 T: std::convert::Into<crate::model::Owner>,
3511 {
3512 self.owner = std::option::Option::Some(v.into());
3513 self
3514 }
3515
3516 pub fn set_or_clear_owner<T>(mut self, v: std::option::Option<T>) -> Self
3518 where
3519 T: std::convert::Into<crate::model::Owner>,
3520 {
3521 self.owner = v.map(|x| x.into());
3522 self
3523 }
3524
3525 pub fn set_encryption<T>(mut self, v: T) -> Self
3527 where
3528 T: std::convert::Into<crate::model::bucket::Encryption>,
3529 {
3530 self.encryption = std::option::Option::Some(v.into());
3531 self
3532 }
3533
3534 pub fn set_or_clear_encryption<T>(mut self, v: std::option::Option<T>) -> Self
3536 where
3537 T: std::convert::Into<crate::model::bucket::Encryption>,
3538 {
3539 self.encryption = v.map(|x| x.into());
3540 self
3541 }
3542
3543 pub fn set_billing<T>(mut self, v: T) -> Self
3545 where
3546 T: std::convert::Into<crate::model::bucket::Billing>,
3547 {
3548 self.billing = std::option::Option::Some(v.into());
3549 self
3550 }
3551
3552 pub fn set_or_clear_billing<T>(mut self, v: std::option::Option<T>) -> Self
3554 where
3555 T: std::convert::Into<crate::model::bucket::Billing>,
3556 {
3557 self.billing = v.map(|x| x.into());
3558 self
3559 }
3560
3561 pub fn set_retention_policy<T>(mut self, v: T) -> Self
3563 where
3564 T: std::convert::Into<crate::model::bucket::RetentionPolicy>,
3565 {
3566 self.retention_policy = std::option::Option::Some(v.into());
3567 self
3568 }
3569
3570 pub fn set_or_clear_retention_policy<T>(mut self, v: std::option::Option<T>) -> Self
3572 where
3573 T: std::convert::Into<crate::model::bucket::RetentionPolicy>,
3574 {
3575 self.retention_policy = v.map(|x| x.into());
3576 self
3577 }
3578
3579 pub fn set_iam_config<T>(mut self, v: T) -> Self
3581 where
3582 T: std::convert::Into<crate::model::bucket::IamConfig>,
3583 {
3584 self.iam_config = std::option::Option::Some(v.into());
3585 self
3586 }
3587
3588 pub fn set_or_clear_iam_config<T>(mut self, v: std::option::Option<T>) -> Self
3590 where
3591 T: std::convert::Into<crate::model::bucket::IamConfig>,
3592 {
3593 self.iam_config = v.map(|x| x.into());
3594 self
3595 }
3596
3597 pub fn set_satisfies_pzs<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3599 self.satisfies_pzs = v.into();
3600 self
3601 }
3602
3603 pub fn set_custom_placement_config<T>(mut self, v: T) -> Self
3605 where
3606 T: std::convert::Into<crate::model::bucket::CustomPlacementConfig>,
3607 {
3608 self.custom_placement_config = std::option::Option::Some(v.into());
3609 self
3610 }
3611
3612 pub fn set_or_clear_custom_placement_config<T>(mut self, v: std::option::Option<T>) -> Self
3614 where
3615 T: std::convert::Into<crate::model::bucket::CustomPlacementConfig>,
3616 {
3617 self.custom_placement_config = v.map(|x| x.into());
3618 self
3619 }
3620
3621 pub fn set_autoclass<T>(mut self, v: T) -> Self
3623 where
3624 T: std::convert::Into<crate::model::bucket::Autoclass>,
3625 {
3626 self.autoclass = std::option::Option::Some(v.into());
3627 self
3628 }
3629
3630 pub fn set_or_clear_autoclass<T>(mut self, v: std::option::Option<T>) -> Self
3632 where
3633 T: std::convert::Into<crate::model::bucket::Autoclass>,
3634 {
3635 self.autoclass = v.map(|x| x.into());
3636 self
3637 }
3638
3639 pub fn set_hierarchical_namespace<T>(mut self, v: T) -> Self
3641 where
3642 T: std::convert::Into<crate::model::bucket::HierarchicalNamespace>,
3643 {
3644 self.hierarchical_namespace = std::option::Option::Some(v.into());
3645 self
3646 }
3647
3648 pub fn set_or_clear_hierarchical_namespace<T>(mut self, v: std::option::Option<T>) -> Self
3650 where
3651 T: std::convert::Into<crate::model::bucket::HierarchicalNamespace>,
3652 {
3653 self.hierarchical_namespace = v.map(|x| x.into());
3654 self
3655 }
3656
3657 pub fn set_soft_delete_policy<T>(mut self, v: T) -> Self
3659 where
3660 T: std::convert::Into<crate::model::bucket::SoftDeletePolicy>,
3661 {
3662 self.soft_delete_policy = std::option::Option::Some(v.into());
3663 self
3664 }
3665
3666 pub fn set_or_clear_soft_delete_policy<T>(mut self, v: std::option::Option<T>) -> Self
3668 where
3669 T: std::convert::Into<crate::model::bucket::SoftDeletePolicy>,
3670 {
3671 self.soft_delete_policy = v.map(|x| x.into());
3672 self
3673 }
3674
3675 pub fn set_object_retention<T>(mut self, v: T) -> Self
3677 where
3678 T: std::convert::Into<crate::model::bucket::ObjectRetention>,
3679 {
3680 self.object_retention = std::option::Option::Some(v.into());
3681 self
3682 }
3683
3684 pub fn set_or_clear_object_retention<T>(mut self, v: std::option::Option<T>) -> Self
3686 where
3687 T: std::convert::Into<crate::model::bucket::ObjectRetention>,
3688 {
3689 self.object_retention = v.map(|x| x.into());
3690 self
3691 }
3692
3693 pub fn set_ip_filter<T>(mut self, v: T) -> Self
3695 where
3696 T: std::convert::Into<crate::model::bucket::IpFilter>,
3697 {
3698 self.ip_filter = std::option::Option::Some(v.into());
3699 self
3700 }
3701
3702 pub fn set_or_clear_ip_filter<T>(mut self, v: std::option::Option<T>) -> Self
3704 where
3705 T: std::convert::Into<crate::model::bucket::IpFilter>,
3706 {
3707 self.ip_filter = v.map(|x| x.into());
3708 self
3709 }
3710}
3711
3712impl wkt::message::Message for Bucket {
3713 fn typename() -> &'static str {
3714 "type.googleapis.com/google.storage.v2.Bucket"
3715 }
3716}
3717
3718pub mod bucket {
3720 #[allow(unused_imports)]
3721 use super::*;
3722
3723 #[derive(Clone, Default, PartialEq)]
3725 #[non_exhaustive]
3726 pub struct Billing {
3727 pub requester_pays: bool,
3729
3730 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3731 }
3732
3733 impl Billing {
3734 pub fn new() -> Self {
3735 std::default::Default::default()
3736 }
3737
3738 pub fn set_requester_pays<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3740 self.requester_pays = v.into();
3741 self
3742 }
3743 }
3744
3745 impl wkt::message::Message for Billing {
3746 fn typename() -> &'static str {
3747 "type.googleapis.com/google.storage.v2.Bucket.Billing"
3748 }
3749 }
3750
3751 #[derive(Clone, Default, PartialEq)]
3756 #[non_exhaustive]
3757 pub struct Cors {
3758 pub origin: std::vec::Vec<std::string::String>,
3762
3763 pub method: std::vec::Vec<std::string::String>,
3768
3769 pub response_header: std::vec::Vec<std::string::String>,
3773
3774 pub max_age_seconds: i32,
3778
3779 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3780 }
3781
3782 impl Cors {
3783 pub fn new() -> Self {
3784 std::default::Default::default()
3785 }
3786
3787 pub fn set_origin<T, V>(mut self, v: T) -> Self
3789 where
3790 T: std::iter::IntoIterator<Item = V>,
3791 V: std::convert::Into<std::string::String>,
3792 {
3793 use std::iter::Iterator;
3794 self.origin = v.into_iter().map(|i| i.into()).collect();
3795 self
3796 }
3797
3798 pub fn set_method<T, V>(mut self, v: T) -> Self
3800 where
3801 T: std::iter::IntoIterator<Item = V>,
3802 V: std::convert::Into<std::string::String>,
3803 {
3804 use std::iter::Iterator;
3805 self.method = v.into_iter().map(|i| i.into()).collect();
3806 self
3807 }
3808
3809 pub fn set_response_header<T, V>(mut self, v: T) -> Self
3811 where
3812 T: std::iter::IntoIterator<Item = V>,
3813 V: std::convert::Into<std::string::String>,
3814 {
3815 use std::iter::Iterator;
3816 self.response_header = v.into_iter().map(|i| i.into()).collect();
3817 self
3818 }
3819
3820 pub fn set_max_age_seconds<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3822 self.max_age_seconds = v.into();
3823 self
3824 }
3825 }
3826
3827 impl wkt::message::Message for Cors {
3828 fn typename() -> &'static str {
3829 "type.googleapis.com/google.storage.v2.Bucket.Cors"
3830 }
3831 }
3832
3833 #[derive(Clone, Default, PartialEq)]
3835 #[non_exhaustive]
3836 pub struct Encryption {
3837 pub default_kms_key: std::string::String,
3840
3841 pub google_managed_encryption_enforcement_config: std::option::Option<
3846 crate::model::bucket::encryption::GoogleManagedEncryptionEnforcementConfig,
3847 >,
3848
3849 pub customer_managed_encryption_enforcement_config: std::option::Option<
3854 crate::model::bucket::encryption::CustomerManagedEncryptionEnforcementConfig,
3855 >,
3856
3857 pub customer_supplied_encryption_enforcement_config: std::option::Option<
3862 crate::model::bucket::encryption::CustomerSuppliedEncryptionEnforcementConfig,
3863 >,
3864
3865 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3866 }
3867
3868 impl Encryption {
3869 pub fn new() -> Self {
3870 std::default::Default::default()
3871 }
3872
3873 pub fn set_default_kms_key<T: std::convert::Into<std::string::String>>(
3875 mut self,
3876 v: T,
3877 ) -> Self {
3878 self.default_kms_key = v.into();
3879 self
3880 }
3881
3882 pub fn set_google_managed_encryption_enforcement_config<T>(mut self, v: T) -> Self
3884 where
3885 T: std::convert::Into<
3886 crate::model::bucket::encryption::GoogleManagedEncryptionEnforcementConfig,
3887 >,
3888 {
3889 self.google_managed_encryption_enforcement_config = std::option::Option::Some(v.into());
3890 self
3891 }
3892
3893 pub fn set_or_clear_google_managed_encryption_enforcement_config<T>(
3895 mut self,
3896 v: std::option::Option<T>,
3897 ) -> Self
3898 where
3899 T: std::convert::Into<
3900 crate::model::bucket::encryption::GoogleManagedEncryptionEnforcementConfig,
3901 >,
3902 {
3903 self.google_managed_encryption_enforcement_config = v.map(|x| x.into());
3904 self
3905 }
3906
3907 pub fn set_customer_managed_encryption_enforcement_config<T>(mut self, v: T) -> Self
3909 where
3910 T: std::convert::Into<
3911 crate::model::bucket::encryption::CustomerManagedEncryptionEnforcementConfig,
3912 >,
3913 {
3914 self.customer_managed_encryption_enforcement_config =
3915 std::option::Option::Some(v.into());
3916 self
3917 }
3918
3919 pub fn set_or_clear_customer_managed_encryption_enforcement_config<T>(
3921 mut self,
3922 v: std::option::Option<T>,
3923 ) -> Self
3924 where
3925 T: std::convert::Into<
3926 crate::model::bucket::encryption::CustomerManagedEncryptionEnforcementConfig,
3927 >,
3928 {
3929 self.customer_managed_encryption_enforcement_config = v.map(|x| x.into());
3930 self
3931 }
3932
3933 pub fn set_customer_supplied_encryption_enforcement_config<T>(mut self, v: T) -> Self
3935 where
3936 T: std::convert::Into<
3937 crate::model::bucket::encryption::CustomerSuppliedEncryptionEnforcementConfig,
3938 >,
3939 {
3940 self.customer_supplied_encryption_enforcement_config =
3941 std::option::Option::Some(v.into());
3942 self
3943 }
3944
3945 pub fn set_or_clear_customer_supplied_encryption_enforcement_config<T>(
3947 mut self,
3948 v: std::option::Option<T>,
3949 ) -> Self
3950 where
3951 T: std::convert::Into<
3952 crate::model::bucket::encryption::CustomerSuppliedEncryptionEnforcementConfig,
3953 >,
3954 {
3955 self.customer_supplied_encryption_enforcement_config = v.map(|x| x.into());
3956 self
3957 }
3958 }
3959
3960 impl wkt::message::Message for Encryption {
3961 fn typename() -> &'static str {
3962 "type.googleapis.com/google.storage.v2.Bucket.Encryption"
3963 }
3964 }
3965
3966 pub mod encryption {
3968 #[allow(unused_imports)]
3969 use super::*;
3970
3971 #[derive(Clone, Default, PartialEq)]
3973 #[non_exhaustive]
3974 pub struct GoogleManagedEncryptionEnforcementConfig {
3975 pub restriction_mode: std::option::Option<std::string::String>,
3982
3983 pub effective_time: std::option::Option<wkt::Timestamp>,
3985
3986 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3987 }
3988
3989 impl GoogleManagedEncryptionEnforcementConfig {
3990 pub fn new() -> Self {
3991 std::default::Default::default()
3992 }
3993
3994 pub fn set_restriction_mode<T>(mut self, v: T) -> Self
3996 where
3997 T: std::convert::Into<std::string::String>,
3998 {
3999 self.restriction_mode = std::option::Option::Some(v.into());
4000 self
4001 }
4002
4003 pub fn set_or_clear_restriction_mode<T>(mut self, v: std::option::Option<T>) -> Self
4005 where
4006 T: std::convert::Into<std::string::String>,
4007 {
4008 self.restriction_mode = v.map(|x| x.into());
4009 self
4010 }
4011
4012 pub fn set_effective_time<T>(mut self, v: T) -> Self
4014 where
4015 T: std::convert::Into<wkt::Timestamp>,
4016 {
4017 self.effective_time = std::option::Option::Some(v.into());
4018 self
4019 }
4020
4021 pub fn set_or_clear_effective_time<T>(mut self, v: std::option::Option<T>) -> Self
4023 where
4024 T: std::convert::Into<wkt::Timestamp>,
4025 {
4026 self.effective_time = v.map(|x| x.into());
4027 self
4028 }
4029 }
4030
4031 impl wkt::message::Message for GoogleManagedEncryptionEnforcementConfig {
4032 fn typename() -> &'static str {
4033 "type.googleapis.com/google.storage.v2.Bucket.Encryption.GoogleManagedEncryptionEnforcementConfig"
4034 }
4035 }
4036
4037 #[derive(Clone, Default, PartialEq)]
4039 #[non_exhaustive]
4040 pub struct CustomerManagedEncryptionEnforcementConfig {
4041 pub restriction_mode: std::option::Option<std::string::String>,
4048
4049 pub effective_time: std::option::Option<wkt::Timestamp>,
4051
4052 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4053 }
4054
4055 impl CustomerManagedEncryptionEnforcementConfig {
4056 pub fn new() -> Self {
4057 std::default::Default::default()
4058 }
4059
4060 pub fn set_restriction_mode<T>(mut self, v: T) -> Self
4062 where
4063 T: std::convert::Into<std::string::String>,
4064 {
4065 self.restriction_mode = std::option::Option::Some(v.into());
4066 self
4067 }
4068
4069 pub fn set_or_clear_restriction_mode<T>(mut self, v: std::option::Option<T>) -> Self
4071 where
4072 T: std::convert::Into<std::string::String>,
4073 {
4074 self.restriction_mode = v.map(|x| x.into());
4075 self
4076 }
4077
4078 pub fn set_effective_time<T>(mut self, v: T) -> Self
4080 where
4081 T: std::convert::Into<wkt::Timestamp>,
4082 {
4083 self.effective_time = std::option::Option::Some(v.into());
4084 self
4085 }
4086
4087 pub fn set_or_clear_effective_time<T>(mut self, v: std::option::Option<T>) -> Self
4089 where
4090 T: std::convert::Into<wkt::Timestamp>,
4091 {
4092 self.effective_time = v.map(|x| x.into());
4093 self
4094 }
4095 }
4096
4097 impl wkt::message::Message for CustomerManagedEncryptionEnforcementConfig {
4098 fn typename() -> &'static str {
4099 "type.googleapis.com/google.storage.v2.Bucket.Encryption.CustomerManagedEncryptionEnforcementConfig"
4100 }
4101 }
4102
4103 #[derive(Clone, Default, PartialEq)]
4105 #[non_exhaustive]
4106 pub struct CustomerSuppliedEncryptionEnforcementConfig {
4107 pub restriction_mode: std::option::Option<std::string::String>,
4115
4116 pub effective_time: std::option::Option<wkt::Timestamp>,
4118
4119 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4120 }
4121
4122 impl CustomerSuppliedEncryptionEnforcementConfig {
4123 pub fn new() -> Self {
4124 std::default::Default::default()
4125 }
4126
4127 pub fn set_restriction_mode<T>(mut self, v: T) -> Self
4129 where
4130 T: std::convert::Into<std::string::String>,
4131 {
4132 self.restriction_mode = std::option::Option::Some(v.into());
4133 self
4134 }
4135
4136 pub fn set_or_clear_restriction_mode<T>(mut self, v: std::option::Option<T>) -> Self
4138 where
4139 T: std::convert::Into<std::string::String>,
4140 {
4141 self.restriction_mode = v.map(|x| x.into());
4142 self
4143 }
4144
4145 pub fn set_effective_time<T>(mut self, v: T) -> Self
4147 where
4148 T: std::convert::Into<wkt::Timestamp>,
4149 {
4150 self.effective_time = std::option::Option::Some(v.into());
4151 self
4152 }
4153
4154 pub fn set_or_clear_effective_time<T>(mut self, v: std::option::Option<T>) -> Self
4156 where
4157 T: std::convert::Into<wkt::Timestamp>,
4158 {
4159 self.effective_time = v.map(|x| x.into());
4160 self
4161 }
4162 }
4163
4164 impl wkt::message::Message for CustomerSuppliedEncryptionEnforcementConfig {
4165 fn typename() -> &'static str {
4166 "type.googleapis.com/google.storage.v2.Bucket.Encryption.CustomerSuppliedEncryptionEnforcementConfig"
4167 }
4168 }
4169 }
4170
4171 #[derive(Clone, Default, PartialEq)]
4173 #[non_exhaustive]
4174 pub struct IamConfig {
4175 pub uniform_bucket_level_access:
4177 std::option::Option<crate::model::bucket::iam_config::UniformBucketLevelAccess>,
4178
4179 pub public_access_prevention: std::string::String,
4182
4183 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4184 }
4185
4186 impl IamConfig {
4187 pub fn new() -> Self {
4188 std::default::Default::default()
4189 }
4190
4191 pub fn set_uniform_bucket_level_access<T>(mut self, v: T) -> Self
4193 where
4194 T: std::convert::Into<crate::model::bucket::iam_config::UniformBucketLevelAccess>,
4195 {
4196 self.uniform_bucket_level_access = std::option::Option::Some(v.into());
4197 self
4198 }
4199
4200 pub fn set_or_clear_uniform_bucket_level_access<T>(
4202 mut self,
4203 v: std::option::Option<T>,
4204 ) -> Self
4205 where
4206 T: std::convert::Into<crate::model::bucket::iam_config::UniformBucketLevelAccess>,
4207 {
4208 self.uniform_bucket_level_access = v.map(|x| x.into());
4209 self
4210 }
4211
4212 pub fn set_public_access_prevention<T: std::convert::Into<std::string::String>>(
4214 mut self,
4215 v: T,
4216 ) -> Self {
4217 self.public_access_prevention = v.into();
4218 self
4219 }
4220 }
4221
4222 impl wkt::message::Message for IamConfig {
4223 fn typename() -> &'static str {
4224 "type.googleapis.com/google.storage.v2.Bucket.IamConfig"
4225 }
4226 }
4227
4228 pub mod iam_config {
4230 #[allow(unused_imports)]
4231 use super::*;
4232
4233 #[derive(Clone, Default, PartialEq)]
4236 #[non_exhaustive]
4237 pub struct UniformBucketLevelAccess {
4238 pub enabled: bool,
4241
4242 pub lock_time: std::option::Option<wkt::Timestamp>,
4247
4248 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4249 }
4250
4251 impl UniformBucketLevelAccess {
4252 pub fn new() -> Self {
4253 std::default::Default::default()
4254 }
4255
4256 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4258 self.enabled = v.into();
4259 self
4260 }
4261
4262 pub fn set_lock_time<T>(mut self, v: T) -> Self
4264 where
4265 T: std::convert::Into<wkt::Timestamp>,
4266 {
4267 self.lock_time = std::option::Option::Some(v.into());
4268 self
4269 }
4270
4271 pub fn set_or_clear_lock_time<T>(mut self, v: std::option::Option<T>) -> Self
4273 where
4274 T: std::convert::Into<wkt::Timestamp>,
4275 {
4276 self.lock_time = v.map(|x| x.into());
4277 self
4278 }
4279 }
4280
4281 impl wkt::message::Message for UniformBucketLevelAccess {
4282 fn typename() -> &'static str {
4283 "type.googleapis.com/google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess"
4284 }
4285 }
4286 }
4287
4288 #[derive(Clone, Default, PartialEq)]
4291 #[non_exhaustive]
4292 pub struct Lifecycle {
4293 pub rule: std::vec::Vec<crate::model::bucket::lifecycle::Rule>,
4296
4297 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4298 }
4299
4300 impl Lifecycle {
4301 pub fn new() -> Self {
4302 std::default::Default::default()
4303 }
4304
4305 pub fn set_rule<T, V>(mut self, v: T) -> Self
4307 where
4308 T: std::iter::IntoIterator<Item = V>,
4309 V: std::convert::Into<crate::model::bucket::lifecycle::Rule>,
4310 {
4311 use std::iter::Iterator;
4312 self.rule = v.into_iter().map(|i| i.into()).collect();
4313 self
4314 }
4315 }
4316
4317 impl wkt::message::Message for Lifecycle {
4318 fn typename() -> &'static str {
4319 "type.googleapis.com/google.storage.v2.Bucket.Lifecycle"
4320 }
4321 }
4322
4323 pub mod lifecycle {
4325 #[allow(unused_imports)]
4326 use super::*;
4327
4328 #[derive(Clone, Default, PartialEq)]
4331 #[non_exhaustive]
4332 pub struct Rule {
4333 pub action: std::option::Option<crate::model::bucket::lifecycle::rule::Action>,
4335
4336 pub condition: std::option::Option<crate::model::bucket::lifecycle::rule::Condition>,
4338
4339 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4340 }
4341
4342 impl Rule {
4343 pub fn new() -> Self {
4344 std::default::Default::default()
4345 }
4346
4347 pub fn set_action<T>(mut self, v: T) -> Self
4349 where
4350 T: std::convert::Into<crate::model::bucket::lifecycle::rule::Action>,
4351 {
4352 self.action = std::option::Option::Some(v.into());
4353 self
4354 }
4355
4356 pub fn set_or_clear_action<T>(mut self, v: std::option::Option<T>) -> Self
4358 where
4359 T: std::convert::Into<crate::model::bucket::lifecycle::rule::Action>,
4360 {
4361 self.action = v.map(|x| x.into());
4362 self
4363 }
4364
4365 pub fn set_condition<T>(mut self, v: T) -> Self
4367 where
4368 T: std::convert::Into<crate::model::bucket::lifecycle::rule::Condition>,
4369 {
4370 self.condition = std::option::Option::Some(v.into());
4371 self
4372 }
4373
4374 pub fn set_or_clear_condition<T>(mut self, v: std::option::Option<T>) -> Self
4376 where
4377 T: std::convert::Into<crate::model::bucket::lifecycle::rule::Condition>,
4378 {
4379 self.condition = v.map(|x| x.into());
4380 self
4381 }
4382 }
4383
4384 impl wkt::message::Message for Rule {
4385 fn typename() -> &'static str {
4386 "type.googleapis.com/google.storage.v2.Bucket.Lifecycle.Rule"
4387 }
4388 }
4389
4390 pub mod rule {
4392 #[allow(unused_imports)]
4393 use super::*;
4394
4395 #[derive(Clone, Default, PartialEq)]
4397 #[non_exhaustive]
4398 pub struct Action {
4399 pub r#type: std::string::String,
4403
4404 pub storage_class: std::string::String,
4407
4408 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4409 }
4410
4411 impl Action {
4412 pub fn new() -> Self {
4413 std::default::Default::default()
4414 }
4415
4416 pub fn set_type<T: std::convert::Into<std::string::String>>(
4418 mut self,
4419 v: T,
4420 ) -> Self {
4421 self.r#type = v.into();
4422 self
4423 }
4424
4425 pub fn set_storage_class<T: std::convert::Into<std::string::String>>(
4427 mut self,
4428 v: T,
4429 ) -> Self {
4430 self.storage_class = v.into();
4431 self
4432 }
4433 }
4434
4435 impl wkt::message::Message for Action {
4436 fn typename() -> &'static str {
4437 "type.googleapis.com/google.storage.v2.Bucket.Lifecycle.Rule.Action"
4438 }
4439 }
4440
4441 #[derive(Clone, Default, PartialEq)]
4443 #[non_exhaustive]
4444 pub struct Condition {
4445 pub age_days: std::option::Option<i32>,
4450
4451 pub created_before: std::option::Option<gtype::model::Date>,
4454
4455 pub is_live: std::option::Option<bool>,
4459
4460 pub num_newer_versions: std::option::Option<i32>,
4464
4465 pub matches_storage_class: std::vec::Vec<std::string::String>,
4470
4471 pub days_since_custom_time: std::option::Option<i32>,
4475
4476 pub custom_time_before: std::option::Option<gtype::model::Date>,
4479
4480 pub days_since_noncurrent_time: std::option::Option<i32>,
4486
4487 pub noncurrent_time_before: std::option::Option<gtype::model::Date>,
4491
4492 pub matches_prefix: std::vec::Vec<std::string::String>,
4495
4496 pub matches_suffix: std::vec::Vec<std::string::String>,
4499
4500 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4501 }
4502
4503 impl Condition {
4504 pub fn new() -> Self {
4505 std::default::Default::default()
4506 }
4507
4508 pub fn set_age_days<T>(mut self, v: T) -> Self
4510 where
4511 T: std::convert::Into<i32>,
4512 {
4513 self.age_days = std::option::Option::Some(v.into());
4514 self
4515 }
4516
4517 pub fn set_or_clear_age_days<T>(mut self, v: std::option::Option<T>) -> Self
4519 where
4520 T: std::convert::Into<i32>,
4521 {
4522 self.age_days = v.map(|x| x.into());
4523 self
4524 }
4525
4526 pub fn set_created_before<T>(mut self, v: T) -> Self
4528 where
4529 T: std::convert::Into<gtype::model::Date>,
4530 {
4531 self.created_before = std::option::Option::Some(v.into());
4532 self
4533 }
4534
4535 pub fn set_or_clear_created_before<T>(mut self, v: std::option::Option<T>) -> Self
4537 where
4538 T: std::convert::Into<gtype::model::Date>,
4539 {
4540 self.created_before = v.map(|x| x.into());
4541 self
4542 }
4543
4544 pub fn set_is_live<T>(mut self, v: T) -> Self
4546 where
4547 T: std::convert::Into<bool>,
4548 {
4549 self.is_live = std::option::Option::Some(v.into());
4550 self
4551 }
4552
4553 pub fn set_or_clear_is_live<T>(mut self, v: std::option::Option<T>) -> Self
4555 where
4556 T: std::convert::Into<bool>,
4557 {
4558 self.is_live = v.map(|x| x.into());
4559 self
4560 }
4561
4562 pub fn set_num_newer_versions<T>(mut self, v: T) -> Self
4564 where
4565 T: std::convert::Into<i32>,
4566 {
4567 self.num_newer_versions = std::option::Option::Some(v.into());
4568 self
4569 }
4570
4571 pub fn set_or_clear_num_newer_versions<T>(
4573 mut self,
4574 v: std::option::Option<T>,
4575 ) -> Self
4576 where
4577 T: std::convert::Into<i32>,
4578 {
4579 self.num_newer_versions = v.map(|x| x.into());
4580 self
4581 }
4582
4583 pub fn set_matches_storage_class<T, V>(mut self, v: T) -> Self
4585 where
4586 T: std::iter::IntoIterator<Item = V>,
4587 V: std::convert::Into<std::string::String>,
4588 {
4589 use std::iter::Iterator;
4590 self.matches_storage_class = v.into_iter().map(|i| i.into()).collect();
4591 self
4592 }
4593
4594 pub fn set_days_since_custom_time<T>(mut self, v: T) -> Self
4596 where
4597 T: std::convert::Into<i32>,
4598 {
4599 self.days_since_custom_time = std::option::Option::Some(v.into());
4600 self
4601 }
4602
4603 pub fn set_or_clear_days_since_custom_time<T>(
4605 mut self,
4606 v: std::option::Option<T>,
4607 ) -> Self
4608 where
4609 T: std::convert::Into<i32>,
4610 {
4611 self.days_since_custom_time = v.map(|x| x.into());
4612 self
4613 }
4614
4615 pub fn set_custom_time_before<T>(mut self, v: T) -> Self
4617 where
4618 T: std::convert::Into<gtype::model::Date>,
4619 {
4620 self.custom_time_before = std::option::Option::Some(v.into());
4621 self
4622 }
4623
4624 pub fn set_or_clear_custom_time_before<T>(
4626 mut self,
4627 v: std::option::Option<T>,
4628 ) -> Self
4629 where
4630 T: std::convert::Into<gtype::model::Date>,
4631 {
4632 self.custom_time_before = v.map(|x| x.into());
4633 self
4634 }
4635
4636 pub fn set_days_since_noncurrent_time<T>(mut self, v: T) -> Self
4638 where
4639 T: std::convert::Into<i32>,
4640 {
4641 self.days_since_noncurrent_time = std::option::Option::Some(v.into());
4642 self
4643 }
4644
4645 pub fn set_or_clear_days_since_noncurrent_time<T>(
4647 mut self,
4648 v: std::option::Option<T>,
4649 ) -> Self
4650 where
4651 T: std::convert::Into<i32>,
4652 {
4653 self.days_since_noncurrent_time = v.map(|x| x.into());
4654 self
4655 }
4656
4657 pub fn set_noncurrent_time_before<T>(mut self, v: T) -> Self
4659 where
4660 T: std::convert::Into<gtype::model::Date>,
4661 {
4662 self.noncurrent_time_before = std::option::Option::Some(v.into());
4663 self
4664 }
4665
4666 pub fn set_or_clear_noncurrent_time_before<T>(
4668 mut self,
4669 v: std::option::Option<T>,
4670 ) -> Self
4671 where
4672 T: std::convert::Into<gtype::model::Date>,
4673 {
4674 self.noncurrent_time_before = v.map(|x| x.into());
4675 self
4676 }
4677
4678 pub fn set_matches_prefix<T, V>(mut self, v: T) -> Self
4680 where
4681 T: std::iter::IntoIterator<Item = V>,
4682 V: std::convert::Into<std::string::String>,
4683 {
4684 use std::iter::Iterator;
4685 self.matches_prefix = v.into_iter().map(|i| i.into()).collect();
4686 self
4687 }
4688
4689 pub fn set_matches_suffix<T, V>(mut self, v: T) -> Self
4691 where
4692 T: std::iter::IntoIterator<Item = V>,
4693 V: std::convert::Into<std::string::String>,
4694 {
4695 use std::iter::Iterator;
4696 self.matches_suffix = v.into_iter().map(|i| i.into()).collect();
4697 self
4698 }
4699 }
4700
4701 impl wkt::message::Message for Condition {
4702 fn typename() -> &'static str {
4703 "type.googleapis.com/google.storage.v2.Bucket.Lifecycle.Rule.Condition"
4704 }
4705 }
4706 }
4707 }
4708
4709 #[derive(Clone, Default, PartialEq)]
4711 #[non_exhaustive]
4712 pub struct Logging {
4713 pub log_bucket: std::string::String,
4716
4717 pub log_object_prefix: std::string::String,
4719
4720 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4721 }
4722
4723 impl Logging {
4724 pub fn new() -> Self {
4725 std::default::Default::default()
4726 }
4727
4728 pub fn set_log_bucket<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4730 self.log_bucket = v.into();
4731 self
4732 }
4733
4734 pub fn set_log_object_prefix<T: std::convert::Into<std::string::String>>(
4736 mut self,
4737 v: T,
4738 ) -> Self {
4739 self.log_object_prefix = v.into();
4740 self
4741 }
4742 }
4743
4744 impl wkt::message::Message for Logging {
4745 fn typename() -> &'static str {
4746 "type.googleapis.com/google.storage.v2.Bucket.Logging"
4747 }
4748 }
4749
4750 #[derive(Clone, Default, PartialEq)]
4752 #[non_exhaustive]
4753 pub struct ObjectRetention {
4754 pub enabled: bool,
4757
4758 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4759 }
4760
4761 impl ObjectRetention {
4762 pub fn new() -> Self {
4763 std::default::Default::default()
4764 }
4765
4766 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4768 self.enabled = v.into();
4769 self
4770 }
4771 }
4772
4773 impl wkt::message::Message for ObjectRetention {
4774 fn typename() -> &'static str {
4775 "type.googleapis.com/google.storage.v2.Bucket.ObjectRetention"
4776 }
4777 }
4778
4779 #[derive(Clone, Default, PartialEq)]
4781 #[non_exhaustive]
4782 pub struct RetentionPolicy {
4783 pub effective_time: std::option::Option<wkt::Timestamp>,
4786
4787 pub is_locked: bool,
4789
4790 pub retention_duration: std::option::Option<wkt::Duration>,
4796
4797 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4798 }
4799
4800 impl RetentionPolicy {
4801 pub fn new() -> Self {
4802 std::default::Default::default()
4803 }
4804
4805 pub fn set_effective_time<T>(mut self, v: T) -> Self
4807 where
4808 T: std::convert::Into<wkt::Timestamp>,
4809 {
4810 self.effective_time = std::option::Option::Some(v.into());
4811 self
4812 }
4813
4814 pub fn set_or_clear_effective_time<T>(mut self, v: std::option::Option<T>) -> Self
4816 where
4817 T: std::convert::Into<wkt::Timestamp>,
4818 {
4819 self.effective_time = v.map(|x| x.into());
4820 self
4821 }
4822
4823 pub fn set_is_locked<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4825 self.is_locked = v.into();
4826 self
4827 }
4828
4829 pub fn set_retention_duration<T>(mut self, v: T) -> Self
4831 where
4832 T: std::convert::Into<wkt::Duration>,
4833 {
4834 self.retention_duration = std::option::Option::Some(v.into());
4835 self
4836 }
4837
4838 pub fn set_or_clear_retention_duration<T>(mut self, v: std::option::Option<T>) -> Self
4840 where
4841 T: std::convert::Into<wkt::Duration>,
4842 {
4843 self.retention_duration = v.map(|x| x.into());
4844 self
4845 }
4846 }
4847
4848 impl wkt::message::Message for RetentionPolicy {
4849 fn typename() -> &'static str {
4850 "type.googleapis.com/google.storage.v2.Bucket.RetentionPolicy"
4851 }
4852 }
4853
4854 #[derive(Clone, Default, PartialEq)]
4856 #[non_exhaustive]
4857 pub struct SoftDeletePolicy {
4858 pub retention_duration: std::option::Option<wkt::Duration>,
4862
4863 pub effective_time: std::option::Option<wkt::Timestamp>,
4865
4866 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4867 }
4868
4869 impl SoftDeletePolicy {
4870 pub fn new() -> Self {
4871 std::default::Default::default()
4872 }
4873
4874 pub fn set_retention_duration<T>(mut self, v: T) -> Self
4876 where
4877 T: std::convert::Into<wkt::Duration>,
4878 {
4879 self.retention_duration = std::option::Option::Some(v.into());
4880 self
4881 }
4882
4883 pub fn set_or_clear_retention_duration<T>(mut self, v: std::option::Option<T>) -> Self
4885 where
4886 T: std::convert::Into<wkt::Duration>,
4887 {
4888 self.retention_duration = v.map(|x| x.into());
4889 self
4890 }
4891
4892 pub fn set_effective_time<T>(mut self, v: T) -> Self
4894 where
4895 T: std::convert::Into<wkt::Timestamp>,
4896 {
4897 self.effective_time = std::option::Option::Some(v.into());
4898 self
4899 }
4900
4901 pub fn set_or_clear_effective_time<T>(mut self, v: std::option::Option<T>) -> Self
4903 where
4904 T: std::convert::Into<wkt::Timestamp>,
4905 {
4906 self.effective_time = v.map(|x| x.into());
4907 self
4908 }
4909 }
4910
4911 impl wkt::message::Message for SoftDeletePolicy {
4912 fn typename() -> &'static str {
4913 "type.googleapis.com/google.storage.v2.Bucket.SoftDeletePolicy"
4914 }
4915 }
4916
4917 #[derive(Clone, Default, PartialEq)]
4921 #[non_exhaustive]
4922 pub struct Versioning {
4923 pub enabled: bool,
4925
4926 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4927 }
4928
4929 impl Versioning {
4930 pub fn new() -> Self {
4931 std::default::Default::default()
4932 }
4933
4934 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4936 self.enabled = v.into();
4937 self
4938 }
4939 }
4940
4941 impl wkt::message::Message for Versioning {
4942 fn typename() -> &'static str {
4943 "type.googleapis.com/google.storage.v2.Bucket.Versioning"
4944 }
4945 }
4946
4947 #[derive(Clone, Default, PartialEq)]
4951 #[non_exhaustive]
4952 pub struct Website {
4953 pub main_page_suffix: std::string::String,
4958
4959 pub not_found_page: std::string::String,
4965
4966 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4967 }
4968
4969 impl Website {
4970 pub fn new() -> Self {
4971 std::default::Default::default()
4972 }
4973
4974 pub fn set_main_page_suffix<T: std::convert::Into<std::string::String>>(
4976 mut self,
4977 v: T,
4978 ) -> Self {
4979 self.main_page_suffix = v.into();
4980 self
4981 }
4982
4983 pub fn set_not_found_page<T: std::convert::Into<std::string::String>>(
4985 mut self,
4986 v: T,
4987 ) -> Self {
4988 self.not_found_page = v.into();
4989 self
4990 }
4991 }
4992
4993 impl wkt::message::Message for Website {
4994 fn typename() -> &'static str {
4995 "type.googleapis.com/google.storage.v2.Bucket.Website"
4996 }
4997 }
4998
4999 #[derive(Clone, Default, PartialEq)]
5003 #[non_exhaustive]
5004 pub struct CustomPlacementConfig {
5005 pub data_locations: std::vec::Vec<std::string::String>,
5007
5008 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5009 }
5010
5011 impl CustomPlacementConfig {
5012 pub fn new() -> Self {
5013 std::default::Default::default()
5014 }
5015
5016 pub fn set_data_locations<T, V>(mut self, v: T) -> Self
5018 where
5019 T: std::iter::IntoIterator<Item = V>,
5020 V: std::convert::Into<std::string::String>,
5021 {
5022 use std::iter::Iterator;
5023 self.data_locations = v.into_iter().map(|i| i.into()).collect();
5024 self
5025 }
5026 }
5027
5028 impl wkt::message::Message for CustomPlacementConfig {
5029 fn typename() -> &'static str {
5030 "type.googleapis.com/google.storage.v2.Bucket.CustomPlacementConfig"
5031 }
5032 }
5033
5034 #[derive(Clone, Default, PartialEq)]
5036 #[non_exhaustive]
5037 pub struct Autoclass {
5038 pub enabled: bool,
5040
5041 pub toggle_time: std::option::Option<wkt::Timestamp>,
5046
5047 pub terminal_storage_class: std::option::Option<std::string::String>,
5051
5052 pub terminal_storage_class_update_time: std::option::Option<wkt::Timestamp>,
5055
5056 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5057 }
5058
5059 impl Autoclass {
5060 pub fn new() -> Self {
5061 std::default::Default::default()
5062 }
5063
5064 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5066 self.enabled = v.into();
5067 self
5068 }
5069
5070 pub fn set_toggle_time<T>(mut self, v: T) -> Self
5072 where
5073 T: std::convert::Into<wkt::Timestamp>,
5074 {
5075 self.toggle_time = std::option::Option::Some(v.into());
5076 self
5077 }
5078
5079 pub fn set_or_clear_toggle_time<T>(mut self, v: std::option::Option<T>) -> Self
5081 where
5082 T: std::convert::Into<wkt::Timestamp>,
5083 {
5084 self.toggle_time = v.map(|x| x.into());
5085 self
5086 }
5087
5088 pub fn set_terminal_storage_class<T>(mut self, v: T) -> Self
5090 where
5091 T: std::convert::Into<std::string::String>,
5092 {
5093 self.terminal_storage_class = std::option::Option::Some(v.into());
5094 self
5095 }
5096
5097 pub fn set_or_clear_terminal_storage_class<T>(mut self, v: std::option::Option<T>) -> Self
5099 where
5100 T: std::convert::Into<std::string::String>,
5101 {
5102 self.terminal_storage_class = v.map(|x| x.into());
5103 self
5104 }
5105
5106 pub fn set_terminal_storage_class_update_time<T>(mut self, v: T) -> Self
5108 where
5109 T: std::convert::Into<wkt::Timestamp>,
5110 {
5111 self.terminal_storage_class_update_time = std::option::Option::Some(v.into());
5112 self
5113 }
5114
5115 pub fn set_or_clear_terminal_storage_class_update_time<T>(
5117 mut self,
5118 v: std::option::Option<T>,
5119 ) -> Self
5120 where
5121 T: std::convert::Into<wkt::Timestamp>,
5122 {
5123 self.terminal_storage_class_update_time = v.map(|x| x.into());
5124 self
5125 }
5126 }
5127
5128 impl wkt::message::Message for Autoclass {
5129 fn typename() -> &'static str {
5130 "type.googleapis.com/google.storage.v2.Bucket.Autoclass"
5131 }
5132 }
5133
5134 #[derive(Clone, Default, PartialEq)]
5139 #[non_exhaustive]
5140 pub struct IpFilter {
5141 pub mode: std::option::Option<std::string::String>,
5147
5148 pub public_network_source:
5150 std::option::Option<crate::model::bucket::ip_filter::PublicNetworkSource>,
5151
5152 pub vpc_network_sources: std::vec::Vec<crate::model::bucket::ip_filter::VpcNetworkSource>,
5155
5156 pub allow_cross_org_vpcs: bool,
5162
5163 pub allow_all_service_agent_access: std::option::Option<bool>,
5166
5167 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5168 }
5169
5170 impl IpFilter {
5171 pub fn new() -> Self {
5172 std::default::Default::default()
5173 }
5174
5175 pub fn set_mode<T>(mut self, v: T) -> Self
5177 where
5178 T: std::convert::Into<std::string::String>,
5179 {
5180 self.mode = std::option::Option::Some(v.into());
5181 self
5182 }
5183
5184 pub fn set_or_clear_mode<T>(mut self, v: std::option::Option<T>) -> Self
5186 where
5187 T: std::convert::Into<std::string::String>,
5188 {
5189 self.mode = v.map(|x| x.into());
5190 self
5191 }
5192
5193 pub fn set_public_network_source<T>(mut self, v: T) -> Self
5195 where
5196 T: std::convert::Into<crate::model::bucket::ip_filter::PublicNetworkSource>,
5197 {
5198 self.public_network_source = std::option::Option::Some(v.into());
5199 self
5200 }
5201
5202 pub fn set_or_clear_public_network_source<T>(mut self, v: std::option::Option<T>) -> Self
5204 where
5205 T: std::convert::Into<crate::model::bucket::ip_filter::PublicNetworkSource>,
5206 {
5207 self.public_network_source = v.map(|x| x.into());
5208 self
5209 }
5210
5211 pub fn set_vpc_network_sources<T, V>(mut self, v: T) -> Self
5213 where
5214 T: std::iter::IntoIterator<Item = V>,
5215 V: std::convert::Into<crate::model::bucket::ip_filter::VpcNetworkSource>,
5216 {
5217 use std::iter::Iterator;
5218 self.vpc_network_sources = v.into_iter().map(|i| i.into()).collect();
5219 self
5220 }
5221
5222 pub fn set_allow_cross_org_vpcs<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5224 self.allow_cross_org_vpcs = v.into();
5225 self
5226 }
5227
5228 pub fn set_allow_all_service_agent_access<T>(mut self, v: T) -> Self
5230 where
5231 T: std::convert::Into<bool>,
5232 {
5233 self.allow_all_service_agent_access = std::option::Option::Some(v.into());
5234 self
5235 }
5236
5237 pub fn set_or_clear_allow_all_service_agent_access<T>(
5239 mut self,
5240 v: std::option::Option<T>,
5241 ) -> Self
5242 where
5243 T: std::convert::Into<bool>,
5244 {
5245 self.allow_all_service_agent_access = v.map(|x| x.into());
5246 self
5247 }
5248 }
5249
5250 impl wkt::message::Message for IpFilter {
5251 fn typename() -> &'static str {
5252 "type.googleapis.com/google.storage.v2.Bucket.IpFilter"
5253 }
5254 }
5255
5256 pub mod ip_filter {
5258 #[allow(unused_imports)]
5259 use super::*;
5260
5261 #[derive(Clone, Default, PartialEq)]
5264 #[non_exhaustive]
5265 pub struct PublicNetworkSource {
5266 pub allowed_ip_cidr_ranges: std::vec::Vec<std::string::String>,
5269
5270 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5271 }
5272
5273 impl PublicNetworkSource {
5274 pub fn new() -> Self {
5275 std::default::Default::default()
5276 }
5277
5278 pub fn set_allowed_ip_cidr_ranges<T, V>(mut self, v: T) -> Self
5280 where
5281 T: std::iter::IntoIterator<Item = V>,
5282 V: std::convert::Into<std::string::String>,
5283 {
5284 use std::iter::Iterator;
5285 self.allowed_ip_cidr_ranges = v.into_iter().map(|i| i.into()).collect();
5286 self
5287 }
5288 }
5289
5290 impl wkt::message::Message for PublicNetworkSource {
5291 fn typename() -> &'static str {
5292 "type.googleapis.com/google.storage.v2.Bucket.IpFilter.PublicNetworkSource"
5293 }
5294 }
5295
5296 #[derive(Clone, Default, PartialEq)]
5298 #[non_exhaustive]
5299 pub struct VpcNetworkSource {
5300 pub network: std::option::Option<std::string::String>,
5304
5305 pub allowed_ip_cidr_ranges: std::vec::Vec<std::string::String>,
5312
5313 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5314 }
5315
5316 impl VpcNetworkSource {
5317 pub fn new() -> Self {
5318 std::default::Default::default()
5319 }
5320
5321 pub fn set_network<T>(mut self, v: T) -> Self
5323 where
5324 T: std::convert::Into<std::string::String>,
5325 {
5326 self.network = std::option::Option::Some(v.into());
5327 self
5328 }
5329
5330 pub fn set_or_clear_network<T>(mut self, v: std::option::Option<T>) -> Self
5332 where
5333 T: std::convert::Into<std::string::String>,
5334 {
5335 self.network = v.map(|x| x.into());
5336 self
5337 }
5338
5339 pub fn set_allowed_ip_cidr_ranges<T, V>(mut self, v: T) -> Self
5341 where
5342 T: std::iter::IntoIterator<Item = V>,
5343 V: std::convert::Into<std::string::String>,
5344 {
5345 use std::iter::Iterator;
5346 self.allowed_ip_cidr_ranges = v.into_iter().map(|i| i.into()).collect();
5347 self
5348 }
5349 }
5350
5351 impl wkt::message::Message for VpcNetworkSource {
5352 fn typename() -> &'static str {
5353 "type.googleapis.com/google.storage.v2.Bucket.IpFilter.VpcNetworkSource"
5354 }
5355 }
5356 }
5357
5358 #[derive(Clone, Default, PartialEq)]
5360 #[non_exhaustive]
5361 pub struct HierarchicalNamespace {
5362 pub enabled: bool,
5364
5365 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5366 }
5367
5368 impl HierarchicalNamespace {
5369 pub fn new() -> Self {
5370 std::default::Default::default()
5371 }
5372
5373 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5375 self.enabled = v.into();
5376 self
5377 }
5378 }
5379
5380 impl wkt::message::Message for HierarchicalNamespace {
5381 fn typename() -> &'static str {
5382 "type.googleapis.com/google.storage.v2.Bucket.HierarchicalNamespace"
5383 }
5384 }
5385}
5386
5387#[derive(Clone, Default, PartialEq)]
5389#[non_exhaustive]
5390pub struct BucketAccessControl {
5391 pub role: std::string::String,
5393
5394 pub id: std::string::String,
5396
5397 pub entity: std::string::String,
5417
5418 pub entity_alt: std::string::String,
5421
5422 pub entity_id: std::string::String,
5424
5425 pub etag: std::string::String,
5430
5431 pub email: std::string::String,
5433
5434 pub domain: std::string::String,
5436
5437 pub project_team: std::option::Option<crate::model::ProjectTeam>,
5439
5440 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5441}
5442
5443impl BucketAccessControl {
5444 pub fn new() -> Self {
5445 std::default::Default::default()
5446 }
5447
5448 pub fn set_role<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5450 self.role = v.into();
5451 self
5452 }
5453
5454 pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5456 self.id = v.into();
5457 self
5458 }
5459
5460 pub fn set_entity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5462 self.entity = v.into();
5463 self
5464 }
5465
5466 pub fn set_entity_alt<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5468 self.entity_alt = v.into();
5469 self
5470 }
5471
5472 pub fn set_entity_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5474 self.entity_id = v.into();
5475 self
5476 }
5477
5478 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5480 self.etag = v.into();
5481 self
5482 }
5483
5484 pub fn set_email<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5486 self.email = v.into();
5487 self
5488 }
5489
5490 pub fn set_domain<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5492 self.domain = v.into();
5493 self
5494 }
5495
5496 pub fn set_project_team<T>(mut self, v: T) -> Self
5498 where
5499 T: std::convert::Into<crate::model::ProjectTeam>,
5500 {
5501 self.project_team = std::option::Option::Some(v.into());
5502 self
5503 }
5504
5505 pub fn set_or_clear_project_team<T>(mut self, v: std::option::Option<T>) -> Self
5507 where
5508 T: std::convert::Into<crate::model::ProjectTeam>,
5509 {
5510 self.project_team = v.map(|x| x.into());
5511 self
5512 }
5513}
5514
5515impl wkt::message::Message for BucketAccessControl {
5516 fn typename() -> &'static str {
5517 "type.googleapis.com/google.storage.v2.BucketAccessControl"
5518 }
5519}
5520
5521#[derive(Clone, Default, PartialEq)]
5523#[non_exhaustive]
5524pub struct ObjectChecksums {
5525 pub crc32c: std::option::Option<u32>,
5530
5531 pub md5_hash: ::bytes::Bytes,
5539
5540 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5541}
5542
5543impl ObjectChecksums {
5544 pub fn new() -> Self {
5545 std::default::Default::default()
5546 }
5547
5548 pub fn set_crc32c<T>(mut self, v: T) -> Self
5550 where
5551 T: std::convert::Into<u32>,
5552 {
5553 self.crc32c = std::option::Option::Some(v.into());
5554 self
5555 }
5556
5557 pub fn set_or_clear_crc32c<T>(mut self, v: std::option::Option<T>) -> Self
5559 where
5560 T: std::convert::Into<u32>,
5561 {
5562 self.crc32c = v.map(|x| x.into());
5563 self
5564 }
5565
5566 pub fn set_md5_hash<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
5568 self.md5_hash = v.into();
5569 self
5570 }
5571}
5572
5573impl wkt::message::Message for ObjectChecksums {
5574 fn typename() -> &'static str {
5575 "type.googleapis.com/google.storage.v2.ObjectChecksums"
5576 }
5577}
5578
5579#[derive(Clone, Default, PartialEq)]
5581#[non_exhaustive]
5582pub struct ObjectCustomContextPayload {
5583 pub value: std::string::String,
5585
5586 pub create_time: std::option::Option<wkt::Timestamp>,
5588
5589 pub update_time: std::option::Option<wkt::Timestamp>,
5591
5592 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5593}
5594
5595impl ObjectCustomContextPayload {
5596 pub fn new() -> Self {
5597 std::default::Default::default()
5598 }
5599
5600 pub fn set_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5602 self.value = v.into();
5603 self
5604 }
5605
5606 pub fn set_create_time<T>(mut self, v: T) -> Self
5608 where
5609 T: std::convert::Into<wkt::Timestamp>,
5610 {
5611 self.create_time = std::option::Option::Some(v.into());
5612 self
5613 }
5614
5615 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
5617 where
5618 T: std::convert::Into<wkt::Timestamp>,
5619 {
5620 self.create_time = v.map(|x| x.into());
5621 self
5622 }
5623
5624 pub fn set_update_time<T>(mut self, v: T) -> Self
5626 where
5627 T: std::convert::Into<wkt::Timestamp>,
5628 {
5629 self.update_time = std::option::Option::Some(v.into());
5630 self
5631 }
5632
5633 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
5635 where
5636 T: std::convert::Into<wkt::Timestamp>,
5637 {
5638 self.update_time = v.map(|x| x.into());
5639 self
5640 }
5641}
5642
5643impl wkt::message::Message for ObjectCustomContextPayload {
5644 fn typename() -> &'static str {
5645 "type.googleapis.com/google.storage.v2.ObjectCustomContextPayload"
5646 }
5647}
5648
5649#[derive(Clone, Default, PartialEq)]
5651#[non_exhaustive]
5652pub struct ObjectContexts {
5653 pub custom:
5655 std::collections::HashMap<std::string::String, crate::model::ObjectCustomContextPayload>,
5656
5657 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5658}
5659
5660impl ObjectContexts {
5661 pub fn new() -> Self {
5662 std::default::Default::default()
5663 }
5664
5665 pub fn set_custom<T, K, V>(mut self, v: T) -> Self
5667 where
5668 T: std::iter::IntoIterator<Item = (K, V)>,
5669 K: std::convert::Into<std::string::String>,
5670 V: std::convert::Into<crate::model::ObjectCustomContextPayload>,
5671 {
5672 use std::iter::Iterator;
5673 self.custom = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5674 self
5675 }
5676}
5677
5678impl wkt::message::Message for ObjectContexts {
5679 fn typename() -> &'static str {
5680 "type.googleapis.com/google.storage.v2.ObjectContexts"
5681 }
5682}
5683
5684#[derive(Clone, Default, PartialEq)]
5687#[non_exhaustive]
5688pub struct CustomerEncryption {
5689 pub encryption_algorithm: std::string::String,
5691
5692 pub key_sha256_bytes: ::bytes::Bytes,
5695
5696 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5697}
5698
5699impl CustomerEncryption {
5700 pub fn new() -> Self {
5701 std::default::Default::default()
5702 }
5703
5704 pub fn set_encryption_algorithm<T: std::convert::Into<std::string::String>>(
5706 mut self,
5707 v: T,
5708 ) -> Self {
5709 self.encryption_algorithm = v.into();
5710 self
5711 }
5712
5713 pub fn set_key_sha256_bytes<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
5715 self.key_sha256_bytes = v.into();
5716 self
5717 }
5718}
5719
5720impl wkt::message::Message for CustomerEncryption {
5721 fn typename() -> &'static str {
5722 "type.googleapis.com/google.storage.v2.CustomerEncryption"
5723 }
5724}
5725
5726#[derive(Clone, Default, PartialEq)]
5728#[non_exhaustive]
5729pub struct Object {
5730 pub name: std::string::String,
5738
5739 pub bucket: std::string::String,
5741
5742 pub etag: std::string::String,
5747
5748 pub generation: i64,
5751
5752 pub restore_token: std::option::Option<std::string::String>,
5756
5757 pub metageneration: i64,
5762
5763 pub storage_class: std::string::String,
5765
5766 pub size: i64,
5769
5770 pub content_encoding: std::string::String,
5773
5774 pub content_disposition: std::string::String,
5777
5778 pub cache_control: std::string::String,
5783
5784 pub acl: std::vec::Vec<crate::model::ObjectAccessControl>,
5788
5789 pub content_language: std::string::String,
5792
5793 pub delete_time: std::option::Option<wkt::Timestamp>,
5796
5797 pub finalize_time: std::option::Option<wkt::Timestamp>,
5799
5800 pub content_type: std::string::String,
5805
5806 pub create_time: std::option::Option<wkt::Timestamp>,
5808
5809 pub component_count: i32,
5812
5813 pub checksums: std::option::Option<crate::model::ObjectChecksums>,
5819
5820 pub update_time: std::option::Option<wkt::Timestamp>,
5827
5828 pub kms_key: std::string::String,
5831
5832 pub update_storage_class_time: std::option::Option<wkt::Timestamp>,
5835
5836 pub temporary_hold: bool,
5843
5844 pub retention_expire_time: std::option::Option<wkt::Timestamp>,
5851
5852 pub metadata: std::collections::HashMap<std::string::String, std::string::String>,
5854
5855 pub contexts: std::option::Option<crate::model::ObjectContexts>,
5859
5860 pub event_based_hold: std::option::Option<bool>,
5872
5873 pub owner: std::option::Option<crate::model::Owner>,
5876
5877 pub customer_encryption: std::option::Option<crate::model::CustomerEncryption>,
5880
5881 pub custom_time: std::option::Option<wkt::Timestamp>,
5883
5884 pub soft_delete_time: std::option::Option<wkt::Timestamp>,
5889
5890 pub hard_delete_time: std::option::Option<wkt::Timestamp>,
5895
5896 pub retention: std::option::Option<crate::model::object::Retention>,
5899
5900 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5901}
5902
5903impl Object {
5904 pub fn new() -> Self {
5905 std::default::Default::default()
5906 }
5907
5908 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5910 self.name = v.into();
5911 self
5912 }
5913
5914 pub fn set_bucket<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5916 self.bucket = v.into();
5917 self
5918 }
5919
5920 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5922 self.etag = v.into();
5923 self
5924 }
5925
5926 pub fn set_generation<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
5928 self.generation = v.into();
5929 self
5930 }
5931
5932 pub fn set_restore_token<T>(mut self, v: T) -> Self
5934 where
5935 T: std::convert::Into<std::string::String>,
5936 {
5937 self.restore_token = std::option::Option::Some(v.into());
5938 self
5939 }
5940
5941 pub fn set_or_clear_restore_token<T>(mut self, v: std::option::Option<T>) -> Self
5943 where
5944 T: std::convert::Into<std::string::String>,
5945 {
5946 self.restore_token = v.map(|x| x.into());
5947 self
5948 }
5949
5950 pub fn set_metageneration<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
5952 self.metageneration = v.into();
5953 self
5954 }
5955
5956 pub fn set_storage_class<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5958 self.storage_class = v.into();
5959 self
5960 }
5961
5962 pub fn set_size<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
5964 self.size = v.into();
5965 self
5966 }
5967
5968 pub fn set_content_encoding<T: std::convert::Into<std::string::String>>(
5970 mut self,
5971 v: T,
5972 ) -> Self {
5973 self.content_encoding = v.into();
5974 self
5975 }
5976
5977 pub fn set_content_disposition<T: std::convert::Into<std::string::String>>(
5979 mut self,
5980 v: T,
5981 ) -> Self {
5982 self.content_disposition = v.into();
5983 self
5984 }
5985
5986 pub fn set_cache_control<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5988 self.cache_control = v.into();
5989 self
5990 }
5991
5992 pub fn set_acl<T, V>(mut self, v: T) -> Self
5994 where
5995 T: std::iter::IntoIterator<Item = V>,
5996 V: std::convert::Into<crate::model::ObjectAccessControl>,
5997 {
5998 use std::iter::Iterator;
5999 self.acl = v.into_iter().map(|i| i.into()).collect();
6000 self
6001 }
6002
6003 pub fn set_content_language<T: std::convert::Into<std::string::String>>(
6005 mut self,
6006 v: T,
6007 ) -> Self {
6008 self.content_language = v.into();
6009 self
6010 }
6011
6012 pub fn set_delete_time<T>(mut self, v: T) -> Self
6014 where
6015 T: std::convert::Into<wkt::Timestamp>,
6016 {
6017 self.delete_time = std::option::Option::Some(v.into());
6018 self
6019 }
6020
6021 pub fn set_or_clear_delete_time<T>(mut self, v: std::option::Option<T>) -> Self
6023 where
6024 T: std::convert::Into<wkt::Timestamp>,
6025 {
6026 self.delete_time = v.map(|x| x.into());
6027 self
6028 }
6029
6030 pub fn set_finalize_time<T>(mut self, v: T) -> Self
6032 where
6033 T: std::convert::Into<wkt::Timestamp>,
6034 {
6035 self.finalize_time = std::option::Option::Some(v.into());
6036 self
6037 }
6038
6039 pub fn set_or_clear_finalize_time<T>(mut self, v: std::option::Option<T>) -> Self
6041 where
6042 T: std::convert::Into<wkt::Timestamp>,
6043 {
6044 self.finalize_time = v.map(|x| x.into());
6045 self
6046 }
6047
6048 pub fn set_content_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6050 self.content_type = v.into();
6051 self
6052 }
6053
6054 pub fn set_create_time<T>(mut self, v: T) -> Self
6056 where
6057 T: std::convert::Into<wkt::Timestamp>,
6058 {
6059 self.create_time = std::option::Option::Some(v.into());
6060 self
6061 }
6062
6063 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
6065 where
6066 T: std::convert::Into<wkt::Timestamp>,
6067 {
6068 self.create_time = v.map(|x| x.into());
6069 self
6070 }
6071
6072 pub fn set_component_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6074 self.component_count = v.into();
6075 self
6076 }
6077
6078 pub fn set_checksums<T>(mut self, v: T) -> Self
6080 where
6081 T: std::convert::Into<crate::model::ObjectChecksums>,
6082 {
6083 self.checksums = std::option::Option::Some(v.into());
6084 self
6085 }
6086
6087 pub fn set_or_clear_checksums<T>(mut self, v: std::option::Option<T>) -> Self
6089 where
6090 T: std::convert::Into<crate::model::ObjectChecksums>,
6091 {
6092 self.checksums = v.map(|x| x.into());
6093 self
6094 }
6095
6096 pub fn set_update_time<T>(mut self, v: T) -> Self
6098 where
6099 T: std::convert::Into<wkt::Timestamp>,
6100 {
6101 self.update_time = std::option::Option::Some(v.into());
6102 self
6103 }
6104
6105 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
6107 where
6108 T: std::convert::Into<wkt::Timestamp>,
6109 {
6110 self.update_time = v.map(|x| x.into());
6111 self
6112 }
6113
6114 pub fn set_kms_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6116 self.kms_key = v.into();
6117 self
6118 }
6119
6120 pub fn set_update_storage_class_time<T>(mut self, v: T) -> Self
6122 where
6123 T: std::convert::Into<wkt::Timestamp>,
6124 {
6125 self.update_storage_class_time = std::option::Option::Some(v.into());
6126 self
6127 }
6128
6129 pub fn set_or_clear_update_storage_class_time<T>(mut self, v: std::option::Option<T>) -> Self
6131 where
6132 T: std::convert::Into<wkt::Timestamp>,
6133 {
6134 self.update_storage_class_time = v.map(|x| x.into());
6135 self
6136 }
6137
6138 pub fn set_temporary_hold<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6140 self.temporary_hold = v.into();
6141 self
6142 }
6143
6144 pub fn set_retention_expire_time<T>(mut self, v: T) -> Self
6146 where
6147 T: std::convert::Into<wkt::Timestamp>,
6148 {
6149 self.retention_expire_time = std::option::Option::Some(v.into());
6150 self
6151 }
6152
6153 pub fn set_or_clear_retention_expire_time<T>(mut self, v: std::option::Option<T>) -> Self
6155 where
6156 T: std::convert::Into<wkt::Timestamp>,
6157 {
6158 self.retention_expire_time = v.map(|x| x.into());
6159 self
6160 }
6161
6162 pub fn set_metadata<T, K, V>(mut self, v: T) -> Self
6164 where
6165 T: std::iter::IntoIterator<Item = (K, V)>,
6166 K: std::convert::Into<std::string::String>,
6167 V: std::convert::Into<std::string::String>,
6168 {
6169 use std::iter::Iterator;
6170 self.metadata = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6171 self
6172 }
6173
6174 pub fn set_contexts<T>(mut self, v: T) -> Self
6176 where
6177 T: std::convert::Into<crate::model::ObjectContexts>,
6178 {
6179 self.contexts = std::option::Option::Some(v.into());
6180 self
6181 }
6182
6183 pub fn set_or_clear_contexts<T>(mut self, v: std::option::Option<T>) -> Self
6185 where
6186 T: std::convert::Into<crate::model::ObjectContexts>,
6187 {
6188 self.contexts = v.map(|x| x.into());
6189 self
6190 }
6191
6192 pub fn set_event_based_hold<T>(mut self, v: T) -> Self
6194 where
6195 T: std::convert::Into<bool>,
6196 {
6197 self.event_based_hold = std::option::Option::Some(v.into());
6198 self
6199 }
6200
6201 pub fn set_or_clear_event_based_hold<T>(mut self, v: std::option::Option<T>) -> Self
6203 where
6204 T: std::convert::Into<bool>,
6205 {
6206 self.event_based_hold = v.map(|x| x.into());
6207 self
6208 }
6209
6210 pub fn set_owner<T>(mut self, v: T) -> Self
6212 where
6213 T: std::convert::Into<crate::model::Owner>,
6214 {
6215 self.owner = std::option::Option::Some(v.into());
6216 self
6217 }
6218
6219 pub fn set_or_clear_owner<T>(mut self, v: std::option::Option<T>) -> Self
6221 where
6222 T: std::convert::Into<crate::model::Owner>,
6223 {
6224 self.owner = v.map(|x| x.into());
6225 self
6226 }
6227
6228 pub fn set_customer_encryption<T>(mut self, v: T) -> Self
6230 where
6231 T: std::convert::Into<crate::model::CustomerEncryption>,
6232 {
6233 self.customer_encryption = std::option::Option::Some(v.into());
6234 self
6235 }
6236
6237 pub fn set_or_clear_customer_encryption<T>(mut self, v: std::option::Option<T>) -> Self
6239 where
6240 T: std::convert::Into<crate::model::CustomerEncryption>,
6241 {
6242 self.customer_encryption = v.map(|x| x.into());
6243 self
6244 }
6245
6246 pub fn set_custom_time<T>(mut self, v: T) -> Self
6248 where
6249 T: std::convert::Into<wkt::Timestamp>,
6250 {
6251 self.custom_time = std::option::Option::Some(v.into());
6252 self
6253 }
6254
6255 pub fn set_or_clear_custom_time<T>(mut self, v: std::option::Option<T>) -> Self
6257 where
6258 T: std::convert::Into<wkt::Timestamp>,
6259 {
6260 self.custom_time = v.map(|x| x.into());
6261 self
6262 }
6263
6264 pub fn set_soft_delete_time<T>(mut self, v: T) -> Self
6266 where
6267 T: std::convert::Into<wkt::Timestamp>,
6268 {
6269 self.soft_delete_time = std::option::Option::Some(v.into());
6270 self
6271 }
6272
6273 pub fn set_or_clear_soft_delete_time<T>(mut self, v: std::option::Option<T>) -> Self
6275 where
6276 T: std::convert::Into<wkt::Timestamp>,
6277 {
6278 self.soft_delete_time = v.map(|x| x.into());
6279 self
6280 }
6281
6282 pub fn set_hard_delete_time<T>(mut self, v: T) -> Self
6284 where
6285 T: std::convert::Into<wkt::Timestamp>,
6286 {
6287 self.hard_delete_time = std::option::Option::Some(v.into());
6288 self
6289 }
6290
6291 pub fn set_or_clear_hard_delete_time<T>(mut self, v: std::option::Option<T>) -> Self
6293 where
6294 T: std::convert::Into<wkt::Timestamp>,
6295 {
6296 self.hard_delete_time = v.map(|x| x.into());
6297 self
6298 }
6299
6300 pub fn set_retention<T>(mut self, v: T) -> Self
6302 where
6303 T: std::convert::Into<crate::model::object::Retention>,
6304 {
6305 self.retention = std::option::Option::Some(v.into());
6306 self
6307 }
6308
6309 pub fn set_or_clear_retention<T>(mut self, v: std::option::Option<T>) -> Self
6311 where
6312 T: std::convert::Into<crate::model::object::Retention>,
6313 {
6314 self.retention = v.map(|x| x.into());
6315 self
6316 }
6317}
6318
6319impl wkt::message::Message for Object {
6320 fn typename() -> &'static str {
6321 "type.googleapis.com/google.storage.v2.Object"
6322 }
6323}
6324
6325pub mod object {
6327 #[allow(unused_imports)]
6328 use super::*;
6329
6330 #[derive(Clone, Default, PartialEq)]
6333 #[non_exhaustive]
6334 pub struct Retention {
6335 pub mode: crate::model::object::retention::Mode,
6337
6338 pub retain_until_time: std::option::Option<wkt::Timestamp>,
6341
6342 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6343 }
6344
6345 impl Retention {
6346 pub fn new() -> Self {
6347 std::default::Default::default()
6348 }
6349
6350 pub fn set_mode<T: std::convert::Into<crate::model::object::retention::Mode>>(
6352 mut self,
6353 v: T,
6354 ) -> Self {
6355 self.mode = v.into();
6356 self
6357 }
6358
6359 pub fn set_retain_until_time<T>(mut self, v: T) -> Self
6361 where
6362 T: std::convert::Into<wkt::Timestamp>,
6363 {
6364 self.retain_until_time = std::option::Option::Some(v.into());
6365 self
6366 }
6367
6368 pub fn set_or_clear_retain_until_time<T>(mut self, v: std::option::Option<T>) -> Self
6370 where
6371 T: std::convert::Into<wkt::Timestamp>,
6372 {
6373 self.retain_until_time = v.map(|x| x.into());
6374 self
6375 }
6376 }
6377
6378 impl wkt::message::Message for Retention {
6379 fn typename() -> &'static str {
6380 "type.googleapis.com/google.storage.v2.Object.Retention"
6381 }
6382 }
6383
6384 pub mod retention {
6386 #[allow(unused_imports)]
6387 use super::*;
6388
6389 #[derive(Clone, Debug, PartialEq)]
6405 #[non_exhaustive]
6406 pub enum Mode {
6407 Unspecified,
6409 Unlocked,
6413 Locked,
6417 UnknownValue(mode::UnknownValue),
6422 }
6423
6424 #[doc(hidden)]
6425 pub mod mode {
6426 #[allow(unused_imports)]
6427 use super::*;
6428 #[derive(Clone, Debug, PartialEq)]
6429 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
6430 }
6431
6432 impl Mode {
6433 pub fn value(&self) -> std::option::Option<i32> {
6438 match self {
6439 Self::Unspecified => std::option::Option::Some(0),
6440 Self::Unlocked => std::option::Option::Some(1),
6441 Self::Locked => std::option::Option::Some(2),
6442 Self::UnknownValue(u) => u.0.value(),
6443 }
6444 }
6445
6446 pub fn name(&self) -> std::option::Option<&str> {
6451 match self {
6452 Self::Unspecified => std::option::Option::Some("MODE_UNSPECIFIED"),
6453 Self::Unlocked => std::option::Option::Some("UNLOCKED"),
6454 Self::Locked => std::option::Option::Some("LOCKED"),
6455 Self::UnknownValue(u) => u.0.name(),
6456 }
6457 }
6458 }
6459
6460 impl std::default::Default for Mode {
6461 fn default() -> Self {
6462 use std::convert::From;
6463 Self::from(0)
6464 }
6465 }
6466
6467 impl std::fmt::Display for Mode {
6468 fn fmt(
6469 &self,
6470 f: &mut std::fmt::Formatter<'_>,
6471 ) -> std::result::Result<(), std::fmt::Error> {
6472 wkt::internal::display_enum(f, self.name(), self.value())
6473 }
6474 }
6475
6476 impl std::convert::From<i32> for Mode {
6477 fn from(value: i32) -> Self {
6478 match value {
6479 0 => Self::Unspecified,
6480 1 => Self::Unlocked,
6481 2 => Self::Locked,
6482 _ => Self::UnknownValue(mode::UnknownValue(
6483 wkt::internal::UnknownEnumValue::Integer(value),
6484 )),
6485 }
6486 }
6487 }
6488
6489 impl std::convert::From<&str> for Mode {
6490 fn from(value: &str) -> Self {
6491 use std::string::ToString;
6492 match value {
6493 "MODE_UNSPECIFIED" => Self::Unspecified,
6494 "UNLOCKED" => Self::Unlocked,
6495 "LOCKED" => Self::Locked,
6496 _ => Self::UnknownValue(mode::UnknownValue(
6497 wkt::internal::UnknownEnumValue::String(value.to_string()),
6498 )),
6499 }
6500 }
6501 }
6502
6503 impl serde::ser::Serialize for Mode {
6504 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6505 where
6506 S: serde::Serializer,
6507 {
6508 match self {
6509 Self::Unspecified => serializer.serialize_i32(0),
6510 Self::Unlocked => serializer.serialize_i32(1),
6511 Self::Locked => serializer.serialize_i32(2),
6512 Self::UnknownValue(u) => u.0.serialize(serializer),
6513 }
6514 }
6515 }
6516
6517 impl<'de> serde::de::Deserialize<'de> for Mode {
6518 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6519 where
6520 D: serde::Deserializer<'de>,
6521 {
6522 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mode>::new(
6523 ".google.storage.v2.Object.Retention.Mode",
6524 ))
6525 }
6526 }
6527 }
6528}
6529
6530#[derive(Clone, Default, PartialEq)]
6532#[non_exhaustive]
6533pub struct ObjectAccessControl {
6534 pub role: std::string::String,
6541
6542 pub id: std::string::String,
6544
6545 pub entity: std::string::String,
6565
6566 pub entity_alt: std::string::String,
6569
6570 pub entity_id: std::string::String,
6572
6573 pub etag: std::string::String,
6578
6579 pub email: std::string::String,
6581
6582 pub domain: std::string::String,
6584
6585 pub project_team: std::option::Option<crate::model::ProjectTeam>,
6587
6588 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6589}
6590
6591impl ObjectAccessControl {
6592 pub fn new() -> Self {
6593 std::default::Default::default()
6594 }
6595
6596 pub fn set_role<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6598 self.role = v.into();
6599 self
6600 }
6601
6602 pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6604 self.id = v.into();
6605 self
6606 }
6607
6608 pub fn set_entity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6610 self.entity = v.into();
6611 self
6612 }
6613
6614 pub fn set_entity_alt<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6616 self.entity_alt = v.into();
6617 self
6618 }
6619
6620 pub fn set_entity_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6622 self.entity_id = v.into();
6623 self
6624 }
6625
6626 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6628 self.etag = v.into();
6629 self
6630 }
6631
6632 pub fn set_email<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6634 self.email = v.into();
6635 self
6636 }
6637
6638 pub fn set_domain<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6640 self.domain = v.into();
6641 self
6642 }
6643
6644 pub fn set_project_team<T>(mut self, v: T) -> Self
6646 where
6647 T: std::convert::Into<crate::model::ProjectTeam>,
6648 {
6649 self.project_team = std::option::Option::Some(v.into());
6650 self
6651 }
6652
6653 pub fn set_or_clear_project_team<T>(mut self, v: std::option::Option<T>) -> Self
6655 where
6656 T: std::convert::Into<crate::model::ProjectTeam>,
6657 {
6658 self.project_team = v.map(|x| x.into());
6659 self
6660 }
6661}
6662
6663impl wkt::message::Message for ObjectAccessControl {
6664 fn typename() -> &'static str {
6665 "type.googleapis.com/google.storage.v2.ObjectAccessControl"
6666 }
6667}
6668
6669#[derive(Clone, Default, PartialEq)]
6671#[non_exhaustive]
6672pub struct ListObjectsResponse {
6673 pub objects: std::vec::Vec<crate::model::Object>,
6675
6676 pub prefixes: std::vec::Vec<std::string::String>,
6679
6680 pub next_page_token: std::string::String,
6683
6684 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6685}
6686
6687impl ListObjectsResponse {
6688 pub fn new() -> Self {
6689 std::default::Default::default()
6690 }
6691
6692 pub fn set_objects<T, V>(mut self, v: T) -> Self
6694 where
6695 T: std::iter::IntoIterator<Item = V>,
6696 V: std::convert::Into<crate::model::Object>,
6697 {
6698 use std::iter::Iterator;
6699 self.objects = v.into_iter().map(|i| i.into()).collect();
6700 self
6701 }
6702
6703 pub fn set_prefixes<T, V>(mut self, v: T) -> Self
6705 where
6706 T: std::iter::IntoIterator<Item = V>,
6707 V: std::convert::Into<std::string::String>,
6708 {
6709 use std::iter::Iterator;
6710 self.prefixes = v.into_iter().map(|i| i.into()).collect();
6711 self
6712 }
6713
6714 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6716 self.next_page_token = v.into();
6717 self
6718 }
6719}
6720
6721impl wkt::message::Message for ListObjectsResponse {
6722 fn typename() -> &'static str {
6723 "type.googleapis.com/google.storage.v2.ListObjectsResponse"
6724 }
6725}
6726
6727#[doc(hidden)]
6728impl gax::paginator::internal::PageableResponse for ListObjectsResponse {
6729 type PageItem = crate::model::Object;
6730
6731 fn items(self) -> std::vec::Vec<Self::PageItem> {
6732 self.objects
6733 }
6734
6735 fn next_page_token(&self) -> std::string::String {
6736 use std::clone::Clone;
6737 self.next_page_token.clone()
6738 }
6739}
6740
6741#[derive(Clone, Default, PartialEq)]
6743#[non_exhaustive]
6744pub struct ProjectTeam {
6745 pub project_number: std::string::String,
6747
6748 pub team: std::string::String,
6750
6751 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6752}
6753
6754impl ProjectTeam {
6755 pub fn new() -> Self {
6756 std::default::Default::default()
6757 }
6758
6759 pub fn set_project_number<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6761 self.project_number = v.into();
6762 self
6763 }
6764
6765 pub fn set_team<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6767 self.team = v.into();
6768 self
6769 }
6770}
6771
6772impl wkt::message::Message for ProjectTeam {
6773 fn typename() -> &'static str {
6774 "type.googleapis.com/google.storage.v2.ProjectTeam"
6775 }
6776}
6777
6778#[derive(Clone, Default, PartialEq)]
6780#[non_exhaustive]
6781pub struct Owner {
6782 pub entity: std::string::String,
6784
6785 pub entity_id: std::string::String,
6787
6788 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6789}
6790
6791impl Owner {
6792 pub fn new() -> Self {
6793 std::default::Default::default()
6794 }
6795
6796 pub fn set_entity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6798 self.entity = v.into();
6799 self
6800 }
6801
6802 pub fn set_entity_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6804 self.entity_id = v.into();
6805 self
6806 }
6807}
6808
6809impl wkt::message::Message for Owner {
6810 fn typename() -> &'static str {
6811 "type.googleapis.com/google.storage.v2.Owner"
6812 }
6813}