pub(crate) fn de_cluster_operation_v2_provisioned<'a, I>(
tokens: &mut ::std::iter::Peekable<I>,
) -> Result<Option<crate::types::ClusterOperationV2Provisioned>, ::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::types::builders::ClusterOperationV2ProvisionedBuilder::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() {
"operationSteps" => {
builder = builder.set_operation_steps(
crate::protocol_serde::shape_list_of_cluster_operation_step::de_list_of_cluster_operation_step(tokens)?,
);
}
"sourceClusterInfo" => {
builder =
builder.set_source_cluster_info(crate::protocol_serde::shape_mutable_cluster_info::de_mutable_cluster_info(tokens)?);
}
"targetClusterInfo" => {
builder =
builder.set_target_cluster_info(crate::protocol_serde::shape_mutable_cluster_info::de_mutable_cluster_info(tokens)?);
}
"vpcConnectionInfo" => {
builder =
builder.set_vpc_connection_info(crate::protocol_serde::shape_vpc_connection_info::de_vpc_connection_info(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",
)),
}
}