1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StopInstanceInput {
/// <p>The name of the instance (a virtual private server) to stop.</p>
pub instance_name: ::std::option::Option<::std::string::String>,
/// <p>When set to <code>True</code>, forces a Lightsail instance that is stuck in a <code>stopping</code> state to stop.</p><important>
/// <p>Only use the <code>force</code> parameter if your instance is stuck in the <code>stopping</code> state. In any other state, your instance should stop normally without adding this parameter to your API request.</p>
/// </important>
pub force: ::std::option::Option<bool>,
}
impl StopInstanceInput {
/// <p>The name of the instance (a virtual private server) to stop.</p>
pub fn instance_name(&self) -> ::std::option::Option<&str> {
self.instance_name.as_deref()
}
/// <p>When set to <code>True</code>, forces a Lightsail instance that is stuck in a <code>stopping</code> state to stop.</p><important>
/// <p>Only use the <code>force</code> parameter if your instance is stuck in the <code>stopping</code> state. In any other state, your instance should stop normally without adding this parameter to your API request.</p>
/// </important>
pub fn force(&self) -> ::std::option::Option<bool> {
self.force
}
}
impl StopInstanceInput {
/// Creates a new builder-style object to manufacture [`StopInstanceInput`](crate::operation::stop_instance::StopInstanceInput).
pub fn builder() -> crate::operation::stop_instance::builders::StopInstanceInputBuilder {
crate::operation::stop_instance::builders::StopInstanceInputBuilder::default()
}
}
/// A builder for [`StopInstanceInput`](crate::operation::stop_instance::StopInstanceInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StopInstanceInputBuilder {
pub(crate) instance_name: ::std::option::Option<::std::string::String>,
pub(crate) force: ::std::option::Option<bool>,
}
impl StopInstanceInputBuilder {
/// <p>The name of the instance (a virtual private server) to stop.</p>
/// This field is required.
pub fn instance_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.instance_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the instance (a virtual private server) to stop.</p>
pub fn set_instance_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.instance_name = input;
self
}
/// <p>The name of the instance (a virtual private server) to stop.</p>
pub fn get_instance_name(&self) -> &::std::option::Option<::std::string::String> {
&self.instance_name
}
/// <p>When set to <code>True</code>, forces a Lightsail instance that is stuck in a <code>stopping</code> state to stop.</p><important>
/// <p>Only use the <code>force</code> parameter if your instance is stuck in the <code>stopping</code> state. In any other state, your instance should stop normally without adding this parameter to your API request.</p>
/// </important>
pub fn force(mut self, input: bool) -> Self {
self.force = ::std::option::Option::Some(input);
self
}
/// <p>When set to <code>True</code>, forces a Lightsail instance that is stuck in a <code>stopping</code> state to stop.</p><important>
/// <p>Only use the <code>force</code> parameter if your instance is stuck in the <code>stopping</code> state. In any other state, your instance should stop normally without adding this parameter to your API request.</p>
/// </important>
pub fn set_force(mut self, input: ::std::option::Option<bool>) -> Self {
self.force = input;
self
}
/// <p>When set to <code>True</code>, forces a Lightsail instance that is stuck in a <code>stopping</code> state to stop.</p><important>
/// <p>Only use the <code>force</code> parameter if your instance is stuck in the <code>stopping</code> state. In any other state, your instance should stop normally without adding this parameter to your API request.</p>
/// </important>
pub fn get_force(&self) -> &::std::option::Option<bool> {
&self.force
}
/// Consumes the builder and constructs a [`StopInstanceInput`](crate::operation::stop_instance::StopInstanceInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::stop_instance::StopInstanceInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::stop_instance::StopInstanceInput {
instance_name: self.instance_name,
force: self.force,
})
}
}