aws_sdk_codebuild/operation/get_report_group_trend/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::get_report_group_trend::_get_report_group_trend_output::GetReportGroupTrendOutputBuilder;
3
4pub use crate::operation::get_report_group_trend::_get_report_group_trend_input::GetReportGroupTrendInputBuilder;
5
6impl crate::operation::get_report_group_trend::builders::GetReportGroupTrendInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::get_report_group_trend::GetReportGroupTrendOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::get_report_group_trend::GetReportGroupTrendError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.get_report_group_trend();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `GetReportGroupTrend`.
24///
25/// <p>Analyzes and accumulates test report values for the specified test reports.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct GetReportGroupTrendFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::get_report_group_trend::builders::GetReportGroupTrendInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::get_report_group_trend::GetReportGroupTrendOutput,
35 crate::operation::get_report_group_trend::GetReportGroupTrendError,
36 > for GetReportGroupTrendFluentBuilder
37{
38 fn send(
39 self,
40 config_override: crate::config::Builder,
41 ) -> crate::client::customize::internal::BoxFuture<
42 crate::client::customize::internal::SendResult<
43 crate::operation::get_report_group_trend::GetReportGroupTrendOutput,
44 crate::operation::get_report_group_trend::GetReportGroupTrendError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl GetReportGroupTrendFluentBuilder {
51 /// Creates a new `GetReportGroupTrendFluentBuilder`.
52 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53 Self {
54 handle,
55 inner: ::std::default::Default::default(),
56 config_override: ::std::option::Option::None,
57 }
58 }
59 /// Access the GetReportGroupTrend as a reference.
60 pub fn as_input(&self) -> &crate::operation::get_report_group_trend::builders::GetReportGroupTrendInputBuilder {
61 &self.inner
62 }
63 /// Sends the request and returns the response.
64 ///
65 /// If an error occurs, an `SdkError` will be returned with additional details that
66 /// can be matched against.
67 ///
68 /// By default, any retryable failures will be retried twice. Retry behavior
69 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70 /// set when configuring the client.
71 pub async fn send(
72 self,
73 ) -> ::std::result::Result<
74 crate::operation::get_report_group_trend::GetReportGroupTrendOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::get_report_group_trend::GetReportGroupTrendError,
77 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78 >,
79 > {
80 let input = self
81 .inner
82 .build()
83 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84 let runtime_plugins = crate::operation::get_report_group_trend::GetReportGroupTrend::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::get_report_group_trend::GetReportGroupTrend::orchestrate(&runtime_plugins, input).await
90 }
91
92 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93 pub fn customize(
94 self,
95 ) -> crate::client::customize::CustomizableOperation<
96 crate::operation::get_report_group_trend::GetReportGroupTrendOutput,
97 crate::operation::get_report_group_trend::GetReportGroupTrendError,
98 Self,
99 > {
100 crate::client::customize::CustomizableOperation::new(self)
101 }
102 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103 self.set_config_override(::std::option::Option::Some(config_override.into()));
104 self
105 }
106
107 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108 self.config_override = config_override;
109 self
110 }
111 /// <p>The ARN of the report group that contains the reports to analyze.</p>
112 pub fn report_group_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113 self.inner = self.inner.report_group_arn(input.into());
114 self
115 }
116 /// <p>The ARN of the report group that contains the reports to analyze.</p>
117 pub fn set_report_group_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118 self.inner = self.inner.set_report_group_arn(input);
119 self
120 }
121 /// <p>The ARN of the report group that contains the reports to analyze.</p>
122 pub fn get_report_group_arn(&self) -> &::std::option::Option<::std::string::String> {
123 self.inner.get_report_group_arn()
124 }
125 /// <p>The number of reports to analyze. This operation always retrieves the most recent reports.</p>
126 /// <p>If this parameter is omitted, the most recent 100 reports are analyzed.</p>
127 pub fn num_of_reports(mut self, input: i32) -> Self {
128 self.inner = self.inner.num_of_reports(input);
129 self
130 }
131 /// <p>The number of reports to analyze. This operation always retrieves the most recent reports.</p>
132 /// <p>If this parameter is omitted, the most recent 100 reports are analyzed.</p>
133 pub fn set_num_of_reports(mut self, input: ::std::option::Option<i32>) -> Self {
134 self.inner = self.inner.set_num_of_reports(input);
135 self
136 }
137 /// <p>The number of reports to analyze. This operation always retrieves the most recent reports.</p>
138 /// <p>If this parameter is omitted, the most recent 100 reports are analyzed.</p>
139 pub fn get_num_of_reports(&self) -> &::std::option::Option<i32> {
140 self.inner.get_num_of_reports()
141 }
142 /// <p>The test report value to accumulate. This must be one of the following values:</p>
143 /// <dl>
144 /// <dt>
145 /// Test reports:
146 /// </dt>
147 /// <dd>
148 /// <dl>
149 /// <dt>
150 /// DURATION
151 /// </dt>
152 /// <dd>
153 /// <p>Accumulate the test run times for the specified reports.</p>
154 /// </dd>
155 /// <dt>
156 /// PASS_RATE
157 /// </dt>
158 /// <dd>
159 /// <p>Accumulate the percentage of tests that passed for the specified test reports.</p>
160 /// </dd>
161 /// <dt>
162 /// TOTAL
163 /// </dt>
164 /// <dd>
165 /// <p>Accumulate the total number of tests for the specified test reports.</p>
166 /// </dd>
167 /// </dl>
168 /// </dd>
169 /// </dl>
170 /// <dl>
171 /// <dt>
172 /// Code coverage reports:
173 /// </dt>
174 /// <dd>
175 /// <dl>
176 /// <dt>
177 /// BRANCH_COVERAGE
178 /// </dt>
179 /// <dd>
180 /// <p>Accumulate the branch coverage percentages for the specified test reports.</p>
181 /// </dd>
182 /// <dt>
183 /// BRANCHES_COVERED
184 /// </dt>
185 /// <dd>
186 /// <p>Accumulate the branches covered values for the specified test reports.</p>
187 /// </dd>
188 /// <dt>
189 /// BRANCHES_MISSED
190 /// </dt>
191 /// <dd>
192 /// <p>Accumulate the branches missed values for the specified test reports.</p>
193 /// </dd>
194 /// <dt>
195 /// LINE_COVERAGE
196 /// </dt>
197 /// <dd>
198 /// <p>Accumulate the line coverage percentages for the specified test reports.</p>
199 /// </dd>
200 /// <dt>
201 /// LINES_COVERED
202 /// </dt>
203 /// <dd>
204 /// <p>Accumulate the lines covered values for the specified test reports.</p>
205 /// </dd>
206 /// <dt>
207 /// LINES_MISSED
208 /// </dt>
209 /// <dd>
210 /// <p>Accumulate the lines not covered values for the specified test reports.</p>
211 /// </dd>
212 /// </dl>
213 /// </dd>
214 /// </dl>
215 pub fn trend_field(mut self, input: crate::types::ReportGroupTrendFieldType) -> Self {
216 self.inner = self.inner.trend_field(input);
217 self
218 }
219 /// <p>The test report value to accumulate. This must be one of the following values:</p>
220 /// <dl>
221 /// <dt>
222 /// Test reports:
223 /// </dt>
224 /// <dd>
225 /// <dl>
226 /// <dt>
227 /// DURATION
228 /// </dt>
229 /// <dd>
230 /// <p>Accumulate the test run times for the specified reports.</p>
231 /// </dd>
232 /// <dt>
233 /// PASS_RATE
234 /// </dt>
235 /// <dd>
236 /// <p>Accumulate the percentage of tests that passed for the specified test reports.</p>
237 /// </dd>
238 /// <dt>
239 /// TOTAL
240 /// </dt>
241 /// <dd>
242 /// <p>Accumulate the total number of tests for the specified test reports.</p>
243 /// </dd>
244 /// </dl>
245 /// </dd>
246 /// </dl>
247 /// <dl>
248 /// <dt>
249 /// Code coverage reports:
250 /// </dt>
251 /// <dd>
252 /// <dl>
253 /// <dt>
254 /// BRANCH_COVERAGE
255 /// </dt>
256 /// <dd>
257 /// <p>Accumulate the branch coverage percentages for the specified test reports.</p>
258 /// </dd>
259 /// <dt>
260 /// BRANCHES_COVERED
261 /// </dt>
262 /// <dd>
263 /// <p>Accumulate the branches covered values for the specified test reports.</p>
264 /// </dd>
265 /// <dt>
266 /// BRANCHES_MISSED
267 /// </dt>
268 /// <dd>
269 /// <p>Accumulate the branches missed values for the specified test reports.</p>
270 /// </dd>
271 /// <dt>
272 /// LINE_COVERAGE
273 /// </dt>
274 /// <dd>
275 /// <p>Accumulate the line coverage percentages for the specified test reports.</p>
276 /// </dd>
277 /// <dt>
278 /// LINES_COVERED
279 /// </dt>
280 /// <dd>
281 /// <p>Accumulate the lines covered values for the specified test reports.</p>
282 /// </dd>
283 /// <dt>
284 /// LINES_MISSED
285 /// </dt>
286 /// <dd>
287 /// <p>Accumulate the lines not covered values for the specified test reports.</p>
288 /// </dd>
289 /// </dl>
290 /// </dd>
291 /// </dl>
292 pub fn set_trend_field(mut self, input: ::std::option::Option<crate::types::ReportGroupTrendFieldType>) -> Self {
293 self.inner = self.inner.set_trend_field(input);
294 self
295 }
296 /// <p>The test report value to accumulate. This must be one of the following values:</p>
297 /// <dl>
298 /// <dt>
299 /// Test reports:
300 /// </dt>
301 /// <dd>
302 /// <dl>
303 /// <dt>
304 /// DURATION
305 /// </dt>
306 /// <dd>
307 /// <p>Accumulate the test run times for the specified reports.</p>
308 /// </dd>
309 /// <dt>
310 /// PASS_RATE
311 /// </dt>
312 /// <dd>
313 /// <p>Accumulate the percentage of tests that passed for the specified test reports.</p>
314 /// </dd>
315 /// <dt>
316 /// TOTAL
317 /// </dt>
318 /// <dd>
319 /// <p>Accumulate the total number of tests for the specified test reports.</p>
320 /// </dd>
321 /// </dl>
322 /// </dd>
323 /// </dl>
324 /// <dl>
325 /// <dt>
326 /// Code coverage reports:
327 /// </dt>
328 /// <dd>
329 /// <dl>
330 /// <dt>
331 /// BRANCH_COVERAGE
332 /// </dt>
333 /// <dd>
334 /// <p>Accumulate the branch coverage percentages for the specified test reports.</p>
335 /// </dd>
336 /// <dt>
337 /// BRANCHES_COVERED
338 /// </dt>
339 /// <dd>
340 /// <p>Accumulate the branches covered values for the specified test reports.</p>
341 /// </dd>
342 /// <dt>
343 /// BRANCHES_MISSED
344 /// </dt>
345 /// <dd>
346 /// <p>Accumulate the branches missed values for the specified test reports.</p>
347 /// </dd>
348 /// <dt>
349 /// LINE_COVERAGE
350 /// </dt>
351 /// <dd>
352 /// <p>Accumulate the line coverage percentages for the specified test reports.</p>
353 /// </dd>
354 /// <dt>
355 /// LINES_COVERED
356 /// </dt>
357 /// <dd>
358 /// <p>Accumulate the lines covered values for the specified test reports.</p>
359 /// </dd>
360 /// <dt>
361 /// LINES_MISSED
362 /// </dt>
363 /// <dd>
364 /// <p>Accumulate the lines not covered values for the specified test reports.</p>
365 /// </dd>
366 /// </dl>
367 /// </dd>
368 /// </dl>
369 pub fn get_trend_field(&self) -> &::std::option::Option<crate::types::ReportGroupTrendFieldType> {
370 self.inner.get_trend_field()
371 }
372}