Struct aws_sdk_databrew::output::list_rulesets_output::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for ListRulesetsOutput
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn rulesets(self, input: RulesetItem) -> Self
pub fn rulesets(self, input: RulesetItem) -> Self
Appends an item to rulesets
.
To override the contents of this collection use set_rulesets
.
A list of RulesetItem. RulesetItem contains meta data of a ruleset.
sourcepub fn set_rulesets(self, input: Option<Vec<RulesetItem>>) -> Self
pub fn set_rulesets(self, input: Option<Vec<RulesetItem>>) -> Self
A list of RulesetItem. RulesetItem contains meta data of a ruleset.
Examples found in repository?
src/json_deser.rs (lines 2470-2474)
2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497
pub(crate) fn deser_operation_crate_operation_list_rulesets(
value: &[u8],
mut builder: crate::output::list_rulesets_output::Builder,
) -> Result<
crate::output::list_rulesets_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() {
"NextToken" => {
builder = builder.set_next_token(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"Rulesets" => {
builder = builder.set_rulesets(
crate::json_deser::deser_list_com_amazonaws_databrew_ruleset_item_list(
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
)),
)
}
}
}
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 next_token(self, input: impl Into<String>) -> Self
pub fn next_token(self, input: impl Into<String>) -> Self
A token that you can use in a subsequent call to retrieve the next set of results.
sourcepub fn set_next_token(self, input: Option<String>) -> Self
pub fn set_next_token(self, input: Option<String>) -> Self
A token that you can use in a subsequent call to retrieve the next set of results.
Examples found in repository?
src/json_deser.rs (lines 2461-2467)
2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497
pub(crate) fn deser_operation_crate_operation_list_rulesets(
value: &[u8],
mut builder: crate::output::list_rulesets_output::Builder,
) -> Result<
crate::output::list_rulesets_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() {
"NextToken" => {
builder = builder.set_next_token(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"Rulesets" => {
builder = builder.set_rulesets(
crate::json_deser::deser_list_com_amazonaws_databrew_ruleset_item_list(
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
)),
)
}
}
}
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) -> ListRulesetsOutput
pub fn build(self) -> ListRulesetsOutput
Consumes the builder and constructs a ListRulesetsOutput
.
Examples found in repository?
src/operation_deser.rs (line 2199)
2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201
pub fn parse_list_rulesets_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::ListRulesetsOutput, crate::error::ListRulesetsError> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::list_rulesets_output::Builder::default();
let _ = response;
output = crate::json_deser::deser_operation_crate_operation_list_rulesets(
response.body().as_ref(),
output,
)
.map_err(crate::error::ListRulesetsError::unhandled)?;
output.build()
})
}