aws_sdk_databasemigration/operation/describe_recommendations/
_describe_recommendations_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 DescribeRecommendationsInput {
6    /// <p>Filters applied to the target engine recommendations described in the form of key-value pairs.</p>
7    /// <p>Valid filter names: <code>database-id</code> | <code>engine-name</code></p>
8    pub filters: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>,
9    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, Fleet Advisor includes a pagination token in the response so that you can retrieve the remaining results.</p>
10    pub max_records: ::std::option::Option<i32>,
11    /// <p>Specifies the unique pagination token that makes it possible to display the next page of results. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
12    /// <p>If <code>NextToken</code> is returned by a previous response, there are more results available. The value of <code>NextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged.</p>
13    pub next_token: ::std::option::Option<::std::string::String>,
14}
15impl DescribeRecommendationsInput {
16    /// <p>Filters applied to the target engine recommendations described in the form of key-value pairs.</p>
17    /// <p>Valid filter names: <code>database-id</code> | <code>engine-name</code></p>
18    ///
19    /// 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()`.
20    pub fn filters(&self) -> &[crate::types::Filter] {
21        self.filters.as_deref().unwrap_or_default()
22    }
23    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, Fleet Advisor includes a pagination token in the response so that you can retrieve the remaining results.</p>
24    pub fn max_records(&self) -> ::std::option::Option<i32> {
25        self.max_records
26    }
27    /// <p>Specifies the unique pagination token that makes it possible to display the next page of results. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
28    /// <p>If <code>NextToken</code> is returned by a previous response, there are more results available. The value of <code>NextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged.</p>
29    pub fn next_token(&self) -> ::std::option::Option<&str> {
30        self.next_token.as_deref()
31    }
32}
33impl DescribeRecommendationsInput {
34    /// Creates a new builder-style object to manufacture [`DescribeRecommendationsInput`](crate::operation::describe_recommendations::DescribeRecommendationsInput).
35    pub fn builder() -> crate::operation::describe_recommendations::builders::DescribeRecommendationsInputBuilder {
36        crate::operation::describe_recommendations::builders::DescribeRecommendationsInputBuilder::default()
37    }
38}
39
40/// A builder for [`DescribeRecommendationsInput`](crate::operation::describe_recommendations::DescribeRecommendationsInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct DescribeRecommendationsInputBuilder {
44    pub(crate) filters: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>,
45    pub(crate) max_records: ::std::option::Option<i32>,
46    pub(crate) next_token: ::std::option::Option<::std::string::String>,
47}
48impl DescribeRecommendationsInputBuilder {
49    /// Appends an item to `filters`.
50    ///
51    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
52    ///
53    /// <p>Filters applied to the target engine recommendations described in the form of key-value pairs.</p>
54    /// <p>Valid filter names: <code>database-id</code> | <code>engine-name</code></p>
55    pub fn filters(mut self, input: crate::types::Filter) -> Self {
56        let mut v = self.filters.unwrap_or_default();
57        v.push(input);
58        self.filters = ::std::option::Option::Some(v);
59        self
60    }
61    /// <p>Filters applied to the target engine recommendations described in the form of key-value pairs.</p>
62    /// <p>Valid filter names: <code>database-id</code> | <code>engine-name</code></p>
63    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>) -> Self {
64        self.filters = input;
65        self
66    }
67    /// <p>Filters applied to the target engine recommendations described in the form of key-value pairs.</p>
68    /// <p>Valid filter names: <code>database-id</code> | <code>engine-name</code></p>
69    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
70        &self.filters
71    }
72    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, Fleet Advisor includes a pagination token in the response so that you can retrieve the remaining results.</p>
73    pub fn max_records(mut self, input: i32) -> Self {
74        self.max_records = ::std::option::Option::Some(input);
75        self
76    }
77    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, Fleet Advisor includes a pagination token in the response so that you can retrieve the remaining results.</p>
78    pub fn set_max_records(mut self, input: ::std::option::Option<i32>) -> Self {
79        self.max_records = input;
80        self
81    }
82    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, Fleet Advisor includes a pagination token in the response so that you can retrieve the remaining results.</p>
83    pub fn get_max_records(&self) -> &::std::option::Option<i32> {
84        &self.max_records
85    }
86    /// <p>Specifies the unique pagination token that makes it possible to display the next page of results. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
87    /// <p>If <code>NextToken</code> is returned by a previous response, there are more results available. The value of <code>NextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged.</p>
88    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
89        self.next_token = ::std::option::Option::Some(input.into());
90        self
91    }
92    /// <p>Specifies the unique pagination token that makes it possible to display the next page of results. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
93    /// <p>If <code>NextToken</code> is returned by a previous response, there are more results available. The value of <code>NextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged.</p>
94    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95        self.next_token = input;
96        self
97    }
98    /// <p>Specifies the unique pagination token that makes it possible to display the next page of results. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
99    /// <p>If <code>NextToken</code> is returned by a previous response, there are more results available. The value of <code>NextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged.</p>
100    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
101        &self.next_token
102    }
103    /// Consumes the builder and constructs a [`DescribeRecommendationsInput`](crate::operation::describe_recommendations::DescribeRecommendationsInput).
104    pub fn build(
105        self,
106    ) -> ::std::result::Result<
107        crate::operation::describe_recommendations::DescribeRecommendationsInput,
108        ::aws_smithy_types::error::operation::BuildError,
109    > {
110        ::std::result::Result::Ok(crate::operation::describe_recommendations::DescribeRecommendationsInput {
111            filters: self.filters,
112            max_records: self.max_records,
113            next_token: self.next_token,
114        })
115    }
116}