1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct GetCredentialsOutput {
/// <p>A database user name that is authorized to log on to the database <code>DbName</code> using the password <code>DbPassword</code>. If the specified <code>DbUser</code> exists in the database, the new user name has the same database privileges as the the user named in <code>DbUser</code>. By default, the user is added to PUBLIC.</p>
pub db_user: ::std::option::Option<::std::string::String>,
/// <p>A temporary password that authorizes the user name returned by <code>DbUser</code> to log on to the database <code>DbName</code>.</p>
pub db_password: ::std::option::Option<::std::string::String>,
/// <p>The date and time the password in <code>DbPassword</code> expires.</p>
pub expiration: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The date and time of when the <code>DbUser</code> and <code>DbPassword</code> authorization refreshes.</p>
pub next_refresh_time: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl GetCredentialsOutput {
/// <p>A database user name that is authorized to log on to the database <code>DbName</code> using the password <code>DbPassword</code>. If the specified <code>DbUser</code> exists in the database, the new user name has the same database privileges as the the user named in <code>DbUser</code>. By default, the user is added to PUBLIC.</p>
pub fn db_user(&self) -> ::std::option::Option<&str> {
self.db_user.as_deref()
}
/// <p>A temporary password that authorizes the user name returned by <code>DbUser</code> to log on to the database <code>DbName</code>.</p>
pub fn db_password(&self) -> ::std::option::Option<&str> {
self.db_password.as_deref()
}
/// <p>The date and time the password in <code>DbPassword</code> expires.</p>
pub fn expiration(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.expiration.as_ref()
}
/// <p>The date and time of when the <code>DbUser</code> and <code>DbPassword</code> authorization refreshes.</p>
pub fn next_refresh_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.next_refresh_time.as_ref()
}
}
impl ::std::fmt::Debug for GetCredentialsOutput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("GetCredentialsOutput");
formatter.field("db_user", &"*** Sensitive Data Redacted ***");
formatter.field("db_password", &"*** Sensitive Data Redacted ***");
formatter.field("expiration", &self.expiration);
formatter.field("next_refresh_time", &self.next_refresh_time);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}
impl ::aws_types::request_id::RequestId for GetCredentialsOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetCredentialsOutput {
/// Creates a new builder-style object to manufacture [`GetCredentialsOutput`](crate::operation::get_credentials::GetCredentialsOutput).
pub fn builder() -> crate::operation::get_credentials::builders::GetCredentialsOutputBuilder {
crate::operation::get_credentials::builders::GetCredentialsOutputBuilder::default()
}
}
/// A builder for [`GetCredentialsOutput`](crate::operation::get_credentials::GetCredentialsOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct GetCredentialsOutputBuilder {
pub(crate) db_user: ::std::option::Option<::std::string::String>,
pub(crate) db_password: ::std::option::Option<::std::string::String>,
pub(crate) expiration: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) next_refresh_time: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl GetCredentialsOutputBuilder {
/// <p>A database user name that is authorized to log on to the database <code>DbName</code> using the password <code>DbPassword</code>. If the specified <code>DbUser</code> exists in the database, the new user name has the same database privileges as the the user named in <code>DbUser</code>. By default, the user is added to PUBLIC.</p>
pub fn db_user(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.db_user = ::std::option::Option::Some(input.into());
self
}
/// <p>A database user name that is authorized to log on to the database <code>DbName</code> using the password <code>DbPassword</code>. If the specified <code>DbUser</code> exists in the database, the new user name has the same database privileges as the the user named in <code>DbUser</code>. By default, the user is added to PUBLIC.</p>
pub fn set_db_user(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.db_user = input;
self
}
/// <p>A database user name that is authorized to log on to the database <code>DbName</code> using the password <code>DbPassword</code>. If the specified <code>DbUser</code> exists in the database, the new user name has the same database privileges as the the user named in <code>DbUser</code>. By default, the user is added to PUBLIC.</p>
pub fn get_db_user(&self) -> &::std::option::Option<::std::string::String> {
&self.db_user
}
/// <p>A temporary password that authorizes the user name returned by <code>DbUser</code> to log on to the database <code>DbName</code>.</p>
pub fn db_password(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.db_password = ::std::option::Option::Some(input.into());
self
}
/// <p>A temporary password that authorizes the user name returned by <code>DbUser</code> to log on to the database <code>DbName</code>.</p>
pub fn set_db_password(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.db_password = input;
self
}
/// <p>A temporary password that authorizes the user name returned by <code>DbUser</code> to log on to the database <code>DbName</code>.</p>
pub fn get_db_password(&self) -> &::std::option::Option<::std::string::String> {
&self.db_password
}
/// <p>The date and time the password in <code>DbPassword</code> expires.</p>
pub fn expiration(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.expiration = ::std::option::Option::Some(input);
self
}
/// <p>The date and time the password in <code>DbPassword</code> expires.</p>
pub fn set_expiration(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.expiration = input;
self
}
/// <p>The date and time the password in <code>DbPassword</code> expires.</p>
pub fn get_expiration(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.expiration
}
/// <p>The date and time of when the <code>DbUser</code> and <code>DbPassword</code> authorization refreshes.</p>
pub fn next_refresh_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.next_refresh_time = ::std::option::Option::Some(input);
self
}
/// <p>The date and time of when the <code>DbUser</code> and <code>DbPassword</code> authorization refreshes.</p>
pub fn set_next_refresh_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.next_refresh_time = input;
self
}
/// <p>The date and time of when the <code>DbUser</code> and <code>DbPassword</code> authorization refreshes.</p>
pub fn get_next_refresh_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.next_refresh_time
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
/// Consumes the builder and constructs a [`GetCredentialsOutput`](crate::operation::get_credentials::GetCredentialsOutput).
pub fn build(self) -> crate::operation::get_credentials::GetCredentialsOutput {
crate::operation::get_credentials::GetCredentialsOutput {
db_user: self.db_user,
db_password: self.db_password,
expiration: self.expiration,
next_refresh_time: self.next_refresh_time,
_request_id: self._request_id,
}
}
}
impl ::std::fmt::Debug for GetCredentialsOutputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("GetCredentialsOutputBuilder");
formatter.field("db_user", &"*** Sensitive Data Redacted ***");
formatter.field("db_password", &"*** Sensitive Data Redacted ***");
formatter.field("expiration", &self.expiration);
formatter.field("next_refresh_time", &self.next_refresh_time);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}