aws_sdk_cloudfront/operation/get_function/
_get_function_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct GetFunctionOutput {
6 pub function_code: ::std::option::Option<::aws_smithy_types::Blob>,
8 pub e_tag: ::std::option::Option<::std::string::String>,
10 pub content_type: ::std::option::Option<::std::string::String>,
12 _request_id: Option<String>,
13}
14impl GetFunctionOutput {
15 pub fn function_code(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
17 self.function_code.as_ref()
18 }
19 pub fn e_tag(&self) -> ::std::option::Option<&str> {
21 self.e_tag.as_deref()
22 }
23 pub fn content_type(&self) -> ::std::option::Option<&str> {
25 self.content_type.as_deref()
26 }
27}
28impl ::std::fmt::Debug for GetFunctionOutput {
29 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30 let mut formatter = f.debug_struct("GetFunctionOutput");
31 formatter.field("function_code", &"*** Sensitive Data Redacted ***");
32 formatter.field("e_tag", &self.e_tag);
33 formatter.field("content_type", &self.content_type);
34 formatter.field("_request_id", &self._request_id);
35 formatter.finish()
36 }
37}
38impl ::aws_types::request_id::RequestId for GetFunctionOutput {
39 fn request_id(&self) -> Option<&str> {
40 self._request_id.as_deref()
41 }
42}
43impl GetFunctionOutput {
44 pub fn builder() -> crate::operation::get_function::builders::GetFunctionOutputBuilder {
46 crate::operation::get_function::builders::GetFunctionOutputBuilder::default()
47 }
48}
49
50#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
52#[non_exhaustive]
53pub struct GetFunctionOutputBuilder {
54 pub(crate) function_code: ::std::option::Option<::aws_smithy_types::Blob>,
55 pub(crate) e_tag: ::std::option::Option<::std::string::String>,
56 pub(crate) content_type: ::std::option::Option<::std::string::String>,
57 _request_id: Option<String>,
58}
59impl GetFunctionOutputBuilder {
60 pub fn function_code(mut self, input: ::aws_smithy_types::Blob) -> Self {
62 self.function_code = ::std::option::Option::Some(input);
63 self
64 }
65 pub fn set_function_code(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
67 self.function_code = input;
68 self
69 }
70 pub fn get_function_code(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
72 &self.function_code
73 }
74 pub fn e_tag(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
76 self.e_tag = ::std::option::Option::Some(input.into());
77 self
78 }
79 pub fn set_e_tag(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81 self.e_tag = input;
82 self
83 }
84 pub fn get_e_tag(&self) -> &::std::option::Option<::std::string::String> {
86 &self.e_tag
87 }
88 pub fn content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
90 self.content_type = ::std::option::Option::Some(input.into());
91 self
92 }
93 pub fn set_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95 self.content_type = input;
96 self
97 }
98 pub fn get_content_type(&self) -> &::std::option::Option<::std::string::String> {
100 &self.content_type
101 }
102 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
103 self._request_id = Some(request_id.into());
104 self
105 }
106
107 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
108 self._request_id = request_id;
109 self
110 }
111 pub fn build(self) -> crate::operation::get_function::GetFunctionOutput {
113 crate::operation::get_function::GetFunctionOutput {
114 function_code: self.function_code,
115 e_tag: self.e_tag,
116 content_type: self.content_type,
117 _request_id: self._request_id,
118 }
119 }
120}
121impl ::std::fmt::Debug for GetFunctionOutputBuilder {
122 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
123 let mut formatter = f.debug_struct("GetFunctionOutputBuilder");
124 formatter.field("function_code", &"*** Sensitive Data Redacted ***");
125 formatter.field("e_tag", &self.e_tag);
126 formatter.field("content_type", &self.content_type);
127 formatter.field("_request_id", &self._request_id);
128 formatter.finish()
129 }
130}