Struct aws_sdk_cloudfront::model::origins::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for Origins
.
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 origins for this distribution.
Examples found in repository?
src/xml_deser.rs (line 9677)
9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694
pub fn deser_structure_crate_model_origins(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Origins, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Origins::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Quantity") /* Quantity com.amazonaws.cloudfront#Origins$Quantity */ => {
let var_368 =
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_368);
}
,
s if s.matches("Items") /* Items com.amazonaws.cloudfront#Origins$Items */ => {
let var_369 =
Some(
crate::xml_deser::deser_list_com_amazonaws_cloudfront_origin_list(&mut tag)
?
)
;
builder = builder.set_items(var_369);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn items(self, input: Origin) -> Self
pub fn items(self, input: Origin) -> Self
Appends an item to items
.
To override the contents of this collection use set_items
.
A list of origins.
sourcepub fn set_items(self, input: Option<Vec<Origin>>) -> Self
pub fn set_items(self, input: Option<Vec<Origin>>) -> Self
A list of origins.
Examples found in repository?
src/xml_deser.rs (line 9687)
9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694
pub fn deser_structure_crate_model_origins(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Origins, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Origins::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Quantity") /* Quantity com.amazonaws.cloudfront#Origins$Quantity */ => {
let var_368 =
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_368);
}
,
s if s.matches("Items") /* Items com.amazonaws.cloudfront#Origins$Items */ => {
let var_369 =
Some(
crate::xml_deser::deser_list_com_amazonaws_cloudfront_origin_list(&mut tag)
?
)
;
builder = builder.set_items(var_369);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> Origins
pub fn build(self) -> Origins
Consumes the builder and constructs a Origins
.
Examples found in repository?
src/xml_deser.rs (line 9693)
9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694
pub fn deser_structure_crate_model_origins(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Origins, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Origins::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Quantity") /* Quantity com.amazonaws.cloudfront#Origins$Quantity */ => {
let var_368 =
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_368);
}
,
s if s.matches("Items") /* Items com.amazonaws.cloudfront#Origins$Items */ => {
let var_369 =
Some(
crate::xml_deser::deser_list_com_amazonaws_cloudfront_origin_list(&mut tag)
?
)
;
builder = builder.set_items(var_369);
}
,
_ => {}
}
}
Ok(builder.build())
}