aws_sdk_evidently/operation/start_experiment/
_start_experiment_input.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 StartExperimentInput {
6    /// <p>The name or ARN of the project that contains the experiment to start.</p>
7    pub project: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the experiment to start.</p>
9    pub experiment: ::std::option::Option<::std::string::String>,
10    /// <p>The date and time to end the experiment. This must be no more than 30 days after the experiment starts.</p>
11    pub analysis_complete_time: ::std::option::Option<::aws_smithy_types::DateTime>,
12}
13impl StartExperimentInput {
14    /// <p>The name or ARN of the project that contains the experiment to start.</p>
15    pub fn project(&self) -> ::std::option::Option<&str> {
16        self.project.as_deref()
17    }
18    /// <p>The name of the experiment to start.</p>
19    pub fn experiment(&self) -> ::std::option::Option<&str> {
20        self.experiment.as_deref()
21    }
22    /// <p>The date and time to end the experiment. This must be no more than 30 days after the experiment starts.</p>
23    pub fn analysis_complete_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
24        self.analysis_complete_time.as_ref()
25    }
26}
27impl StartExperimentInput {
28    /// Creates a new builder-style object to manufacture [`StartExperimentInput`](crate::operation::start_experiment::StartExperimentInput).
29    pub fn builder() -> crate::operation::start_experiment::builders::StartExperimentInputBuilder {
30        crate::operation::start_experiment::builders::StartExperimentInputBuilder::default()
31    }
32}
33
34/// A builder for [`StartExperimentInput`](crate::operation::start_experiment::StartExperimentInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct StartExperimentInputBuilder {
38    pub(crate) project: ::std::option::Option<::std::string::String>,
39    pub(crate) experiment: ::std::option::Option<::std::string::String>,
40    pub(crate) analysis_complete_time: ::std::option::Option<::aws_smithy_types::DateTime>,
41}
42impl StartExperimentInputBuilder {
43    /// <p>The name or ARN of the project that contains the experiment to start.</p>
44    /// This field is required.
45    pub fn project(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.project = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>The name or ARN of the project that contains the experiment to start.</p>
50    pub fn set_project(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.project = input;
52        self
53    }
54    /// <p>The name or ARN of the project that contains the experiment to start.</p>
55    pub fn get_project(&self) -> &::std::option::Option<::std::string::String> {
56        &self.project
57    }
58    /// <p>The name of the experiment to start.</p>
59    /// This field is required.
60    pub fn experiment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.experiment = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>The name of the experiment to start.</p>
65    pub fn set_experiment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.experiment = input;
67        self
68    }
69    /// <p>The name of the experiment to start.</p>
70    pub fn get_experiment(&self) -> &::std::option::Option<::std::string::String> {
71        &self.experiment
72    }
73    /// <p>The date and time to end the experiment. This must be no more than 30 days after the experiment starts.</p>
74    /// This field is required.
75    pub fn analysis_complete_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
76        self.analysis_complete_time = ::std::option::Option::Some(input);
77        self
78    }
79    /// <p>The date and time to end the experiment. This must be no more than 30 days after the experiment starts.</p>
80    pub fn set_analysis_complete_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
81        self.analysis_complete_time = input;
82        self
83    }
84    /// <p>The date and time to end the experiment. This must be no more than 30 days after the experiment starts.</p>
85    pub fn get_analysis_complete_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
86        &self.analysis_complete_time
87    }
88    /// Consumes the builder and constructs a [`StartExperimentInput`](crate::operation::start_experiment::StartExperimentInput).
89    pub fn build(
90        self,
91    ) -> ::std::result::Result<crate::operation::start_experiment::StartExperimentInput, ::aws_smithy_types::error::operation::BuildError> {
92        ::std::result::Result::Ok(crate::operation::start_experiment::StartExperimentInput {
93            project: self.project,
94            experiment: self.experiment,
95            analysis_complete_time: self.analysis_complete_time,
96        })
97    }
98}