aws_sdk_cloudfront/operation/create_function/
_create_function_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateFunctionOutput {
6    /// <p>Contains configuration information and metadata about a CloudFront function.</p>
7    pub function_summary: ::std::option::Option<crate::types::FunctionSummary>,
8    /// <p>The URL of the CloudFront function. Use the URL to manage the function with the CloudFront API.</p>
9    pub location: ::std::option::Option<::std::string::String>,
10    /// <p>The version identifier for the current version of the CloudFront function.</p>
11    pub e_tag: ::std::option::Option<::std::string::String>,
12    _request_id: Option<String>,
13}
14impl CreateFunctionOutput {
15    /// <p>Contains configuration information and metadata about a CloudFront function.</p>
16    pub fn function_summary(&self) -> ::std::option::Option<&crate::types::FunctionSummary> {
17        self.function_summary.as_ref()
18    }
19    /// <p>The URL of the CloudFront function. Use the URL to manage the function with the CloudFront API.</p>
20    pub fn location(&self) -> ::std::option::Option<&str> {
21        self.location.as_deref()
22    }
23    /// <p>The version identifier for the current version of the CloudFront function.</p>
24    pub fn e_tag(&self) -> ::std::option::Option<&str> {
25        self.e_tag.as_deref()
26    }
27}
28impl ::aws_types::request_id::RequestId for CreateFunctionOutput {
29    fn request_id(&self) -> Option<&str> {
30        self._request_id.as_deref()
31    }
32}
33impl CreateFunctionOutput {
34    /// Creates a new builder-style object to manufacture [`CreateFunctionOutput`](crate::operation::create_function::CreateFunctionOutput).
35    pub fn builder() -> crate::operation::create_function::builders::CreateFunctionOutputBuilder {
36        crate::operation::create_function::builders::CreateFunctionOutputBuilder::default()
37    }
38}
39
40/// A builder for [`CreateFunctionOutput`](crate::operation::create_function::CreateFunctionOutput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct CreateFunctionOutputBuilder {
44    pub(crate) function_summary: ::std::option::Option<crate::types::FunctionSummary>,
45    pub(crate) location: ::std::option::Option<::std::string::String>,
46    pub(crate) e_tag: ::std::option::Option<::std::string::String>,
47    _request_id: Option<String>,
48}
49impl CreateFunctionOutputBuilder {
50    /// <p>Contains configuration information and metadata about a CloudFront function.</p>
51    pub fn function_summary(mut self, input: crate::types::FunctionSummary) -> Self {
52        self.function_summary = ::std::option::Option::Some(input);
53        self
54    }
55    /// <p>Contains configuration information and metadata about a CloudFront function.</p>
56    pub fn set_function_summary(mut self, input: ::std::option::Option<crate::types::FunctionSummary>) -> Self {
57        self.function_summary = input;
58        self
59    }
60    /// <p>Contains configuration information and metadata about a CloudFront function.</p>
61    pub fn get_function_summary(&self) -> &::std::option::Option<crate::types::FunctionSummary> {
62        &self.function_summary
63    }
64    /// <p>The URL of the CloudFront function. Use the URL to manage the function with the CloudFront API.</p>
65    pub fn location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
66        self.location = ::std::option::Option::Some(input.into());
67        self
68    }
69    /// <p>The URL of the CloudFront function. Use the URL to manage the function with the CloudFront API.</p>
70    pub fn set_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
71        self.location = input;
72        self
73    }
74    /// <p>The URL of the CloudFront function. Use the URL to manage the function with the CloudFront API.</p>
75    pub fn get_location(&self) -> &::std::option::Option<::std::string::String> {
76        &self.location
77    }
78    /// <p>The version identifier for the current version of the CloudFront function.</p>
79    pub fn e_tag(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
80        self.e_tag = ::std::option::Option::Some(input.into());
81        self
82    }
83    /// <p>The version identifier for the current version of the CloudFront function.</p>
84    pub fn set_e_tag(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
85        self.e_tag = input;
86        self
87    }
88    /// <p>The version identifier for the current version of the CloudFront function.</p>
89    pub fn get_e_tag(&self) -> &::std::option::Option<::std::string::String> {
90        &self.e_tag
91    }
92    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
93        self._request_id = Some(request_id.into());
94        self
95    }
96
97    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
98        self._request_id = request_id;
99        self
100    }
101    /// Consumes the builder and constructs a [`CreateFunctionOutput`](crate::operation::create_function::CreateFunctionOutput).
102    pub fn build(self) -> crate::operation::create_function::CreateFunctionOutput {
103        crate::operation::create_function::CreateFunctionOutput {
104            function_summary: self.function_summary,
105            location: self.location,
106            e_tag: self.e_tag,
107            _request_id: self._request_id,
108        }
109    }
110}