aws_sdk_sagemaker/protocol_serde/
shape_create_cluster_input.rs1pub fn ser_create_cluster_input_input(
3 object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
4 input: &crate::operation::create_cluster::CreateClusterInput,
5) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
6 if let Some(var_1) = &input.cluster_name {
7 object.key("ClusterName").string(var_1.as_str());
8 }
9 if let Some(var_2) = &input.instance_groups {
10 let mut array_3 = object.key("InstanceGroups").start_array();
11 for item_4 in var_2 {
12 {
13 #[allow(unused_mut)]
14 let mut object_5 = array_3.value().start_object();
15 crate::protocol_serde::shape_cluster_instance_group_specification::ser_cluster_instance_group_specification(&mut object_5, item_4)?;
16 object_5.finish();
17 }
18 }
19 array_3.finish();
20 }
21 if let Some(var_6) = &input.vpc_config {
22 #[allow(unused_mut)]
23 let mut object_7 = object.key("VpcConfig").start_object();
24 crate::protocol_serde::shape_vpc_config::ser_vpc_config(&mut object_7, var_6)?;
25 object_7.finish();
26 }
27 if let Some(var_8) = &input.tags {
28 let mut array_9 = object.key("Tags").start_array();
29 for item_10 in var_8 {
30 {
31 #[allow(unused_mut)]
32 let mut object_11 = array_9.value().start_object();
33 crate::protocol_serde::shape_tag::ser_tag(&mut object_11, item_10)?;
34 object_11.finish();
35 }
36 }
37 array_9.finish();
38 }
39 if let Some(var_12) = &input.orchestrator {
40 #[allow(unused_mut)]
41 let mut object_13 = object.key("Orchestrator").start_object();
42 crate::protocol_serde::shape_cluster_orchestrator::ser_cluster_orchestrator(&mut object_13, var_12)?;
43 object_13.finish();
44 }
45 if let Some(var_14) = &input.node_recovery {
46 object.key("NodeRecovery").string(var_14.as_str());
47 }
48 Ok(())
49}