Struct aws_sdk_cloudfront::output::create_function_output::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for CreateFunctionOutput
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn function_summary(self, input: FunctionSummary) -> Self
pub fn function_summary(self, input: FunctionSummary) -> Self
Contains configuration information and metadata about a CloudFront function.
sourcepub fn set_function_summary(self, input: Option<FunctionSummary>) -> Self
pub fn set_function_summary(self, input: Option<FunctionSummary>) -> Self
Contains configuration information and metadata about a CloudFront function.
Examples found in repository?
src/operation_deser.rs (lines 2748-2750)
2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763
pub fn parse_create_function_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::CreateFunctionOutput, crate::error::CreateFunctionError> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::create_function_output::Builder::default();
let _ = response;
output = output.set_e_tag(
crate::http_serde::deser_header_create_function_create_function_output_e_tag(
response.headers(),
)
.map_err(|_| {
crate::error::CreateFunctionError::unhandled(
"Failed to parse ETag from header `ETag",
)
})?,
);
output = output.set_function_summary(
crate::http_serde::deser_payload_create_function_create_function_output_function_summary(response.body().as_ref())?
);
output = output.set_location(
crate::http_serde::deser_header_create_function_create_function_output_location(
response.headers(),
)
.map_err(|_| {
crate::error::CreateFunctionError::unhandled(
"Failed to parse Location from header `Location",
)
})?,
);
output.build()
})
}
sourcepub fn location(self, input: impl Into<String>) -> Self
pub fn location(self, input: impl Into<String>) -> Self
The URL of the CloudFront function. Use the URL to manage the function with the CloudFront API.
sourcepub fn set_location(self, input: Option<String>) -> Self
pub fn set_location(self, input: Option<String>) -> Self
The URL of the CloudFront function. Use the URL to manage the function with the CloudFront API.
Examples found in repository?
src/operation_deser.rs (lines 2751-2760)
2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763
pub fn parse_create_function_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::CreateFunctionOutput, crate::error::CreateFunctionError> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::create_function_output::Builder::default();
let _ = response;
output = output.set_e_tag(
crate::http_serde::deser_header_create_function_create_function_output_e_tag(
response.headers(),
)
.map_err(|_| {
crate::error::CreateFunctionError::unhandled(
"Failed to parse ETag from header `ETag",
)
})?,
);
output = output.set_function_summary(
crate::http_serde::deser_payload_create_function_create_function_output_function_summary(response.body().as_ref())?
);
output = output.set_location(
crate::http_serde::deser_header_create_function_create_function_output_location(
response.headers(),
)
.map_err(|_| {
crate::error::CreateFunctionError::unhandled(
"Failed to parse Location from header `Location",
)
})?,
);
output.build()
})
}
sourcepub fn e_tag(self, input: impl Into<String>) -> Self
pub fn e_tag(self, input: impl Into<String>) -> Self
The version identifier for the current version of the CloudFront function.
sourcepub fn set_e_tag(self, input: Option<String>) -> Self
pub fn set_e_tag(self, input: Option<String>) -> Self
The version identifier for the current version of the CloudFront function.
Examples found in repository?
src/operation_deser.rs (lines 2738-2747)
2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763
pub fn parse_create_function_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::CreateFunctionOutput, crate::error::CreateFunctionError> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::create_function_output::Builder::default();
let _ = response;
output = output.set_e_tag(
crate::http_serde::deser_header_create_function_create_function_output_e_tag(
response.headers(),
)
.map_err(|_| {
crate::error::CreateFunctionError::unhandled(
"Failed to parse ETag from header `ETag",
)
})?,
);
output = output.set_function_summary(
crate::http_serde::deser_payload_create_function_create_function_output_function_summary(response.body().as_ref())?
);
output = output.set_location(
crate::http_serde::deser_header_create_function_create_function_output_location(
response.headers(),
)
.map_err(|_| {
crate::error::CreateFunctionError::unhandled(
"Failed to parse Location from header `Location",
)
})?,
);
output.build()
})
}
sourcepub fn build(self) -> CreateFunctionOutput
pub fn build(self) -> CreateFunctionOutput
Consumes the builder and constructs a CreateFunctionOutput
.
Examples found in repository?
src/operation_deser.rs (line 2761)
2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763
pub fn parse_create_function_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::CreateFunctionOutput, crate::error::CreateFunctionError> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::create_function_output::Builder::default();
let _ = response;
output = output.set_e_tag(
crate::http_serde::deser_header_create_function_create_function_output_e_tag(
response.headers(),
)
.map_err(|_| {
crate::error::CreateFunctionError::unhandled(
"Failed to parse ETag from header `ETag",
)
})?,
);
output = output.set_function_summary(
crate::http_serde::deser_payload_create_function_create_function_output_function_summary(response.body().as_ref())?
);
output = output.set_location(
crate::http_serde::deser_header_create_function_create_function_output_location(
response.headers(),
)
.map_err(|_| {
crate::error::CreateFunctionError::unhandled(
"Failed to parse Location from header `Location",
)
})?,
);
output.build()
})
}