aws_sdk_ssmsap/operation/get_database/
_get_database_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 GetDatabaseInput {
6    /// <p>The ID of the application.</p>
7    pub application_id: ::std::option::Option<::std::string::String>,
8    /// <p>The ID of the component.</p>
9    pub component_id: ::std::option::Option<::std::string::String>,
10    /// <p>The ID of the database.</p>
11    pub database_id: ::std::option::Option<::std::string::String>,
12    /// <p>The Amazon Resource Name (ARN) of the database.</p>
13    pub database_arn: ::std::option::Option<::std::string::String>,
14}
15impl GetDatabaseInput {
16    /// <p>The ID of the application.</p>
17    pub fn application_id(&self) -> ::std::option::Option<&str> {
18        self.application_id.as_deref()
19    }
20    /// <p>The ID of the component.</p>
21    pub fn component_id(&self) -> ::std::option::Option<&str> {
22        self.component_id.as_deref()
23    }
24    /// <p>The ID of the database.</p>
25    pub fn database_id(&self) -> ::std::option::Option<&str> {
26        self.database_id.as_deref()
27    }
28    /// <p>The Amazon Resource Name (ARN) of the database.</p>
29    pub fn database_arn(&self) -> ::std::option::Option<&str> {
30        self.database_arn.as_deref()
31    }
32}
33impl GetDatabaseInput {
34    /// Creates a new builder-style object to manufacture [`GetDatabaseInput`](crate::operation::get_database::GetDatabaseInput).
35    pub fn builder() -> crate::operation::get_database::builders::GetDatabaseInputBuilder {
36        crate::operation::get_database::builders::GetDatabaseInputBuilder::default()
37    }
38}
39
40/// A builder for [`GetDatabaseInput`](crate::operation::get_database::GetDatabaseInput).
41#[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    /// <p>The ID of the application.</p>
51    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    /// <p>The ID of the application.</p>
56    pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
57        self.application_id = input;
58        self
59    }
60    /// <p>The ID of the application.</p>
61    pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
62        &self.application_id
63    }
64    /// <p>The ID of the component.</p>
65    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    /// <p>The ID of the component.</p>
70    pub fn set_component_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
71        self.component_id = input;
72        self
73    }
74    /// <p>The ID of the component.</p>
75    pub fn get_component_id(&self) -> &::std::option::Option<::std::string::String> {
76        &self.component_id
77    }
78    /// <p>The ID of the database.</p>
79    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    /// <p>The ID of the database.</p>
84    pub fn set_database_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
85        self.database_id = input;
86        self
87    }
88    /// <p>The ID of the database.</p>
89    pub fn get_database_id(&self) -> &::std::option::Option<::std::string::String> {
90        &self.database_id
91    }
92    /// <p>The Amazon Resource Name (ARN) of the database.</p>
93    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    /// <p>The Amazon Resource Name (ARN) of the database.</p>
98    pub fn set_database_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99        self.database_arn = input;
100        self
101    }
102    /// <p>The Amazon Resource Name (ARN) of the database.</p>
103    pub fn get_database_arn(&self) -> &::std::option::Option<::std::string::String> {
104        &self.database_arn
105    }
106    /// Consumes the builder and constructs a [`GetDatabaseInput`](crate::operation::get_database::GetDatabaseInput).
107    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}