aws_sdk_shield/protocol_serde/
shape_block_action.rs1pub fn ser_block_action(
3 #[allow(unused_variables)] object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
4 #[allow(unused_variables)] input: &crate::types::BlockAction,
5) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
6 Ok(())
7}
8
9pub(crate) fn de_block_action<'a, I>(
10 tokens: &mut ::std::iter::Peekable<I>,
11 _value: &'a [u8],
12) -> ::std::result::Result<Option<crate::types::BlockAction>, ::aws_smithy_json::deserialize::error::DeserializeError>
13where
14 I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
15{
16 match tokens.next().transpose()? {
17 Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
18 Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
19 #[allow(unused_mut)]
20 let mut builder = crate::types::builders::BlockActionBuilder::default();
21 ::aws_smithy_json::deserialize::token::skip_to_end(tokens)?;
22 Ok(Some(builder.build()))
23 }
24 _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
25 "expected start object or null",
26 )),
27 }
28}