Struct aws_sdk_cloudfront::model::cache_behaviors::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for CacheBehaviors
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn set_quantity(self, input: Option<i32>) -> Self
pub fn set_quantity(self, input: Option<i32>) -> Self
The number of cache behaviors for this distribution.
Examples found in repository?
src/xml_deser.rs (line 9993)
9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010
pub fn deser_structure_crate_model_cache_behaviors(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CacheBehaviors, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CacheBehaviors::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Quantity") /* Quantity com.amazonaws.cloudfront#CacheBehaviors$Quantity */ => {
let var_390 =
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_390);
}
,
s if s.matches("Items") /* Items com.amazonaws.cloudfront#CacheBehaviors$Items */ => {
let var_391 =
Some(
crate::xml_deser::deser_list_com_amazonaws_cloudfront_cache_behavior_list(&mut tag)
?
)
;
builder = builder.set_items(var_391);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn items(self, input: CacheBehavior) -> Self
pub fn items(self, input: CacheBehavior) -> Self
Appends an item to items
.
To override the contents of this collection use set_items
.
Optional: A complex type that contains cache behaviors for this distribution. If Quantity
is 0
, you can omit Items
.
sourcepub fn set_items(self, input: Option<Vec<CacheBehavior>>) -> Self
pub fn set_items(self, input: Option<Vec<CacheBehavior>>) -> Self
Optional: A complex type that contains cache behaviors for this distribution. If Quantity
is 0
, you can omit Items
.
Examples found in repository?
src/xml_deser.rs (line 10003)
9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010
pub fn deser_structure_crate_model_cache_behaviors(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CacheBehaviors, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CacheBehaviors::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Quantity") /* Quantity com.amazonaws.cloudfront#CacheBehaviors$Quantity */ => {
let var_390 =
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_390);
}
,
s if s.matches("Items") /* Items com.amazonaws.cloudfront#CacheBehaviors$Items */ => {
let var_391 =
Some(
crate::xml_deser::deser_list_com_amazonaws_cloudfront_cache_behavior_list(&mut tag)
?
)
;
builder = builder.set_items(var_391);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> CacheBehaviors
pub fn build(self) -> CacheBehaviors
Consumes the builder and constructs a CacheBehaviors
.
Examples found in repository?
src/xml_deser.rs (line 10009)
9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010
pub fn deser_structure_crate_model_cache_behaviors(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CacheBehaviors, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CacheBehaviors::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Quantity") /* Quantity com.amazonaws.cloudfront#CacheBehaviors$Quantity */ => {
let var_390 =
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_390);
}
,
s if s.matches("Items") /* Items com.amazonaws.cloudfront#CacheBehaviors$Items */ => {
let var_391 =
Some(
crate::xml_deser::deser_list_com_amazonaws_cloudfront_cache_behavior_list(&mut tag)
?
)
;
builder = builder.set_items(var_391);
}
,
_ => {}
}
}
Ok(builder.build())
}