aws_sdk_evidently/operation/stop_launch/
_stop_launch_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct StopLaunchInput {
6 pub project: ::std::option::Option<::std::string::String>,
8 pub launch: ::std::option::Option<::std::string::String>,
10 pub desired_state: ::std::option::Option<crate::types::LaunchStopDesiredState>,
12 pub reason: ::std::option::Option<::std::string::String>,
14}
15impl StopLaunchInput {
16 pub fn project(&self) -> ::std::option::Option<&str> {
18 self.project.as_deref()
19 }
20 pub fn launch(&self) -> ::std::option::Option<&str> {
22 self.launch.as_deref()
23 }
24 pub fn desired_state(&self) -> ::std::option::Option<&crate::types::LaunchStopDesiredState> {
26 self.desired_state.as_ref()
27 }
28 pub fn reason(&self) -> ::std::option::Option<&str> {
30 self.reason.as_deref()
31 }
32}
33impl StopLaunchInput {
34 pub fn builder() -> crate::operation::stop_launch::builders::StopLaunchInputBuilder {
36 crate::operation::stop_launch::builders::StopLaunchInputBuilder::default()
37 }
38}
39
40#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct StopLaunchInputBuilder {
44 pub(crate) project: ::std::option::Option<::std::string::String>,
45 pub(crate) launch: ::std::option::Option<::std::string::String>,
46 pub(crate) desired_state: ::std::option::Option<crate::types::LaunchStopDesiredState>,
47 pub(crate) reason: ::std::option::Option<::std::string::String>,
48}
49impl StopLaunchInputBuilder {
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 launch(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68 self.launch = ::std::option::Option::Some(input.into());
69 self
70 }
71 pub fn set_launch(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73 self.launch = input;
74 self
75 }
76 pub fn get_launch(&self) -> &::std::option::Option<::std::string::String> {
78 &self.launch
79 }
80 pub fn desired_state(mut self, input: crate::types::LaunchStopDesiredState) -> 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::LaunchStopDesiredState>) -> Self {
87 self.desired_state = input;
88 self
89 }
90 pub fn get_desired_state(&self) -> &::std::option::Option<crate::types::LaunchStopDesiredState> {
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(self) -> ::std::result::Result<crate::operation::stop_launch::StopLaunchInput, ::aws_smithy_types::error::operation::BuildError> {
110 ::std::result::Result::Ok(crate::operation::stop_launch::StopLaunchInput {
111 project: self.project,
112 launch: self.launch,
113 desired_state: self.desired_state,
114 reason: self.reason,
115 })
116 }
117}