aws_sdk_ssmsap/operation/get_database/
_get_database_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetDatabaseInput {
6 pub application_id: ::std::option::Option<::std::string::String>,
8 pub component_id: ::std::option::Option<::std::string::String>,
10 pub database_id: ::std::option::Option<::std::string::String>,
12 pub database_arn: ::std::option::Option<::std::string::String>,
14}
15impl GetDatabaseInput {
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 database_id(&self) -> ::std::option::Option<&str> {
26 self.database_id.as_deref()
27 }
28 pub fn database_arn(&self) -> ::std::option::Option<&str> {
30 self.database_arn.as_deref()
31 }
32}
33impl GetDatabaseInput {
34 pub fn builder() -> crate::operation::get_database::builders::GetDatabaseInputBuilder {
36 crate::operation::get_database::builders::GetDatabaseInputBuilder::default()
37 }
38}
39
40#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct GetDatabaseInputBuilder {
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) database_id: ::std::option::Option<::std::string::String>,
47 pub(crate) database_arn: ::std::option::Option<::std::string::String>,
48}
49impl GetDatabaseInputBuilder {
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 database_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
80 self.database_id = ::std::option::Option::Some(input.into());
81 self
82 }
83 pub fn set_database_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
85 self.database_id = input;
86 self
87 }
88 pub fn get_database_id(&self) -> &::std::option::Option<::std::string::String> {
90 &self.database_id
91 }
92 pub fn database_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
94 self.database_arn = ::std::option::Option::Some(input.into());
95 self
96 }
97 pub fn set_database_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99 self.database_arn = input;
100 self
101 }
102 pub fn get_database_arn(&self) -> &::std::option::Option<::std::string::String> {
104 &self.database_arn
105 }
106 pub fn build(self) -> ::std::result::Result<crate::operation::get_database::GetDatabaseInput, ::aws_smithy_types::error::operation::BuildError> {
108 ::std::result::Result::Ok(crate::operation::get_database::GetDatabaseInput {
109 application_id: self.application_id,
110 component_id: self.component_id,
111 database_id: self.database_id,
112 database_arn: self.database_arn,
113 })
114 }
115}