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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The structure representing the GetRecommendationsResponse.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetRecommendationsOutput {
    /// <p>The name of the profiling group the analysis data is about.</p>
    pub profiling_group_name: ::std::option::Option<::std::string::String>,
    /// <p> The start time of the profile the analysis data is about. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC. </p>
    pub profile_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p> The end time of the profile the analysis data is about. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC. </p>
    pub profile_end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The list of recommendations that the analysis found for this profile.</p>
    pub recommendations: ::std::option::Option<::std::vec::Vec<crate::types::Recommendation>>,
    /// <p> The list of anomalies that the analysis has found for this profile. </p>
    pub anomalies: ::std::option::Option<::std::vec::Vec<crate::types::Anomaly>>,
    _request_id: Option<String>,
}
impl GetRecommendationsOutput {
    /// <p>The name of the profiling group the analysis data is about.</p>
    pub fn profiling_group_name(&self) -> ::std::option::Option<&str> {
        self.profiling_group_name.as_deref()
    }
    /// <p> The start time of the profile the analysis data is about. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC. </p>
    pub fn profile_start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.profile_start_time.as_ref()
    }
    /// <p> The end time of the profile the analysis data is about. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC. </p>
    pub fn profile_end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.profile_end_time.as_ref()
    }
    /// <p>The list of recommendations that the analysis found for this profile.</p>
    pub fn recommendations(&self) -> ::std::option::Option<&[crate::types::Recommendation]> {
        self.recommendations.as_deref()
    }
    /// <p> The list of anomalies that the analysis has found for this profile. </p>
    pub fn anomalies(&self) -> ::std::option::Option<&[crate::types::Anomaly]> {
        self.anomalies.as_deref()
    }
}
impl ::aws_http::request_id::RequestId for GetRecommendationsOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetRecommendationsOutput {
    /// Creates a new builder-style object to manufacture [`GetRecommendationsOutput`](crate::operation::get_recommendations::GetRecommendationsOutput).
    pub fn builder() -> crate::operation::get_recommendations::builders::GetRecommendationsOutputBuilder {
        crate::operation::get_recommendations::builders::GetRecommendationsOutputBuilder::default()
    }
}

/// A builder for [`GetRecommendationsOutput`](crate::operation::get_recommendations::GetRecommendationsOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct GetRecommendationsOutputBuilder {
    pub(crate) profiling_group_name: ::std::option::Option<::std::string::String>,
    pub(crate) profile_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) profile_end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) recommendations: ::std::option::Option<::std::vec::Vec<crate::types::Recommendation>>,
    pub(crate) anomalies: ::std::option::Option<::std::vec::Vec<crate::types::Anomaly>>,
    _request_id: Option<String>,
}
impl GetRecommendationsOutputBuilder {
    /// <p>The name of the profiling group the analysis data is about.</p>
    pub fn profiling_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.profiling_group_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the profiling group the analysis data is about.</p>
    pub fn set_profiling_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.profiling_group_name = input;
        self
    }
    /// <p>The name of the profiling group the analysis data is about.</p>
    pub fn get_profiling_group_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.profiling_group_name
    }
    /// <p> The start time of the profile the analysis data is about. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC. </p>
    pub fn profile_start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.profile_start_time = ::std::option::Option::Some(input);
        self
    }
    /// <p> The start time of the profile the analysis data is about. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC. </p>
    pub fn set_profile_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.profile_start_time = input;
        self
    }
    /// <p> The start time of the profile the analysis data is about. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC. </p>
    pub fn get_profile_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.profile_start_time
    }
    /// <p> The end time of the profile the analysis data is about. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC. </p>
    pub fn profile_end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.profile_end_time = ::std::option::Option::Some(input);
        self
    }
    /// <p> The end time of the profile the analysis data is about. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC. </p>
    pub fn set_profile_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.profile_end_time = input;
        self
    }
    /// <p> The end time of the profile the analysis data is about. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC. </p>
    pub fn get_profile_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.profile_end_time
    }
    /// Appends an item to `recommendations`.
    ///
    /// To override the contents of this collection use [`set_recommendations`](Self::set_recommendations).
    ///
    /// <p>The list of recommendations that the analysis found for this profile.</p>
    pub fn recommendations(mut self, input: crate::types::Recommendation) -> Self {
        let mut v = self.recommendations.unwrap_or_default();
        v.push(input);
        self.recommendations = ::std::option::Option::Some(v);
        self
    }
    /// <p>The list of recommendations that the analysis found for this profile.</p>
    pub fn set_recommendations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Recommendation>>) -> Self {
        self.recommendations = input;
        self
    }
    /// <p>The list of recommendations that the analysis found for this profile.</p>
    pub fn get_recommendations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Recommendation>> {
        &self.recommendations
    }
    /// Appends an item to `anomalies`.
    ///
    /// To override the contents of this collection use [`set_anomalies`](Self::set_anomalies).
    ///
    /// <p> The list of anomalies that the analysis has found for this profile. </p>
    pub fn anomalies(mut self, input: crate::types::Anomaly) -> Self {
        let mut v = self.anomalies.unwrap_or_default();
        v.push(input);
        self.anomalies = ::std::option::Option::Some(v);
        self
    }
    /// <p> The list of anomalies that the analysis has found for this profile. </p>
    pub fn set_anomalies(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Anomaly>>) -> Self {
        self.anomalies = input;
        self
    }
    /// <p> The list of anomalies that the analysis has found for this profile. </p>
    pub fn get_anomalies(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Anomaly>> {
        &self.anomalies
    }
    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 [`GetRecommendationsOutput`](crate::operation::get_recommendations::GetRecommendationsOutput).
    pub fn build(self) -> crate::operation::get_recommendations::GetRecommendationsOutput {
        crate::operation::get_recommendations::GetRecommendationsOutput {
            profiling_group_name: self.profiling_group_name,
            profile_start_time: self.profile_start_time,
            profile_end_time: self.profile_end_time,
            recommendations: self.recommendations,
            anomalies: self.anomalies,
            _request_id: self._request_id,
        }
    }
}