Struct aws_sdk_cloudfront::model::origin::Builder
source · pub struct Builder { /* private fields */ }Expand description
A builder for Origin.
Implementations§
source§impl Builder
impl Builder
sourcepub fn id(self, input: impl Into<String>) -> Self
pub fn id(self, input: impl Into<String>) -> Self
A unique identifier for the origin. This value must be unique within the distribution.
Use this value to specify the TargetOriginId in a CacheBehavior or DefaultCacheBehavior.
sourcepub fn set_id(self, input: Option<String>) -> Self
pub fn set_id(self, input: Option<String>) -> Self
A unique identifier for the origin. This value must be unique within the distribution.
Use this value to specify the TargetOriginId in a CacheBehavior or DefaultCacheBehavior.
Examples found in repository?
13851 13852 13853 13854 13855 13856 13857 13858 13859 13860 13861 13862 13863 13864 13865 13866 13867 13868 13869 13870 13871 13872 13873 13874 13875 13876 13877 13878 13879 13880 13881 13882 13883 13884 13885 13886 13887 13888 13889 13890 13891 13892 13893 13894 13895 13896 13897 13898 13899 13900 13901 13902 13903 13904 13905 13906 13907 13908 13909 13910 13911 13912 13913 13914 13915 13916 13917 13918 13919 13920 13921 13922 13923 13924 13925 13926 13927 13928 13929 13930 13931 13932 13933 13934 13935 13936 13937 13938 13939 13940 13941 13942 13943 13944 13945 13946 13947 13948 13949 13950 13951 13952 13953 13954 13955 13956 13957 13958 13959 13960 13961 13962 13963 13964 13965 13966 13967 13968 13969 13970 13971 13972 13973 13974 13975 13976 13977 13978 13979 13980 13981 13982 13983 13984
pub fn deser_structure_crate_model_origin(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Origin, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Origin::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Id") /* Id com.amazonaws.cloudfront#Origin$Id */ => {
let var_581 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_id(var_581);
}
,
s if s.matches("DomainName") /* DomainName com.amazonaws.cloudfront#Origin$DomainName */ => {
let var_582 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_domain_name(var_582);
}
,
s if s.matches("OriginPath") /* OriginPath com.amazonaws.cloudfront#Origin$OriginPath */ => {
let var_583 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_origin_path(var_583);
}
,
s if s.matches("CustomHeaders") /* CustomHeaders com.amazonaws.cloudfront#Origin$CustomHeaders */ => {
let var_584 =
Some(
crate::xml_deser::deser_structure_crate_model_custom_headers(&mut tag)
?
)
;
builder = builder.set_custom_headers(var_584);
}
,
s if s.matches("S3OriginConfig") /* S3OriginConfig com.amazonaws.cloudfront#Origin$S3OriginConfig */ => {
let var_585 =
Some(
crate::xml_deser::deser_structure_crate_model_s3_origin_config(&mut tag)
?
)
;
builder = builder.set_s3_origin_config(var_585);
}
,
s if s.matches("CustomOriginConfig") /* CustomOriginConfig com.amazonaws.cloudfront#Origin$CustomOriginConfig */ => {
let var_586 =
Some(
crate::xml_deser::deser_structure_crate_model_custom_origin_config(&mut tag)
?
)
;
builder = builder.set_custom_origin_config(var_586);
}
,
s if s.matches("ConnectionAttempts") /* ConnectionAttempts com.amazonaws.cloudfront#Origin$ConnectionAttempts */ => {
let var_587 =
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_connection_attempts(var_587);
}
,
s if s.matches("ConnectionTimeout") /* ConnectionTimeout com.amazonaws.cloudfront#Origin$ConnectionTimeout */ => {
let var_588 =
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_connection_timeout(var_588);
}
,
s if s.matches("OriginShield") /* OriginShield com.amazonaws.cloudfront#Origin$OriginShield */ => {
let var_589 =
Some(
crate::xml_deser::deser_structure_crate_model_origin_shield(&mut tag)
?
)
;
builder = builder.set_origin_shield(var_589);
}
,
s if s.matches("OriginAccessControlId") /* OriginAccessControlId com.amazonaws.cloudfront#Origin$OriginAccessControlId */ => {
let var_590 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_origin_access_control_id(var_590);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn domain_name(self, input: impl Into<String>) -> Self
pub fn domain_name(self, input: impl Into<String>) -> Self
The domain name for the origin.
For more information, see Origin Domain Name in the Amazon CloudFront Developer Guide.
sourcepub fn set_domain_name(self, input: Option<String>) -> Self
pub fn set_domain_name(self, input: Option<String>) -> Self
The domain name for the origin.
For more information, see Origin Domain Name in the Amazon CloudFront Developer Guide.
Examples found in repository?
13851 13852 13853 13854 13855 13856 13857 13858 13859 13860 13861 13862 13863 13864 13865 13866 13867 13868 13869 13870 13871 13872 13873 13874 13875 13876 13877 13878 13879 13880 13881 13882 13883 13884 13885 13886 13887 13888 13889 13890 13891 13892 13893 13894 13895 13896 13897 13898 13899 13900 13901 13902 13903 13904 13905 13906 13907 13908 13909 13910 13911 13912 13913 13914 13915 13916 13917 13918 13919 13920 13921 13922 13923 13924 13925 13926 13927 13928 13929 13930 13931 13932 13933 13934 13935 13936 13937 13938 13939 13940 13941 13942 13943 13944 13945 13946 13947 13948 13949 13950 13951 13952 13953 13954 13955 13956 13957 13958 13959 13960 13961 13962 13963 13964 13965 13966 13967 13968 13969 13970 13971 13972 13973 13974 13975 13976 13977 13978 13979 13980 13981 13982 13983 13984
pub fn deser_structure_crate_model_origin(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Origin, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Origin::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Id") /* Id com.amazonaws.cloudfront#Origin$Id */ => {
let var_581 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_id(var_581);
}
,
s if s.matches("DomainName") /* DomainName com.amazonaws.cloudfront#Origin$DomainName */ => {
let var_582 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_domain_name(var_582);
}
,
s if s.matches("OriginPath") /* OriginPath com.amazonaws.cloudfront#Origin$OriginPath */ => {
let var_583 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_origin_path(var_583);
}
,
s if s.matches("CustomHeaders") /* CustomHeaders com.amazonaws.cloudfront#Origin$CustomHeaders */ => {
let var_584 =
Some(
crate::xml_deser::deser_structure_crate_model_custom_headers(&mut tag)
?
)
;
builder = builder.set_custom_headers(var_584);
}
,
s if s.matches("S3OriginConfig") /* S3OriginConfig com.amazonaws.cloudfront#Origin$S3OriginConfig */ => {
let var_585 =
Some(
crate::xml_deser::deser_structure_crate_model_s3_origin_config(&mut tag)
?
)
;
builder = builder.set_s3_origin_config(var_585);
}
,
s if s.matches("CustomOriginConfig") /* CustomOriginConfig com.amazonaws.cloudfront#Origin$CustomOriginConfig */ => {
let var_586 =
Some(
crate::xml_deser::deser_structure_crate_model_custom_origin_config(&mut tag)
?
)
;
builder = builder.set_custom_origin_config(var_586);
}
,
s if s.matches("ConnectionAttempts") /* ConnectionAttempts com.amazonaws.cloudfront#Origin$ConnectionAttempts */ => {
let var_587 =
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_connection_attempts(var_587);
}
,
s if s.matches("ConnectionTimeout") /* ConnectionTimeout com.amazonaws.cloudfront#Origin$ConnectionTimeout */ => {
let var_588 =
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_connection_timeout(var_588);
}
,
s if s.matches("OriginShield") /* OriginShield com.amazonaws.cloudfront#Origin$OriginShield */ => {
let var_589 =
Some(
crate::xml_deser::deser_structure_crate_model_origin_shield(&mut tag)
?
)
;
builder = builder.set_origin_shield(var_589);
}
,
s if s.matches("OriginAccessControlId") /* OriginAccessControlId com.amazonaws.cloudfront#Origin$OriginAccessControlId */ => {
let var_590 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_origin_access_control_id(var_590);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn origin_path(self, input: impl Into<String>) -> Self
pub fn origin_path(self, input: impl Into<String>) -> Self
An optional path that CloudFront appends to the origin domain name when CloudFront requests content from the origin.
For more information, see Origin Path in the Amazon CloudFront Developer Guide.
sourcepub fn set_origin_path(self, input: Option<String>) -> Self
pub fn set_origin_path(self, input: Option<String>) -> Self
An optional path that CloudFront appends to the origin domain name when CloudFront requests content from the origin.
For more information, see Origin Path in the Amazon CloudFront Developer Guide.
Examples found in repository?
13851 13852 13853 13854 13855 13856 13857 13858 13859 13860 13861 13862 13863 13864 13865 13866 13867 13868 13869 13870 13871 13872 13873 13874 13875 13876 13877 13878 13879 13880 13881 13882 13883 13884 13885 13886 13887 13888 13889 13890 13891 13892 13893 13894 13895 13896 13897 13898 13899 13900 13901 13902 13903 13904 13905 13906 13907 13908 13909 13910 13911 13912 13913 13914 13915 13916 13917 13918 13919 13920 13921 13922 13923 13924 13925 13926 13927 13928 13929 13930 13931 13932 13933 13934 13935 13936 13937 13938 13939 13940 13941 13942 13943 13944 13945 13946 13947 13948 13949 13950 13951 13952 13953 13954 13955 13956 13957 13958 13959 13960 13961 13962 13963 13964 13965 13966 13967 13968 13969 13970 13971 13972 13973 13974 13975 13976 13977 13978 13979 13980 13981 13982 13983 13984
pub fn deser_structure_crate_model_origin(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Origin, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Origin::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Id") /* Id com.amazonaws.cloudfront#Origin$Id */ => {
let var_581 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_id(var_581);
}
,
s if s.matches("DomainName") /* DomainName com.amazonaws.cloudfront#Origin$DomainName */ => {
let var_582 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_domain_name(var_582);
}
,
s if s.matches("OriginPath") /* OriginPath com.amazonaws.cloudfront#Origin$OriginPath */ => {
let var_583 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_origin_path(var_583);
}
,
s if s.matches("CustomHeaders") /* CustomHeaders com.amazonaws.cloudfront#Origin$CustomHeaders */ => {
let var_584 =
Some(
crate::xml_deser::deser_structure_crate_model_custom_headers(&mut tag)
?
)
;
builder = builder.set_custom_headers(var_584);
}
,
s if s.matches("S3OriginConfig") /* S3OriginConfig com.amazonaws.cloudfront#Origin$S3OriginConfig */ => {
let var_585 =
Some(
crate::xml_deser::deser_structure_crate_model_s3_origin_config(&mut tag)
?
)
;
builder = builder.set_s3_origin_config(var_585);
}
,
s if s.matches("CustomOriginConfig") /* CustomOriginConfig com.amazonaws.cloudfront#Origin$CustomOriginConfig */ => {
let var_586 =
Some(
crate::xml_deser::deser_structure_crate_model_custom_origin_config(&mut tag)
?
)
;
builder = builder.set_custom_origin_config(var_586);
}
,
s if s.matches("ConnectionAttempts") /* ConnectionAttempts com.amazonaws.cloudfront#Origin$ConnectionAttempts */ => {
let var_587 =
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_connection_attempts(var_587);
}
,
s if s.matches("ConnectionTimeout") /* ConnectionTimeout com.amazonaws.cloudfront#Origin$ConnectionTimeout */ => {
let var_588 =
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_connection_timeout(var_588);
}
,
s if s.matches("OriginShield") /* OriginShield com.amazonaws.cloudfront#Origin$OriginShield */ => {
let var_589 =
Some(
crate::xml_deser::deser_structure_crate_model_origin_shield(&mut tag)
?
)
;
builder = builder.set_origin_shield(var_589);
}
,
s if s.matches("OriginAccessControlId") /* OriginAccessControlId com.amazonaws.cloudfront#Origin$OriginAccessControlId */ => {
let var_590 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_origin_access_control_id(var_590);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn custom_headers(self, input: CustomHeaders) -> Self
pub fn custom_headers(self, input: CustomHeaders) -> Self
A list of HTTP header names and values that CloudFront adds to the requests that it sends to the origin.
For more information, see Adding Custom Headers to Origin Requests in the Amazon CloudFront Developer Guide.
sourcepub fn set_custom_headers(self, input: Option<CustomHeaders>) -> Self
pub fn set_custom_headers(self, input: Option<CustomHeaders>) -> Self
A list of HTTP header names and values that CloudFront adds to the requests that it sends to the origin.
For more information, see Adding Custom Headers to Origin Requests in the Amazon CloudFront Developer Guide.
Examples found in repository?
13851 13852 13853 13854 13855 13856 13857 13858 13859 13860 13861 13862 13863 13864 13865 13866 13867 13868 13869 13870 13871 13872 13873 13874 13875 13876 13877 13878 13879 13880 13881 13882 13883 13884 13885 13886 13887 13888 13889 13890 13891 13892 13893 13894 13895 13896 13897 13898 13899 13900 13901 13902 13903 13904 13905 13906 13907 13908 13909 13910 13911 13912 13913 13914 13915 13916 13917 13918 13919 13920 13921 13922 13923 13924 13925 13926 13927 13928 13929 13930 13931 13932 13933 13934 13935 13936 13937 13938 13939 13940 13941 13942 13943 13944 13945 13946 13947 13948 13949 13950 13951 13952 13953 13954 13955 13956 13957 13958 13959 13960 13961 13962 13963 13964 13965 13966 13967 13968 13969 13970 13971 13972 13973 13974 13975 13976 13977 13978 13979 13980 13981 13982 13983 13984
pub fn deser_structure_crate_model_origin(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Origin, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Origin::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Id") /* Id com.amazonaws.cloudfront#Origin$Id */ => {
let var_581 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_id(var_581);
}
,
s if s.matches("DomainName") /* DomainName com.amazonaws.cloudfront#Origin$DomainName */ => {
let var_582 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_domain_name(var_582);
}
,
s if s.matches("OriginPath") /* OriginPath com.amazonaws.cloudfront#Origin$OriginPath */ => {
let var_583 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_origin_path(var_583);
}
,
s if s.matches("CustomHeaders") /* CustomHeaders com.amazonaws.cloudfront#Origin$CustomHeaders */ => {
let var_584 =
Some(
crate::xml_deser::deser_structure_crate_model_custom_headers(&mut tag)
?
)
;
builder = builder.set_custom_headers(var_584);
}
,
s if s.matches("S3OriginConfig") /* S3OriginConfig com.amazonaws.cloudfront#Origin$S3OriginConfig */ => {
let var_585 =
Some(
crate::xml_deser::deser_structure_crate_model_s3_origin_config(&mut tag)
?
)
;
builder = builder.set_s3_origin_config(var_585);
}
,
s if s.matches("CustomOriginConfig") /* CustomOriginConfig com.amazonaws.cloudfront#Origin$CustomOriginConfig */ => {
let var_586 =
Some(
crate::xml_deser::deser_structure_crate_model_custom_origin_config(&mut tag)
?
)
;
builder = builder.set_custom_origin_config(var_586);
}
,
s if s.matches("ConnectionAttempts") /* ConnectionAttempts com.amazonaws.cloudfront#Origin$ConnectionAttempts */ => {
let var_587 =
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_connection_attempts(var_587);
}
,
s if s.matches("ConnectionTimeout") /* ConnectionTimeout com.amazonaws.cloudfront#Origin$ConnectionTimeout */ => {
let var_588 =
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_connection_timeout(var_588);
}
,
s if s.matches("OriginShield") /* OriginShield com.amazonaws.cloudfront#Origin$OriginShield */ => {
let var_589 =
Some(
crate::xml_deser::deser_structure_crate_model_origin_shield(&mut tag)
?
)
;
builder = builder.set_origin_shield(var_589);
}
,
s if s.matches("OriginAccessControlId") /* OriginAccessControlId com.amazonaws.cloudfront#Origin$OriginAccessControlId */ => {
let var_590 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_origin_access_control_id(var_590);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn s3_origin_config(self, input: S3OriginConfig) -> Self
pub fn s3_origin_config(self, input: S3OriginConfig) -> Self
Use this type to specify an origin that is an Amazon S3 bucket that is not configured with static website hosting. To specify any other type of origin, including an Amazon S3 bucket that is configured with static website hosting, use the CustomOriginConfig type instead.
sourcepub fn set_s3_origin_config(self, input: Option<S3OriginConfig>) -> Self
pub fn set_s3_origin_config(self, input: Option<S3OriginConfig>) -> Self
Use this type to specify an origin that is an Amazon S3 bucket that is not configured with static website hosting. To specify any other type of origin, including an Amazon S3 bucket that is configured with static website hosting, use the CustomOriginConfig type instead.
Examples found in repository?
13851 13852 13853 13854 13855 13856 13857 13858 13859 13860 13861 13862 13863 13864 13865 13866 13867 13868 13869 13870 13871 13872 13873 13874 13875 13876 13877 13878 13879 13880 13881 13882 13883 13884 13885 13886 13887 13888 13889 13890 13891 13892 13893 13894 13895 13896 13897 13898 13899 13900 13901 13902 13903 13904 13905 13906 13907 13908 13909 13910 13911 13912 13913 13914 13915 13916 13917 13918 13919 13920 13921 13922 13923 13924 13925 13926 13927 13928 13929 13930 13931 13932 13933 13934 13935 13936 13937 13938 13939 13940 13941 13942 13943 13944 13945 13946 13947 13948 13949 13950 13951 13952 13953 13954 13955 13956 13957 13958 13959 13960 13961 13962 13963 13964 13965 13966 13967 13968 13969 13970 13971 13972 13973 13974 13975 13976 13977 13978 13979 13980 13981 13982 13983 13984
pub fn deser_structure_crate_model_origin(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Origin, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Origin::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Id") /* Id com.amazonaws.cloudfront#Origin$Id */ => {
let var_581 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_id(var_581);
}
,
s if s.matches("DomainName") /* DomainName com.amazonaws.cloudfront#Origin$DomainName */ => {
let var_582 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_domain_name(var_582);
}
,
s if s.matches("OriginPath") /* OriginPath com.amazonaws.cloudfront#Origin$OriginPath */ => {
let var_583 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_origin_path(var_583);
}
,
s if s.matches("CustomHeaders") /* CustomHeaders com.amazonaws.cloudfront#Origin$CustomHeaders */ => {
let var_584 =
Some(
crate::xml_deser::deser_structure_crate_model_custom_headers(&mut tag)
?
)
;
builder = builder.set_custom_headers(var_584);
}
,
s if s.matches("S3OriginConfig") /* S3OriginConfig com.amazonaws.cloudfront#Origin$S3OriginConfig */ => {
let var_585 =
Some(
crate::xml_deser::deser_structure_crate_model_s3_origin_config(&mut tag)
?
)
;
builder = builder.set_s3_origin_config(var_585);
}
,
s if s.matches("CustomOriginConfig") /* CustomOriginConfig com.amazonaws.cloudfront#Origin$CustomOriginConfig */ => {
let var_586 =
Some(
crate::xml_deser::deser_structure_crate_model_custom_origin_config(&mut tag)
?
)
;
builder = builder.set_custom_origin_config(var_586);
}
,
s if s.matches("ConnectionAttempts") /* ConnectionAttempts com.amazonaws.cloudfront#Origin$ConnectionAttempts */ => {
let var_587 =
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_connection_attempts(var_587);
}
,
s if s.matches("ConnectionTimeout") /* ConnectionTimeout com.amazonaws.cloudfront#Origin$ConnectionTimeout */ => {
let var_588 =
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_connection_timeout(var_588);
}
,
s if s.matches("OriginShield") /* OriginShield com.amazonaws.cloudfront#Origin$OriginShield */ => {
let var_589 =
Some(
crate::xml_deser::deser_structure_crate_model_origin_shield(&mut tag)
?
)
;
builder = builder.set_origin_shield(var_589);
}
,
s if s.matches("OriginAccessControlId") /* OriginAccessControlId com.amazonaws.cloudfront#Origin$OriginAccessControlId */ => {
let var_590 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_origin_access_control_id(var_590);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn custom_origin_config(self, input: CustomOriginConfig) -> Self
pub fn custom_origin_config(self, input: CustomOriginConfig) -> Self
Use this type to specify an origin that is not an Amazon S3 bucket, with one exception. If the Amazon S3 bucket is configured with static website hosting, use this type. If the Amazon S3 bucket is not configured with static website hosting, use the S3OriginConfig type instead.
sourcepub fn set_custom_origin_config(self, input: Option<CustomOriginConfig>) -> Self
pub fn set_custom_origin_config(self, input: Option<CustomOriginConfig>) -> Self
Use this type to specify an origin that is not an Amazon S3 bucket, with one exception. If the Amazon S3 bucket is configured with static website hosting, use this type. If the Amazon S3 bucket is not configured with static website hosting, use the S3OriginConfig type instead.
Examples found in repository?
13851 13852 13853 13854 13855 13856 13857 13858 13859 13860 13861 13862 13863 13864 13865 13866 13867 13868 13869 13870 13871 13872 13873 13874 13875 13876 13877 13878 13879 13880 13881 13882 13883 13884 13885 13886 13887 13888 13889 13890 13891 13892 13893 13894 13895 13896 13897 13898 13899 13900 13901 13902 13903 13904 13905 13906 13907 13908 13909 13910 13911 13912 13913 13914 13915 13916 13917 13918 13919 13920 13921 13922 13923 13924 13925 13926 13927 13928 13929 13930 13931 13932 13933 13934 13935 13936 13937 13938 13939 13940 13941 13942 13943 13944 13945 13946 13947 13948 13949 13950 13951 13952 13953 13954 13955 13956 13957 13958 13959 13960 13961 13962 13963 13964 13965 13966 13967 13968 13969 13970 13971 13972 13973 13974 13975 13976 13977 13978 13979 13980 13981 13982 13983 13984
pub fn deser_structure_crate_model_origin(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Origin, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Origin::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Id") /* Id com.amazonaws.cloudfront#Origin$Id */ => {
let var_581 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_id(var_581);
}
,
s if s.matches("DomainName") /* DomainName com.amazonaws.cloudfront#Origin$DomainName */ => {
let var_582 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_domain_name(var_582);
}
,
s if s.matches("OriginPath") /* OriginPath com.amazonaws.cloudfront#Origin$OriginPath */ => {
let var_583 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_origin_path(var_583);
}
,
s if s.matches("CustomHeaders") /* CustomHeaders com.amazonaws.cloudfront#Origin$CustomHeaders */ => {
let var_584 =
Some(
crate::xml_deser::deser_structure_crate_model_custom_headers(&mut tag)
?
)
;
builder = builder.set_custom_headers(var_584);
}
,
s if s.matches("S3OriginConfig") /* S3OriginConfig com.amazonaws.cloudfront#Origin$S3OriginConfig */ => {
let var_585 =
Some(
crate::xml_deser::deser_structure_crate_model_s3_origin_config(&mut tag)
?
)
;
builder = builder.set_s3_origin_config(var_585);
}
,
s if s.matches("CustomOriginConfig") /* CustomOriginConfig com.amazonaws.cloudfront#Origin$CustomOriginConfig */ => {
let var_586 =
Some(
crate::xml_deser::deser_structure_crate_model_custom_origin_config(&mut tag)
?
)
;
builder = builder.set_custom_origin_config(var_586);
}
,
s if s.matches("ConnectionAttempts") /* ConnectionAttempts com.amazonaws.cloudfront#Origin$ConnectionAttempts */ => {
let var_587 =
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_connection_attempts(var_587);
}
,
s if s.matches("ConnectionTimeout") /* ConnectionTimeout com.amazonaws.cloudfront#Origin$ConnectionTimeout */ => {
let var_588 =
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_connection_timeout(var_588);
}
,
s if s.matches("OriginShield") /* OriginShield com.amazonaws.cloudfront#Origin$OriginShield */ => {
let var_589 =
Some(
crate::xml_deser::deser_structure_crate_model_origin_shield(&mut tag)
?
)
;
builder = builder.set_origin_shield(var_589);
}
,
s if s.matches("OriginAccessControlId") /* OriginAccessControlId com.amazonaws.cloudfront#Origin$OriginAccessControlId */ => {
let var_590 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_origin_access_control_id(var_590);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn connection_attempts(self, input: i32) -> Self
pub fn connection_attempts(self, input: i32) -> Self
The number of times that CloudFront attempts to connect to the origin. The minimum number is 1, the maximum is 3, and the default (if you don’t specify otherwise) is 3.
For a custom origin (including an Amazon S3 bucket that’s configured with static website hosting), this value also specifies the number of times that CloudFront attempts to get a response from the origin, in the case of an Origin Response Timeout.
For more information, see Origin Connection Attempts in the Amazon CloudFront Developer Guide.
sourcepub fn set_connection_attempts(self, input: Option<i32>) -> Self
pub fn set_connection_attempts(self, input: Option<i32>) -> Self
The number of times that CloudFront attempts to connect to the origin. The minimum number is 1, the maximum is 3, and the default (if you don’t specify otherwise) is 3.
For a custom origin (including an Amazon S3 bucket that’s configured with static website hosting), this value also specifies the number of times that CloudFront attempts to get a response from the origin, in the case of an Origin Response Timeout.
For more information, see Origin Connection Attempts in the Amazon CloudFront Developer Guide.
Examples found in repository?
13851 13852 13853 13854 13855 13856 13857 13858 13859 13860 13861 13862 13863 13864 13865 13866 13867 13868 13869 13870 13871 13872 13873 13874 13875 13876 13877 13878 13879 13880 13881 13882 13883 13884 13885 13886 13887 13888 13889 13890 13891 13892 13893 13894 13895 13896 13897 13898 13899 13900 13901 13902 13903 13904 13905 13906 13907 13908 13909 13910 13911 13912 13913 13914 13915 13916 13917 13918 13919 13920 13921 13922 13923 13924 13925 13926 13927 13928 13929 13930 13931 13932 13933 13934 13935 13936 13937 13938 13939 13940 13941 13942 13943 13944 13945 13946 13947 13948 13949 13950 13951 13952 13953 13954 13955 13956 13957 13958 13959 13960 13961 13962 13963 13964 13965 13966 13967 13968 13969 13970 13971 13972 13973 13974 13975 13976 13977 13978 13979 13980 13981 13982 13983 13984
pub fn deser_structure_crate_model_origin(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Origin, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Origin::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Id") /* Id com.amazonaws.cloudfront#Origin$Id */ => {
let var_581 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_id(var_581);
}
,
s if s.matches("DomainName") /* DomainName com.amazonaws.cloudfront#Origin$DomainName */ => {
let var_582 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_domain_name(var_582);
}
,
s if s.matches("OriginPath") /* OriginPath com.amazonaws.cloudfront#Origin$OriginPath */ => {
let var_583 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_origin_path(var_583);
}
,
s if s.matches("CustomHeaders") /* CustomHeaders com.amazonaws.cloudfront#Origin$CustomHeaders */ => {
let var_584 =
Some(
crate::xml_deser::deser_structure_crate_model_custom_headers(&mut tag)
?
)
;
builder = builder.set_custom_headers(var_584);
}
,
s if s.matches("S3OriginConfig") /* S3OriginConfig com.amazonaws.cloudfront#Origin$S3OriginConfig */ => {
let var_585 =
Some(
crate::xml_deser::deser_structure_crate_model_s3_origin_config(&mut tag)
?
)
;
builder = builder.set_s3_origin_config(var_585);
}
,
s if s.matches("CustomOriginConfig") /* CustomOriginConfig com.amazonaws.cloudfront#Origin$CustomOriginConfig */ => {
let var_586 =
Some(
crate::xml_deser::deser_structure_crate_model_custom_origin_config(&mut tag)
?
)
;
builder = builder.set_custom_origin_config(var_586);
}
,
s if s.matches("ConnectionAttempts") /* ConnectionAttempts com.amazonaws.cloudfront#Origin$ConnectionAttempts */ => {
let var_587 =
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_connection_attempts(var_587);
}
,
s if s.matches("ConnectionTimeout") /* ConnectionTimeout com.amazonaws.cloudfront#Origin$ConnectionTimeout */ => {
let var_588 =
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_connection_timeout(var_588);
}
,
s if s.matches("OriginShield") /* OriginShield com.amazonaws.cloudfront#Origin$OriginShield */ => {
let var_589 =
Some(
crate::xml_deser::deser_structure_crate_model_origin_shield(&mut tag)
?
)
;
builder = builder.set_origin_shield(var_589);
}
,
s if s.matches("OriginAccessControlId") /* OriginAccessControlId com.amazonaws.cloudfront#Origin$OriginAccessControlId */ => {
let var_590 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_origin_access_control_id(var_590);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn connection_timeout(self, input: i32) -> Self
pub fn connection_timeout(self, input: i32) -> Self
The number of seconds that CloudFront waits when trying to establish a connection to the origin. The minimum timeout is 1 second, the maximum is 10 seconds, and the default (if you don’t specify otherwise) is 10 seconds.
For more information, see Origin Connection Timeout in the Amazon CloudFront Developer Guide.
sourcepub fn set_connection_timeout(self, input: Option<i32>) -> Self
pub fn set_connection_timeout(self, input: Option<i32>) -> Self
The number of seconds that CloudFront waits when trying to establish a connection to the origin. The minimum timeout is 1 second, the maximum is 10 seconds, and the default (if you don’t specify otherwise) is 10 seconds.
For more information, see Origin Connection Timeout in the Amazon CloudFront Developer Guide.
Examples found in repository?
13851 13852 13853 13854 13855 13856 13857 13858 13859 13860 13861 13862 13863 13864 13865 13866 13867 13868 13869 13870 13871 13872 13873 13874 13875 13876 13877 13878 13879 13880 13881 13882 13883 13884 13885 13886 13887 13888 13889 13890 13891 13892 13893 13894 13895 13896 13897 13898 13899 13900 13901 13902 13903 13904 13905 13906 13907 13908 13909 13910 13911 13912 13913 13914 13915 13916 13917 13918 13919 13920 13921 13922 13923 13924 13925 13926 13927 13928 13929 13930 13931 13932 13933 13934 13935 13936 13937 13938 13939 13940 13941 13942 13943 13944 13945 13946 13947 13948 13949 13950 13951 13952 13953 13954 13955 13956 13957 13958 13959 13960 13961 13962 13963 13964 13965 13966 13967 13968 13969 13970 13971 13972 13973 13974 13975 13976 13977 13978 13979 13980 13981 13982 13983 13984
pub fn deser_structure_crate_model_origin(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Origin, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Origin::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Id") /* Id com.amazonaws.cloudfront#Origin$Id */ => {
let var_581 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_id(var_581);
}
,
s if s.matches("DomainName") /* DomainName com.amazonaws.cloudfront#Origin$DomainName */ => {
let var_582 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_domain_name(var_582);
}
,
s if s.matches("OriginPath") /* OriginPath com.amazonaws.cloudfront#Origin$OriginPath */ => {
let var_583 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_origin_path(var_583);
}
,
s if s.matches("CustomHeaders") /* CustomHeaders com.amazonaws.cloudfront#Origin$CustomHeaders */ => {
let var_584 =
Some(
crate::xml_deser::deser_structure_crate_model_custom_headers(&mut tag)
?
)
;
builder = builder.set_custom_headers(var_584);
}
,
s if s.matches("S3OriginConfig") /* S3OriginConfig com.amazonaws.cloudfront#Origin$S3OriginConfig */ => {
let var_585 =
Some(
crate::xml_deser::deser_structure_crate_model_s3_origin_config(&mut tag)
?
)
;
builder = builder.set_s3_origin_config(var_585);
}
,
s if s.matches("CustomOriginConfig") /* CustomOriginConfig com.amazonaws.cloudfront#Origin$CustomOriginConfig */ => {
let var_586 =
Some(
crate::xml_deser::deser_structure_crate_model_custom_origin_config(&mut tag)
?
)
;
builder = builder.set_custom_origin_config(var_586);
}
,
s if s.matches("ConnectionAttempts") /* ConnectionAttempts com.amazonaws.cloudfront#Origin$ConnectionAttempts */ => {
let var_587 =
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_connection_attempts(var_587);
}
,
s if s.matches("ConnectionTimeout") /* ConnectionTimeout com.amazonaws.cloudfront#Origin$ConnectionTimeout */ => {
let var_588 =
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_connection_timeout(var_588);
}
,
s if s.matches("OriginShield") /* OriginShield com.amazonaws.cloudfront#Origin$OriginShield */ => {
let var_589 =
Some(
crate::xml_deser::deser_structure_crate_model_origin_shield(&mut tag)
?
)
;
builder = builder.set_origin_shield(var_589);
}
,
s if s.matches("OriginAccessControlId") /* OriginAccessControlId com.amazonaws.cloudfront#Origin$OriginAccessControlId */ => {
let var_590 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_origin_access_control_id(var_590);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn origin_shield(self, input: OriginShield) -> Self
pub fn origin_shield(self, input: OriginShield) -> Self
CloudFront Origin Shield. Using Origin Shield can help reduce the load on your origin.
For more information, see Using Origin Shield in the Amazon CloudFront Developer Guide.
sourcepub fn set_origin_shield(self, input: Option<OriginShield>) -> Self
pub fn set_origin_shield(self, input: Option<OriginShield>) -> Self
CloudFront Origin Shield. Using Origin Shield can help reduce the load on your origin.
For more information, see Using Origin Shield in the Amazon CloudFront Developer Guide.
Examples found in repository?
13851 13852 13853 13854 13855 13856 13857 13858 13859 13860 13861 13862 13863 13864 13865 13866 13867 13868 13869 13870 13871 13872 13873 13874 13875 13876 13877 13878 13879 13880 13881 13882 13883 13884 13885 13886 13887 13888 13889 13890 13891 13892 13893 13894 13895 13896 13897 13898 13899 13900 13901 13902 13903 13904 13905 13906 13907 13908 13909 13910 13911 13912 13913 13914 13915 13916 13917 13918 13919 13920 13921 13922 13923 13924 13925 13926 13927 13928 13929 13930 13931 13932 13933 13934 13935 13936 13937 13938 13939 13940 13941 13942 13943 13944 13945 13946 13947 13948 13949 13950 13951 13952 13953 13954 13955 13956 13957 13958 13959 13960 13961 13962 13963 13964 13965 13966 13967 13968 13969 13970 13971 13972 13973 13974 13975 13976 13977 13978 13979 13980 13981 13982 13983 13984
pub fn deser_structure_crate_model_origin(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Origin, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Origin::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Id") /* Id com.amazonaws.cloudfront#Origin$Id */ => {
let var_581 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_id(var_581);
}
,
s if s.matches("DomainName") /* DomainName com.amazonaws.cloudfront#Origin$DomainName */ => {
let var_582 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_domain_name(var_582);
}
,
s if s.matches("OriginPath") /* OriginPath com.amazonaws.cloudfront#Origin$OriginPath */ => {
let var_583 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_origin_path(var_583);
}
,
s if s.matches("CustomHeaders") /* CustomHeaders com.amazonaws.cloudfront#Origin$CustomHeaders */ => {
let var_584 =
Some(
crate::xml_deser::deser_structure_crate_model_custom_headers(&mut tag)
?
)
;
builder = builder.set_custom_headers(var_584);
}
,
s if s.matches("S3OriginConfig") /* S3OriginConfig com.amazonaws.cloudfront#Origin$S3OriginConfig */ => {
let var_585 =
Some(
crate::xml_deser::deser_structure_crate_model_s3_origin_config(&mut tag)
?
)
;
builder = builder.set_s3_origin_config(var_585);
}
,
s if s.matches("CustomOriginConfig") /* CustomOriginConfig com.amazonaws.cloudfront#Origin$CustomOriginConfig */ => {
let var_586 =
Some(
crate::xml_deser::deser_structure_crate_model_custom_origin_config(&mut tag)
?
)
;
builder = builder.set_custom_origin_config(var_586);
}
,
s if s.matches("ConnectionAttempts") /* ConnectionAttempts com.amazonaws.cloudfront#Origin$ConnectionAttempts */ => {
let var_587 =
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_connection_attempts(var_587);
}
,
s if s.matches("ConnectionTimeout") /* ConnectionTimeout com.amazonaws.cloudfront#Origin$ConnectionTimeout */ => {
let var_588 =
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_connection_timeout(var_588);
}
,
s if s.matches("OriginShield") /* OriginShield com.amazonaws.cloudfront#Origin$OriginShield */ => {
let var_589 =
Some(
crate::xml_deser::deser_structure_crate_model_origin_shield(&mut tag)
?
)
;
builder = builder.set_origin_shield(var_589);
}
,
s if s.matches("OriginAccessControlId") /* OriginAccessControlId com.amazonaws.cloudfront#Origin$OriginAccessControlId */ => {
let var_590 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_origin_access_control_id(var_590);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn origin_access_control_id(self, input: impl Into<String>) -> Self
pub fn origin_access_control_id(self, input: impl Into<String>) -> Self
The unique identifier of an origin access control for this origin.
For more information, see Restricting access to an Amazon S3 origin in the Amazon CloudFront Developer Guide.
sourcepub fn set_origin_access_control_id(self, input: Option<String>) -> Self
pub fn set_origin_access_control_id(self, input: Option<String>) -> Self
The unique identifier of an origin access control for this origin.
For more information, see Restricting access to an Amazon S3 origin in the Amazon CloudFront Developer Guide.
Examples found in repository?
13851 13852 13853 13854 13855 13856 13857 13858 13859 13860 13861 13862 13863 13864 13865 13866 13867 13868 13869 13870 13871 13872 13873 13874 13875 13876 13877 13878 13879 13880 13881 13882 13883 13884 13885 13886 13887 13888 13889 13890 13891 13892 13893 13894 13895 13896 13897 13898 13899 13900 13901 13902 13903 13904 13905 13906 13907 13908 13909 13910 13911 13912 13913 13914 13915 13916 13917 13918 13919 13920 13921 13922 13923 13924 13925 13926 13927 13928 13929 13930 13931 13932 13933 13934 13935 13936 13937 13938 13939 13940 13941 13942 13943 13944 13945 13946 13947 13948 13949 13950 13951 13952 13953 13954 13955 13956 13957 13958 13959 13960 13961 13962 13963 13964 13965 13966 13967 13968 13969 13970 13971 13972 13973 13974 13975 13976 13977 13978 13979 13980 13981 13982 13983 13984
pub fn deser_structure_crate_model_origin(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Origin, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Origin::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Id") /* Id com.amazonaws.cloudfront#Origin$Id */ => {
let var_581 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_id(var_581);
}
,
s if s.matches("DomainName") /* DomainName com.amazonaws.cloudfront#Origin$DomainName */ => {
let var_582 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_domain_name(var_582);
}
,
s if s.matches("OriginPath") /* OriginPath com.amazonaws.cloudfront#Origin$OriginPath */ => {
let var_583 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_origin_path(var_583);
}
,
s if s.matches("CustomHeaders") /* CustomHeaders com.amazonaws.cloudfront#Origin$CustomHeaders */ => {
let var_584 =
Some(
crate::xml_deser::deser_structure_crate_model_custom_headers(&mut tag)
?
)
;
builder = builder.set_custom_headers(var_584);
}
,
s if s.matches("S3OriginConfig") /* S3OriginConfig com.amazonaws.cloudfront#Origin$S3OriginConfig */ => {
let var_585 =
Some(
crate::xml_deser::deser_structure_crate_model_s3_origin_config(&mut tag)
?
)
;
builder = builder.set_s3_origin_config(var_585);
}
,
s if s.matches("CustomOriginConfig") /* CustomOriginConfig com.amazonaws.cloudfront#Origin$CustomOriginConfig */ => {
let var_586 =
Some(
crate::xml_deser::deser_structure_crate_model_custom_origin_config(&mut tag)
?
)
;
builder = builder.set_custom_origin_config(var_586);
}
,
s if s.matches("ConnectionAttempts") /* ConnectionAttempts com.amazonaws.cloudfront#Origin$ConnectionAttempts */ => {
let var_587 =
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_connection_attempts(var_587);
}
,
s if s.matches("ConnectionTimeout") /* ConnectionTimeout com.amazonaws.cloudfront#Origin$ConnectionTimeout */ => {
let var_588 =
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_connection_timeout(var_588);
}
,
s if s.matches("OriginShield") /* OriginShield com.amazonaws.cloudfront#Origin$OriginShield */ => {
let var_589 =
Some(
crate::xml_deser::deser_structure_crate_model_origin_shield(&mut tag)
?
)
;
builder = builder.set_origin_shield(var_589);
}
,
s if s.matches("OriginAccessControlId") /* OriginAccessControlId com.amazonaws.cloudfront#Origin$OriginAccessControlId */ => {
let var_590 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_origin_access_control_id(var_590);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn build(self) -> Origin
pub fn build(self) -> Origin
Consumes the builder and constructs a Origin.
Examples found in repository?
13851 13852 13853 13854 13855 13856 13857 13858 13859 13860 13861 13862 13863 13864 13865 13866 13867 13868 13869 13870 13871 13872 13873 13874 13875 13876 13877 13878 13879 13880 13881 13882 13883 13884 13885 13886 13887 13888 13889 13890 13891 13892 13893 13894 13895 13896 13897 13898 13899 13900 13901 13902 13903 13904 13905 13906 13907 13908 13909 13910 13911 13912 13913 13914 13915 13916 13917 13918 13919 13920 13921 13922 13923 13924 13925 13926 13927 13928 13929 13930 13931 13932 13933 13934 13935 13936 13937 13938 13939 13940 13941 13942 13943 13944 13945 13946 13947 13948 13949 13950 13951 13952 13953 13954 13955 13956 13957 13958 13959 13960 13961 13962 13963 13964 13965 13966 13967 13968 13969 13970 13971 13972 13973 13974 13975 13976 13977 13978 13979 13980 13981 13982 13983 13984
pub fn deser_structure_crate_model_origin(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Origin, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Origin::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Id") /* Id com.amazonaws.cloudfront#Origin$Id */ => {
let var_581 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_id(var_581);
}
,
s if s.matches("DomainName") /* DomainName com.amazonaws.cloudfront#Origin$DomainName */ => {
let var_582 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_domain_name(var_582);
}
,
s if s.matches("OriginPath") /* OriginPath com.amazonaws.cloudfront#Origin$OriginPath */ => {
let var_583 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_origin_path(var_583);
}
,
s if s.matches("CustomHeaders") /* CustomHeaders com.amazonaws.cloudfront#Origin$CustomHeaders */ => {
let var_584 =
Some(
crate::xml_deser::deser_structure_crate_model_custom_headers(&mut tag)
?
)
;
builder = builder.set_custom_headers(var_584);
}
,
s if s.matches("S3OriginConfig") /* S3OriginConfig com.amazonaws.cloudfront#Origin$S3OriginConfig */ => {
let var_585 =
Some(
crate::xml_deser::deser_structure_crate_model_s3_origin_config(&mut tag)
?
)
;
builder = builder.set_s3_origin_config(var_585);
}
,
s if s.matches("CustomOriginConfig") /* CustomOriginConfig com.amazonaws.cloudfront#Origin$CustomOriginConfig */ => {
let var_586 =
Some(
crate::xml_deser::deser_structure_crate_model_custom_origin_config(&mut tag)
?
)
;
builder = builder.set_custom_origin_config(var_586);
}
,
s if s.matches("ConnectionAttempts") /* ConnectionAttempts com.amazonaws.cloudfront#Origin$ConnectionAttempts */ => {
let var_587 =
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_connection_attempts(var_587);
}
,
s if s.matches("ConnectionTimeout") /* ConnectionTimeout com.amazonaws.cloudfront#Origin$ConnectionTimeout */ => {
let var_588 =
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_connection_timeout(var_588);
}
,
s if s.matches("OriginShield") /* OriginShield com.amazonaws.cloudfront#Origin$OriginShield */ => {
let var_589 =
Some(
crate::xml_deser::deser_structure_crate_model_origin_shield(&mut tag)
?
)
;
builder = builder.set_origin_shield(var_589);
}
,
s if s.matches("OriginAccessControlId") /* OriginAccessControlId com.amazonaws.cloudfront#Origin$OriginAccessControlId */ => {
let var_590 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_origin_access_control_id(var_590);
}
,
_ => {}
}
}
Ok(builder.build())
}