aws_sdk_s3/protocol_serde/
shape_website_configuration.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_website_configuration(
    input: &crate::types::WebsiteConfiguration,
    writer: ::aws_smithy_xml::encode::ElWriter,
) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    #[allow(unused_mut)]
    let mut scope = writer.finish();
    if let Some(var_1) = &input.error_document {
        let inner_writer = scope.start_el("ErrorDocument");
        crate::protocol_serde::shape_error_document::ser_error_document(var_1, inner_writer)?
    }
    if let Some(var_2) = &input.index_document {
        let inner_writer = scope.start_el("IndexDocument");
        crate::protocol_serde::shape_index_document::ser_index_document(var_2, inner_writer)?
    }
    if let Some(var_3) = &input.redirect_all_requests_to {
        let inner_writer = scope.start_el("RedirectAllRequestsTo");
        crate::protocol_serde::shape_redirect_all_requests_to::ser_redirect_all_requests_to(var_3, inner_writer)?
    }
    if let Some(var_4) = &input.routing_rules {
        let mut inner_writer = scope.start_el("RoutingRules").finish();
        for list_item_5 in var_4 {
            {
                let inner_writer = inner_writer.start_el("RoutingRule");
                crate::protocol_serde::shape_routing_rule::ser_routing_rule(list_item_5, inner_writer)?
            }
        }
    }
    scope.finish();
    Ok(())
}