Struct aws_sdk_cloudfront::model::cache_policy_summary::Builder
source · pub struct Builder { /* private fields */ }Expand description
A builder for CachePolicySummary.
Implementations§
source§impl Builder
impl Builder
sourcepub fn type(self, input: CachePolicyType) -> Self
pub fn type(self, input: CachePolicyType) -> Self
The type of cache policy, either managed (created by Amazon Web Services) or custom (created in this Amazon Web Services account).
sourcepub fn set_type(self, input: Option<CachePolicyType>) -> Self
pub fn set_type(self, input: Option<CachePolicyType>) -> Self
The type of cache policy, either managed (created by Amazon Web Services) or custom (created in this Amazon Web Services account).
Examples found in repository?
src/xml_deser.rs (line 12676)
12658 12659 12660 12661 12662 12663 12664 12665 12666 12667 12668 12669 12670 12671 12672 12673 12674 12675 12676 12677 12678 12679 12680 12681 12682 12683 12684 12685 12686 12687 12688 12689 12690 12691 12692 12693
pub fn deser_structure_crate_model_cache_policy_summary(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CachePolicySummary, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CachePolicySummary::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Type") /* Type com.amazonaws.cloudfront#CachePolicySummary$Type */ => {
let var_505 =
Some(
Result::<crate::model::CachePolicyType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CachePolicyType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_type(var_505);
}
,
s if s.matches("CachePolicy") /* CachePolicy com.amazonaws.cloudfront#CachePolicySummary$CachePolicy */ => {
let var_506 =
Some(
crate::xml_deser::deser_structure_crate_model_cache_policy(&mut tag)
?
)
;
builder = builder.set_cache_policy(var_506);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn cache_policy(self, input: CachePolicy) -> Self
pub fn cache_policy(self, input: CachePolicy) -> Self
The cache policy.
sourcepub fn set_cache_policy(self, input: Option<CachePolicy>) -> Self
pub fn set_cache_policy(self, input: Option<CachePolicy>) -> Self
The cache policy.
Examples found in repository?
src/xml_deser.rs (line 12686)
12658 12659 12660 12661 12662 12663 12664 12665 12666 12667 12668 12669 12670 12671 12672 12673 12674 12675 12676 12677 12678 12679 12680 12681 12682 12683 12684 12685 12686 12687 12688 12689 12690 12691 12692 12693
pub fn deser_structure_crate_model_cache_policy_summary(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CachePolicySummary, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CachePolicySummary::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Type") /* Type com.amazonaws.cloudfront#CachePolicySummary$Type */ => {
let var_505 =
Some(
Result::<crate::model::CachePolicyType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CachePolicyType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_type(var_505);
}
,
s if s.matches("CachePolicy") /* CachePolicy com.amazonaws.cloudfront#CachePolicySummary$CachePolicy */ => {
let var_506 =
Some(
crate::xml_deser::deser_structure_crate_model_cache_policy(&mut tag)
?
)
;
builder = builder.set_cache_policy(var_506);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn build(self) -> CachePolicySummary
pub fn build(self) -> CachePolicySummary
Consumes the builder and constructs a CachePolicySummary.
Examples found in repository?
src/xml_deser.rs (line 12692)
12658 12659 12660 12661 12662 12663 12664 12665 12666 12667 12668 12669 12670 12671 12672 12673 12674 12675 12676 12677 12678 12679 12680 12681 12682 12683 12684 12685 12686 12687 12688 12689 12690 12691 12692 12693
pub fn deser_structure_crate_model_cache_policy_summary(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CachePolicySummary, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CachePolicySummary::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Type") /* Type com.amazonaws.cloudfront#CachePolicySummary$Type */ => {
let var_505 =
Some(
Result::<crate::model::CachePolicyType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CachePolicyType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_type(var_505);
}
,
s if s.matches("CachePolicy") /* CachePolicy com.amazonaws.cloudfront#CachePolicySummary$CachePolicy */ => {
let var_506 =
Some(
crate::xml_deser::deser_structure_crate_model_cache_policy(&mut tag)
?
)
;
builder = builder.set_cache_policy(var_506);
}
,
_ => {}
}
}
Ok(builder.build())
}