aws_sdk_s3/operation/get_bucket_acl/
_get_bucket_acl_output.rs
1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetBucketAclOutput {
6 pub owner: ::std::option::Option<crate::types::Owner>,
8 pub grants: ::std::option::Option<::std::vec::Vec<crate::types::Grant>>,
10 _extended_request_id: Option<String>,
11 _request_id: Option<String>,
12}
13impl GetBucketAclOutput {
14 pub fn owner(&self) -> ::std::option::Option<&crate::types::Owner> {
16 self.owner.as_ref()
17 }
18 pub fn grants(&self) -> &[crate::types::Grant] {
22 self.grants.as_deref().unwrap_or_default()
23 }
24}
25impl crate::s3_request_id::RequestIdExt for GetBucketAclOutput {
26 fn extended_request_id(&self) -> Option<&str> {
27 self._extended_request_id.as_deref()
28 }
29}
30impl ::aws_types::request_id::RequestId for GetBucketAclOutput {
31 fn request_id(&self) -> Option<&str> {
32 self._request_id.as_deref()
33 }
34}
35impl GetBucketAclOutput {
36 pub fn builder() -> crate::operation::get_bucket_acl::builders::GetBucketAclOutputBuilder {
38 crate::operation::get_bucket_acl::builders::GetBucketAclOutputBuilder::default()
39 }
40}
41
42#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct GetBucketAclOutputBuilder {
46 pub(crate) owner: ::std::option::Option<crate::types::Owner>,
47 pub(crate) grants: ::std::option::Option<::std::vec::Vec<crate::types::Grant>>,
48 _extended_request_id: Option<String>,
49 _request_id: Option<String>,
50}
51impl GetBucketAclOutputBuilder {
52 pub fn owner(mut self, input: crate::types::Owner) -> Self {
54 self.owner = ::std::option::Option::Some(input);
55 self
56 }
57 pub fn set_owner(mut self, input: ::std::option::Option<crate::types::Owner>) -> Self {
59 self.owner = input;
60 self
61 }
62 pub fn get_owner(&self) -> &::std::option::Option<crate::types::Owner> {
64 &self.owner
65 }
66 pub fn grants(mut self, input: crate::types::Grant) -> Self {
72 let mut v = self.grants.unwrap_or_default();
73 v.push(input);
74 self.grants = ::std::option::Option::Some(v);
75 self
76 }
77 pub fn set_grants(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Grant>>) -> Self {
79 self.grants = input;
80 self
81 }
82 pub fn get_grants(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Grant>> {
84 &self.grants
85 }
86 pub(crate) fn _extended_request_id(mut self, extended_request_id: impl Into<String>) -> Self {
87 self._extended_request_id = Some(extended_request_id.into());
88 self
89 }
90
91 pub(crate) fn _set_extended_request_id(&mut self, extended_request_id: Option<String>) -> &mut Self {
92 self._extended_request_id = extended_request_id;
93 self
94 }
95 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
96 self._request_id = Some(request_id.into());
97 self
98 }
99
100 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
101 self._request_id = request_id;
102 self
103 }
104 pub fn build(self) -> crate::operation::get_bucket_acl::GetBucketAclOutput {
106 crate::operation::get_bucket_acl::GetBucketAclOutput {
107 owner: self.owner,
108 grants: self.grants,
109 _extended_request_id: self._extended_request_id,
110 _request_id: self._request_id,
111 }
112 }
113}