Struct aws_sdk_cloudfront::error::batch_too_large::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for BatchTooLarge
.
Implementations§
source§impl Builder
impl Builder
pub fn message(self, input: impl Into<String>) -> Self
sourcepub fn set_message(self, input: Option<String>) -> Self
pub fn set_message(self, input: Option<String>) -> Self
Examples found in repository?
src/xml_deser.rs (line 3060)
3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067
pub fn deser_structure_crate_error_batch_too_large_xml_err(
inp: &[u8],
mut builder: crate::error::batch_too_large::Builder,
) -> Result<crate::error::batch_too_large::Builder, aws_smithy_xml::decode::XmlDecodeError> {
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_wrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("Message") /* Message com.amazonaws.cloudfront#BatchTooLarge$Message */ => {
let var_90 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_90);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn build(self) -> BatchTooLarge
pub fn build(self) -> BatchTooLarge
Consumes the builder and constructs a BatchTooLarge
.
Examples found in repository?
src/operation_deser.rs (line 2815)
2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922
pub fn parse_create_invalidation_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::CreateInvalidationOutput,
crate::error::CreateInvalidationError,
> {
let generic = crate::xml_deser::parse_http_generic_error(response)
.map_err(crate::error::CreateInvalidationError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => return Err(crate::error::CreateInvalidationError::unhandled(generic)),
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"AccessDenied" => crate::error::CreateInvalidationError {
meta: generic,
kind: crate::error::CreateInvalidationErrorKind::AccessDenied({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::access_denied::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_access_denied_xml_err(
response.body().as_ref(),
output,
)
.map_err(crate::error::CreateInvalidationError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"BatchTooLarge" => crate::error::CreateInvalidationError {
meta: generic,
kind: crate::error::CreateInvalidationErrorKind::BatchTooLarge({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::batch_too_large::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_batch_too_large_xml_err(
response.body().as_ref(),
output,
)
.map_err(crate::error::CreateInvalidationError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"InconsistentQuantities" => crate::error::CreateInvalidationError {
meta: generic,
kind: crate::error::CreateInvalidationErrorKind::InconsistentQuantities({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::inconsistent_quantities::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_inconsistent_quantities_xml_err(response.body().as_ref(), output).map_err(crate::error::CreateInvalidationError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"InvalidArgument" => crate::error::CreateInvalidationError {
meta: generic,
kind: crate::error::CreateInvalidationErrorKind::InvalidArgument({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::invalid_argument::Builder::default();
let _ = response;
output =
crate::xml_deser::deser_structure_crate_error_invalid_argument_xml_err(
response.body().as_ref(),
output,
)
.map_err(crate::error::CreateInvalidationError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"MissingBody" => crate::error::CreateInvalidationError {
meta: generic,
kind: crate::error::CreateInvalidationErrorKind::MissingBody({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::missing_body::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_missing_body_xml_err(
response.body().as_ref(),
output,
)
.map_err(crate::error::CreateInvalidationError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"NoSuchDistribution" => {
crate::error::CreateInvalidationError {
meta: generic,
kind: crate::error::CreateInvalidationErrorKind::NoSuchDistribution({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::no_such_distribution::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_no_such_distribution_xml_err(response.body().as_ref(), output).map_err(crate::error::CreateInvalidationError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
}
}
"TooManyInvalidationsInProgress" => crate::error::CreateInvalidationError {
meta: generic,
kind: crate::error::CreateInvalidationErrorKind::TooManyInvalidationsInProgress({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::too_many_invalidations_in_progress::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_too_many_invalidations_in_progress_xml_err(response.body().as_ref(), output).map_err(crate::error::CreateInvalidationError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
_ => crate::error::CreateInvalidationError::generic(generic),
})
}