aws_sdk_evidently/operation/stop_experiment/
_stop_experiment_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct StopExperimentInput {
6 pub project: ::std::option::Option<::std::string::String>,
8 pub experiment: ::std::option::Option<::std::string::String>,
10 pub desired_state: ::std::option::Option<crate::types::ExperimentStopDesiredState>,
12 pub reason: ::std::option::Option<::std::string::String>,
14}
15impl StopExperimentInput {
16 pub fn project(&self) -> ::std::option::Option<&str> {
18 self.project.as_deref()
19 }
20 pub fn experiment(&self) -> ::std::option::Option<&str> {
22 self.experiment.as_deref()
23 }
24 pub fn desired_state(&self) -> ::std::option::Option<&crate::types::ExperimentStopDesiredState> {
26 self.desired_state.as_ref()
27 }
28 pub fn reason(&self) -> ::std::option::Option<&str> {
30 self.reason.as_deref()
31 }
32}
33impl StopExperimentInput {
34 pub fn builder() -> crate::operation::stop_experiment::builders::StopExperimentInputBuilder {
36 crate::operation::stop_experiment::builders::StopExperimentInputBuilder::default()
37 }
38}
39
40#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct StopExperimentInputBuilder {
44 pub(crate) project: ::std::option::Option<::std::string::String>,
45 pub(crate) experiment: ::std::option::Option<::std::string::String>,
46 pub(crate) desired_state: ::std::option::Option<crate::types::ExperimentStopDesiredState>,
47 pub(crate) reason: ::std::option::Option<::std::string::String>,
48}
49impl StopExperimentInputBuilder {
50 pub fn project(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.project = ::std::option::Option::Some(input.into());
54 self
55 }
56 pub fn set_project(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.project = input;
59 self
60 }
61 pub fn get_project(&self) -> &::std::option::Option<::std::string::String> {
63 &self.project
64 }
65 pub fn experiment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68 self.experiment = ::std::option::Option::Some(input.into());
69 self
70 }
71 pub fn set_experiment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73 self.experiment = input;
74 self
75 }
76 pub fn get_experiment(&self) -> &::std::option::Option<::std::string::String> {
78 &self.experiment
79 }
80 pub fn desired_state(mut self, input: crate::types::ExperimentStopDesiredState) -> Self {
82 self.desired_state = ::std::option::Option::Some(input);
83 self
84 }
85 pub fn set_desired_state(mut self, input: ::std::option::Option<crate::types::ExperimentStopDesiredState>) -> Self {
87 self.desired_state = input;
88 self
89 }
90 pub fn get_desired_state(&self) -> &::std::option::Option<crate::types::ExperimentStopDesiredState> {
92 &self.desired_state
93 }
94 pub fn reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96 self.reason = ::std::option::Option::Some(input.into());
97 self
98 }
99 pub fn set_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101 self.reason = input;
102 self
103 }
104 pub fn get_reason(&self) -> &::std::option::Option<::std::string::String> {
106 &self.reason
107 }
108 pub fn build(
110 self,
111 ) -> ::std::result::Result<crate::operation::stop_experiment::StopExperimentInput, ::aws_smithy_types::error::operation::BuildError> {
112 ::std::result::Result::Ok(crate::operation::stop_experiment::StopExperimentInput {
113 project: self.project,
114 experiment: self.experiment,
115 desired_state: self.desired_state,
116 reason: self.reason,
117 })
118 }
119}