aws_sdk_s3/operation/put_object_acl/
_put_object_acl_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct PutObjectAclOutput {
6    /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
7    /// <p>This functionality is not supported for directory buckets.</p>
8    /// </note>
9    pub request_charged: ::std::option::Option<crate::types::RequestCharged>,
10    _extended_request_id: Option<String>,
11    _request_id: Option<String>,
12}
13impl PutObjectAclOutput {
14    /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
15    /// <p>This functionality is not supported for directory buckets.</p>
16    /// </note>
17    pub fn request_charged(&self) -> ::std::option::Option<&crate::types::RequestCharged> {
18        self.request_charged.as_ref()
19    }
20}
21impl crate::s3_request_id::RequestIdExt for PutObjectAclOutput {
22    fn extended_request_id(&self) -> Option<&str> {
23        self._extended_request_id.as_deref()
24    }
25}
26impl ::aws_types::request_id::RequestId for PutObjectAclOutput {
27    fn request_id(&self) -> Option<&str> {
28        self._request_id.as_deref()
29    }
30}
31impl PutObjectAclOutput {
32    /// Creates a new builder-style object to manufacture [`PutObjectAclOutput`](crate::operation::put_object_acl::PutObjectAclOutput).
33    pub fn builder() -> crate::operation::put_object_acl::builders::PutObjectAclOutputBuilder {
34        crate::operation::put_object_acl::builders::PutObjectAclOutputBuilder::default()
35    }
36}
37
38/// A builder for [`PutObjectAclOutput`](crate::operation::put_object_acl::PutObjectAclOutput).
39#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
40#[non_exhaustive]
41pub struct PutObjectAclOutputBuilder {
42    pub(crate) request_charged: ::std::option::Option<crate::types::RequestCharged>,
43    _extended_request_id: Option<String>,
44    _request_id: Option<String>,
45}
46impl PutObjectAclOutputBuilder {
47    /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
48    /// <p>This functionality is not supported for directory buckets.</p>
49    /// </note>
50    pub fn request_charged(mut self, input: crate::types::RequestCharged) -> Self {
51        self.request_charged = ::std::option::Option::Some(input);
52        self
53    }
54    /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
55    /// <p>This functionality is not supported for directory buckets.</p>
56    /// </note>
57    pub fn set_request_charged(mut self, input: ::std::option::Option<crate::types::RequestCharged>) -> Self {
58        self.request_charged = input;
59        self
60    }
61    /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
62    /// <p>This functionality is not supported for directory buckets.</p>
63    /// </note>
64    pub fn get_request_charged(&self) -> &::std::option::Option<crate::types::RequestCharged> {
65        &self.request_charged
66    }
67    pub(crate) fn _extended_request_id(mut self, extended_request_id: impl Into<String>) -> Self {
68        self._extended_request_id = Some(extended_request_id.into());
69        self
70    }
71
72    pub(crate) fn _set_extended_request_id(&mut self, extended_request_id: Option<String>) -> &mut Self {
73        self._extended_request_id = extended_request_id;
74        self
75    }
76    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
77        self._request_id = Some(request_id.into());
78        self
79    }
80
81    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
82        self._request_id = request_id;
83        self
84    }
85    /// Consumes the builder and constructs a [`PutObjectAclOutput`](crate::operation::put_object_acl::PutObjectAclOutput).
86    pub fn build(self) -> crate::operation::put_object_acl::PutObjectAclOutput {
87        crate::operation::put_object_acl::PutObjectAclOutput {
88            request_charged: self.request_charged,
89            _extended_request_id: self._extended_request_id,
90            _request_id: self._request_id,
91        }
92    }
93}