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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Container for the parameters to the <code>ListInsights</code> operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ListInsightsInput {
/// <p>The entity for which to list insights. Specifies the type and value of the entity, such as a domain name or Amazon Web Services account ID.</p>
pub entity: ::std::option::Option<crate::types::InsightEntity>,
/// <p>The time range for filtering insights, specified as epoch millisecond timestamps.</p>
pub time_range: ::std::option::Option<crate::types::InsightTimeRange>,
/// <p>The sort order for the results. Possible values are <code>ASC</code> (ascending) and <code>DESC</code> (descending).</p>
pub sort_order: ::std::option::Option<crate::types::InsightSortOrder>,
/// <p>An optional parameter that specifies the maximum number of results to return. You can use <code>NextToken</code> to get the next page of results. Valid values are 1 to 500.</p>
pub max_results: ::std::option::Option<i32>,
/// <p>If your initial <code>ListInsights</code> operation returns a <code>NextToken</code>, include the returned <code>NextToken</code> in subsequent <code>ListInsights</code> operations to retrieve the next page of results.</p>
pub next_token: ::std::option::Option<::std::string::String>,
}
impl ListInsightsInput {
/// <p>The entity for which to list insights. Specifies the type and value of the entity, such as a domain name or Amazon Web Services account ID.</p>
pub fn entity(&self) -> ::std::option::Option<&crate::types::InsightEntity> {
self.entity.as_ref()
}
/// <p>The time range for filtering insights, specified as epoch millisecond timestamps.</p>
pub fn time_range(&self) -> ::std::option::Option<&crate::types::InsightTimeRange> {
self.time_range.as_ref()
}
/// <p>The sort order for the results. Possible values are <code>ASC</code> (ascending) and <code>DESC</code> (descending).</p>
pub fn sort_order(&self) -> ::std::option::Option<&crate::types::InsightSortOrder> {
self.sort_order.as_ref()
}
/// <p>An optional parameter that specifies the maximum number of results to return. You can use <code>NextToken</code> to get the next page of results. Valid values are 1 to 500.</p>
pub fn max_results(&self) -> ::std::option::Option<i32> {
self.max_results
}
/// <p>If your initial <code>ListInsights</code> operation returns a <code>NextToken</code>, include the returned <code>NextToken</code> in subsequent <code>ListInsights</code> operations to retrieve the next page of results.</p>
pub fn next_token(&self) -> ::std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl ListInsightsInput {
/// Creates a new builder-style object to manufacture [`ListInsightsInput`](crate::operation::list_insights::ListInsightsInput).
pub fn builder() -> crate::operation::list_insights::builders::ListInsightsInputBuilder {
crate::operation::list_insights::builders::ListInsightsInputBuilder::default()
}
}
/// A builder for [`ListInsightsInput`](crate::operation::list_insights::ListInsightsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListInsightsInputBuilder {
pub(crate) entity: ::std::option::Option<crate::types::InsightEntity>,
pub(crate) time_range: ::std::option::Option<crate::types::InsightTimeRange>,
pub(crate) sort_order: ::std::option::Option<crate::types::InsightSortOrder>,
pub(crate) max_results: ::std::option::Option<i32>,
pub(crate) next_token: ::std::option::Option<::std::string::String>,
}
impl ListInsightsInputBuilder {
/// <p>The entity for which to list insights. Specifies the type and value of the entity, such as a domain name or Amazon Web Services account ID.</p>
/// This field is required.
pub fn entity(mut self, input: crate::types::InsightEntity) -> Self {
self.entity = ::std::option::Option::Some(input);
self
}
/// <p>The entity for which to list insights. Specifies the type and value of the entity, such as a domain name or Amazon Web Services account ID.</p>
pub fn set_entity(mut self, input: ::std::option::Option<crate::types::InsightEntity>) -> Self {
self.entity = input;
self
}
/// <p>The entity for which to list insights. Specifies the type and value of the entity, such as a domain name or Amazon Web Services account ID.</p>
pub fn get_entity(&self) -> &::std::option::Option<crate::types::InsightEntity> {
&self.entity
}
/// <p>The time range for filtering insights, specified as epoch millisecond timestamps.</p>
pub fn time_range(mut self, input: crate::types::InsightTimeRange) -> Self {
self.time_range = ::std::option::Option::Some(input);
self
}
/// <p>The time range for filtering insights, specified as epoch millisecond timestamps.</p>
pub fn set_time_range(mut self, input: ::std::option::Option<crate::types::InsightTimeRange>) -> Self {
self.time_range = input;
self
}
/// <p>The time range for filtering insights, specified as epoch millisecond timestamps.</p>
pub fn get_time_range(&self) -> &::std::option::Option<crate::types::InsightTimeRange> {
&self.time_range
}
/// <p>The sort order for the results. Possible values are <code>ASC</code> (ascending) and <code>DESC</code> (descending).</p>
pub fn sort_order(mut self, input: crate::types::InsightSortOrder) -> Self {
self.sort_order = ::std::option::Option::Some(input);
self
}
/// <p>The sort order for the results. Possible values are <code>ASC</code> (ascending) and <code>DESC</code> (descending).</p>
pub fn set_sort_order(mut self, input: ::std::option::Option<crate::types::InsightSortOrder>) -> Self {
self.sort_order = input;
self
}
/// <p>The sort order for the results. Possible values are <code>ASC</code> (ascending) and <code>DESC</code> (descending).</p>
pub fn get_sort_order(&self) -> &::std::option::Option<crate::types::InsightSortOrder> {
&self.sort_order
}
/// <p>An optional parameter that specifies the maximum number of results to return. You can use <code>NextToken</code> to get the next page of results. Valid values are 1 to 500.</p>
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = ::std::option::Option::Some(input);
self
}
/// <p>An optional parameter that specifies the maximum number of results to return. You can use <code>NextToken</code> to get the next page of results. Valid values are 1 to 500.</p>
pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
/// <p>An optional parameter that specifies the maximum number of results to return. You can use <code>NextToken</code> to get the next page of results. Valid values are 1 to 500.</p>
pub fn get_max_results(&self) -> &::std::option::Option<i32> {
&self.max_results
}
/// <p>If your initial <code>ListInsights</code> operation returns a <code>NextToken</code>, include the returned <code>NextToken</code> in subsequent <code>ListInsights</code> operations to retrieve the next page of results.</p>
pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.next_token = ::std::option::Option::Some(input.into());
self
}
/// <p>If your initial <code>ListInsights</code> operation returns a <code>NextToken</code>, include the returned <code>NextToken</code> in subsequent <code>ListInsights</code> operations to retrieve the next page of results.</p>
pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.next_token = input;
self
}
/// <p>If your initial <code>ListInsights</code> operation returns a <code>NextToken</code>, include the returned <code>NextToken</code> in subsequent <code>ListInsights</code> operations to retrieve the next page of results.</p>
pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
&self.next_token
}
/// Consumes the builder and constructs a [`ListInsightsInput`](crate::operation::list_insights::ListInsightsInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::list_insights::ListInsightsInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::list_insights::ListInsightsInput {
entity: self.entity,
time_range: self.time_range,
sort_order: self.sort_order,
max_results: self.max_results,
next_token: self.next_token,
})
}
}