Struct aws_sdk_databrew::output::update_ruleset_output::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for UpdateRulesetOutput
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn set_name(self, input: Option<String>) -> Self
pub fn set_name(self, input: Option<String>) -> Self
The name of the updated ruleset.
Examples found in repository?
src/json_deser.rs (lines 3143-3149)
3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172
pub(crate) fn deser_operation_crate_operation_update_ruleset(
value: &[u8],
mut builder: crate::output::update_ruleset_output::Builder,
) -> Result<
crate::output::update_ruleset_output::Builder,
aws_smithy_json::deserialize::error::DeserializeError,
> {
let mut tokens_owned =
aws_smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(value))
.peekable();
let tokens = &mut tokens_owned;
aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
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() {
"Name" => {
builder = builder.set_name(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => 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
)),
)
}
}
}
if tokens.next().is_some() {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"found more JSON tokens after completing parsing",
),
);
}
Ok(builder)
}
sourcepub fn build(self) -> UpdateRulesetOutput
pub fn build(self) -> UpdateRulesetOutput
Consumes the builder and constructs a UpdateRulesetOutput
.
Examples found in repository?
src/operation_deser.rs (line 3429)
3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431
pub fn parse_update_ruleset_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::UpdateRulesetOutput, crate::error::UpdateRulesetError> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::update_ruleset_output::Builder::default();
let _ = response;
output = crate::json_deser::deser_operation_crate_operation_update_ruleset(
response.body().as_ref(),
output,
)
.map_err(crate::error::UpdateRulesetError::unhandled)?;
output.build()
})
}