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
85
86
87
88
89
// 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 CreateAlertOutput {
/// Deprecated. Use `alert.alertArn`, which carries the same value. Kept so an existing caller keeps working while it moves to `alert`.
pub alert_arn: ::std::option::Option<::std::string::String>,
/// The alert that was created. The same `Alert` shape GetAlert returns, so a caller need not read the alert back to learn its timestamps or its minted alert id. {@code alert.state} is absent here — see the `state` member of `Alert`. Every other member is populated exactly as GetAlert populates it.
pub alert: ::std::option::Option<crate::types::Alert>,
_request_id: Option<String>,
}
impl CreateAlertOutput {
/// Deprecated. Use `alert.alertArn`, which carries the same value. Kept so an existing caller keeps working while it moves to `alert`.
pub fn alert_arn(&self) -> ::std::option::Option<&str> {
self.alert_arn.as_deref()
}
/// The alert that was created. The same `Alert` shape GetAlert returns, so a caller need not read the alert back to learn its timestamps or its minted alert id. {@code alert.state} is absent here — see the `state` member of `Alert`. Every other member is populated exactly as GetAlert populates it.
pub fn alert(&self) -> ::std::option::Option<&crate::types::Alert> {
self.alert.as_ref()
}
}
impl ::aws_types::request_id::RequestId for CreateAlertOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateAlertOutput {
/// Creates a new builder-style object to manufacture [`CreateAlertOutput`](crate::operation::create_alert::CreateAlertOutput).
pub fn builder() -> crate::operation::create_alert::builders::CreateAlertOutputBuilder {
crate::operation::create_alert::builders::CreateAlertOutputBuilder::default()
}
}
/// A builder for [`CreateAlertOutput`](crate::operation::create_alert::CreateAlertOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateAlertOutputBuilder {
pub(crate) alert_arn: ::std::option::Option<::std::string::String>,
pub(crate) alert: ::std::option::Option<crate::types::Alert>,
_request_id: Option<String>,
}
impl CreateAlertOutputBuilder {
/// Deprecated. Use `alert.alertArn`, which carries the same value. Kept so an existing caller keeps working while it moves to `alert`.
pub fn alert_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.alert_arn = ::std::option::Option::Some(input.into());
self
}
/// Deprecated. Use `alert.alertArn`, which carries the same value. Kept so an existing caller keeps working while it moves to `alert`.
pub fn set_alert_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.alert_arn = input;
self
}
/// Deprecated. Use `alert.alertArn`, which carries the same value. Kept so an existing caller keeps working while it moves to `alert`.
pub fn get_alert_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.alert_arn
}
/// The alert that was created. The same `Alert` shape GetAlert returns, so a caller need not read the alert back to learn its timestamps or its minted alert id. {@code alert.state} is absent here — see the `state` member of `Alert`. Every other member is populated exactly as GetAlert populates it.
/// This field is required.
pub fn alert(mut self, input: crate::types::Alert) -> Self {
self.alert = ::std::option::Option::Some(input);
self
}
/// The alert that was created. The same `Alert` shape GetAlert returns, so a caller need not read the alert back to learn its timestamps or its minted alert id. {@code alert.state} is absent here — see the `state` member of `Alert`. Every other member is populated exactly as GetAlert populates it.
pub fn set_alert(mut self, input: ::std::option::Option<crate::types::Alert>) -> Self {
self.alert = input;
self
}
/// The alert that was created. The same `Alert` shape GetAlert returns, so a caller need not read the alert back to learn its timestamps or its minted alert id. {@code alert.state} is absent here — see the `state` member of `Alert`. Every other member is populated exactly as GetAlert populates it.
pub fn get_alert(&self) -> &::std::option::Option<crate::types::Alert> {
&self.alert
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
/// Consumes the builder and constructs a [`CreateAlertOutput`](crate::operation::create_alert::CreateAlertOutput).
pub fn build(self) -> crate::operation::create_alert::CreateAlertOutput {
crate::operation::create_alert::CreateAlertOutput {
alert_arn: self.alert_arn,
alert: self.alert,
_request_id: self._request_id,
}
}
}