aws_sdk_ssmsap/operation/get_database/
_get_database_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetDatabaseOutput {
6 pub database: ::std::option::Option<crate::types::Database>,
8 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
10 _request_id: Option<String>,
11}
12impl GetDatabaseOutput {
13 pub fn database(&self) -> ::std::option::Option<&crate::types::Database> {
15 self.database.as_ref()
16 }
17 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
19 self.tags.as_ref()
20 }
21}
22impl ::aws_types::request_id::RequestId for GetDatabaseOutput {
23 fn request_id(&self) -> Option<&str> {
24 self._request_id.as_deref()
25 }
26}
27impl GetDatabaseOutput {
28 pub fn builder() -> crate::operation::get_database::builders::GetDatabaseOutputBuilder {
30 crate::operation::get_database::builders::GetDatabaseOutputBuilder::default()
31 }
32}
33
34#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct GetDatabaseOutputBuilder {
38 pub(crate) database: ::std::option::Option<crate::types::Database>,
39 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
40 _request_id: Option<String>,
41}
42impl GetDatabaseOutputBuilder {
43 pub fn database(mut self, input: crate::types::Database) -> Self {
45 self.database = ::std::option::Option::Some(input);
46 self
47 }
48 pub fn set_database(mut self, input: ::std::option::Option<crate::types::Database>) -> Self {
50 self.database = input;
51 self
52 }
53 pub fn get_database(&self) -> &::std::option::Option<crate::types::Database> {
55 &self.database
56 }
57 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
63 let mut hash_map = self.tags.unwrap_or_default();
64 hash_map.insert(k.into(), v.into());
65 self.tags = ::std::option::Option::Some(hash_map);
66 self
67 }
68 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
70 self.tags = input;
71 self
72 }
73 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
75 &self.tags
76 }
77 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
78 self._request_id = Some(request_id.into());
79 self
80 }
81
82 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
83 self._request_id = request_id;
84 self
85 }
86 pub fn build(self) -> crate::operation::get_database::GetDatabaseOutput {
88 crate::operation::get_database::GetDatabaseOutput {
89 database: self.database,
90 tags: self.tags,
91 _request_id: self._request_id,
92 }
93 }
94}