aws_sdk_ssmsap/operation/list_databases/
_list_databases_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct ListDatabasesInput {
6 pub application_id: ::std::option::Option<::std::string::String>,
8 pub component_id: ::std::option::Option<::std::string::String>,
10 pub next_token: ::std::option::Option<::std::string::String>,
12 pub max_results: ::std::option::Option<i32>,
14}
15impl ListDatabasesInput {
16 pub fn application_id(&self) -> ::std::option::Option<&str> {
18 self.application_id.as_deref()
19 }
20 pub fn component_id(&self) -> ::std::option::Option<&str> {
22 self.component_id.as_deref()
23 }
24 pub fn next_token(&self) -> ::std::option::Option<&str> {
26 self.next_token.as_deref()
27 }
28 pub fn max_results(&self) -> ::std::option::Option<i32> {
30 self.max_results
31 }
32}
33impl ListDatabasesInput {
34 pub fn builder() -> crate::operation::list_databases::builders::ListDatabasesInputBuilder {
36 crate::operation::list_databases::builders::ListDatabasesInputBuilder::default()
37 }
38}
39
40#[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 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 pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
57 self.application_id = input;
58 self
59 }
60 pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
62 &self.application_id
63 }
64 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 pub fn set_component_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
71 self.component_id = input;
72 self
73 }
74 pub fn get_component_id(&self) -> &::std::option::Option<::std::string::String> {
76 &self.component_id
77 }
78 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 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
85 self.next_token = input;
86 self
87 }
88 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
90 &self.next_token
91 }
92 pub fn max_results(mut self, input: i32) -> Self {
94 self.max_results = ::std::option::Option::Some(input);
95 self
96 }
97 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
99 self.max_results = input;
100 self
101 }
102 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
104 &self.max_results
105 }
106 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}