pub struct Builder { /* private fields */ }
Expand description
A builder for GetShardIteratorOutput
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn shard_iterator(self, input: impl Into<String>) -> Self
pub fn shard_iterator(self, input: impl Into<String>) -> Self
The position in the shard from which to start reading stream records sequentially. A shard iterator specifies this position using the sequence number of a stream record in a shard.
sourcepub fn set_shard_iterator(self, input: Option<String>) -> Self
pub fn set_shard_iterator(self, input: Option<String>) -> Self
The position in the shard from which to start reading stream records sequentially. A shard iterator specifies this position using the sequence number of a stream record in a shard.
Examples found in repository?
src/json_deser.rs (lines 372-378)
354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401
pub(crate) fn deser_operation_crate_operation_get_shard_iterator(
value: &[u8],
mut builder: crate::output::get_shard_iterator_output::Builder,
) -> Result<
crate::output::get_shard_iterator_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() {
"ShardIterator" => {
builder = builder.set_shard_iterator(
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) -> GetShardIteratorOutput
pub fn build(self) -> GetShardIteratorOutput
Consumes the builder and constructs a GetShardIteratorOutput
.
Examples found in repository?
src/operation_deser.rs (line 274)
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276
pub fn parse_get_shard_iterator_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::GetShardIteratorOutput, crate::error::GetShardIteratorError>
{
Ok({
#[allow(unused_mut)]
let mut output = crate::output::get_shard_iterator_output::Builder::default();
let _ = response;
output = crate::json_deser::deser_operation_crate_operation_get_shard_iterator(
response.body().as_ref(),
output,
)
.map_err(crate::error::GetShardIteratorError::unhandled)?;
output.build()
})
}