Struct aws_sdk_securityhub::model::aws_s3_bucket_server_side_encryption_configuration::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for AwsS3BucketServerSideEncryptionConfiguration
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn rules(self, input: AwsS3BucketServerSideEncryptionRule) -> Self
pub fn rules(self, input: AwsS3BucketServerSideEncryptionRule) -> Self
Appends an item to rules
.
To override the contents of this collection use set_rules
.
The encryption rules that are applied to the S3 bucket.
sourcepub fn set_rules(
self,
input: Option<Vec<AwsS3BucketServerSideEncryptionRule>>
) -> Self
pub fn set_rules(
self,
input: Option<Vec<AwsS3BucketServerSideEncryptionRule>>
) -> Self
The encryption rules that are applied to the S3 bucket.
Examples found in repository?
src/json_deser.rs (lines 24147-24149)
24117 24118 24119 24120 24121 24122 24123 24124 24125 24126 24127 24128 24129 24130 24131 24132 24133 24134 24135 24136 24137 24138 24139 24140 24141 24142 24143 24144 24145 24146 24147 24148 24149 24150 24151 24152 24153 24154 24155 24156 24157 24158 24159 24160 24161 24162 24163 24164 24165 24166 24167 24168 24169 24170 24171 24172
pub(crate) fn deser_structure_crate_model_aws_s3_bucket_server_side_encryption_configuration<
'a,
I,
>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsS3BucketServerSideEncryptionConfiguration>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder =
crate::model::aws_s3_bucket_server_side_encryption_configuration::Builder::default(
);
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"Rules" => {
builder = builder.set_rules(
crate::json_deser::deser_list_com_amazonaws_securityhub_aws_s3_bucket_server_side_encryption_rules(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn build(self) -> AwsS3BucketServerSideEncryptionConfiguration
pub fn build(self) -> AwsS3BucketServerSideEncryptionConfiguration
Consumes the builder and constructs a AwsS3BucketServerSideEncryptionConfiguration
.
Examples found in repository?
src/json_deser.rs (line 24164)
24117 24118 24119 24120 24121 24122 24123 24124 24125 24126 24127 24128 24129 24130 24131 24132 24133 24134 24135 24136 24137 24138 24139 24140 24141 24142 24143 24144 24145 24146 24147 24148 24149 24150 24151 24152 24153 24154 24155 24156 24157 24158 24159 24160 24161 24162 24163 24164 24165 24166 24167 24168 24169 24170 24171 24172
pub(crate) fn deser_structure_crate_model_aws_s3_bucket_server_side_encryption_configuration<
'a,
I,
>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsS3BucketServerSideEncryptionConfiguration>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder =
crate::model::aws_s3_bucket_server_side_encryption_configuration::Builder::default(
);
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"Rules" => {
builder = builder.set_rules(
crate::json_deser::deser_list_com_amazonaws_securityhub_aws_s3_bucket_server_side_encryption_rules(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}