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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
// 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 DescribeAccountOverviewOutput {
/// <p>An integer that specifies the number of open reactive insights in your Amazon Web Services account that were created during the time range passed in.</p>
pub reactive_insights: i32,
/// <p>An integer that specifies the number of open proactive insights in your Amazon Web Services account that were created during the time range passed in.</p>
pub proactive_insights: i32,
/// <p>The Mean Time to Recover (MTTR) for all closed insights that were created during the time range passed in.</p>
pub mean_time_to_recover_in_milliseconds: i64,
_request_id: Option<String>,
}
impl DescribeAccountOverviewOutput {
/// <p>An integer that specifies the number of open reactive insights in your Amazon Web Services account that were created during the time range passed in.</p>
pub fn reactive_insights(&self) -> i32 {
self.reactive_insights
}
/// <p>An integer that specifies the number of open proactive insights in your Amazon Web Services account that were created during the time range passed in.</p>
pub fn proactive_insights(&self) -> i32 {
self.proactive_insights
}
/// <p>The Mean Time to Recover (MTTR) for all closed insights that were created during the time range passed in.</p>
pub fn mean_time_to_recover_in_milliseconds(&self) -> i64 {
self.mean_time_to_recover_in_milliseconds
}
}
impl ::aws_types::request_id::RequestId for DescribeAccountOverviewOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl DescribeAccountOverviewOutput {
/// Creates a new builder-style object to manufacture [`DescribeAccountOverviewOutput`](crate::operation::describe_account_overview::DescribeAccountOverviewOutput).
pub fn builder() -> crate::operation::describe_account_overview::builders::DescribeAccountOverviewOutputBuilder {
crate::operation::describe_account_overview::builders::DescribeAccountOverviewOutputBuilder::default()
}
}
/// A builder for [`DescribeAccountOverviewOutput`](crate::operation::describe_account_overview::DescribeAccountOverviewOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeAccountOverviewOutputBuilder {
pub(crate) reactive_insights: ::std::option::Option<i32>,
pub(crate) proactive_insights: ::std::option::Option<i32>,
pub(crate) mean_time_to_recover_in_milliseconds: ::std::option::Option<i64>,
_request_id: Option<String>,
}
impl DescribeAccountOverviewOutputBuilder {
/// <p>An integer that specifies the number of open reactive insights in your Amazon Web Services account that were created during the time range passed in.</p>
/// This field is required.
pub fn reactive_insights(mut self, input: i32) -> Self {
self.reactive_insights = ::std::option::Option::Some(input);
self
}
/// <p>An integer that specifies the number of open reactive insights in your Amazon Web Services account that were created during the time range passed in.</p>
pub fn set_reactive_insights(mut self, input: ::std::option::Option<i32>) -> Self {
self.reactive_insights = input;
self
}
/// <p>An integer that specifies the number of open reactive insights in your Amazon Web Services account that were created during the time range passed in.</p>
pub fn get_reactive_insights(&self) -> &::std::option::Option<i32> {
&self.reactive_insights
}
/// <p>An integer that specifies the number of open proactive insights in your Amazon Web Services account that were created during the time range passed in.</p>
/// This field is required.
pub fn proactive_insights(mut self, input: i32) -> Self {
self.proactive_insights = ::std::option::Option::Some(input);
self
}
/// <p>An integer that specifies the number of open proactive insights in your Amazon Web Services account that were created during the time range passed in.</p>
pub fn set_proactive_insights(mut self, input: ::std::option::Option<i32>) -> Self {
self.proactive_insights = input;
self
}
/// <p>An integer that specifies the number of open proactive insights in your Amazon Web Services account that were created during the time range passed in.</p>
pub fn get_proactive_insights(&self) -> &::std::option::Option<i32> {
&self.proactive_insights
}
/// <p>The Mean Time to Recover (MTTR) for all closed insights that were created during the time range passed in.</p>
/// This field is required.
pub fn mean_time_to_recover_in_milliseconds(mut self, input: i64) -> Self {
self.mean_time_to_recover_in_milliseconds = ::std::option::Option::Some(input);
self
}
/// <p>The Mean Time to Recover (MTTR) for all closed insights that were created during the time range passed in.</p>
pub fn set_mean_time_to_recover_in_milliseconds(mut self, input: ::std::option::Option<i64>) -> Self {
self.mean_time_to_recover_in_milliseconds = input;
self
}
/// <p>The Mean Time to Recover (MTTR) for all closed insights that were created during the time range passed in.</p>
pub fn get_mean_time_to_recover_in_milliseconds(&self) -> &::std::option::Option<i64> {
&self.mean_time_to_recover_in_milliseconds
}
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 [`DescribeAccountOverviewOutput`](crate::operation::describe_account_overview::DescribeAccountOverviewOutput).
/// This method will fail if any of the following fields are not set:
/// - [`mean_time_to_recover_in_milliseconds`](crate::operation::describe_account_overview::builders::DescribeAccountOverviewOutputBuilder::mean_time_to_recover_in_milliseconds)
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::describe_account_overview::DescribeAccountOverviewOutput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::describe_account_overview::DescribeAccountOverviewOutput {
reactive_insights: self.reactive_insights.unwrap_or_default(),
proactive_insights: self.proactive_insights.unwrap_or_default(),
mean_time_to_recover_in_milliseconds: self.mean_time_to_recover_in_milliseconds.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"mean_time_to_recover_in_milliseconds",
"mean_time_to_recover_in_milliseconds was not specified but it is required when building DescribeAccountOverviewOutput",
)
})?,
_request_id: self._request_id,
})
}
}