Struct aws_sdk_cloudfront::model::response_headers_policy_access_control_allow_headers::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for ResponseHeadersPolicyAccessControlAllowHeaders
.
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 HTTP header names in the list.
Examples found in repository?
src/xml_deser.rs (line 12204)
12182 12183 12184 12185 12186 12187 12188 12189 12190 12191 12192 12193 12194 12195 12196 12197 12198 12199 12200 12201 12202 12203 12204 12205 12206 12207 12208 12209 12210 12211 12212 12213 12214 12215 12216 12217 12218 12219 12220 12221
pub fn deser_structure_crate_model_response_headers_policy_access_control_allow_headers(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<
crate::model::ResponseHeadersPolicyAccessControlAllowHeaders,
aws_smithy_xml::decode::XmlDecodeError,
> {
#[allow(unused_mut)]
let mut builder = crate::model::ResponseHeadersPolicyAccessControlAllowHeaders::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Quantity") /* Quantity com.amazonaws.cloudfront#ResponseHeadersPolicyAccessControlAllowHeaders$Quantity */ => {
let var_484 =
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_484);
}
,
s if s.matches("Items") /* Items com.amazonaws.cloudfront#ResponseHeadersPolicyAccessControlAllowHeaders$Items */ => {
let var_485 =
Some(
crate::xml_deser::deser_list_com_amazonaws_cloudfront_access_control_allow_headers_list(&mut tag)
?
)
;
builder = builder.set_items(var_485);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn items(self, input: impl Into<String>) -> Self
pub fn items(self, input: impl Into<String>) -> Self
Appends an item to items
.
To override the contents of this collection use set_items
.
The list of HTTP header names. You can specify *
to allow all headers.
sourcepub fn set_items(self, input: Option<Vec<String>>) -> Self
pub fn set_items(self, input: Option<Vec<String>>) -> Self
The list of HTTP header names. You can specify *
to allow all headers.
Examples found in repository?
src/xml_deser.rs (line 12214)
12182 12183 12184 12185 12186 12187 12188 12189 12190 12191 12192 12193 12194 12195 12196 12197 12198 12199 12200 12201 12202 12203 12204 12205 12206 12207 12208 12209 12210 12211 12212 12213 12214 12215 12216 12217 12218 12219 12220 12221
pub fn deser_structure_crate_model_response_headers_policy_access_control_allow_headers(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<
crate::model::ResponseHeadersPolicyAccessControlAllowHeaders,
aws_smithy_xml::decode::XmlDecodeError,
> {
#[allow(unused_mut)]
let mut builder = crate::model::ResponseHeadersPolicyAccessControlAllowHeaders::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Quantity") /* Quantity com.amazonaws.cloudfront#ResponseHeadersPolicyAccessControlAllowHeaders$Quantity */ => {
let var_484 =
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_484);
}
,
s if s.matches("Items") /* Items com.amazonaws.cloudfront#ResponseHeadersPolicyAccessControlAllowHeaders$Items */ => {
let var_485 =
Some(
crate::xml_deser::deser_list_com_amazonaws_cloudfront_access_control_allow_headers_list(&mut tag)
?
)
;
builder = builder.set_items(var_485);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> ResponseHeadersPolicyAccessControlAllowHeaders
pub fn build(self) -> ResponseHeadersPolicyAccessControlAllowHeaders
Consumes the builder and constructs a ResponseHeadersPolicyAccessControlAllowHeaders
.
Examples found in repository?
src/xml_deser.rs (line 12220)
12182 12183 12184 12185 12186 12187 12188 12189 12190 12191 12192 12193 12194 12195 12196 12197 12198 12199 12200 12201 12202 12203 12204 12205 12206 12207 12208 12209 12210 12211 12212 12213 12214 12215 12216 12217 12218 12219 12220 12221
pub fn deser_structure_crate_model_response_headers_policy_access_control_allow_headers(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<
crate::model::ResponseHeadersPolicyAccessControlAllowHeaders,
aws_smithy_xml::decode::XmlDecodeError,
> {
#[allow(unused_mut)]
let mut builder = crate::model::ResponseHeadersPolicyAccessControlAllowHeaders::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Quantity") /* Quantity com.amazonaws.cloudfront#ResponseHeadersPolicyAccessControlAllowHeaders$Quantity */ => {
let var_484 =
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_484);
}
,
s if s.matches("Items") /* Items com.amazonaws.cloudfront#ResponseHeadersPolicyAccessControlAllowHeaders$Items */ => {
let var_485 =
Some(
crate::xml_deser::deser_list_com_amazonaws_cloudfront_access_control_allow_headers_list(&mut tag)
?
)
;
builder = builder.set_items(var_485);
}
,
_ => {}
}
}
Ok(builder.build())
}