aws_sdk_backupexternal/operation/get_node/
_get_node_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetNodeOutput {
6 pub appliance_arn: ::std::string::String,
8 pub node_arn: ::std::string::String,
10 pub ip_address: ::std::string::String,
12 pub environment_type: crate::types::ApplianceEnvironmentType,
14 pub node_management_status: crate::types::NodeManagementStatus,
16 pub health_status: ::std::option::Option<crate::types::NodeHealthStatus>,
18 pub notifications: ::std::option::Option<::std::vec::Vec<crate::types::Notification>>,
20 pub created_at: ::aws_smithy_types::DateTime,
22 pub deleted_at: ::std::option::Option<::aws_smithy_types::DateTime>,
24 pub software_version: ::std::option::Option<::std::string::String>,
26 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
28 _request_id: Option<String>,
29}
30impl GetNodeOutput {
31 pub fn appliance_arn(&self) -> &str {
33 use std::ops::Deref;
34 self.appliance_arn.deref()
35 }
36 pub fn node_arn(&self) -> &str {
38 use std::ops::Deref;
39 self.node_arn.deref()
40 }
41 pub fn ip_address(&self) -> &str {
43 use std::ops::Deref;
44 self.ip_address.deref()
45 }
46 pub fn environment_type(&self) -> &crate::types::ApplianceEnvironmentType {
48 &self.environment_type
49 }
50 pub fn node_management_status(&self) -> &crate::types::NodeManagementStatus {
52 &self.node_management_status
53 }
54 pub fn health_status(&self) -> ::std::option::Option<&crate::types::NodeHealthStatus> {
56 self.health_status.as_ref()
57 }
58 pub fn notifications(&self) -> &[crate::types::Notification] {
62 self.notifications.as_deref().unwrap_or_default()
63 }
64 pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
66 &self.created_at
67 }
68 pub fn deleted_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
70 self.deleted_at.as_ref()
71 }
72 pub fn software_version(&self) -> ::std::option::Option<&str> {
74 self.software_version.as_deref()
75 }
76 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
78 self.tags.as_ref()
79 }
80}
81impl ::aws_types::request_id::RequestId for GetNodeOutput {
82 fn request_id(&self) -> Option<&str> {
83 self._request_id.as_deref()
84 }
85}
86impl GetNodeOutput {
87 pub fn builder() -> crate::operation::get_node::builders::GetNodeOutputBuilder {
89 crate::operation::get_node::builders::GetNodeOutputBuilder::default()
90 }
91}
92
93#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
95#[non_exhaustive]
96pub struct GetNodeOutputBuilder {
97 pub(crate) appliance_arn: ::std::option::Option<::std::string::String>,
98 pub(crate) node_arn: ::std::option::Option<::std::string::String>,
99 pub(crate) ip_address: ::std::option::Option<::std::string::String>,
100 pub(crate) environment_type: ::std::option::Option<crate::types::ApplianceEnvironmentType>,
101 pub(crate) node_management_status: ::std::option::Option<crate::types::NodeManagementStatus>,
102 pub(crate) health_status: ::std::option::Option<crate::types::NodeHealthStatus>,
103 pub(crate) notifications: ::std::option::Option<::std::vec::Vec<crate::types::Notification>>,
104 pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
105 pub(crate) deleted_at: ::std::option::Option<::aws_smithy_types::DateTime>,
106 pub(crate) software_version: ::std::option::Option<::std::string::String>,
107 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
108 _request_id: Option<String>,
109}
110impl GetNodeOutputBuilder {
111 pub fn appliance_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114 self.appliance_arn = ::std::option::Option::Some(input.into());
115 self
116 }
117 pub fn set_appliance_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119 self.appliance_arn = input;
120 self
121 }
122 pub fn get_appliance_arn(&self) -> &::std::option::Option<::std::string::String> {
124 &self.appliance_arn
125 }
126 pub fn node_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129 self.node_arn = ::std::option::Option::Some(input.into());
130 self
131 }
132 pub fn set_node_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134 self.node_arn = input;
135 self
136 }
137 pub fn get_node_arn(&self) -> &::std::option::Option<::std::string::String> {
139 &self.node_arn
140 }
141 pub fn ip_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
144 self.ip_address = ::std::option::Option::Some(input.into());
145 self
146 }
147 pub fn set_ip_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
149 self.ip_address = input;
150 self
151 }
152 pub fn get_ip_address(&self) -> &::std::option::Option<::std::string::String> {
154 &self.ip_address
155 }
156 pub fn environment_type(mut self, input: crate::types::ApplianceEnvironmentType) -> Self {
159 self.environment_type = ::std::option::Option::Some(input);
160 self
161 }
162 pub fn set_environment_type(mut self, input: ::std::option::Option<crate::types::ApplianceEnvironmentType>) -> Self {
164 self.environment_type = input;
165 self
166 }
167 pub fn get_environment_type(&self) -> &::std::option::Option<crate::types::ApplianceEnvironmentType> {
169 &self.environment_type
170 }
171 pub fn node_management_status(mut self, input: crate::types::NodeManagementStatus) -> Self {
174 self.node_management_status = ::std::option::Option::Some(input);
175 self
176 }
177 pub fn set_node_management_status(mut self, input: ::std::option::Option<crate::types::NodeManagementStatus>) -> Self {
179 self.node_management_status = input;
180 self
181 }
182 pub fn get_node_management_status(&self) -> &::std::option::Option<crate::types::NodeManagementStatus> {
184 &self.node_management_status
185 }
186 pub fn health_status(mut self, input: crate::types::NodeHealthStatus) -> Self {
188 self.health_status = ::std::option::Option::Some(input);
189 self
190 }
191 pub fn set_health_status(mut self, input: ::std::option::Option<crate::types::NodeHealthStatus>) -> Self {
193 self.health_status = input;
194 self
195 }
196 pub fn get_health_status(&self) -> &::std::option::Option<crate::types::NodeHealthStatus> {
198 &self.health_status
199 }
200 pub fn notifications(mut self, input: crate::types::Notification) -> Self {
206 let mut v = self.notifications.unwrap_or_default();
207 v.push(input);
208 self.notifications = ::std::option::Option::Some(v);
209 self
210 }
211 pub fn set_notifications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Notification>>) -> Self {
213 self.notifications = input;
214 self
215 }
216 pub fn get_notifications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Notification>> {
218 &self.notifications
219 }
220 pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
223 self.created_at = ::std::option::Option::Some(input);
224 self
225 }
226 pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
228 self.created_at = input;
229 self
230 }
231 pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
233 &self.created_at
234 }
235 pub fn deleted_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
237 self.deleted_at = ::std::option::Option::Some(input);
238 self
239 }
240 pub fn set_deleted_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
242 self.deleted_at = input;
243 self
244 }
245 pub fn get_deleted_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
247 &self.deleted_at
248 }
249 pub fn software_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
251 self.software_version = ::std::option::Option::Some(input.into());
252 self
253 }
254 pub fn set_software_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
256 self.software_version = input;
257 self
258 }
259 pub fn get_software_version(&self) -> &::std::option::Option<::std::string::String> {
261 &self.software_version
262 }
263 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
269 let mut hash_map = self.tags.unwrap_or_default();
270 hash_map.insert(k.into(), v.into());
271 self.tags = ::std::option::Option::Some(hash_map);
272 self
273 }
274 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
276 self.tags = input;
277 self
278 }
279 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
281 &self.tags
282 }
283 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
284 self._request_id = Some(request_id.into());
285 self
286 }
287
288 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
289 self._request_id = request_id;
290 self
291 }
292 pub fn build(self) -> ::std::result::Result<crate::operation::get_node::GetNodeOutput, ::aws_smithy_types::error::operation::BuildError> {
301 ::std::result::Result::Ok(crate::operation::get_node::GetNodeOutput {
302 appliance_arn: self.appliance_arn.ok_or_else(|| {
303 ::aws_smithy_types::error::operation::BuildError::missing_field(
304 "appliance_arn",
305 "appliance_arn was not specified but it is required when building GetNodeOutput",
306 )
307 })?,
308 node_arn: self.node_arn.ok_or_else(|| {
309 ::aws_smithy_types::error::operation::BuildError::missing_field(
310 "node_arn",
311 "node_arn was not specified but it is required when building GetNodeOutput",
312 )
313 })?,
314 ip_address: self.ip_address.ok_or_else(|| {
315 ::aws_smithy_types::error::operation::BuildError::missing_field(
316 "ip_address",
317 "ip_address was not specified but it is required when building GetNodeOutput",
318 )
319 })?,
320 environment_type: self.environment_type.ok_or_else(|| {
321 ::aws_smithy_types::error::operation::BuildError::missing_field(
322 "environment_type",
323 "environment_type was not specified but it is required when building GetNodeOutput",
324 )
325 })?,
326 node_management_status: self.node_management_status.ok_or_else(|| {
327 ::aws_smithy_types::error::operation::BuildError::missing_field(
328 "node_management_status",
329 "node_management_status was not specified but it is required when building GetNodeOutput",
330 )
331 })?,
332 health_status: self.health_status,
333 notifications: self.notifications,
334 created_at: self.created_at.ok_or_else(|| {
335 ::aws_smithy_types::error::operation::BuildError::missing_field(
336 "created_at",
337 "created_at was not specified but it is required when building GetNodeOutput",
338 )
339 })?,
340 deleted_at: self.deleted_at,
341 software_version: self.software_version,
342 tags: self.tags,
343 _request_id: self._request_id,
344 })
345 }
346}