Struct aws_sdk_cloudfront::model::response_headers_policy_strict_transport_security::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for ResponseHeadersPolicyStrictTransportSecurity
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn override(self, input: bool) -> Self
pub fn override(self, input: bool) -> Self
A Boolean that determines whether CloudFront overrides the Strict-Transport-Security
HTTP response header received from the origin with the one specified in this response headers policy.
sourcepub fn set_override(self, input: Option<bool>) -> Self
pub fn set_override(self, input: Option<bool>) -> Self
A Boolean that determines whether CloudFront overrides the Strict-Transport-Security
HTTP response header received from the origin with the one specified in this response headers policy.
Examples found in repository?
12538 12539 12540 12541 12542 12543 12544 12545 12546 12547 12548 12549 12550 12551 12552 12553 12554 12555 12556 12557 12558 12559 12560 12561 12562 12563 12564 12565 12566 12567 12568 12569 12570 12571 12572 12573 12574 12575 12576 12577 12578 12579 12580 12581 12582 12583 12584 12585 12586 12587 12588 12589 12590 12591 12592 12593 12594 12595 12596 12597 12598 12599 12600 12601 12602 12603 12604 12605 12606 12607 12608 12609 12610 12611 12612
pub fn deser_structure_crate_model_response_headers_policy_strict_transport_security(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<
crate::model::ResponseHeadersPolicyStrictTransportSecurity,
aws_smithy_xml::decode::XmlDecodeError,
> {
#[allow(unused_mut)]
let mut builder = crate::model::ResponseHeadersPolicyStrictTransportSecurity::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Override") /* Override com.amazonaws.cloudfront#ResponseHeadersPolicyStrictTransportSecurity$Override */ => {
let var_501 =
Some(
{
<bool 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 (boolean: `com.amazonaws.cloudfront#boolean`)"))
}
?
)
;
builder = builder.set_override(var_501);
}
,
s if s.matches("IncludeSubdomains") /* IncludeSubdomains com.amazonaws.cloudfront#ResponseHeadersPolicyStrictTransportSecurity$IncludeSubdomains */ => {
let var_502 =
Some(
{
<bool 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 (boolean: `com.amazonaws.cloudfront#boolean`)"))
}
?
)
;
builder = builder.set_include_subdomains(var_502);
}
,
s if s.matches("Preload") /* Preload com.amazonaws.cloudfront#ResponseHeadersPolicyStrictTransportSecurity$Preload */ => {
let var_503 =
Some(
{
<bool 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 (boolean: `com.amazonaws.cloudfront#boolean`)"))
}
?
)
;
builder = builder.set_preload(var_503);
}
,
s if s.matches("AccessControlMaxAgeSec") /* AccessControlMaxAgeSec com.amazonaws.cloudfront#ResponseHeadersPolicyStrictTransportSecurity$AccessControlMaxAgeSec */ => {
let var_504 =
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_access_control_max_age_sec(var_504);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn include_subdomains(self, input: bool) -> Self
pub fn include_subdomains(self, input: bool) -> Self
A Boolean that determines whether CloudFront includes the includeSubDomains
directive in the Strict-Transport-Security
HTTP response header.
sourcepub fn set_include_subdomains(self, input: Option<bool>) -> Self
pub fn set_include_subdomains(self, input: Option<bool>) -> Self
A Boolean that determines whether CloudFront includes the includeSubDomains
directive in the Strict-Transport-Security
HTTP response header.
Examples found in repository?
12538 12539 12540 12541 12542 12543 12544 12545 12546 12547 12548 12549 12550 12551 12552 12553 12554 12555 12556 12557 12558 12559 12560 12561 12562 12563 12564 12565 12566 12567 12568 12569 12570 12571 12572 12573 12574 12575 12576 12577 12578 12579 12580 12581 12582 12583 12584 12585 12586 12587 12588 12589 12590 12591 12592 12593 12594 12595 12596 12597 12598 12599 12600 12601 12602 12603 12604 12605 12606 12607 12608 12609 12610 12611 12612
pub fn deser_structure_crate_model_response_headers_policy_strict_transport_security(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<
crate::model::ResponseHeadersPolicyStrictTransportSecurity,
aws_smithy_xml::decode::XmlDecodeError,
> {
#[allow(unused_mut)]
let mut builder = crate::model::ResponseHeadersPolicyStrictTransportSecurity::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Override") /* Override com.amazonaws.cloudfront#ResponseHeadersPolicyStrictTransportSecurity$Override */ => {
let var_501 =
Some(
{
<bool 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 (boolean: `com.amazonaws.cloudfront#boolean`)"))
}
?
)
;
builder = builder.set_override(var_501);
}
,
s if s.matches("IncludeSubdomains") /* IncludeSubdomains com.amazonaws.cloudfront#ResponseHeadersPolicyStrictTransportSecurity$IncludeSubdomains */ => {
let var_502 =
Some(
{
<bool 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 (boolean: `com.amazonaws.cloudfront#boolean`)"))
}
?
)
;
builder = builder.set_include_subdomains(var_502);
}
,
s if s.matches("Preload") /* Preload com.amazonaws.cloudfront#ResponseHeadersPolicyStrictTransportSecurity$Preload */ => {
let var_503 =
Some(
{
<bool 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 (boolean: `com.amazonaws.cloudfront#boolean`)"))
}
?
)
;
builder = builder.set_preload(var_503);
}
,
s if s.matches("AccessControlMaxAgeSec") /* AccessControlMaxAgeSec com.amazonaws.cloudfront#ResponseHeadersPolicyStrictTransportSecurity$AccessControlMaxAgeSec */ => {
let var_504 =
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_access_control_max_age_sec(var_504);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn preload(self, input: bool) -> Self
pub fn preload(self, input: bool) -> Self
A Boolean that determines whether CloudFront includes the preload
directive in the Strict-Transport-Security
HTTP response header.
sourcepub fn set_preload(self, input: Option<bool>) -> Self
pub fn set_preload(self, input: Option<bool>) -> Self
A Boolean that determines whether CloudFront includes the preload
directive in the Strict-Transport-Security
HTTP response header.
Examples found in repository?
12538 12539 12540 12541 12542 12543 12544 12545 12546 12547 12548 12549 12550 12551 12552 12553 12554 12555 12556 12557 12558 12559 12560 12561 12562 12563 12564 12565 12566 12567 12568 12569 12570 12571 12572 12573 12574 12575 12576 12577 12578 12579 12580 12581 12582 12583 12584 12585 12586 12587 12588 12589 12590 12591 12592 12593 12594 12595 12596 12597 12598 12599 12600 12601 12602 12603 12604 12605 12606 12607 12608 12609 12610 12611 12612
pub fn deser_structure_crate_model_response_headers_policy_strict_transport_security(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<
crate::model::ResponseHeadersPolicyStrictTransportSecurity,
aws_smithy_xml::decode::XmlDecodeError,
> {
#[allow(unused_mut)]
let mut builder = crate::model::ResponseHeadersPolicyStrictTransportSecurity::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Override") /* Override com.amazonaws.cloudfront#ResponseHeadersPolicyStrictTransportSecurity$Override */ => {
let var_501 =
Some(
{
<bool 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 (boolean: `com.amazonaws.cloudfront#boolean`)"))
}
?
)
;
builder = builder.set_override(var_501);
}
,
s if s.matches("IncludeSubdomains") /* IncludeSubdomains com.amazonaws.cloudfront#ResponseHeadersPolicyStrictTransportSecurity$IncludeSubdomains */ => {
let var_502 =
Some(
{
<bool 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 (boolean: `com.amazonaws.cloudfront#boolean`)"))
}
?
)
;
builder = builder.set_include_subdomains(var_502);
}
,
s if s.matches("Preload") /* Preload com.amazonaws.cloudfront#ResponseHeadersPolicyStrictTransportSecurity$Preload */ => {
let var_503 =
Some(
{
<bool 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 (boolean: `com.amazonaws.cloudfront#boolean`)"))
}
?
)
;
builder = builder.set_preload(var_503);
}
,
s if s.matches("AccessControlMaxAgeSec") /* AccessControlMaxAgeSec com.amazonaws.cloudfront#ResponseHeadersPolicyStrictTransportSecurity$AccessControlMaxAgeSec */ => {
let var_504 =
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_access_control_max_age_sec(var_504);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn access_control_max_age_sec(self, input: i32) -> Self
pub fn access_control_max_age_sec(self, input: i32) -> Self
A number that CloudFront uses as the value for the max-age
directive in the Strict-Transport-Security
HTTP response header.
sourcepub fn set_access_control_max_age_sec(self, input: Option<i32>) -> Self
pub fn set_access_control_max_age_sec(self, input: Option<i32>) -> Self
A number that CloudFront uses as the value for the max-age
directive in the Strict-Transport-Security
HTTP response header.
Examples found in repository?
12538 12539 12540 12541 12542 12543 12544 12545 12546 12547 12548 12549 12550 12551 12552 12553 12554 12555 12556 12557 12558 12559 12560 12561 12562 12563 12564 12565 12566 12567 12568 12569 12570 12571 12572 12573 12574 12575 12576 12577 12578 12579 12580 12581 12582 12583 12584 12585 12586 12587 12588 12589 12590 12591 12592 12593 12594 12595 12596 12597 12598 12599 12600 12601 12602 12603 12604 12605 12606 12607 12608 12609 12610 12611 12612
pub fn deser_structure_crate_model_response_headers_policy_strict_transport_security(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<
crate::model::ResponseHeadersPolicyStrictTransportSecurity,
aws_smithy_xml::decode::XmlDecodeError,
> {
#[allow(unused_mut)]
let mut builder = crate::model::ResponseHeadersPolicyStrictTransportSecurity::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Override") /* Override com.amazonaws.cloudfront#ResponseHeadersPolicyStrictTransportSecurity$Override */ => {
let var_501 =
Some(
{
<bool 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 (boolean: `com.amazonaws.cloudfront#boolean`)"))
}
?
)
;
builder = builder.set_override(var_501);
}
,
s if s.matches("IncludeSubdomains") /* IncludeSubdomains com.amazonaws.cloudfront#ResponseHeadersPolicyStrictTransportSecurity$IncludeSubdomains */ => {
let var_502 =
Some(
{
<bool 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 (boolean: `com.amazonaws.cloudfront#boolean`)"))
}
?
)
;
builder = builder.set_include_subdomains(var_502);
}
,
s if s.matches("Preload") /* Preload com.amazonaws.cloudfront#ResponseHeadersPolicyStrictTransportSecurity$Preload */ => {
let var_503 =
Some(
{
<bool 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 (boolean: `com.amazonaws.cloudfront#boolean`)"))
}
?
)
;
builder = builder.set_preload(var_503);
}
,
s if s.matches("AccessControlMaxAgeSec") /* AccessControlMaxAgeSec com.amazonaws.cloudfront#ResponseHeadersPolicyStrictTransportSecurity$AccessControlMaxAgeSec */ => {
let var_504 =
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_access_control_max_age_sec(var_504);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> ResponseHeadersPolicyStrictTransportSecurity
pub fn build(self) -> ResponseHeadersPolicyStrictTransportSecurity
Consumes the builder and constructs a ResponseHeadersPolicyStrictTransportSecurity
.
Examples found in repository?
12538 12539 12540 12541 12542 12543 12544 12545 12546 12547 12548 12549 12550 12551 12552 12553 12554 12555 12556 12557 12558 12559 12560 12561 12562 12563 12564 12565 12566 12567 12568 12569 12570 12571 12572 12573 12574 12575 12576 12577 12578 12579 12580 12581 12582 12583 12584 12585 12586 12587 12588 12589 12590 12591 12592 12593 12594 12595 12596 12597 12598 12599 12600 12601 12602 12603 12604 12605 12606 12607 12608 12609 12610 12611 12612
pub fn deser_structure_crate_model_response_headers_policy_strict_transport_security(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<
crate::model::ResponseHeadersPolicyStrictTransportSecurity,
aws_smithy_xml::decode::XmlDecodeError,
> {
#[allow(unused_mut)]
let mut builder = crate::model::ResponseHeadersPolicyStrictTransportSecurity::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Override") /* Override com.amazonaws.cloudfront#ResponseHeadersPolicyStrictTransportSecurity$Override */ => {
let var_501 =
Some(
{
<bool 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 (boolean: `com.amazonaws.cloudfront#boolean`)"))
}
?
)
;
builder = builder.set_override(var_501);
}
,
s if s.matches("IncludeSubdomains") /* IncludeSubdomains com.amazonaws.cloudfront#ResponseHeadersPolicyStrictTransportSecurity$IncludeSubdomains */ => {
let var_502 =
Some(
{
<bool 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 (boolean: `com.amazonaws.cloudfront#boolean`)"))
}
?
)
;
builder = builder.set_include_subdomains(var_502);
}
,
s if s.matches("Preload") /* Preload com.amazonaws.cloudfront#ResponseHeadersPolicyStrictTransportSecurity$Preload */ => {
let var_503 =
Some(
{
<bool 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 (boolean: `com.amazonaws.cloudfront#boolean`)"))
}
?
)
;
builder = builder.set_preload(var_503);
}
,
s if s.matches("AccessControlMaxAgeSec") /* AccessControlMaxAgeSec com.amazonaws.cloudfront#ResponseHeadersPolicyStrictTransportSecurity$AccessControlMaxAgeSec */ => {
let var_504 =
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_access_control_max_age_sec(var_504);
}
,
_ => {}
}
}
Ok(builder.build())
}