#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct EnableIoTLoggingParams {
pub role_arn_for_logging: ::std::string::String,
pub log_level: crate::types::LogLevel,
}
impl EnableIoTLoggingParams {
pub fn role_arn_for_logging(&self) -> &str {
use std::ops::Deref;
self.role_arn_for_logging.deref()
}
pub fn log_level(&self) -> &crate::types::LogLevel {
&self.log_level
}
}
impl EnableIoTLoggingParams {
pub fn builder() -> crate::types::builders::EnableIoTLoggingParamsBuilder {
crate::types::builders::EnableIoTLoggingParamsBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct EnableIoTLoggingParamsBuilder {
pub(crate) role_arn_for_logging: ::std::option::Option<::std::string::String>,
pub(crate) log_level: ::std::option::Option<crate::types::LogLevel>,
}
impl EnableIoTLoggingParamsBuilder {
pub fn role_arn_for_logging(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.role_arn_for_logging = ::std::option::Option::Some(input.into());
self
}
pub fn set_role_arn_for_logging(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.role_arn_for_logging = input;
self
}
pub fn get_role_arn_for_logging(&self) -> &::std::option::Option<::std::string::String> {
&self.role_arn_for_logging
}
pub fn log_level(mut self, input: crate::types::LogLevel) -> Self {
self.log_level = ::std::option::Option::Some(input);
self
}
pub fn set_log_level(mut self, input: ::std::option::Option<crate::types::LogLevel>) -> Self {
self.log_level = input;
self
}
pub fn get_log_level(&self) -> &::std::option::Option<crate::types::LogLevel> {
&self.log_level
}
pub fn build(self) -> ::std::result::Result<crate::types::EnableIoTLoggingParams, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::EnableIoTLoggingParams {
role_arn_for_logging: self.role_arn_for_logging.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"role_arn_for_logging",
"role_arn_for_logging was not specified but it is required when building EnableIoTLoggingParams",
)
})?,
log_level: self.log_level.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"log_level",
"log_level was not specified but it is required when building EnableIoTLoggingParams",
)
})?,
})
}
}