aws_sdk_s3/operation/get_object_acl/
_get_object_acl_output.rs
1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetObjectAclOutput {
6 pub owner: ::std::option::Option<crate::types::Owner>,
8 pub grants: ::std::option::Option<::std::vec::Vec<crate::types::Grant>>,
10 pub request_charged: ::std::option::Option<crate::types::RequestCharged>,
14 _extended_request_id: Option<String>,
15 _request_id: Option<String>,
16}
17impl GetObjectAclOutput {
18 pub fn owner(&self) -> ::std::option::Option<&crate::types::Owner> {
20 self.owner.as_ref()
21 }
22 pub fn grants(&self) -> &[crate::types::Grant] {
26 self.grants.as_deref().unwrap_or_default()
27 }
28 pub fn request_charged(&self) -> ::std::option::Option<&crate::types::RequestCharged> {
32 self.request_charged.as_ref()
33 }
34}
35impl crate::s3_request_id::RequestIdExt for GetObjectAclOutput {
36 fn extended_request_id(&self) -> Option<&str> {
37 self._extended_request_id.as_deref()
38 }
39}
40impl ::aws_types::request_id::RequestId for GetObjectAclOutput {
41 fn request_id(&self) -> Option<&str> {
42 self._request_id.as_deref()
43 }
44}
45impl GetObjectAclOutput {
46 pub fn builder() -> crate::operation::get_object_acl::builders::GetObjectAclOutputBuilder {
48 crate::operation::get_object_acl::builders::GetObjectAclOutputBuilder::default()
49 }
50}
51
52#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
54#[non_exhaustive]
55pub struct GetObjectAclOutputBuilder {
56 pub(crate) owner: ::std::option::Option<crate::types::Owner>,
57 pub(crate) grants: ::std::option::Option<::std::vec::Vec<crate::types::Grant>>,
58 pub(crate) request_charged: ::std::option::Option<crate::types::RequestCharged>,
59 _extended_request_id: Option<String>,
60 _request_id: Option<String>,
61}
62impl GetObjectAclOutputBuilder {
63 pub fn owner(mut self, input: crate::types::Owner) -> Self {
65 self.owner = ::std::option::Option::Some(input);
66 self
67 }
68 pub fn set_owner(mut self, input: ::std::option::Option<crate::types::Owner>) -> Self {
70 self.owner = input;
71 self
72 }
73 pub fn get_owner(&self) -> &::std::option::Option<crate::types::Owner> {
75 &self.owner
76 }
77 pub fn grants(mut self, input: crate::types::Grant) -> Self {
83 let mut v = self.grants.unwrap_or_default();
84 v.push(input);
85 self.grants = ::std::option::Option::Some(v);
86 self
87 }
88 pub fn set_grants(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Grant>>) -> Self {
90 self.grants = input;
91 self
92 }
93 pub fn get_grants(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Grant>> {
95 &self.grants
96 }
97 pub fn request_charged(mut self, input: crate::types::RequestCharged) -> Self {
101 self.request_charged = ::std::option::Option::Some(input);
102 self
103 }
104 pub fn set_request_charged(mut self, input: ::std::option::Option<crate::types::RequestCharged>) -> Self {
108 self.request_charged = input;
109 self
110 }
111 pub fn get_request_charged(&self) -> &::std::option::Option<crate::types::RequestCharged> {
115 &self.request_charged
116 }
117 pub(crate) fn _extended_request_id(mut self, extended_request_id: impl Into<String>) -> Self {
118 self._extended_request_id = Some(extended_request_id.into());
119 self
120 }
121
122 pub(crate) fn _set_extended_request_id(&mut self, extended_request_id: Option<String>) -> &mut Self {
123 self._extended_request_id = extended_request_id;
124 self
125 }
126 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
127 self._request_id = Some(request_id.into());
128 self
129 }
130
131 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
132 self._request_id = request_id;
133 self
134 }
135 pub fn build(self) -> crate::operation::get_object_acl::GetObjectAclOutput {
137 crate::operation::get_object_acl::GetObjectAclOutput {
138 owner: self.owner,
139 grants: self.grants,
140 request_charged: self.request_charged,
141 _extended_request_id: self._extended_request_id,
142 _request_id: self._request_id,
143 }
144 }
145}