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