aws_sdk_evidently/operation/get_experiment_results/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::get_experiment_results::_get_experiment_results_output::GetExperimentResultsOutputBuilder;
3
4pub use crate::operation::get_experiment_results::_get_experiment_results_input::GetExperimentResultsInputBuilder;
5
6impl crate::operation::get_experiment_results::builders::GetExperimentResultsInputBuilder {
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_experiment_results::GetExperimentResultsOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::get_experiment_results::GetExperimentResultsError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.get_experiment_results();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `GetExperimentResults`.
24///
25/// <p>Retrieves the results of a running or completed experiment. No results are available until there have been 100 events for each variation and at least 10 minutes have passed since the start of the experiment. To increase the statistical power, Evidently performs an additional offline p-value analysis at the end of the experiment. Offline p-value analysis can detect statistical significance in some cases where the anytime p-values used during the experiment do not find statistical significance.</p>
26/// <p>Experiment results are available up to 63 days after the start of the experiment. They are not available after that because of CloudWatch data retention policies.</p>
27#[deprecated(note = "AWS CloudWatch Evidently has been deprecated since 11/17/2025.", since = "11/17/2025")]
28#[derive(::std::clone::Clone, ::std::fmt::Debug)]
29pub struct GetExperimentResultsFluentBuilder {
30 handle: ::std::sync::Arc<crate::client::Handle>,
31 inner: crate::operation::get_experiment_results::builders::GetExperimentResultsInputBuilder,
32 config_override: ::std::option::Option<crate::config::Builder>,
33}
34impl
35 crate::client::customize::internal::CustomizableSend<
36 crate::operation::get_experiment_results::GetExperimentResultsOutput,
37 crate::operation::get_experiment_results::GetExperimentResultsError,
38 > for GetExperimentResultsFluentBuilder
39{
40 fn send(
41 self,
42 config_override: crate::config::Builder,
43 ) -> crate::client::customize::internal::BoxFuture<
44 crate::client::customize::internal::SendResult<
45 crate::operation::get_experiment_results::GetExperimentResultsOutput,
46 crate::operation::get_experiment_results::GetExperimentResultsError,
47 >,
48 > {
49 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
50 }
51}
52impl GetExperimentResultsFluentBuilder {
53 /// Creates a new `GetExperimentResultsFluentBuilder`.
54 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
55 Self {
56 handle,
57 inner: ::std::default::Default::default(),
58 config_override: ::std::option::Option::None,
59 }
60 }
61 /// Access the GetExperimentResults as a reference.
62 pub fn as_input(&self) -> &crate::operation::get_experiment_results::builders::GetExperimentResultsInputBuilder {
63 &self.inner
64 }
65 /// Sends the request and returns the response.
66 ///
67 /// If an error occurs, an `SdkError` will be returned with additional details that
68 /// can be matched against.
69 ///
70 /// By default, any retryable failures will be retried twice. Retry behavior
71 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
72 /// set when configuring the client.
73 pub async fn send(
74 self,
75 ) -> ::std::result::Result<
76 crate::operation::get_experiment_results::GetExperimentResultsOutput,
77 ::aws_smithy_runtime_api::client::result::SdkError<
78 crate::operation::get_experiment_results::GetExperimentResultsError,
79 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
80 >,
81 > {
82 let input = self
83 .inner
84 .build()
85 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
86 let runtime_plugins = crate::operation::get_experiment_results::GetExperimentResults::operation_runtime_plugins(
87 self.handle.runtime_plugins.clone(),
88 &self.handle.conf,
89 self.config_override,
90 );
91 crate::operation::get_experiment_results::GetExperimentResults::orchestrate(&runtime_plugins, input).await
92 }
93
94 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
95 pub fn customize(
96 self,
97 ) -> crate::client::customize::CustomizableOperation<
98 crate::operation::get_experiment_results::GetExperimentResultsOutput,
99 crate::operation::get_experiment_results::GetExperimentResultsError,
100 Self,
101 > {
102 crate::client::customize::CustomizableOperation::new(self)
103 }
104 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
105 self.set_config_override(::std::option::Option::Some(config_override.into()));
106 self
107 }
108
109 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
110 self.config_override = config_override;
111 self
112 }
113 /// <p>The name or ARN of the project that contains the experiment that you want to see the results of.</p>
114 pub fn project(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115 self.inner = self.inner.project(input.into());
116 self
117 }
118 /// <p>The name or ARN of the project that contains the experiment that you want to see the results of.</p>
119 pub fn set_project(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120 self.inner = self.inner.set_project(input);
121 self
122 }
123 /// <p>The name or ARN of the project that contains the experiment that you want to see the results of.</p>
124 pub fn get_project(&self) -> &::std::option::Option<::std::string::String> {
125 self.inner.get_project()
126 }
127 /// <p>The name of the experiment to retrieve the results of.</p>
128 pub fn experiment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129 self.inner = self.inner.experiment(input.into());
130 self
131 }
132 /// <p>The name of the experiment to retrieve the results of.</p>
133 pub fn set_experiment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134 self.inner = self.inner.set_experiment(input);
135 self
136 }
137 /// <p>The name of the experiment to retrieve the results of.</p>
138 pub fn get_experiment(&self) -> &::std::option::Option<::std::string::String> {
139 self.inner.get_experiment()
140 }
141 /// <p>The date and time that the experiment started.</p>
142 pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
143 self.inner = self.inner.start_time(input);
144 self
145 }
146 /// <p>The date and time that the experiment started.</p>
147 pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
148 self.inner = self.inner.set_start_time(input);
149 self
150 }
151 /// <p>The date and time that the experiment started.</p>
152 pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
153 self.inner.get_start_time()
154 }
155 /// <p>The date and time that the experiment ended, if it is completed. This must be no longer than 30 days after the experiment start time.</p>
156 pub fn end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
157 self.inner = self.inner.end_time(input);
158 self
159 }
160 /// <p>The date and time that the experiment ended, if it is completed. This must be no longer than 30 days after the experiment start time.</p>
161 pub fn set_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
162 self.inner = self.inner.set_end_time(input);
163 self
164 }
165 /// <p>The date and time that the experiment ended, if it is completed. This must be no longer than 30 days after the experiment start time.</p>
166 pub fn get_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
167 self.inner.get_end_time()
168 }
169 ///
170 /// Appends an item to `metricNames`.
171 ///
172 /// To override the contents of this collection use [`set_metric_names`](Self::set_metric_names).
173 ///
174 /// <p>The names of the experiment metrics that you want to see the results of.</p>
175 pub fn metric_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
176 self.inner = self.inner.metric_names(input.into());
177 self
178 }
179 /// <p>The names of the experiment metrics that you want to see the results of.</p>
180 pub fn set_metric_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
181 self.inner = self.inner.set_metric_names(input);
182 self
183 }
184 /// <p>The names of the experiment metrics that you want to see the results of.</p>
185 pub fn get_metric_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
186 self.inner.get_metric_names()
187 }
188 ///
189 /// Appends an item to `treatmentNames`.
190 ///
191 /// To override the contents of this collection use [`set_treatment_names`](Self::set_treatment_names).
192 ///
193 /// <p>The names of the experiment treatments that you want to see the results for.</p>
194 pub fn treatment_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
195 self.inner = self.inner.treatment_names(input.into());
196 self
197 }
198 /// <p>The names of the experiment treatments that you want to see the results for.</p>
199 pub fn set_treatment_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
200 self.inner = self.inner.set_treatment_names(input);
201 self
202 }
203 /// <p>The names of the experiment treatments that you want to see the results for.</p>
204 pub fn get_treatment_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
205 self.inner.get_treatment_names()
206 }
207 /// <p>The statistic used to calculate experiment results. Currently the only valid value is <code>mean</code>, which uses the mean of the collected values as the statistic.</p>
208 pub fn base_stat(mut self, input: crate::types::ExperimentBaseStat) -> Self {
209 self.inner = self.inner.base_stat(input);
210 self
211 }
212 /// <p>The statistic used to calculate experiment results. Currently the only valid value is <code>mean</code>, which uses the mean of the collected values as the statistic.</p>
213 pub fn set_base_stat(mut self, input: ::std::option::Option<crate::types::ExperimentBaseStat>) -> Self {
214 self.inner = self.inner.set_base_stat(input);
215 self
216 }
217 /// <p>The statistic used to calculate experiment results. Currently the only valid value is <code>mean</code>, which uses the mean of the collected values as the statistic.</p>
218 pub fn get_base_stat(&self) -> &::std::option::Option<crate::types::ExperimentBaseStat> {
219 self.inner.get_base_stat()
220 }
221 ///
222 /// Appends an item to `resultStats`.
223 ///
224 /// To override the contents of this collection use [`set_result_stats`](Self::set_result_stats).
225 ///
226 /// <p>The statistics that you want to see in the returned results.</p>
227 /// <ul>
228 /// <li>
229 /// <p><code>PValue</code> specifies to use p-values for the results. A p-value is used in hypothesis testing to measure how often you are willing to make a mistake in rejecting the null hypothesis. A general practice is to reject the null hypothesis and declare that the results are statistically significant when the p-value is less than 0.05.</p></li>
230 /// <li>
231 /// <p><code>ConfidenceInterval</code> specifies a confidence interval for the results. The confidence interval represents the range of values for the chosen metric that is likely to contain the true difference between the <code>baseStat</code> of a variation and the baseline. Evidently returns the 95% confidence interval.</p></li>
232 /// <li>
233 /// <p><code>TreatmentEffect</code> is the difference in the statistic specified by the <code>baseStat</code> parameter between each variation and the default variation.</p></li>
234 /// <li>
235 /// <p><code>BaseStat</code> returns the statistical values collected for the metric for each variation. The statistic uses the same statistic specified in the <code>baseStat</code> parameter. Therefore, if <code>baseStat</code> is <code>mean</code>, this returns the mean of the values collected for each variation.</p></li>
236 /// </ul>
237 pub fn result_stats(mut self, input: crate::types::ExperimentResultRequestType) -> Self {
238 self.inner = self.inner.result_stats(input);
239 self
240 }
241 /// <p>The statistics that you want to see in the returned results.</p>
242 /// <ul>
243 /// <li>
244 /// <p><code>PValue</code> specifies to use p-values for the results. A p-value is used in hypothesis testing to measure how often you are willing to make a mistake in rejecting the null hypothesis. A general practice is to reject the null hypothesis and declare that the results are statistically significant when the p-value is less than 0.05.</p></li>
245 /// <li>
246 /// <p><code>ConfidenceInterval</code> specifies a confidence interval for the results. The confidence interval represents the range of values for the chosen metric that is likely to contain the true difference between the <code>baseStat</code> of a variation and the baseline. Evidently returns the 95% confidence interval.</p></li>
247 /// <li>
248 /// <p><code>TreatmentEffect</code> is the difference in the statistic specified by the <code>baseStat</code> parameter between each variation and the default variation.</p></li>
249 /// <li>
250 /// <p><code>BaseStat</code> returns the statistical values collected for the metric for each variation. The statistic uses the same statistic specified in the <code>baseStat</code> parameter. Therefore, if <code>baseStat</code> is <code>mean</code>, this returns the mean of the values collected for each variation.</p></li>
251 /// </ul>
252 pub fn set_result_stats(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ExperimentResultRequestType>>) -> Self {
253 self.inner = self.inner.set_result_stats(input);
254 self
255 }
256 /// <p>The statistics that you want to see in the returned results.</p>
257 /// <ul>
258 /// <li>
259 /// <p><code>PValue</code> specifies to use p-values for the results. A p-value is used in hypothesis testing to measure how often you are willing to make a mistake in rejecting the null hypothesis. A general practice is to reject the null hypothesis and declare that the results are statistically significant when the p-value is less than 0.05.</p></li>
260 /// <li>
261 /// <p><code>ConfidenceInterval</code> specifies a confidence interval for the results. The confidence interval represents the range of values for the chosen metric that is likely to contain the true difference between the <code>baseStat</code> of a variation and the baseline. Evidently returns the 95% confidence interval.</p></li>
262 /// <li>
263 /// <p><code>TreatmentEffect</code> is the difference in the statistic specified by the <code>baseStat</code> parameter between each variation and the default variation.</p></li>
264 /// <li>
265 /// <p><code>BaseStat</code> returns the statistical values collected for the metric for each variation. The statistic uses the same statistic specified in the <code>baseStat</code> parameter. Therefore, if <code>baseStat</code> is <code>mean</code>, this returns the mean of the values collected for each variation.</p></li>
266 /// </ul>
267 pub fn get_result_stats(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ExperimentResultRequestType>> {
268 self.inner.get_result_stats()
269 }
270 ///
271 /// Appends an item to `reportNames`.
272 ///
273 /// To override the contents of this collection use [`set_report_names`](Self::set_report_names).
274 ///
275 /// <p>The names of the report types that you want to see. Currently, <code>BayesianInference</code> is the only valid value.</p>
276 pub fn report_names(mut self, input: crate::types::ExperimentReportName) -> Self {
277 self.inner = self.inner.report_names(input);
278 self
279 }
280 /// <p>The names of the report types that you want to see. Currently, <code>BayesianInference</code> is the only valid value.</p>
281 pub fn set_report_names(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ExperimentReportName>>) -> Self {
282 self.inner = self.inner.set_report_names(input);
283 self
284 }
285 /// <p>The names of the report types that you want to see. Currently, <code>BayesianInference</code> is the only valid value.</p>
286 pub fn get_report_names(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ExperimentReportName>> {
287 self.inner.get_report_names()
288 }
289 /// <p>In seconds, the amount of time to aggregate results together.</p>
290 pub fn period(mut self, input: i64) -> Self {
291 self.inner = self.inner.period(input);
292 self
293 }
294 /// <p>In seconds, the amount of time to aggregate results together.</p>
295 pub fn set_period(mut self, input: ::std::option::Option<i64>) -> Self {
296 self.inner = self.inner.set_period(input);
297 self
298 }
299 /// <p>In seconds, the amount of time to aggregate results together.</p>
300 pub fn get_period(&self) -> &::std::option::Option<i64> {
301 self.inner.get_period()
302 }
303}