#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EnableLoggingOutput {
#[doc(hidden)]
pub logging_enabled: bool,
#[doc(hidden)]
pub bucket_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub s3_key_prefix: std::option::Option<std::string::String>,
#[doc(hidden)]
pub last_successful_delivery_time: std::option::Option<aws_smithy_types::DateTime>,
#[doc(hidden)]
pub last_failure_time: std::option::Option<aws_smithy_types::DateTime>,
#[doc(hidden)]
pub last_failure_message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub log_destination_type: std::option::Option<crate::types::LogDestinationType>,
#[doc(hidden)]
pub log_exports: std::option::Option<std::vec::Vec<std::string::String>>,
_request_id: Option<String>,
}
impl EnableLoggingOutput {
pub fn logging_enabled(&self) -> bool {
self.logging_enabled
}
pub fn bucket_name(&self) -> std::option::Option<&str> {
self.bucket_name.as_deref()
}
pub fn s3_key_prefix(&self) -> std::option::Option<&str> {
self.s3_key_prefix.as_deref()
}
pub fn last_successful_delivery_time(
&self,
) -> std::option::Option<&aws_smithy_types::DateTime> {
self.last_successful_delivery_time.as_ref()
}
pub fn last_failure_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.last_failure_time.as_ref()
}
pub fn last_failure_message(&self) -> std::option::Option<&str> {
self.last_failure_message.as_deref()
}
pub fn log_destination_type(&self) -> std::option::Option<&crate::types::LogDestinationType> {
self.log_destination_type.as_ref()
}
pub fn log_exports(&self) -> std::option::Option<&[std::string::String]> {
self.log_exports.as_deref()
}
}
impl aws_http::request_id::RequestId for EnableLoggingOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl EnableLoggingOutput {
pub fn builder() -> crate::operation::enable_logging::builders::EnableLoggingOutputBuilder {
crate::operation::enable_logging::builders::EnableLoggingOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct EnableLoggingOutputBuilder {
pub(crate) logging_enabled: std::option::Option<bool>,
pub(crate) bucket_name: std::option::Option<std::string::String>,
pub(crate) s3_key_prefix: std::option::Option<std::string::String>,
pub(crate) last_successful_delivery_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) last_failure_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) last_failure_message: std::option::Option<std::string::String>,
pub(crate) log_destination_type: std::option::Option<crate::types::LogDestinationType>,
pub(crate) log_exports: std::option::Option<std::vec::Vec<std::string::String>>,
_request_id: Option<String>,
}
impl EnableLoggingOutputBuilder {
pub fn logging_enabled(mut self, input: bool) -> Self {
self.logging_enabled = Some(input);
self
}
pub fn set_logging_enabled(mut self, input: std::option::Option<bool>) -> Self {
self.logging_enabled = input;
self
}
pub fn bucket_name(mut self, input: impl Into<std::string::String>) -> Self {
self.bucket_name = Some(input.into());
self
}
pub fn set_bucket_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.bucket_name = input;
self
}
pub fn s3_key_prefix(mut self, input: impl Into<std::string::String>) -> Self {
self.s3_key_prefix = Some(input.into());
self
}
pub fn set_s3_key_prefix(mut self, input: std::option::Option<std::string::String>) -> Self {
self.s3_key_prefix = input;
self
}
pub fn last_successful_delivery_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.last_successful_delivery_time = Some(input);
self
}
pub fn set_last_successful_delivery_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.last_successful_delivery_time = input;
self
}
pub fn last_failure_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.last_failure_time = Some(input);
self
}
pub fn set_last_failure_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.last_failure_time = input;
self
}
pub fn last_failure_message(mut self, input: impl Into<std::string::String>) -> Self {
self.last_failure_message = Some(input.into());
self
}
pub fn set_last_failure_message(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.last_failure_message = input;
self
}
pub fn log_destination_type(mut self, input: crate::types::LogDestinationType) -> Self {
self.log_destination_type = Some(input);
self
}
pub fn set_log_destination_type(
mut self,
input: std::option::Option<crate::types::LogDestinationType>,
) -> Self {
self.log_destination_type = input;
self
}
pub fn log_exports(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.log_exports.unwrap_or_default();
v.push(input.into());
self.log_exports = Some(v);
self
}
pub fn set_log_exports(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.log_exports = input;
self
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(self) -> crate::operation::enable_logging::EnableLoggingOutput {
crate::operation::enable_logging::EnableLoggingOutput {
logging_enabled: self.logging_enabled.unwrap_or_default(),
bucket_name: self.bucket_name,
s3_key_prefix: self.s3_key_prefix,
last_successful_delivery_time: self.last_successful_delivery_time,
last_failure_time: self.last_failure_time,
last_failure_message: self.last_failure_message,
log_destination_type: self.log_destination_type,
log_exports: self.log_exports,
_request_id: self._request_id,
}
}
}