Skip to main content

aws_sdk_athena/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 name of the data catalog that contains the databases to return.</p>
7    pub catalog_name: ::std::option::Option<::std::string::String>,
8    /// <p>A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the <code>NextToken</code> from the response object of the previous page call.</p>
9    pub next_token: ::std::option::Option<::std::string::String>,
10    /// <p>Specifies the maximum number of results to return.</p>
11    pub max_results: ::std::option::Option<i32>,
12    /// <p>The name of the workgroup for which the metadata is being fetched. Required if requesting an IAM Identity Center enabled Glue Data Catalog.</p>
13    pub work_group: ::std::option::Option<::std::string::String>,
14}
15impl ListDatabasesInput {
16    /// <p>The name of the data catalog that contains the databases to return.</p>
17    pub fn catalog_name(&self) -> ::std::option::Option<&str> {
18        self.catalog_name.as_deref()
19    }
20    /// <p>A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the <code>NextToken</code> from the response object of the previous page call.</p>
21    pub fn next_token(&self) -> ::std::option::Option<&str> {
22        self.next_token.as_deref()
23    }
24    /// <p>Specifies the maximum number of results to return.</p>
25    pub fn max_results(&self) -> ::std::option::Option<i32> {
26        self.max_results
27    }
28    /// <p>The name of the workgroup for which the metadata is being fetched. Required if requesting an IAM Identity Center enabled Glue Data Catalog.</p>
29    pub fn work_group(&self) -> ::std::option::Option<&str> {
30        self.work_group.as_deref()
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) catalog_name: ::std::option::Option<::std::string::String>,
45    pub(crate) next_token: ::std::option::Option<::std::string::String>,
46    pub(crate) max_results: ::std::option::Option<i32>,
47    pub(crate) work_group: ::std::option::Option<::std::string::String>,
48}
49impl ListDatabasesInputBuilder {
50    /// <p>The name of the data catalog that contains the databases to return.</p>
51    /// This field is required.
52    pub fn catalog_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.catalog_name = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The name of the data catalog that contains the databases to return.</p>
57    pub fn set_catalog_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.catalog_name = input;
59        self
60    }
61    /// <p>The name of the data catalog that contains the databases to return.</p>
62    pub fn get_catalog_name(&self) -> &::std::option::Option<::std::string::String> {
63        &self.catalog_name
64    }
65    /// <p>A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the <code>NextToken</code> from the response object of the previous page call.</p>
66    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.next_token = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the <code>NextToken</code> from the response object of the previous page call.</p>
71    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.next_token = input;
73        self
74    }
75    /// <p>A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the <code>NextToken</code> from the response object of the previous page call.</p>
76    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
77        &self.next_token
78    }
79    /// <p>Specifies the maximum number of results to return.</p>
80    pub fn max_results(mut self, input: i32) -> Self {
81        self.max_results = ::std::option::Option::Some(input);
82        self
83    }
84    /// <p>Specifies the maximum number of results to return.</p>
85    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
86        self.max_results = input;
87        self
88    }
89    /// <p>Specifies the maximum number of results to return.</p>
90    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
91        &self.max_results
92    }
93    /// <p>The name of the workgroup for which the metadata is being fetched. Required if requesting an IAM Identity Center enabled Glue Data Catalog.</p>
94    pub fn work_group(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95        self.work_group = ::std::option::Option::Some(input.into());
96        self
97    }
98    /// <p>The name of the workgroup for which the metadata is being fetched. Required if requesting an IAM Identity Center enabled Glue Data Catalog.</p>
99    pub fn set_work_group(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100        self.work_group = input;
101        self
102    }
103    /// <p>The name of the workgroup for which the metadata is being fetched. Required if requesting an IAM Identity Center enabled Glue Data Catalog.</p>
104    pub fn get_work_group(&self) -> &::std::option::Option<::std::string::String> {
105        &self.work_group
106    }
107    /// Consumes the builder and constructs a [`ListDatabasesInput`](crate::operation::list_databases::ListDatabasesInput).
108    pub fn build(
109        self,
110    ) -> ::std::result::Result<crate::operation::list_databases::ListDatabasesInput, ::aws_smithy_types::error::operation::BuildError> {
111        ::std::result::Result::Ok(crate::operation::list_databases::ListDatabasesInput {
112            catalog_name: self.catalog_name,
113            next_token: self.next_token,
114            max_results: self.max_results,
115            work_group: self.work_group,
116        })
117    }
118}