#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StopExperimentInput {
pub project: ::std::option::Option<::std::string::String>,
pub experiment: ::std::option::Option<::std::string::String>,
pub desired_state: ::std::option::Option<crate::types::ExperimentStopDesiredState>,
pub reason: ::std::option::Option<::std::string::String>,
}
impl StopExperimentInput {
pub fn project(&self) -> ::std::option::Option<&str> {
self.project.as_deref()
}
pub fn experiment(&self) -> ::std::option::Option<&str> {
self.experiment.as_deref()
}
pub fn desired_state(&self) -> ::std::option::Option<&crate::types::ExperimentStopDesiredState> {
self.desired_state.as_ref()
}
pub fn reason(&self) -> ::std::option::Option<&str> {
self.reason.as_deref()
}
}
impl StopExperimentInput {
pub fn builder() -> crate::operation::stop_experiment::builders::StopExperimentInputBuilder {
crate::operation::stop_experiment::builders::StopExperimentInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StopExperimentInputBuilder {
pub(crate) project: ::std::option::Option<::std::string::String>,
pub(crate) experiment: ::std::option::Option<::std::string::String>,
pub(crate) desired_state: ::std::option::Option<crate::types::ExperimentStopDesiredState>,
pub(crate) reason: ::std::option::Option<::std::string::String>,
}
impl StopExperimentInputBuilder {
pub fn project(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.project = ::std::option::Option::Some(input.into());
self
}
pub fn set_project(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.project = input;
self
}
pub fn get_project(&self) -> &::std::option::Option<::std::string::String> {
&self.project
}
pub fn experiment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.experiment = ::std::option::Option::Some(input.into());
self
}
pub fn set_experiment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.experiment = input;
self
}
pub fn get_experiment(&self) -> &::std::option::Option<::std::string::String> {
&self.experiment
}
pub fn desired_state(mut self, input: crate::types::ExperimentStopDesiredState) -> Self {
self.desired_state = ::std::option::Option::Some(input);
self
}
pub fn set_desired_state(mut self, input: ::std::option::Option<crate::types::ExperimentStopDesiredState>) -> Self {
self.desired_state = input;
self
}
pub fn get_desired_state(&self) -> &::std::option::Option<crate::types::ExperimentStopDesiredState> {
&self.desired_state
}
pub fn reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.reason = ::std::option::Option::Some(input.into());
self
}
pub fn set_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.reason = input;
self
}
pub fn get_reason(&self) -> &::std::option::Option<::std::string::String> {
&self.reason
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::stop_experiment::StopExperimentInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::stop_experiment::StopExperimentInput {
project: self.project,
experiment: self.experiment,
desired_state: self.desired_state,
reason: self.reason,
})
}
}