aws_sdk_evidently/operation/stop_launch/
_stop_launch_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 StopLaunchInput {
6    /// <p>The name or ARN of the project that contains the launch that you want to stop.</p>
7    pub project: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the launch to stop.</p>
9    pub launch: ::std::option::Option<::std::string::String>,
10    /// <p>Specify whether to consider the launch as <code>COMPLETED</code> or <code>CANCELLED</code> after it stops.</p>
11    pub desired_state: ::std::option::Option<crate::types::LaunchStopDesiredState>,
12    /// <p>A string that describes why you are stopping the launch.</p>
13    pub reason: ::std::option::Option<::std::string::String>,
14}
15impl StopLaunchInput {
16    /// <p>The name or ARN of the project that contains the launch that you want to stop.</p>
17    pub fn project(&self) -> ::std::option::Option<&str> {
18        self.project.as_deref()
19    }
20    /// <p>The name of the launch to stop.</p>
21    pub fn launch(&self) -> ::std::option::Option<&str> {
22        self.launch.as_deref()
23    }
24    /// <p>Specify whether to consider the launch as <code>COMPLETED</code> or <code>CANCELLED</code> after it stops.</p>
25    pub fn desired_state(&self) -> ::std::option::Option<&crate::types::LaunchStopDesiredState> {
26        self.desired_state.as_ref()
27    }
28    /// <p>A string that describes why you are stopping the launch.</p>
29    pub fn reason(&self) -> ::std::option::Option<&str> {
30        self.reason.as_deref()
31    }
32}
33impl StopLaunchInput {
34    /// Creates a new builder-style object to manufacture [`StopLaunchInput`](crate::operation::stop_launch::StopLaunchInput).
35    pub fn builder() -> crate::operation::stop_launch::builders::StopLaunchInputBuilder {
36        crate::operation::stop_launch::builders::StopLaunchInputBuilder::default()
37    }
38}
39
40/// A builder for [`StopLaunchInput`](crate::operation::stop_launch::StopLaunchInput).
41#[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    /// <p>The name or ARN of the project that contains the launch that you want to stop.</p>
51    /// This field is required.
52    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    /// <p>The name or ARN of the project that contains the launch that you want to stop.</p>
57    pub fn set_project(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.project = input;
59        self
60    }
61    /// <p>The name or ARN of the project that contains the launch that you want to stop.</p>
62    pub fn get_project(&self) -> &::std::option::Option<::std::string::String> {
63        &self.project
64    }
65    /// <p>The name of the launch to stop.</p>
66    /// This field is required.
67    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    /// <p>The name of the launch to stop.</p>
72    pub fn set_launch(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73        self.launch = input;
74        self
75    }
76    /// <p>The name of the launch to stop.</p>
77    pub fn get_launch(&self) -> &::std::option::Option<::std::string::String> {
78        &self.launch
79    }
80    /// <p>Specify whether to consider the launch as <code>COMPLETED</code> or <code>CANCELLED</code> after it stops.</p>
81    pub fn desired_state(mut self, input: crate::types::LaunchStopDesiredState) -> Self {
82        self.desired_state = ::std::option::Option::Some(input);
83        self
84    }
85    /// <p>Specify whether to consider the launch as <code>COMPLETED</code> or <code>CANCELLED</code> after it stops.</p>
86    pub fn set_desired_state(mut self, input: ::std::option::Option<crate::types::LaunchStopDesiredState>) -> Self {
87        self.desired_state = input;
88        self
89    }
90    /// <p>Specify whether to consider the launch as <code>COMPLETED</code> or <code>CANCELLED</code> after it stops.</p>
91    pub fn get_desired_state(&self) -> &::std::option::Option<crate::types::LaunchStopDesiredState> {
92        &self.desired_state
93    }
94    /// <p>A string that describes why you are stopping the launch.</p>
95    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    /// <p>A string that describes why you are stopping the launch.</p>
100    pub fn set_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101        self.reason = input;
102        self
103    }
104    /// <p>A string that describes why you are stopping the launch.</p>
105    pub fn get_reason(&self) -> &::std::option::Option<::std::string::String> {
106        &self.reason
107    }
108    /// Consumes the builder and constructs a [`StopLaunchInput`](crate::operation::stop_launch::StopLaunchInput).
109    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}