aws_sdk_connect/protocol_serde/
shape_list_phone_numbers_v2_input.rs1pub fn ser_list_phone_numbers_v2_input_input(
3 object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
4 input: &crate::operation::list_phone_numbers_v2::ListPhoneNumbersV2Input,
5) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
6 if let Some(var_1) = &input.instance_id {
7 object.key("InstanceId").string(var_1.as_str());
8 }
9 if let Some(var_2) = &input.max_results {
10 object.key("MaxResults").number(
11 #[allow(clippy::useless_conversion)]
12 ::aws_smithy_types::Number::NegInt((*var_2).into()),
13 );
14 }
15 if let Some(var_3) = &input.next_token {
16 object.key("NextToken").string(var_3.as_str());
17 }
18 if let Some(var_4) = &input.phone_number_country_codes {
19 let mut array_5 = object.key("PhoneNumberCountryCodes").start_array();
20 for item_6 in var_4 {
21 {
22 array_5.value().string(item_6.as_str());
23 }
24 }
25 array_5.finish();
26 }
27 if let Some(var_7) = &input.phone_number_prefix {
28 object.key("PhoneNumberPrefix").string(var_7.as_str());
29 }
30 if let Some(var_8) = &input.phone_number_types {
31 let mut array_9 = object.key("PhoneNumberTypes").start_array();
32 for item_10 in var_8 {
33 {
34 array_9.value().string(item_10.as_str());
35 }
36 }
37 array_9.finish();
38 }
39 if let Some(var_11) = &input.target_arn {
40 object.key("TargetArn").string(var_11.as_str());
41 }
42 Ok(())
43}