aws_sdk_ec2/operation/describe_network_insights_analyses/
_describe_network_insights_analyses_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 DescribeNetworkInsightsAnalysesInput {
6    /// <p>The ID of the network insights analyses. You must specify either analysis IDs or a path ID.</p>
7    pub network_insights_analysis_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
8    /// <p>The ID of the path. You must specify either a path ID or analysis IDs.</p>
9    pub network_insights_path_id: ::std::option::Option<::std::string::String>,
10    /// <p>The time when the network insights analyses started.</p>
11    pub analysis_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
12    /// <p>The time when the network insights analyses ended.</p>
13    pub analysis_end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
14    /// <p>The filters. The following are the possible values:</p>
15    /// <ul>
16    /// <li>
17    /// <p>path-found - A Boolean value that indicates whether a feasible path is found.</p></li>
18    /// <li>
19    /// <p>status - The status of the analysis (running | succeeded | failed).</p></li>
20    /// </ul>
21    pub filters: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>,
22    /// <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>
23    pub max_results: ::std::option::Option<i32>,
24    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
25    pub dry_run: ::std::option::Option<bool>,
26    /// <p>The token for the next page of results.</p>
27    pub next_token: ::std::option::Option<::std::string::String>,
28}
29impl DescribeNetworkInsightsAnalysesInput {
30    /// <p>The ID of the network insights analyses. You must specify either analysis IDs or a path ID.</p>
31    ///
32    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.network_insights_analysis_ids.is_none()`.
33    pub fn network_insights_analysis_ids(&self) -> &[::std::string::String] {
34        self.network_insights_analysis_ids.as_deref().unwrap_or_default()
35    }
36    /// <p>The ID of the path. You must specify either a path ID or analysis IDs.</p>
37    pub fn network_insights_path_id(&self) -> ::std::option::Option<&str> {
38        self.network_insights_path_id.as_deref()
39    }
40    /// <p>The time when the network insights analyses started.</p>
41    pub fn analysis_start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
42        self.analysis_start_time.as_ref()
43    }
44    /// <p>The time when the network insights analyses ended.</p>
45    pub fn analysis_end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
46        self.analysis_end_time.as_ref()
47    }
48    /// <p>The filters. The following are the possible values:</p>
49    /// <ul>
50    /// <li>
51    /// <p>path-found - A Boolean value that indicates whether a feasible path is found.</p></li>
52    /// <li>
53    /// <p>status - The status of the analysis (running | succeeded | failed).</p></li>
54    /// </ul>
55    ///
56    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.filters.is_none()`.
57    pub fn filters(&self) -> &[crate::types::Filter] {
58        self.filters.as_deref().unwrap_or_default()
59    }
60    /// <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>
61    pub fn max_results(&self) -> ::std::option::Option<i32> {
62        self.max_results
63    }
64    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
65    pub fn dry_run(&self) -> ::std::option::Option<bool> {
66        self.dry_run
67    }
68    /// <p>The token for the next page of results.</p>
69    pub fn next_token(&self) -> ::std::option::Option<&str> {
70        self.next_token.as_deref()
71    }
72}
73impl DescribeNetworkInsightsAnalysesInput {
74    /// Creates a new builder-style object to manufacture [`DescribeNetworkInsightsAnalysesInput`](crate::operation::describe_network_insights_analyses::DescribeNetworkInsightsAnalysesInput).
75    pub fn builder() -> crate::operation::describe_network_insights_analyses::builders::DescribeNetworkInsightsAnalysesInputBuilder {
76        crate::operation::describe_network_insights_analyses::builders::DescribeNetworkInsightsAnalysesInputBuilder::default()
77    }
78}
79
80/// A builder for [`DescribeNetworkInsightsAnalysesInput`](crate::operation::describe_network_insights_analyses::DescribeNetworkInsightsAnalysesInput).
81#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
82#[non_exhaustive]
83pub struct DescribeNetworkInsightsAnalysesInputBuilder {
84    pub(crate) network_insights_analysis_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
85    pub(crate) network_insights_path_id: ::std::option::Option<::std::string::String>,
86    pub(crate) analysis_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
87    pub(crate) analysis_end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
88    pub(crate) filters: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>,
89    pub(crate) max_results: ::std::option::Option<i32>,
90    pub(crate) dry_run: ::std::option::Option<bool>,
91    pub(crate) next_token: ::std::option::Option<::std::string::String>,
92}
93impl DescribeNetworkInsightsAnalysesInputBuilder {
94    /// Appends an item to `network_insights_analysis_ids`.
95    ///
96    /// To override the contents of this collection use [`set_network_insights_analysis_ids`](Self::set_network_insights_analysis_ids).
97    ///
98    /// <p>The ID of the network insights analyses. You must specify either analysis IDs or a path ID.</p>
99    pub fn network_insights_analysis_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
100        let mut v = self.network_insights_analysis_ids.unwrap_or_default();
101        v.push(input.into());
102        self.network_insights_analysis_ids = ::std::option::Option::Some(v);
103        self
104    }
105    /// <p>The ID of the network insights analyses. You must specify either analysis IDs or a path ID.</p>
106    pub fn set_network_insights_analysis_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
107        self.network_insights_analysis_ids = input;
108        self
109    }
110    /// <p>The ID of the network insights analyses. You must specify either analysis IDs or a path ID.</p>
111    pub fn get_network_insights_analysis_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
112        &self.network_insights_analysis_ids
113    }
114    /// <p>The ID of the path. You must specify either a path ID or analysis IDs.</p>
115    pub fn network_insights_path_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116        self.network_insights_path_id = ::std::option::Option::Some(input.into());
117        self
118    }
119    /// <p>The ID of the path. You must specify either a path ID or analysis IDs.</p>
120    pub fn set_network_insights_path_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.network_insights_path_id = input;
122        self
123    }
124    /// <p>The ID of the path. You must specify either a path ID or analysis IDs.</p>
125    pub fn get_network_insights_path_id(&self) -> &::std::option::Option<::std::string::String> {
126        &self.network_insights_path_id
127    }
128    /// <p>The time when the network insights analyses started.</p>
129    pub fn analysis_start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
130        self.analysis_start_time = ::std::option::Option::Some(input);
131        self
132    }
133    /// <p>The time when the network insights analyses started.</p>
134    pub fn set_analysis_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
135        self.analysis_start_time = input;
136        self
137    }
138    /// <p>The time when the network insights analyses started.</p>
139    pub fn get_analysis_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
140        &self.analysis_start_time
141    }
142    /// <p>The time when the network insights analyses ended.</p>
143    pub fn analysis_end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
144        self.analysis_end_time = ::std::option::Option::Some(input);
145        self
146    }
147    /// <p>The time when the network insights analyses ended.</p>
148    pub fn set_analysis_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
149        self.analysis_end_time = input;
150        self
151    }
152    /// <p>The time when the network insights analyses ended.</p>
153    pub fn get_analysis_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
154        &self.analysis_end_time
155    }
156    /// Appends an item to `filters`.
157    ///
158    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
159    ///
160    /// <p>The filters. The following are the possible values:</p>
161    /// <ul>
162    /// <li>
163    /// <p>path-found - A Boolean value that indicates whether a feasible path is found.</p></li>
164    /// <li>
165    /// <p>status - The status of the analysis (running | succeeded | failed).</p></li>
166    /// </ul>
167    pub fn filters(mut self, input: crate::types::Filter) -> Self {
168        let mut v = self.filters.unwrap_or_default();
169        v.push(input);
170        self.filters = ::std::option::Option::Some(v);
171        self
172    }
173    /// <p>The filters. The following are the possible values:</p>
174    /// <ul>
175    /// <li>
176    /// <p>path-found - A Boolean value that indicates whether a feasible path is found.</p></li>
177    /// <li>
178    /// <p>status - The status of the analysis (running | succeeded | failed).</p></li>
179    /// </ul>
180    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>) -> Self {
181        self.filters = input;
182        self
183    }
184    /// <p>The filters. The following are the possible values:</p>
185    /// <ul>
186    /// <li>
187    /// <p>path-found - A Boolean value that indicates whether a feasible path is found.</p></li>
188    /// <li>
189    /// <p>status - The status of the analysis (running | succeeded | failed).</p></li>
190    /// </ul>
191    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
192        &self.filters
193    }
194    /// <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>
195    pub fn max_results(mut self, input: i32) -> Self {
196        self.max_results = ::std::option::Option::Some(input);
197        self
198    }
199    /// <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>
200    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
201        self.max_results = input;
202        self
203    }
204    /// <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>
205    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
206        &self.max_results
207    }
208    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
209    pub fn dry_run(mut self, input: bool) -> Self {
210        self.dry_run = ::std::option::Option::Some(input);
211        self
212    }
213    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
214    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
215        self.dry_run = input;
216        self
217    }
218    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
219    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
220        &self.dry_run
221    }
222    /// <p>The token for the next page of results.</p>
223    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
224        self.next_token = ::std::option::Option::Some(input.into());
225        self
226    }
227    /// <p>The token for the next page of results.</p>
228    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
229        self.next_token = input;
230        self
231    }
232    /// <p>The token for the next page of results.</p>
233    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
234        &self.next_token
235    }
236    /// Consumes the builder and constructs a [`DescribeNetworkInsightsAnalysesInput`](crate::operation::describe_network_insights_analyses::DescribeNetworkInsightsAnalysesInput).
237    pub fn build(
238        self,
239    ) -> ::std::result::Result<
240        crate::operation::describe_network_insights_analyses::DescribeNetworkInsightsAnalysesInput,
241        ::aws_smithy_types::error::operation::BuildError,
242    > {
243        ::std::result::Result::Ok(
244            crate::operation::describe_network_insights_analyses::DescribeNetworkInsightsAnalysesInput {
245                network_insights_analysis_ids: self.network_insights_analysis_ids,
246                network_insights_path_id: self.network_insights_path_id,
247                analysis_start_time: self.analysis_start_time,
248                analysis_end_time: self.analysis_end_time,
249                filters: self.filters,
250                max_results: self.max_results,
251                dry_run: self.dry_run,
252                next_token: self.next_token,
253            },
254        )
255    }
256}