aws_sdk_ssmsap/operation/list_databases/
_list_databases_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 ListDatabasesInput {
6    /// <p>The ID of the application.</p>
7    pub application_id: ::std::option::Option<::std::string::String>,
8    /// <p>The ID of the component.</p>
9    pub component_id: ::std::option::Option<::std::string::String>,
10    /// <p>The token for the next page of results.</p>
11    pub next_token: ::std::option::Option<::std::string::String>,
12    /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value. If you do not specify a value for MaxResults, the request returns 50 items per page by default.</p>
13    pub max_results: ::std::option::Option<i32>,
14}
15impl ListDatabasesInput {
16    /// <p>The ID of the application.</p>
17    pub fn application_id(&self) -> ::std::option::Option<&str> {
18        self.application_id.as_deref()
19    }
20    /// <p>The ID of the component.</p>
21    pub fn component_id(&self) -> ::std::option::Option<&str> {
22        self.component_id.as_deref()
23    }
24    /// <p>The token for the next page of results.</p>
25    pub fn next_token(&self) -> ::std::option::Option<&str> {
26        self.next_token.as_deref()
27    }
28    /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value. If you do not specify a value for MaxResults, the request returns 50 items per page by default.</p>
29    pub fn max_results(&self) -> ::std::option::Option<i32> {
30        self.max_results
31    }
32}
33impl ListDatabasesInput {
34    /// Creates a new builder-style object to manufacture [`ListDatabasesInput`](crate::operation::list_databases::ListDatabasesInput).
35    pub fn builder() -> crate::operation::list_databases::builders::ListDatabasesInputBuilder {
36        crate::operation::list_databases::builders::ListDatabasesInputBuilder::default()
37    }
38}
39
40/// A builder for [`ListDatabasesInput`](crate::operation::list_databases::ListDatabasesInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct ListDatabasesInputBuilder {
44    pub(crate) application_id: ::std::option::Option<::std::string::String>,
45    pub(crate) component_id: ::std::option::Option<::std::string::String>,
46    pub(crate) next_token: ::std::option::Option<::std::string::String>,
47    pub(crate) max_results: ::std::option::Option<i32>,
48}
49impl ListDatabasesInputBuilder {
50    /// <p>The ID of the application.</p>
51    pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
52        self.application_id = ::std::option::Option::Some(input.into());
53        self
54    }
55    /// <p>The ID of the application.</p>
56    pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
57        self.application_id = input;
58        self
59    }
60    /// <p>The ID of the application.</p>
61    pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
62        &self.application_id
63    }
64    /// <p>The ID of the component.</p>
65    pub fn component_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
66        self.component_id = ::std::option::Option::Some(input.into());
67        self
68    }
69    /// <p>The ID of the component.</p>
70    pub fn set_component_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
71        self.component_id = input;
72        self
73    }
74    /// <p>The ID of the component.</p>
75    pub fn get_component_id(&self) -> &::std::option::Option<::std::string::String> {
76        &self.component_id
77    }
78    /// <p>The token for the next page of results.</p>
79    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
80        self.next_token = ::std::option::Option::Some(input.into());
81        self
82    }
83    /// <p>The token for the next page of results.</p>
84    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
85        self.next_token = input;
86        self
87    }
88    /// <p>The token for the next page of results.</p>
89    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
90        &self.next_token
91    }
92    /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value. If you do not specify a value for MaxResults, the request returns 50 items per page by default.</p>
93    pub fn max_results(mut self, input: i32) -> Self {
94        self.max_results = ::std::option::Option::Some(input);
95        self
96    }
97    /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value. If you do not specify a value for MaxResults, the request returns 50 items per page by default.</p>
98    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
99        self.max_results = input;
100        self
101    }
102    /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value. If you do not specify a value for MaxResults, the request returns 50 items per page by default.</p>
103    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
104        &self.max_results
105    }
106    /// Consumes the builder and constructs a [`ListDatabasesInput`](crate::operation::list_databases::ListDatabasesInput).
107    pub fn build(
108        self,
109    ) -> ::std::result::Result<crate::operation::list_databases::ListDatabasesInput, ::aws_smithy_types::error::operation::BuildError> {
110        ::std::result::Result::Ok(crate::operation::list_databases::ListDatabasesInput {
111            application_id: self.application_id,
112            component_id: self.component_id,
113            next_token: self.next_token,
114            max_results: self.max_results,
115        })
116    }
117}