aws_sdk_codeguruprofiler/operation/get_recommendations/_get_recommendations_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The structure representing the GetRecommendationsRequest.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct GetRecommendationsInput {
7 /// <p>The name of the profiling group to get analysis data about.</p>
8 pub profiling_group_name: ::std::option::Option<::std::string::String>,
9 /// <p>The end time of the profile to get analysis data about. You must specify <code>startTime</code> and <code>endTime</code>. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.</p>
10 pub start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
11 /// <p>The start time of the profile to get analysis data about. You must specify <code>startTime</code> and <code>endTime</code>. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.</p>
12 pub end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
13 /// <p>The language used to provide analysis. Specify using a string that is one of the following <code>BCP 47</code> language codes.</p>
14 /// <ul>
15 /// <li>
16 /// <p><code>de-DE</code> - German, Germany</p></li>
17 /// <li>
18 /// <p><code>en-GB</code> - English, United Kingdom</p></li>
19 /// <li>
20 /// <p><code>en-US</code> - English, United States</p></li>
21 /// <li>
22 /// <p><code>es-ES</code> - Spanish, Spain</p></li>
23 /// <li>
24 /// <p><code>fr-FR</code> - French, France</p></li>
25 /// <li>
26 /// <p><code>it-IT</code> - Italian, Italy</p></li>
27 /// <li>
28 /// <p><code>ja-JP</code> - Japanese, Japan</p></li>
29 /// <li>
30 /// <p><code>ko-KR</code> - Korean, Republic of Korea</p></li>
31 /// <li>
32 /// <p><code>pt-BR</code> - Portugese, Brazil</p></li>
33 /// <li>
34 /// <p><code>zh-CN</code> - Chinese, China</p></li>
35 /// <li>
36 /// <p><code>zh-TW</code> - Chinese, Taiwan</p></li>
37 /// </ul>
38 pub locale: ::std::option::Option<::std::string::String>,
39}
40impl GetRecommendationsInput {
41 /// <p>The name of the profiling group to get analysis data about.</p>
42 pub fn profiling_group_name(&self) -> ::std::option::Option<&str> {
43 self.profiling_group_name.as_deref()
44 }
45 /// <p>The end time of the profile to get analysis data about. You must specify <code>startTime</code> and <code>endTime</code>. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.</p>
46 pub fn start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
47 self.start_time.as_ref()
48 }
49 /// <p>The start time of the profile to get analysis data about. You must specify <code>startTime</code> and <code>endTime</code>. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.</p>
50 pub fn end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
51 self.end_time.as_ref()
52 }
53 /// <p>The language used to provide analysis. Specify using a string that is one of the following <code>BCP 47</code> language codes.</p>
54 /// <ul>
55 /// <li>
56 /// <p><code>de-DE</code> - German, Germany</p></li>
57 /// <li>
58 /// <p><code>en-GB</code> - English, United Kingdom</p></li>
59 /// <li>
60 /// <p><code>en-US</code> - English, United States</p></li>
61 /// <li>
62 /// <p><code>es-ES</code> - Spanish, Spain</p></li>
63 /// <li>
64 /// <p><code>fr-FR</code> - French, France</p></li>
65 /// <li>
66 /// <p><code>it-IT</code> - Italian, Italy</p></li>
67 /// <li>
68 /// <p><code>ja-JP</code> - Japanese, Japan</p></li>
69 /// <li>
70 /// <p><code>ko-KR</code> - Korean, Republic of Korea</p></li>
71 /// <li>
72 /// <p><code>pt-BR</code> - Portugese, Brazil</p></li>
73 /// <li>
74 /// <p><code>zh-CN</code> - Chinese, China</p></li>
75 /// <li>
76 /// <p><code>zh-TW</code> - Chinese, Taiwan</p></li>
77 /// </ul>
78 pub fn locale(&self) -> ::std::option::Option<&str> {
79 self.locale.as_deref()
80 }
81}
82impl GetRecommendationsInput {
83 /// Creates a new builder-style object to manufacture [`GetRecommendationsInput`](crate::operation::get_recommendations::GetRecommendationsInput).
84 pub fn builder() -> crate::operation::get_recommendations::builders::GetRecommendationsInputBuilder {
85 crate::operation::get_recommendations::builders::GetRecommendationsInputBuilder::default()
86 }
87}
88
89/// A builder for [`GetRecommendationsInput`](crate::operation::get_recommendations::GetRecommendationsInput).
90#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
91#[non_exhaustive]
92pub struct GetRecommendationsInputBuilder {
93 pub(crate) profiling_group_name: ::std::option::Option<::std::string::String>,
94 pub(crate) start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
95 pub(crate) end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
96 pub(crate) locale: ::std::option::Option<::std::string::String>,
97}
98impl GetRecommendationsInputBuilder {
99 /// <p>The name of the profiling group to get analysis data about.</p>
100 /// This field is required.
101 pub fn profiling_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102 self.profiling_group_name = ::std::option::Option::Some(input.into());
103 self
104 }
105 /// <p>The name of the profiling group to get analysis data about.</p>
106 pub fn set_profiling_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107 self.profiling_group_name = input;
108 self
109 }
110 /// <p>The name of the profiling group to get analysis data about.</p>
111 pub fn get_profiling_group_name(&self) -> &::std::option::Option<::std::string::String> {
112 &self.profiling_group_name
113 }
114 /// <p>The end time of the profile to get analysis data about. You must specify <code>startTime</code> and <code>endTime</code>. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.</p>
115 /// This field is required.
116 pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
117 self.start_time = ::std::option::Option::Some(input);
118 self
119 }
120 /// <p>The end time of the profile to get analysis data about. You must specify <code>startTime</code> and <code>endTime</code>. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.</p>
121 pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
122 self.start_time = input;
123 self
124 }
125 /// <p>The end time of the profile to get analysis data about. You must specify <code>startTime</code> and <code>endTime</code>. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.</p>
126 pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
127 &self.start_time
128 }
129 /// <p>The start time of the profile to get analysis data about. You must specify <code>startTime</code> and <code>endTime</code>. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.</p>
130 /// This field is required.
131 pub fn end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
132 self.end_time = ::std::option::Option::Some(input);
133 self
134 }
135 /// <p>The start time of the profile to get analysis data about. You must specify <code>startTime</code> and <code>endTime</code>. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.</p>
136 pub fn set_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
137 self.end_time = input;
138 self
139 }
140 /// <p>The start time of the profile to get analysis data about. You must specify <code>startTime</code> and <code>endTime</code>. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.</p>
141 pub fn get_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
142 &self.end_time
143 }
144 /// <p>The language used to provide analysis. Specify using a string that is one of the following <code>BCP 47</code> language codes.</p>
145 /// <ul>
146 /// <li>
147 /// <p><code>de-DE</code> - German, Germany</p></li>
148 /// <li>
149 /// <p><code>en-GB</code> - English, United Kingdom</p></li>
150 /// <li>
151 /// <p><code>en-US</code> - English, United States</p></li>
152 /// <li>
153 /// <p><code>es-ES</code> - Spanish, Spain</p></li>
154 /// <li>
155 /// <p><code>fr-FR</code> - French, France</p></li>
156 /// <li>
157 /// <p><code>it-IT</code> - Italian, Italy</p></li>
158 /// <li>
159 /// <p><code>ja-JP</code> - Japanese, Japan</p></li>
160 /// <li>
161 /// <p><code>ko-KR</code> - Korean, Republic of Korea</p></li>
162 /// <li>
163 /// <p><code>pt-BR</code> - Portugese, Brazil</p></li>
164 /// <li>
165 /// <p><code>zh-CN</code> - Chinese, China</p></li>
166 /// <li>
167 /// <p><code>zh-TW</code> - Chinese, Taiwan</p></li>
168 /// </ul>
169 pub fn locale(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
170 self.locale = ::std::option::Option::Some(input.into());
171 self
172 }
173 /// <p>The language used to provide analysis. Specify using a string that is one of the following <code>BCP 47</code> language codes.</p>
174 /// <ul>
175 /// <li>
176 /// <p><code>de-DE</code> - German, Germany</p></li>
177 /// <li>
178 /// <p><code>en-GB</code> - English, United Kingdom</p></li>
179 /// <li>
180 /// <p><code>en-US</code> - English, United States</p></li>
181 /// <li>
182 /// <p><code>es-ES</code> - Spanish, Spain</p></li>
183 /// <li>
184 /// <p><code>fr-FR</code> - French, France</p></li>
185 /// <li>
186 /// <p><code>it-IT</code> - Italian, Italy</p></li>
187 /// <li>
188 /// <p><code>ja-JP</code> - Japanese, Japan</p></li>
189 /// <li>
190 /// <p><code>ko-KR</code> - Korean, Republic of Korea</p></li>
191 /// <li>
192 /// <p><code>pt-BR</code> - Portugese, Brazil</p></li>
193 /// <li>
194 /// <p><code>zh-CN</code> - Chinese, China</p></li>
195 /// <li>
196 /// <p><code>zh-TW</code> - Chinese, Taiwan</p></li>
197 /// </ul>
198 pub fn set_locale(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
199 self.locale = input;
200 self
201 }
202 /// <p>The language used to provide analysis. Specify using a string that is one of the following <code>BCP 47</code> language codes.</p>
203 /// <ul>
204 /// <li>
205 /// <p><code>de-DE</code> - German, Germany</p></li>
206 /// <li>
207 /// <p><code>en-GB</code> - English, United Kingdom</p></li>
208 /// <li>
209 /// <p><code>en-US</code> - English, United States</p></li>
210 /// <li>
211 /// <p><code>es-ES</code> - Spanish, Spain</p></li>
212 /// <li>
213 /// <p><code>fr-FR</code> - French, France</p></li>
214 /// <li>
215 /// <p><code>it-IT</code> - Italian, Italy</p></li>
216 /// <li>
217 /// <p><code>ja-JP</code> - Japanese, Japan</p></li>
218 /// <li>
219 /// <p><code>ko-KR</code> - Korean, Republic of Korea</p></li>
220 /// <li>
221 /// <p><code>pt-BR</code> - Portugese, Brazil</p></li>
222 /// <li>
223 /// <p><code>zh-CN</code> - Chinese, China</p></li>
224 /// <li>
225 /// <p><code>zh-TW</code> - Chinese, Taiwan</p></li>
226 /// </ul>
227 pub fn get_locale(&self) -> &::std::option::Option<::std::string::String> {
228 &self.locale
229 }
230 /// Consumes the builder and constructs a [`GetRecommendationsInput`](crate::operation::get_recommendations::GetRecommendationsInput).
231 pub fn build(
232 self,
233 ) -> ::std::result::Result<crate::operation::get_recommendations::GetRecommendationsInput, ::aws_smithy_types::error::operation::BuildError> {
234 ::std::result::Result::Ok(crate::operation::get_recommendations::GetRecommendationsInput {
235 profiling_group_name: self.profiling_group_name,
236 start_time: self.start_time,
237 end_time: self.end_time,
238 locale: self.locale,
239 })
240 }
241}