aws_sdk_opensearch/operation/update_application/
_update_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 UpdateApplicationOutput {
6    /// <p>The unique identifier of the updated OpenSearch application.</p>
7    pub id: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the updated OpenSearch application.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>The Amazon Resource Name (ARN) of the domain. See <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/index.html">Identifiers for IAM Entities </a> in <i>Using Amazon Web Services Identity and Access Management</i> for more information.</p>
11    pub arn: ::std::option::Option<::std::string::String>,
12    /// <p>The data sources associated with the updated OpenSearch application.</p>
13    pub data_sources: ::std::option::Option<::std::vec::Vec<crate::types::DataSource>>,
14    /// <p>The IAM Identity Center configuration for the updated OpenSearch application.</p>
15    pub iam_identity_center_options: ::std::option::Option<crate::types::IamIdentityCenterOptions>,
16    /// <p>The configuration settings for the updated OpenSearch application.</p>
17    pub app_configs: ::std::option::Option<::std::vec::Vec<crate::types::AppConfig>>,
18    /// <p>The timestamp when the OpenSearch application was originally created.</p>
19    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
20    /// <p>The timestamp when the OpenSearch application was last updated.</p>
21    pub last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
22    _request_id: Option<String>,
23}
24impl UpdateApplicationOutput {
25    /// <p>The unique identifier of the updated OpenSearch application.</p>
26    pub fn id(&self) -> ::std::option::Option<&str> {
27        self.id.as_deref()
28    }
29    /// <p>The name of the updated OpenSearch application.</p>
30    pub fn name(&self) -> ::std::option::Option<&str> {
31        self.name.as_deref()
32    }
33    /// <p>The Amazon Resource Name (ARN) of the domain. See <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/index.html">Identifiers for IAM Entities </a> in <i>Using Amazon Web Services Identity and Access Management</i> for more information.</p>
34    pub fn arn(&self) -> ::std::option::Option<&str> {
35        self.arn.as_deref()
36    }
37    /// <p>The data sources associated with the updated OpenSearch application.</p>
38    ///
39    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.data_sources.is_none()`.
40    pub fn data_sources(&self) -> &[crate::types::DataSource] {
41        self.data_sources.as_deref().unwrap_or_default()
42    }
43    /// <p>The IAM Identity Center configuration for the updated OpenSearch application.</p>
44    pub fn iam_identity_center_options(&self) -> ::std::option::Option<&crate::types::IamIdentityCenterOptions> {
45        self.iam_identity_center_options.as_ref()
46    }
47    /// <p>The configuration settings for the updated OpenSearch application.</p>
48    ///
49    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.app_configs.is_none()`.
50    pub fn app_configs(&self) -> &[crate::types::AppConfig] {
51        self.app_configs.as_deref().unwrap_or_default()
52    }
53    /// <p>The timestamp when the OpenSearch application was originally created.</p>
54    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
55        self.created_at.as_ref()
56    }
57    /// <p>The timestamp when the OpenSearch application was last updated.</p>
58    pub fn last_updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
59        self.last_updated_at.as_ref()
60    }
61}
62impl ::aws_types::request_id::RequestId for UpdateApplicationOutput {
63    fn request_id(&self) -> Option<&str> {
64        self._request_id.as_deref()
65    }
66}
67impl UpdateApplicationOutput {
68    /// Creates a new builder-style object to manufacture [`UpdateApplicationOutput`](crate::operation::update_application::UpdateApplicationOutput).
69    pub fn builder() -> crate::operation::update_application::builders::UpdateApplicationOutputBuilder {
70        crate::operation::update_application::builders::UpdateApplicationOutputBuilder::default()
71    }
72}
73
74/// A builder for [`UpdateApplicationOutput`](crate::operation::update_application::UpdateApplicationOutput).
75#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
76#[non_exhaustive]
77pub struct UpdateApplicationOutputBuilder {
78    pub(crate) id: ::std::option::Option<::std::string::String>,
79    pub(crate) name: ::std::option::Option<::std::string::String>,
80    pub(crate) arn: ::std::option::Option<::std::string::String>,
81    pub(crate) data_sources: ::std::option::Option<::std::vec::Vec<crate::types::DataSource>>,
82    pub(crate) iam_identity_center_options: ::std::option::Option<crate::types::IamIdentityCenterOptions>,
83    pub(crate) app_configs: ::std::option::Option<::std::vec::Vec<crate::types::AppConfig>>,
84    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
85    pub(crate) last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
86    _request_id: Option<String>,
87}
88impl UpdateApplicationOutputBuilder {
89    /// <p>The unique identifier of the updated OpenSearch application.</p>
90    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
91        self.id = ::std::option::Option::Some(input.into());
92        self
93    }
94    /// <p>The unique identifier of the updated OpenSearch application.</p>
95    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
96        self.id = input;
97        self
98    }
99    /// <p>The unique identifier of the updated OpenSearch application.</p>
100    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
101        &self.id
102    }
103    /// <p>The name of the updated OpenSearch application.</p>
104    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
105        self.name = ::std::option::Option::Some(input.into());
106        self
107    }
108    /// <p>The name of the updated OpenSearch application.</p>
109    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
110        self.name = input;
111        self
112    }
113    /// <p>The name of the updated OpenSearch application.</p>
114    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
115        &self.name
116    }
117    /// <p>The Amazon Resource Name (ARN) of the domain. See <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/index.html">Identifiers for IAM Entities </a> in <i>Using Amazon Web Services Identity and Access Management</i> for more information.</p>
118    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
119        self.arn = ::std::option::Option::Some(input.into());
120        self
121    }
122    /// <p>The Amazon Resource Name (ARN) of the domain. See <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/index.html">Identifiers for IAM Entities </a> in <i>Using Amazon Web Services Identity and Access Management</i> for more information.</p>
123    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
124        self.arn = input;
125        self
126    }
127    /// <p>The Amazon Resource Name (ARN) of the domain. See <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/index.html">Identifiers for IAM Entities </a> in <i>Using Amazon Web Services Identity and Access Management</i> for more information.</p>
128    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
129        &self.arn
130    }
131    /// Appends an item to `data_sources`.
132    ///
133    /// To override the contents of this collection use [`set_data_sources`](Self::set_data_sources).
134    ///
135    /// <p>The data sources associated with the updated OpenSearch application.</p>
136    pub fn data_sources(mut self, input: crate::types::DataSource) -> Self {
137        let mut v = self.data_sources.unwrap_or_default();
138        v.push(input);
139        self.data_sources = ::std::option::Option::Some(v);
140        self
141    }
142    /// <p>The data sources associated with the updated OpenSearch application.</p>
143    pub fn set_data_sources(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DataSource>>) -> Self {
144        self.data_sources = input;
145        self
146    }
147    /// <p>The data sources associated with the updated OpenSearch application.</p>
148    pub fn get_data_sources(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DataSource>> {
149        &self.data_sources
150    }
151    /// <p>The IAM Identity Center configuration for the updated OpenSearch application.</p>
152    pub fn iam_identity_center_options(mut self, input: crate::types::IamIdentityCenterOptions) -> Self {
153        self.iam_identity_center_options = ::std::option::Option::Some(input);
154        self
155    }
156    /// <p>The IAM Identity Center configuration for the updated OpenSearch application.</p>
157    pub fn set_iam_identity_center_options(mut self, input: ::std::option::Option<crate::types::IamIdentityCenterOptions>) -> Self {
158        self.iam_identity_center_options = input;
159        self
160    }
161    /// <p>The IAM Identity Center configuration for the updated OpenSearch application.</p>
162    pub fn get_iam_identity_center_options(&self) -> &::std::option::Option<crate::types::IamIdentityCenterOptions> {
163        &self.iam_identity_center_options
164    }
165    /// Appends an item to `app_configs`.
166    ///
167    /// To override the contents of this collection use [`set_app_configs`](Self::set_app_configs).
168    ///
169    /// <p>The configuration settings for the updated OpenSearch application.</p>
170    pub fn app_configs(mut self, input: crate::types::AppConfig) -> Self {
171        let mut v = self.app_configs.unwrap_or_default();
172        v.push(input);
173        self.app_configs = ::std::option::Option::Some(v);
174        self
175    }
176    /// <p>The configuration settings for the updated OpenSearch application.</p>
177    pub fn set_app_configs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AppConfig>>) -> Self {
178        self.app_configs = input;
179        self
180    }
181    /// <p>The configuration settings for the updated OpenSearch application.</p>
182    pub fn get_app_configs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AppConfig>> {
183        &self.app_configs
184    }
185    /// <p>The timestamp when the OpenSearch application was originally created.</p>
186    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
187        self.created_at = ::std::option::Option::Some(input);
188        self
189    }
190    /// <p>The timestamp when the OpenSearch application was originally created.</p>
191    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
192        self.created_at = input;
193        self
194    }
195    /// <p>The timestamp when the OpenSearch application was originally created.</p>
196    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
197        &self.created_at
198    }
199    /// <p>The timestamp when the OpenSearch application was last updated.</p>
200    pub fn last_updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
201        self.last_updated_at = ::std::option::Option::Some(input);
202        self
203    }
204    /// <p>The timestamp when the OpenSearch application was last updated.</p>
205    pub fn set_last_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
206        self.last_updated_at = input;
207        self
208    }
209    /// <p>The timestamp when the OpenSearch application was last updated.</p>
210    pub fn get_last_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
211        &self.last_updated_at
212    }
213    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
214        self._request_id = Some(request_id.into());
215        self
216    }
217
218    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
219        self._request_id = request_id;
220        self
221    }
222    /// Consumes the builder and constructs a [`UpdateApplicationOutput`](crate::operation::update_application::UpdateApplicationOutput).
223    pub fn build(self) -> crate::operation::update_application::UpdateApplicationOutput {
224        crate::operation::update_application::UpdateApplicationOutput {
225            id: self.id,
226            name: self.name,
227            arn: self.arn,
228            data_sources: self.data_sources,
229            iam_identity_center_options: self.iam_identity_center_options,
230            app_configs: self.app_configs,
231            created_at: self.created_at,
232            last_updated_at: self.last_updated_at,
233            _request_id: self._request_id,
234        }
235    }
236}