aws_sdk_devopsguru/operation/search_insights/_search_insights_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct SearchInsightsInput {
6 /// <p>The start of the time range passed in. Returned insights occurred after this time.</p>
7 pub start_time_range: ::std::option::Option<crate::types::StartTimeRange>,
8 /// <p>A <code>SearchInsightsFilters</code> object that is used to set the severity and status filters on your insight search.</p>
9 pub filters: ::std::option::Option<crate::types::SearchInsightsFilters>,
10 /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
11 pub max_results: ::std::option::Option<i32>,
12 /// <p>The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.</p>
13 pub next_token: ::std::option::Option<::std::string::String>,
14 /// <p>The type of insights you are searching for (<code>REACTIVE</code> or <code>PROACTIVE</code>).</p>
15 pub r#type: ::std::option::Option<crate::types::InsightType>,
16}
17impl SearchInsightsInput {
18 /// <p>The start of the time range passed in. Returned insights occurred after this time.</p>
19 pub fn start_time_range(&self) -> ::std::option::Option<&crate::types::StartTimeRange> {
20 self.start_time_range.as_ref()
21 }
22 /// <p>A <code>SearchInsightsFilters</code> object that is used to set the severity and status filters on your insight search.</p>
23 pub fn filters(&self) -> ::std::option::Option<&crate::types::SearchInsightsFilters> {
24 self.filters.as_ref()
25 }
26 /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
27 pub fn max_results(&self) -> ::std::option::Option<i32> {
28 self.max_results
29 }
30 /// <p>The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.</p>
31 pub fn next_token(&self) -> ::std::option::Option<&str> {
32 self.next_token.as_deref()
33 }
34 /// <p>The type of insights you are searching for (<code>REACTIVE</code> or <code>PROACTIVE</code>).</p>
35 pub fn r#type(&self) -> ::std::option::Option<&crate::types::InsightType> {
36 self.r#type.as_ref()
37 }
38}
39impl SearchInsightsInput {
40 /// Creates a new builder-style object to manufacture [`SearchInsightsInput`](crate::operation::search_insights::SearchInsightsInput).
41 pub fn builder() -> crate::operation::search_insights::builders::SearchInsightsInputBuilder {
42 crate::operation::search_insights::builders::SearchInsightsInputBuilder::default()
43 }
44}
45
46/// A builder for [`SearchInsightsInput`](crate::operation::search_insights::SearchInsightsInput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct SearchInsightsInputBuilder {
50 pub(crate) start_time_range: ::std::option::Option<crate::types::StartTimeRange>,
51 pub(crate) filters: ::std::option::Option<crate::types::SearchInsightsFilters>,
52 pub(crate) max_results: ::std::option::Option<i32>,
53 pub(crate) next_token: ::std::option::Option<::std::string::String>,
54 pub(crate) r#type: ::std::option::Option<crate::types::InsightType>,
55}
56impl SearchInsightsInputBuilder {
57 /// <p>The start of the time range passed in. Returned insights occurred after this time.</p>
58 /// This field is required.
59 pub fn start_time_range(mut self, input: crate::types::StartTimeRange) -> Self {
60 self.start_time_range = ::std::option::Option::Some(input);
61 self
62 }
63 /// <p>The start of the time range passed in. Returned insights occurred after this time.</p>
64 pub fn set_start_time_range(mut self, input: ::std::option::Option<crate::types::StartTimeRange>) -> Self {
65 self.start_time_range = input;
66 self
67 }
68 /// <p>The start of the time range passed in. Returned insights occurred after this time.</p>
69 pub fn get_start_time_range(&self) -> &::std::option::Option<crate::types::StartTimeRange> {
70 &self.start_time_range
71 }
72 /// <p>A <code>SearchInsightsFilters</code> object that is used to set the severity and status filters on your insight search.</p>
73 pub fn filters(mut self, input: crate::types::SearchInsightsFilters) -> Self {
74 self.filters = ::std::option::Option::Some(input);
75 self
76 }
77 /// <p>A <code>SearchInsightsFilters</code> object that is used to set the severity and status filters on your insight search.</p>
78 pub fn set_filters(mut self, input: ::std::option::Option<crate::types::SearchInsightsFilters>) -> Self {
79 self.filters = input;
80 self
81 }
82 /// <p>A <code>SearchInsightsFilters</code> object that is used to set the severity and status filters on your insight search.</p>
83 pub fn get_filters(&self) -> &::std::option::Option<crate::types::SearchInsightsFilters> {
84 &self.filters
85 }
86 /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
87 pub fn max_results(mut self, input: i32) -> Self {
88 self.max_results = ::std::option::Option::Some(input);
89 self
90 }
91 /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
92 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
93 self.max_results = input;
94 self
95 }
96 /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
97 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
98 &self.max_results
99 }
100 /// <p>The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.</p>
101 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102 self.next_token = ::std::option::Option::Some(input.into());
103 self
104 }
105 /// <p>The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.</p>
106 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107 self.next_token = input;
108 self
109 }
110 /// <p>The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.</p>
111 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
112 &self.next_token
113 }
114 /// <p>The type of insights you are searching for (<code>REACTIVE</code> or <code>PROACTIVE</code>).</p>
115 /// This field is required.
116 pub fn r#type(mut self, input: crate::types::InsightType) -> Self {
117 self.r#type = ::std::option::Option::Some(input);
118 self
119 }
120 /// <p>The type of insights you are searching for (<code>REACTIVE</code> or <code>PROACTIVE</code>).</p>
121 pub fn set_type(mut self, input: ::std::option::Option<crate::types::InsightType>) -> Self {
122 self.r#type = input;
123 self
124 }
125 /// <p>The type of insights you are searching for (<code>REACTIVE</code> or <code>PROACTIVE</code>).</p>
126 pub fn get_type(&self) -> &::std::option::Option<crate::types::InsightType> {
127 &self.r#type
128 }
129 /// Consumes the builder and constructs a [`SearchInsightsInput`](crate::operation::search_insights::SearchInsightsInput).
130 pub fn build(
131 self,
132 ) -> ::std::result::Result<crate::operation::search_insights::SearchInsightsInput, ::aws_smithy_types::error::operation::BuildError> {
133 ::std::result::Result::Ok(crate::operation::search_insights::SearchInsightsInput {
134 start_time_range: self.start_time_range,
135 filters: self.filters,
136 max_results: self.max_results,
137 next_token: self.next_token,
138 r#type: self.r#type,
139 })
140 }
141}