aws_sdk_lightsail/types/_add_on.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Describes an add-on that is enabled for an Amazon Lightsail resource.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct AddOn {
7 /// <p>The name of the add-on.</p>
8 pub name: ::std::option::Option<::std::string::String>,
9 /// <p>The status of the add-on.</p>
10 pub status: ::std::option::Option<::std::string::String>,
11 /// <p>The daily time when an automatic snapshot is created.</p>
12 /// <p>The time shown is in <code>HH:00</code> format, and in Coordinated Universal Time (UTC).</p>
13 /// <p>The snapshot is automatically created between the time shown and up to 45 minutes after.</p>
14 pub snapshot_time_of_day: ::std::option::Option<::std::string::String>,
15 /// <p>The next daily time an automatic snapshot will be created.</p>
16 /// <p>The time shown is in <code>HH:00</code> format, and in Coordinated Universal Time (UTC).</p>
17 /// <p>The snapshot is automatically created between the time shown and up to 45 minutes after.</p>
18 pub next_snapshot_time_of_day: ::std::option::Option<::std::string::String>,
19 /// <p>The trigger threshold of the action.</p><important>
20 /// <p>This add-on only applies to Lightsail for Research resources.</p>
21 /// </important>
22 pub threshold: ::std::option::Option<::std::string::String>,
23 /// <p>The amount of idle time in minutes after which your virtual computer will automatically stop.</p><important>
24 /// <p>This add-on only applies to Lightsail for Research resources.</p>
25 /// </important>
26 pub duration: ::std::option::Option<::std::string::String>,
27}
28impl AddOn {
29 /// <p>The name of the add-on.</p>
30 pub fn name(&self) -> ::std::option::Option<&str> {
31 self.name.as_deref()
32 }
33 /// <p>The status of the add-on.</p>
34 pub fn status(&self) -> ::std::option::Option<&str> {
35 self.status.as_deref()
36 }
37 /// <p>The daily time when an automatic snapshot is created.</p>
38 /// <p>The time shown is in <code>HH:00</code> format, and in Coordinated Universal Time (UTC).</p>
39 /// <p>The snapshot is automatically created between the time shown and up to 45 minutes after.</p>
40 pub fn snapshot_time_of_day(&self) -> ::std::option::Option<&str> {
41 self.snapshot_time_of_day.as_deref()
42 }
43 /// <p>The next daily time an automatic snapshot will be created.</p>
44 /// <p>The time shown is in <code>HH:00</code> format, and in Coordinated Universal Time (UTC).</p>
45 /// <p>The snapshot is automatically created between the time shown and up to 45 minutes after.</p>
46 pub fn next_snapshot_time_of_day(&self) -> ::std::option::Option<&str> {
47 self.next_snapshot_time_of_day.as_deref()
48 }
49 /// <p>The trigger threshold of the action.</p><important>
50 /// <p>This add-on only applies to Lightsail for Research resources.</p>
51 /// </important>
52 pub fn threshold(&self) -> ::std::option::Option<&str> {
53 self.threshold.as_deref()
54 }
55 /// <p>The amount of idle time in minutes after which your virtual computer will automatically stop.</p><important>
56 /// <p>This add-on only applies to Lightsail for Research resources.</p>
57 /// </important>
58 pub fn duration(&self) -> ::std::option::Option<&str> {
59 self.duration.as_deref()
60 }
61}
62impl AddOn {
63 /// Creates a new builder-style object to manufacture [`AddOn`](crate::types::AddOn).
64 pub fn builder() -> crate::types::builders::AddOnBuilder {
65 crate::types::builders::AddOnBuilder::default()
66 }
67}
68
69/// A builder for [`AddOn`](crate::types::AddOn).
70#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
71#[non_exhaustive]
72pub struct AddOnBuilder {
73 pub(crate) name: ::std::option::Option<::std::string::String>,
74 pub(crate) status: ::std::option::Option<::std::string::String>,
75 pub(crate) snapshot_time_of_day: ::std::option::Option<::std::string::String>,
76 pub(crate) next_snapshot_time_of_day: ::std::option::Option<::std::string::String>,
77 pub(crate) threshold: ::std::option::Option<::std::string::String>,
78 pub(crate) duration: ::std::option::Option<::std::string::String>,
79}
80impl AddOnBuilder {
81 /// <p>The name of the add-on.</p>
82 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83 self.name = ::std::option::Option::Some(input.into());
84 self
85 }
86 /// <p>The name of the add-on.</p>
87 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88 self.name = input;
89 self
90 }
91 /// <p>The name of the add-on.</p>
92 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
93 &self.name
94 }
95 /// <p>The status of the add-on.</p>
96 pub fn status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
97 self.status = ::std::option::Option::Some(input.into());
98 self
99 }
100 /// <p>The status of the add-on.</p>
101 pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
102 self.status = input;
103 self
104 }
105 /// <p>The status of the add-on.</p>
106 pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
107 &self.status
108 }
109 /// <p>The daily time when an automatic snapshot is created.</p>
110 /// <p>The time shown is in <code>HH:00</code> format, and in Coordinated Universal Time (UTC).</p>
111 /// <p>The snapshot is automatically created between the time shown and up to 45 minutes after.</p>
112 pub fn snapshot_time_of_day(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113 self.snapshot_time_of_day = ::std::option::Option::Some(input.into());
114 self
115 }
116 /// <p>The daily time when an automatic snapshot is created.</p>
117 /// <p>The time shown is in <code>HH:00</code> format, and in Coordinated Universal Time (UTC).</p>
118 /// <p>The snapshot is automatically created between the time shown and up to 45 minutes after.</p>
119 pub fn set_snapshot_time_of_day(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120 self.snapshot_time_of_day = input;
121 self
122 }
123 /// <p>The daily time when an automatic snapshot is created.</p>
124 /// <p>The time shown is in <code>HH:00</code> format, and in Coordinated Universal Time (UTC).</p>
125 /// <p>The snapshot is automatically created between the time shown and up to 45 minutes after.</p>
126 pub fn get_snapshot_time_of_day(&self) -> &::std::option::Option<::std::string::String> {
127 &self.snapshot_time_of_day
128 }
129 /// <p>The next daily time an automatic snapshot will be created.</p>
130 /// <p>The time shown is in <code>HH:00</code> format, and in Coordinated Universal Time (UTC).</p>
131 /// <p>The snapshot is automatically created between the time shown and up to 45 minutes after.</p>
132 pub fn next_snapshot_time_of_day(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
133 self.next_snapshot_time_of_day = ::std::option::Option::Some(input.into());
134 self
135 }
136 /// <p>The next daily time an automatic snapshot will be created.</p>
137 /// <p>The time shown is in <code>HH:00</code> format, and in Coordinated Universal Time (UTC).</p>
138 /// <p>The snapshot is automatically created between the time shown and up to 45 minutes after.</p>
139 pub fn set_next_snapshot_time_of_day(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
140 self.next_snapshot_time_of_day = input;
141 self
142 }
143 /// <p>The next daily time an automatic snapshot will be created.</p>
144 /// <p>The time shown is in <code>HH:00</code> format, and in Coordinated Universal Time (UTC).</p>
145 /// <p>The snapshot is automatically created between the time shown and up to 45 minutes after.</p>
146 pub fn get_next_snapshot_time_of_day(&self) -> &::std::option::Option<::std::string::String> {
147 &self.next_snapshot_time_of_day
148 }
149 /// <p>The trigger threshold of the action.</p><important>
150 /// <p>This add-on only applies to Lightsail for Research resources.</p>
151 /// </important>
152 pub fn threshold(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
153 self.threshold = ::std::option::Option::Some(input.into());
154 self
155 }
156 /// <p>The trigger threshold of the action.</p><important>
157 /// <p>This add-on only applies to Lightsail for Research resources.</p>
158 /// </important>
159 pub fn set_threshold(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
160 self.threshold = input;
161 self
162 }
163 /// <p>The trigger threshold of the action.</p><important>
164 /// <p>This add-on only applies to Lightsail for Research resources.</p>
165 /// </important>
166 pub fn get_threshold(&self) -> &::std::option::Option<::std::string::String> {
167 &self.threshold
168 }
169 /// <p>The amount of idle time in minutes after which your virtual computer will automatically stop.</p><important>
170 /// <p>This add-on only applies to Lightsail for Research resources.</p>
171 /// </important>
172 pub fn duration(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
173 self.duration = ::std::option::Option::Some(input.into());
174 self
175 }
176 /// <p>The amount of idle time in minutes after which your virtual computer will automatically stop.</p><important>
177 /// <p>This add-on only applies to Lightsail for Research resources.</p>
178 /// </important>
179 pub fn set_duration(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
180 self.duration = input;
181 self
182 }
183 /// <p>The amount of idle time in minutes after which your virtual computer will automatically stop.</p><important>
184 /// <p>This add-on only applies to Lightsail for Research resources.</p>
185 /// </important>
186 pub fn get_duration(&self) -> &::std::option::Option<::std::string::String> {
187 &self.duration
188 }
189 /// Consumes the builder and constructs a [`AddOn`](crate::types::AddOn).
190 pub fn build(self) -> crate::types::AddOn {
191 crate::types::AddOn {
192 name: self.name,
193 status: self.status,
194 snapshot_time_of_day: self.snapshot_time_of_day,
195 next_snapshot_time_of_day: self.next_snapshot_time_of_day,
196 threshold: self.threshold,
197 duration: self.duration,
198 }
199 }
200}