aws_sdk_s3/operation/delete_objects/
_delete_objects_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeleteObjectsOutput {
6 pub deleted: ::std::option::Option<::std::vec::Vec<crate::types::DeletedObject>>,
8 pub request_charged: ::std::option::Option<crate::types::RequestCharged>,
12 pub errors: ::std::option::Option<::std::vec::Vec<crate::types::Error>>,
14 _extended_request_id: Option<String>,
15 _request_id: Option<String>,
16}
17impl DeleteObjectsOutput {
18 pub fn deleted(&self) -> &[crate::types::DeletedObject] {
22 self.deleted.as_deref().unwrap_or_default()
23 }
24 pub fn request_charged(&self) -> ::std::option::Option<&crate::types::RequestCharged> {
28 self.request_charged.as_ref()
29 }
30 pub fn errors(&self) -> &[crate::types::Error] {
34 self.errors.as_deref().unwrap_or_default()
35 }
36}
37impl crate::s3_request_id::RequestIdExt for DeleteObjectsOutput {
38 fn extended_request_id(&self) -> Option<&str> {
39 self._extended_request_id.as_deref()
40 }
41}
42impl ::aws_types::request_id::RequestId for DeleteObjectsOutput {
43 fn request_id(&self) -> Option<&str> {
44 self._request_id.as_deref()
45 }
46}
47impl DeleteObjectsOutput {
48 pub fn builder() -> crate::operation::delete_objects::builders::DeleteObjectsOutputBuilder {
50 crate::operation::delete_objects::builders::DeleteObjectsOutputBuilder::default()
51 }
52}
53
54#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
56#[non_exhaustive]
57pub struct DeleteObjectsOutputBuilder {
58 pub(crate) deleted: ::std::option::Option<::std::vec::Vec<crate::types::DeletedObject>>,
59 pub(crate) request_charged: ::std::option::Option<crate::types::RequestCharged>,
60 pub(crate) errors: ::std::option::Option<::std::vec::Vec<crate::types::Error>>,
61 _extended_request_id: Option<String>,
62 _request_id: Option<String>,
63}
64impl DeleteObjectsOutputBuilder {
65 pub fn deleted(mut self, input: crate::types::DeletedObject) -> Self {
71 let mut v = self.deleted.unwrap_or_default();
72 v.push(input);
73 self.deleted = ::std::option::Option::Some(v);
74 self
75 }
76 pub fn set_deleted(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DeletedObject>>) -> Self {
78 self.deleted = input;
79 self
80 }
81 pub fn get_deleted(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DeletedObject>> {
83 &self.deleted
84 }
85 pub fn request_charged(mut self, input: crate::types::RequestCharged) -> Self {
89 self.request_charged = ::std::option::Option::Some(input);
90 self
91 }
92 pub fn set_request_charged(mut self, input: ::std::option::Option<crate::types::RequestCharged>) -> Self {
96 self.request_charged = input;
97 self
98 }
99 pub fn get_request_charged(&self) -> &::std::option::Option<crate::types::RequestCharged> {
103 &self.request_charged
104 }
105 pub fn errors(mut self, input: crate::types::Error) -> Self {
111 let mut v = self.errors.unwrap_or_default();
112 v.push(input);
113 self.errors = ::std::option::Option::Some(v);
114 self
115 }
116 pub fn set_errors(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Error>>) -> Self {
118 self.errors = input;
119 self
120 }
121 pub fn get_errors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Error>> {
123 &self.errors
124 }
125 pub(crate) fn _extended_request_id(mut self, extended_request_id: impl Into<String>) -> Self {
126 self._extended_request_id = Some(extended_request_id.into());
127 self
128 }
129
130 pub(crate) fn _set_extended_request_id(&mut self, extended_request_id: Option<String>) -> &mut Self {
131 self._extended_request_id = extended_request_id;
132 self
133 }
134 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
135 self._request_id = Some(request_id.into());
136 self
137 }
138
139 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
140 self._request_id = request_id;
141 self
142 }
143 pub fn build(self) -> crate::operation::delete_objects::DeleteObjectsOutput {
145 crate::operation::delete_objects::DeleteObjectsOutput {
146 deleted: self.deleted,
147 request_charged: self.request_charged,
148 errors: self.errors,
149 _extended_request_id: self._extended_request_id,
150 _request_id: self._request_id,
151 }
152 }
153}