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 GetBucketLoggingOutput {
6/// <p>Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys for a bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html">PUT Bucket logging</a> in the <i>Amazon S3 API Reference</i>.</p>
7pub logging_enabled: ::std::option::Option<crate::types::LoggingEnabled>,
8 _extended_request_id: Option<String>,
9 _request_id: Option<String>,
10}
11impl GetBucketLoggingOutput {
12/// <p>Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys for a bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html">PUT Bucket logging</a> in the <i>Amazon S3 API Reference</i>.</p>
13pub fn logging_enabled(&self) -> ::std::option::Option<&crate::types::LoggingEnabled> {
14self.logging_enabled.as_ref()
15 }
16}
17impl crate::s3_request_id::RequestIdExt for GetBucketLoggingOutput {
18fn extended_request_id(&self) -> Option<&str> {
19self._extended_request_id.as_deref()
20 }
21}
22impl ::aws_types::request_id::RequestId for GetBucketLoggingOutput {
23fn request_id(&self) -> Option<&str> {
24self._request_id.as_deref()
25 }
26}
27impl GetBucketLoggingOutput {
28/// Creates a new builder-style object to manufacture [`GetBucketLoggingOutput`](crate::operation::get_bucket_logging::GetBucketLoggingOutput).
29pub fn builder() -> crate::operation::get_bucket_logging::builders::GetBucketLoggingOutputBuilder {
30crate::operation::get_bucket_logging::builders::GetBucketLoggingOutputBuilder::default()
31 }
32}
3334/// A builder for [`GetBucketLoggingOutput`](crate::operation::get_bucket_logging::GetBucketLoggingOutput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct GetBucketLoggingOutputBuilder {
38pub(crate) logging_enabled: ::std::option::Option<crate::types::LoggingEnabled>,
39 _extended_request_id: Option<String>,
40 _request_id: Option<String>,
41}
42impl GetBucketLoggingOutputBuilder {
43/// <p>Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys for a bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html">PUT Bucket logging</a> in the <i>Amazon S3 API Reference</i>.</p>
44pub fn logging_enabled(mut self, input: crate::types::LoggingEnabled) -> Self {
45self.logging_enabled = ::std::option::Option::Some(input);
46self
47}
48/// <p>Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys for a bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html">PUT Bucket logging</a> in the <i>Amazon S3 API Reference</i>.</p>
49pub fn set_logging_enabled(mut self, input: ::std::option::Option<crate::types::LoggingEnabled>) -> Self {
50self.logging_enabled = input;
51self
52}
53/// <p>Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys for a bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html">PUT Bucket logging</a> in the <i>Amazon S3 API Reference</i>.</p>
54pub fn get_logging_enabled(&self) -> &::std::option::Option<crate::types::LoggingEnabled> {
55&self.logging_enabled
56 }
57pub(crate) fn _extended_request_id(mut self, extended_request_id: impl Into<String>) -> Self {
58self._extended_request_id = Some(extended_request_id.into());
59self
60}
6162pub(crate) fn _set_extended_request_id(&mut self, extended_request_id: Option<String>) -> &mut Self {
63self._extended_request_id = extended_request_id;
64self
65}
66pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
67self._request_id = Some(request_id.into());
68self
69}
7071pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
72self._request_id = request_id;
73self
74}
75/// Consumes the builder and constructs a [`GetBucketLoggingOutput`](crate::operation::get_bucket_logging::GetBucketLoggingOutput).
76pub fn build(self) -> crate::operation::get_bucket_logging::GetBucketLoggingOutput {
77crate::operation::get_bucket_logging::GetBucketLoggingOutput {
78 logging_enabled: self.logging_enabled,
79 _extended_request_id: self._extended_request_id,
80 _request_id: self._request_id,
81 }
82 }
83}