Struct aws_sdk_cloudfront::model::CustomHeaders
source · #[non_exhaustive]pub struct CustomHeaders { /* private fields */ }
Expand description
A complex type that contains the list of Custom Headers for each origin.
Implementations§
source§impl CustomHeaders
impl CustomHeaders
sourcepub fn quantity(&self) -> Option<i32>
pub fn quantity(&self) -> Option<i32>
The number of custom headers, if any, for this distribution.
sourcepub fn items(&self) -> Option<&[OriginCustomHeader]>
pub fn items(&self) -> Option<&[OriginCustomHeader]>
Optional: A list that contains one OriginCustomHeader
element for each custom header that you want CloudFront to forward to the origin. If Quantity is 0
, omit Items
.
source§impl CustomHeaders
impl CustomHeaders
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture CustomHeaders
.
Examples found in repository?
src/xml_deser.rs (line 14919)
14915 14916 14917 14918 14919 14920 14921 14922 14923 14924 14925 14926 14927 14928 14929 14930 14931 14932 14933 14934 14935 14936 14937 14938 14939 14940 14941 14942 14943 14944 14945 14946 14947 14948 14949 14950 14951
pub fn deser_structure_crate_model_custom_headers(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CustomHeaders, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CustomHeaders::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Quantity") /* Quantity com.amazonaws.cloudfront#CustomHeaders$Quantity */ => {
let var_631 =
Some(
{
<i32 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 (integer: `com.amazonaws.cloudfront#integer`)"))
}
?
)
;
builder = builder.set_quantity(var_631);
}
,
s if s.matches("Items") /* Items com.amazonaws.cloudfront#CustomHeaders$Items */ => {
let var_632 =
Some(
crate::xml_deser::deser_list_com_amazonaws_cloudfront_origin_custom_headers_list(&mut tag)
?
)
;
builder = builder.set_items(var_632);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for CustomHeaders
impl Clone for CustomHeaders
source§fn clone(&self) -> CustomHeaders
fn clone(&self) -> CustomHeaders
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