#[non_exhaustive]pub struct ResponseHeadersPolicyCustomHeader { /* private fields */ }
Expand description
An HTTP response header name and its value. CloudFront includes this header in HTTP responses that it sends for requests that match a cache behavior that’s associated with this response headers policy.
Implementations§
source§impl ResponseHeadersPolicyCustomHeader
impl ResponseHeadersPolicyCustomHeader
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture ResponseHeadersPolicyCustomHeader
.
Examples found in repository?
src/xml_deser.rs (line 14827)
14822 14823 14824 14825 14826 14827 14828 14829 14830 14831 14832 14833 14834 14835 14836 14837 14838 14839 14840 14841 14842 14843 14844 14845 14846 14847 14848 14849 14850 14851 14852 14853 14854 14855 14856 14857 14858 14859 14860 14861 14862 14863 14864 14865 14866 14867 14868 14869 14870 14871 14872 14873 14874 14875
pub fn deser_structure_crate_model_response_headers_policy_custom_header(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ResponseHeadersPolicyCustomHeader, aws_smithy_xml::decode::XmlDecodeError>
{
#[allow(unused_mut)]
let mut builder = crate::model::ResponseHeadersPolicyCustomHeader::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Header") /* Header com.amazonaws.cloudfront#ResponseHeadersPolicyCustomHeader$Header */ => {
let var_626 =
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_header(var_626);
}
,
s if s.matches("Value") /* Value com.amazonaws.cloudfront#ResponseHeadersPolicyCustomHeader$Value */ => {
let var_627 =
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_value(var_627);
}
,
s if s.matches("Override") /* Override com.amazonaws.cloudfront#ResponseHeadersPolicyCustomHeader$Override */ => {
let var_628 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.cloudfront#boolean`)"))
}
?
)
;
builder = builder.set_override(var_628);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for ResponseHeadersPolicyCustomHeader
impl Clone for ResponseHeadersPolicyCustomHeader
source§fn clone(&self) -> ResponseHeadersPolicyCustomHeader
fn clone(&self) -> ResponseHeadersPolicyCustomHeader
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more