aws_sdk_glue/operation/get_connections/_get_connections_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 GetConnectionsInput {
6 /// <p>The ID of the Data Catalog in which the connections reside. If none is provided, the Amazon Web Services account ID is used by default.</p>
7 pub catalog_id: ::std::option::Option<::std::string::String>,
8 /// <p>A filter that controls which connections are returned.</p>
9 pub filter: ::std::option::Option<crate::types::GetConnectionsFilter>,
10 /// <p>Allows you to retrieve the connection metadata without returning the password. For instance, the Glue console uses this flag to retrieve the connection, and does not display the password. Set this parameter when the caller might not have permission to use the KMS key to decrypt the password, but it does have permission to access the rest of the connection properties.</p>
11 pub hide_password: ::std::option::Option<bool>,
12 /// <p>A continuation token, if this is a continuation call.</p>
13 pub next_token: ::std::option::Option<::std::string::String>,
14 /// <p>The maximum number of connections to return in one response.</p>
15 pub max_results: ::std::option::Option<i32>,
16}
17impl GetConnectionsInput {
18 /// <p>The ID of the Data Catalog in which the connections reside. If none is provided, the Amazon Web Services account ID is used by default.</p>
19 pub fn catalog_id(&self) -> ::std::option::Option<&str> {
20 self.catalog_id.as_deref()
21 }
22 /// <p>A filter that controls which connections are returned.</p>
23 pub fn filter(&self) -> ::std::option::Option<&crate::types::GetConnectionsFilter> {
24 self.filter.as_ref()
25 }
26 /// <p>Allows you to retrieve the connection metadata without returning the password. For instance, the Glue console uses this flag to retrieve the connection, and does not display the password. Set this parameter when the caller might not have permission to use the KMS key to decrypt the password, but it does have permission to access the rest of the connection properties.</p>
27 pub fn hide_password(&self) -> ::std::option::Option<bool> {
28 self.hide_password
29 }
30 /// <p>A continuation token, if this is a continuation call.</p>
31 pub fn next_token(&self) -> ::std::option::Option<&str> {
32 self.next_token.as_deref()
33 }
34 /// <p>The maximum number of connections to return in one response.</p>
35 pub fn max_results(&self) -> ::std::option::Option<i32> {
36 self.max_results
37 }
38}
39impl GetConnectionsInput {
40 /// Creates a new builder-style object to manufacture [`GetConnectionsInput`](crate::operation::get_connections::GetConnectionsInput).
41 pub fn builder() -> crate::operation::get_connections::builders::GetConnectionsInputBuilder {
42 crate::operation::get_connections::builders::GetConnectionsInputBuilder::default()
43 }
44}
45
46/// A builder for [`GetConnectionsInput`](crate::operation::get_connections::GetConnectionsInput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct GetConnectionsInputBuilder {
50 pub(crate) catalog_id: ::std::option::Option<::std::string::String>,
51 pub(crate) filter: ::std::option::Option<crate::types::GetConnectionsFilter>,
52 pub(crate) hide_password: ::std::option::Option<bool>,
53 pub(crate) next_token: ::std::option::Option<::std::string::String>,
54 pub(crate) max_results: ::std::option::Option<i32>,
55}
56impl GetConnectionsInputBuilder {
57 /// <p>The ID of the Data Catalog in which the connections reside. If none is provided, the Amazon Web Services account ID is used by default.</p>
58 pub fn catalog_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59 self.catalog_id = ::std::option::Option::Some(input.into());
60 self
61 }
62 /// <p>The ID of the Data Catalog in which the connections reside. If none is provided, the Amazon Web Services account ID is used by default.</p>
63 pub fn set_catalog_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
64 self.catalog_id = input;
65 self
66 }
67 /// <p>The ID of the Data Catalog in which the connections reside. If none is provided, the Amazon Web Services account ID is used by default.</p>
68 pub fn get_catalog_id(&self) -> &::std::option::Option<::std::string::String> {
69 &self.catalog_id
70 }
71 /// <p>A filter that controls which connections are returned.</p>
72 pub fn filter(mut self, input: crate::types::GetConnectionsFilter) -> Self {
73 self.filter = ::std::option::Option::Some(input);
74 self
75 }
76 /// <p>A filter that controls which connections are returned.</p>
77 pub fn set_filter(mut self, input: ::std::option::Option<crate::types::GetConnectionsFilter>) -> Self {
78 self.filter = input;
79 self
80 }
81 /// <p>A filter that controls which connections are returned.</p>
82 pub fn get_filter(&self) -> &::std::option::Option<crate::types::GetConnectionsFilter> {
83 &self.filter
84 }
85 /// <p>Allows you to retrieve the connection metadata without returning the password. For instance, the Glue console uses this flag to retrieve the connection, and does not display the password. Set this parameter when the caller might not have permission to use the KMS key to decrypt the password, but it does have permission to access the rest of the connection properties.</p>
86 pub fn hide_password(mut self, input: bool) -> Self {
87 self.hide_password = ::std::option::Option::Some(input);
88 self
89 }
90 /// <p>Allows you to retrieve the connection metadata without returning the password. For instance, the Glue console uses this flag to retrieve the connection, and does not display the password. Set this parameter when the caller might not have permission to use the KMS key to decrypt the password, but it does have permission to access the rest of the connection properties.</p>
91 pub fn set_hide_password(mut self, input: ::std::option::Option<bool>) -> Self {
92 self.hide_password = input;
93 self
94 }
95 /// <p>Allows you to retrieve the connection metadata without returning the password. For instance, the Glue console uses this flag to retrieve the connection, and does not display the password. Set this parameter when the caller might not have permission to use the KMS key to decrypt the password, but it does have permission to access the rest of the connection properties.</p>
96 pub fn get_hide_password(&self) -> &::std::option::Option<bool> {
97 &self.hide_password
98 }
99 /// <p>A continuation token, if this is a continuation call.</p>
100 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
101 self.next_token = ::std::option::Option::Some(input.into());
102 self
103 }
104 /// <p>A continuation token, if this is a continuation call.</p>
105 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
106 self.next_token = input;
107 self
108 }
109 /// <p>A continuation token, if this is a continuation call.</p>
110 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
111 &self.next_token
112 }
113 /// <p>The maximum number of connections to return in one response.</p>
114 pub fn max_results(mut self, input: i32) -> Self {
115 self.max_results = ::std::option::Option::Some(input);
116 self
117 }
118 /// <p>The maximum number of connections to return in one response.</p>
119 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
120 self.max_results = input;
121 self
122 }
123 /// <p>The maximum number of connections to return in one response.</p>
124 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
125 &self.max_results
126 }
127 /// Consumes the builder and constructs a [`GetConnectionsInput`](crate::operation::get_connections::GetConnectionsInput).
128 pub fn build(
129 self,
130 ) -> ::std::result::Result<crate::operation::get_connections::GetConnectionsInput, ::aws_smithy_types::error::operation::BuildError> {
131 ::std::result::Result::Ok(crate::operation::get_connections::GetConnectionsInput {
132 catalog_id: self.catalog_id,
133 filter: self.filter,
134 hide_password: self.hide_password,
135 next_token: self.next_token,
136 max_results: self.max_results,
137 })
138 }
139}