aws-sdk-codebuild 1.122.0

AWS SDK for AWS CodeBuild
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_create_webhook_input_input(
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::operation::create_webhook::CreateWebhookInput,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    if let Some(var_1) = &input.project_name {
        object.key("projectName").string(var_1.as_str());
    }
    if let Some(var_2) = &input.branch_filter {
        object.key("branchFilter").string(var_2.as_str());
    }
    if let Some(var_3) = &input.filter_groups {
        let mut array_4 = object.key("filterGroups").start_array();
        for item_5 in var_3 {
            {
                let mut array_6 = array_4.value().start_array();
                for item_7 in item_5 {
                    {
                        #[allow(unused_mut)]
                        let mut object_8 = array_6.value().start_object();
                        crate::protocol_serde::shape_webhook_filter::ser_webhook_filter(&mut object_8, item_7)?;
                        object_8.finish();
                    }
                }
                array_6.finish();
            }
        }
        array_4.finish();
    }
    if let Some(var_9) = &input.build_type {
        object.key("buildType").string(var_9.as_str());
    }
    if let Some(var_10) = &input.manual_creation {
        object.key("manualCreation").boolean(*var_10);
    }
    if let Some(var_11) = &input.scope_configuration {
        #[allow(unused_mut)]
        let mut object_12 = object.key("scopeConfiguration").start_object();
        crate::protocol_serde::shape_scope_configuration::ser_scope_configuration(&mut object_12, var_11)?;
        object_12.finish();
    }
    if let Some(var_13) = &input.pull_request_build_policy {
        #[allow(unused_mut)]
        let mut object_14 = object.key("pullRequestBuildPolicy").start_object();
        crate::protocol_serde::shape_pull_request_build_policy::ser_pull_request_build_policy(&mut object_14, var_13)?;
        object_14.finish();
    }
    Ok(())
}