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