pub struct Builder { /* private fields */ }
Expand description

A builder for GetBucketWebsiteOutput.

Implementations§

Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3 bucket.

Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3 bucket.

Examples found in repository?
src/xml_deser.rs (line 931)
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
pub fn deser_operation_crate_operation_get_bucket_website(
    inp: &[u8],
    mut builder: crate::output::get_bucket_website_output::Builder,
) -> Result<crate::output::get_bucket_website_output::Builder, aws_smithy_xml::decode::XmlDecodeError>
{
    let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;

    #[allow(unused_mut)]
    let mut decoder = doc.root_element()?;
    #[allow(unused_variables)]
    let start_el = decoder.start_el();
    if !start_el.matches("WebsiteConfiguration") {
        return Err(
                                aws_smithy_xml::decode::XmlDecodeError::custom(
                                    format!("encountered invalid XML root: expected WebsiteConfiguration but got {:?}. This is likely a bug in the SDK.", start_el)
                                )
                            );
    }
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("IndexDocument") /* IndexDocument com.amazonaws.s3.synthetic#GetBucketWebsiteOutput$IndexDocument */ =>  {
                let var_40 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_index_document(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_index_document(var_40);
            }
            ,
            s if s.matches("RedirectAllRequestsTo") /* RedirectAllRequestsTo com.amazonaws.s3.synthetic#GetBucketWebsiteOutput$RedirectAllRequestsTo */ =>  {
                let var_41 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_redirect_all_requests_to(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_redirect_all_requests_to(var_41);
            }
            ,
            s if s.matches("RoutingRules") /* RoutingRules com.amazonaws.s3.synthetic#GetBucketWebsiteOutput$RoutingRules */ =>  {
                let var_42 =
                    Some(
                        crate::xml_deser::deser_list_com_amazonaws_s3_routing_rules(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_routing_rules(var_42);
            }
            ,
            s if s.matches("ErrorDocument") /* ErrorDocument com.amazonaws.s3.synthetic#GetBucketWebsiteOutput$ErrorDocument */ =>  {
                let var_43 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_error_document(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_error_document(var_43);
            }
            ,
            _ => {}
        }
    }
    Ok(builder)
}

The name of the index document for the website (for example index.html).

The name of the index document for the website (for example index.html).

Examples found in repository?
src/xml_deser.rs (line 921)
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
pub fn deser_operation_crate_operation_get_bucket_website(
    inp: &[u8],
    mut builder: crate::output::get_bucket_website_output::Builder,
) -> Result<crate::output::get_bucket_website_output::Builder, aws_smithy_xml::decode::XmlDecodeError>
{
    let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;

    #[allow(unused_mut)]
    let mut decoder = doc.root_element()?;
    #[allow(unused_variables)]
    let start_el = decoder.start_el();
    if !start_el.matches("WebsiteConfiguration") {
        return Err(
                                aws_smithy_xml::decode::XmlDecodeError::custom(
                                    format!("encountered invalid XML root: expected WebsiteConfiguration but got {:?}. This is likely a bug in the SDK.", start_el)
                                )
                            );
    }
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("IndexDocument") /* IndexDocument com.amazonaws.s3.synthetic#GetBucketWebsiteOutput$IndexDocument */ =>  {
                let var_40 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_index_document(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_index_document(var_40);
            }
            ,
            s if s.matches("RedirectAllRequestsTo") /* RedirectAllRequestsTo com.amazonaws.s3.synthetic#GetBucketWebsiteOutput$RedirectAllRequestsTo */ =>  {
                let var_41 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_redirect_all_requests_to(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_redirect_all_requests_to(var_41);
            }
            ,
            s if s.matches("RoutingRules") /* RoutingRules com.amazonaws.s3.synthetic#GetBucketWebsiteOutput$RoutingRules */ =>  {
                let var_42 =
                    Some(
                        crate::xml_deser::deser_list_com_amazonaws_s3_routing_rules(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_routing_rules(var_42);
            }
            ,
            s if s.matches("ErrorDocument") /* ErrorDocument com.amazonaws.s3.synthetic#GetBucketWebsiteOutput$ErrorDocument */ =>  {
                let var_43 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_error_document(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_error_document(var_43);
            }
            ,
            _ => {}
        }
    }
    Ok(builder)
}

The object key name of the website error document to use for 4XX class errors.

The object key name of the website error document to use for 4XX class errors.

Examples found in repository?
src/xml_deser.rs (line 951)
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
pub fn deser_operation_crate_operation_get_bucket_website(
    inp: &[u8],
    mut builder: crate::output::get_bucket_website_output::Builder,
) -> Result<crate::output::get_bucket_website_output::Builder, aws_smithy_xml::decode::XmlDecodeError>
{
    let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;

    #[allow(unused_mut)]
    let mut decoder = doc.root_element()?;
    #[allow(unused_variables)]
    let start_el = decoder.start_el();
    if !start_el.matches("WebsiteConfiguration") {
        return Err(
                                aws_smithy_xml::decode::XmlDecodeError::custom(
                                    format!("encountered invalid XML root: expected WebsiteConfiguration but got {:?}. This is likely a bug in the SDK.", start_el)
                                )
                            );
    }
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("IndexDocument") /* IndexDocument com.amazonaws.s3.synthetic#GetBucketWebsiteOutput$IndexDocument */ =>  {
                let var_40 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_index_document(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_index_document(var_40);
            }
            ,
            s if s.matches("RedirectAllRequestsTo") /* RedirectAllRequestsTo com.amazonaws.s3.synthetic#GetBucketWebsiteOutput$RedirectAllRequestsTo */ =>  {
                let var_41 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_redirect_all_requests_to(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_redirect_all_requests_to(var_41);
            }
            ,
            s if s.matches("RoutingRules") /* RoutingRules com.amazonaws.s3.synthetic#GetBucketWebsiteOutput$RoutingRules */ =>  {
                let var_42 =
                    Some(
                        crate::xml_deser::deser_list_com_amazonaws_s3_routing_rules(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_routing_rules(var_42);
            }
            ,
            s if s.matches("ErrorDocument") /* ErrorDocument com.amazonaws.s3.synthetic#GetBucketWebsiteOutput$ErrorDocument */ =>  {
                let var_43 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_error_document(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_error_document(var_43);
            }
            ,
            _ => {}
        }
    }
    Ok(builder)
}

Appends an item to routing_rules.

To override the contents of this collection use set_routing_rules.

Rules that define when a redirect is applied and the redirect behavior.

Rules that define when a redirect is applied and the redirect behavior.

Examples found in repository?
src/xml_deser.rs (line 941)
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
pub fn deser_operation_crate_operation_get_bucket_website(
    inp: &[u8],
    mut builder: crate::output::get_bucket_website_output::Builder,
) -> Result<crate::output::get_bucket_website_output::Builder, aws_smithy_xml::decode::XmlDecodeError>
{
    let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;

    #[allow(unused_mut)]
    let mut decoder = doc.root_element()?;
    #[allow(unused_variables)]
    let start_el = decoder.start_el();
    if !start_el.matches("WebsiteConfiguration") {
        return Err(
                                aws_smithy_xml::decode::XmlDecodeError::custom(
                                    format!("encountered invalid XML root: expected WebsiteConfiguration but got {:?}. This is likely a bug in the SDK.", start_el)
                                )
                            );
    }
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("IndexDocument") /* IndexDocument com.amazonaws.s3.synthetic#GetBucketWebsiteOutput$IndexDocument */ =>  {
                let var_40 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_index_document(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_index_document(var_40);
            }
            ,
            s if s.matches("RedirectAllRequestsTo") /* RedirectAllRequestsTo com.amazonaws.s3.synthetic#GetBucketWebsiteOutput$RedirectAllRequestsTo */ =>  {
                let var_41 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_redirect_all_requests_to(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_redirect_all_requests_to(var_41);
            }
            ,
            s if s.matches("RoutingRules") /* RoutingRules com.amazonaws.s3.synthetic#GetBucketWebsiteOutput$RoutingRules */ =>  {
                let var_42 =
                    Some(
                        crate::xml_deser::deser_list_com_amazonaws_s3_routing_rules(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_routing_rules(var_42);
            }
            ,
            s if s.matches("ErrorDocument") /* ErrorDocument com.amazonaws.s3.synthetic#GetBucketWebsiteOutput$ErrorDocument */ =>  {
                let var_43 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_error_document(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_error_document(var_43);
            }
            ,
            _ => {}
        }
    }
    Ok(builder)
}

Consumes the builder and constructs a GetBucketWebsiteOutput.

Examples found in repository?
src/operation_deser.rs (line 1472)
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
pub fn parse_get_bucket_website_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::GetBucketWebsiteOutput, crate::error::GetBucketWebsiteError>
{
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::get_bucket_website_output::Builder::default();
        let _ = response;
        output = crate::xml_deser::deser_operation_crate_operation_get_bucket_website(
            response.body().as_ref(),
            output,
        )
        .map_err(crate::error::GetBucketWebsiteError::unhandled)?;
        output.build()
    })
}

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more