aws_sdk_codebuild/protocol_serde/
shape_update_webhook_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub fn ser_update_webhook_input_input(
3    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
4    input: &crate::operation::update_webhook::UpdateWebhookInput,
5) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
6    if let Some(var_1) = &input.project_name {
7        object.key("projectName").string(var_1.as_str());
8    }
9    if let Some(var_2) = &input.branch_filter {
10        object.key("branchFilter").string(var_2.as_str());
11    }
12    if let Some(var_3) = &input.rotate_secret {
13        object.key("rotateSecret").boolean(*var_3);
14    }
15    if let Some(var_4) = &input.filter_groups {
16        let mut array_5 = object.key("filterGroups").start_array();
17        for item_6 in var_4 {
18            {
19                let mut array_7 = array_5.value().start_array();
20                for item_8 in item_6 {
21                    {
22                        #[allow(unused_mut)]
23                        let mut object_9 = array_7.value().start_object();
24                        crate::protocol_serde::shape_webhook_filter::ser_webhook_filter(&mut object_9, item_8)?;
25                        object_9.finish();
26                    }
27                }
28                array_7.finish();
29            }
30        }
31        array_5.finish();
32    }
33    if let Some(var_10) = &input.build_type {
34        object.key("buildType").string(var_10.as_str());
35    }
36    if let Some(var_11) = &input.pull_request_build_policy {
37        #[allow(unused_mut)]
38        let mut object_12 = object.key("pullRequestBuildPolicy").start_object();
39        crate::protocol_serde::shape_pull_request_build_policy::ser_pull_request_build_policy(&mut object_12, var_11)?;
40        object_12.finish();
41    }
42    Ok(())
43}