aws_sdk_sagemaker/protocol_serde/
shape_create_model_card_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub fn ser_create_model_card_input_input(
3    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
4    input: &crate::operation::create_model_card::CreateModelCardInput,
5) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
6    if let Some(var_1) = &input.model_card_name {
7        object.key("ModelCardName").string(var_1.as_str());
8    }
9    if let Some(var_2) = &input.security_config {
10        #[allow(unused_mut)]
11        let mut object_3 = object.key("SecurityConfig").start_object();
12        crate::protocol_serde::shape_model_card_security_config::ser_model_card_security_config(&mut object_3, var_2)?;
13        object_3.finish();
14    }
15    if let Some(var_4) = &input.content {
16        object.key("Content").string(var_4.as_str());
17    }
18    if let Some(var_5) = &input.model_card_status {
19        object.key("ModelCardStatus").string(var_5.as_str());
20    }
21    if let Some(var_6) = &input.tags {
22        let mut array_7 = object.key("Tags").start_array();
23        for item_8 in var_6 {
24            {
25                #[allow(unused_mut)]
26                let mut object_9 = array_7.value().start_object();
27                crate::protocol_serde::shape_tag::ser_tag(&mut object_9, item_8)?;
28                object_9.finish();
29            }
30        }
31        array_7.finish();
32    }
33    Ok(())
34}