#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StopLaunchInput {
pub project: ::std::option::Option<::std::string::String>,
pub launch: ::std::option::Option<::std::string::String>,
pub desired_state: ::std::option::Option<crate::types::LaunchStopDesiredState>,
pub reason: ::std::option::Option<::std::string::String>,
}
impl StopLaunchInput {
pub fn project(&self) -> ::std::option::Option<&str> {
self.project.as_deref()
}
pub fn launch(&self) -> ::std::option::Option<&str> {
self.launch.as_deref()
}
pub fn desired_state(&self) -> ::std::option::Option<&crate::types::LaunchStopDesiredState> {
self.desired_state.as_ref()
}
pub fn reason(&self) -> ::std::option::Option<&str> {
self.reason.as_deref()
}
}
impl StopLaunchInput {
pub fn builder() -> crate::operation::stop_launch::builders::StopLaunchInputBuilder {
crate::operation::stop_launch::builders::StopLaunchInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StopLaunchInputBuilder {
pub(crate) project: ::std::option::Option<::std::string::String>,
pub(crate) launch: ::std::option::Option<::std::string::String>,
pub(crate) desired_state: ::std::option::Option<crate::types::LaunchStopDesiredState>,
pub(crate) reason: ::std::option::Option<::std::string::String>,
}
impl StopLaunchInputBuilder {
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 launch(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.launch = ::std::option::Option::Some(input.into());
self
}
pub fn set_launch(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.launch = input;
self
}
pub fn get_launch(&self) -> &::std::option::Option<::std::string::String> {
&self.launch
}
pub fn desired_state(mut self, input: crate::types::LaunchStopDesiredState) -> Self {
self.desired_state = ::std::option::Option::Some(input);
self
}
pub fn set_desired_state(mut self, input: ::std::option::Option<crate::types::LaunchStopDesiredState>) -> Self {
self.desired_state = input;
self
}
pub fn get_desired_state(&self) -> &::std::option::Option<crate::types::LaunchStopDesiredState> {
&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_launch::StopLaunchInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::stop_launch::StopLaunchInput {
project: self.project,
launch: self.launch,
desired_state: self.desired_state,
reason: self.reason,
})
}
}