aws_sdk_ssmsap/operation/get_application/
_get_application_output.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 GetApplicationOutput {
6    /// <p>Returns all of the metadata of an application registered with AWS Systems Manager for SAP.</p>
7    pub application: ::std::option::Option<crate::types::Application>,
8    /// <p>The tags of a registered application.</p>
9    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
10    _request_id: Option<String>,
11}
12impl GetApplicationOutput {
13    /// <p>Returns all of the metadata of an application registered with AWS Systems Manager for SAP.</p>
14    pub fn application(&self) -> ::std::option::Option<&crate::types::Application> {
15        self.application.as_ref()
16    }
17    /// <p>The tags of a registered application.</p>
18    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 GetApplicationOutput {
23    fn request_id(&self) -> Option<&str> {
24        self._request_id.as_deref()
25    }
26}
27impl GetApplicationOutput {
28    /// Creates a new builder-style object to manufacture [`GetApplicationOutput`](crate::operation::get_application::GetApplicationOutput).
29    pub fn builder() -> crate::operation::get_application::builders::GetApplicationOutputBuilder {
30        crate::operation::get_application::builders::GetApplicationOutputBuilder::default()
31    }
32}
33
34/// A builder for [`GetApplicationOutput`](crate::operation::get_application::GetApplicationOutput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct GetApplicationOutputBuilder {
38    pub(crate) application: ::std::option::Option<crate::types::Application>,
39    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
40    _request_id: Option<String>,
41}
42impl GetApplicationOutputBuilder {
43    /// <p>Returns all of the metadata of an application registered with AWS Systems Manager for SAP.</p>
44    pub fn application(mut self, input: crate::types::Application) -> Self {
45        self.application = ::std::option::Option::Some(input);
46        self
47    }
48    /// <p>Returns all of the metadata of an application registered with AWS Systems Manager for SAP.</p>
49    pub fn set_application(mut self, input: ::std::option::Option<crate::types::Application>) -> Self {
50        self.application = input;
51        self
52    }
53    /// <p>Returns all of the metadata of an application registered with AWS Systems Manager for SAP.</p>
54    pub fn get_application(&self) -> &::std::option::Option<crate::types::Application> {
55        &self.application
56    }
57    /// Adds a key-value pair to `tags`.
58    ///
59    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
60    ///
61    /// <p>The tags of a registered application.</p>
62    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    /// <p>The tags of a registered application.</p>
69    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    /// <p>The tags of a registered application.</p>
74    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    /// Consumes the builder and constructs a [`GetApplicationOutput`](crate::operation::get_application::GetApplicationOutput).
87    pub fn build(self) -> crate::operation::get_application::GetApplicationOutput {
88        crate::operation::get_application::GetApplicationOutput {
89            application: self.application,
90            tags: self.tags,
91            _request_id: self._request_id,
92        }
93    }
94}