aws_sdk_opensearch/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>The unique identifier of the OpenSearch application.</p>
7    pub id: ::std::option::Option<::std::string::String>,
8    /// <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>
9    pub arn: ::std::option::Option<::std::string::String>,
10    /// <p>The name of the OpenSearch application.</p>
11    pub name: ::std::option::Option<::std::string::String>,
12    /// <p>The endpoint URL of the OpenSearch application.</p>
13    pub endpoint: ::std::option::Option<::std::string::String>,
14    /// <p>The current status of the OpenSearch application. Possible values: <code>CREATING</code>, <code>UPDATING</code>, <code>DELETING</code>, <code>FAILED</code>, <code>ACTIVE</code>, and <code>DELETED</code>.</p>
15    pub status: ::std::option::Option<crate::types::ApplicationStatus>,
16    /// <p>The IAM Identity Center settings configured for the OpenSearch application.</p>
17    pub iam_identity_center_options: ::std::option::Option<crate::types::IamIdentityCenterOptions>,
18    /// <p>The data sources associated with the OpenSearch application.</p>
19    pub data_sources: ::std::option::Option<::std::vec::Vec<crate::types::DataSource>>,
20    /// <p>The configuration settings of the OpenSearch application.</p>
21    pub app_configs: ::std::option::Option<::std::vec::Vec<crate::types::AppConfig>>,
22    /// <p>The timestamp when the OpenSearch application was created.</p>
23    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
24    /// <p>The timestamp of the last update to the OpenSearch application.</p>
25    pub last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
26    /// <p>The Amazon Resource Name (ARN) of the KMS key used to encrypt the application's data at rest.</p>
27    pub kms_key_arn: ::std::option::Option<::std::string::String>,
28    _request_id: Option<String>,
29}
30impl GetApplicationOutput {
31    /// <p>The unique identifier of the OpenSearch application.</p>
32    pub fn id(&self) -> ::std::option::Option<&str> {
33        self.id.as_deref()
34    }
35    /// <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>
36    pub fn arn(&self) -> ::std::option::Option<&str> {
37        self.arn.as_deref()
38    }
39    /// <p>The name of the OpenSearch application.</p>
40    pub fn name(&self) -> ::std::option::Option<&str> {
41        self.name.as_deref()
42    }
43    /// <p>The endpoint URL of the OpenSearch application.</p>
44    pub fn endpoint(&self) -> ::std::option::Option<&str> {
45        self.endpoint.as_deref()
46    }
47    /// <p>The current status of the OpenSearch application. Possible values: <code>CREATING</code>, <code>UPDATING</code>, <code>DELETING</code>, <code>FAILED</code>, <code>ACTIVE</code>, and <code>DELETED</code>.</p>
48    pub fn status(&self) -> ::std::option::Option<&crate::types::ApplicationStatus> {
49        self.status.as_ref()
50    }
51    /// <p>The IAM Identity Center settings configured for the OpenSearch application.</p>
52    pub fn iam_identity_center_options(&self) -> ::std::option::Option<&crate::types::IamIdentityCenterOptions> {
53        self.iam_identity_center_options.as_ref()
54    }
55    /// <p>The data sources associated with the OpenSearch application.</p>
56    ///
57    /// 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()`.
58    pub fn data_sources(&self) -> &[crate::types::DataSource] {
59        self.data_sources.as_deref().unwrap_or_default()
60    }
61    /// <p>The configuration settings of the OpenSearch application.</p>
62    ///
63    /// 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()`.
64    pub fn app_configs(&self) -> &[crate::types::AppConfig] {
65        self.app_configs.as_deref().unwrap_or_default()
66    }
67    /// <p>The timestamp when the OpenSearch application was created.</p>
68    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
69        self.created_at.as_ref()
70    }
71    /// <p>The timestamp of the last update to the OpenSearch application.</p>
72    pub fn last_updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
73        self.last_updated_at.as_ref()
74    }
75    /// <p>The Amazon Resource Name (ARN) of the KMS key used to encrypt the application's data at rest.</p>
76    pub fn kms_key_arn(&self) -> ::std::option::Option<&str> {
77        self.kms_key_arn.as_deref()
78    }
79}
80impl ::aws_types::request_id::RequestId for GetApplicationOutput {
81    fn request_id(&self) -> Option<&str> {
82        self._request_id.as_deref()
83    }
84}
85impl GetApplicationOutput {
86    /// Creates a new builder-style object to manufacture [`GetApplicationOutput`](crate::operation::get_application::GetApplicationOutput).
87    pub fn builder() -> crate::operation::get_application::builders::GetApplicationOutputBuilder {
88        crate::operation::get_application::builders::GetApplicationOutputBuilder::default()
89    }
90}
91
92/// A builder for [`GetApplicationOutput`](crate::operation::get_application::GetApplicationOutput).
93#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
94#[non_exhaustive]
95pub struct GetApplicationOutputBuilder {
96    pub(crate) id: ::std::option::Option<::std::string::String>,
97    pub(crate) arn: ::std::option::Option<::std::string::String>,
98    pub(crate) name: ::std::option::Option<::std::string::String>,
99    pub(crate) endpoint: ::std::option::Option<::std::string::String>,
100    pub(crate) status: ::std::option::Option<crate::types::ApplicationStatus>,
101    pub(crate) iam_identity_center_options: ::std::option::Option<crate::types::IamIdentityCenterOptions>,
102    pub(crate) data_sources: ::std::option::Option<::std::vec::Vec<crate::types::DataSource>>,
103    pub(crate) app_configs: ::std::option::Option<::std::vec::Vec<crate::types::AppConfig>>,
104    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
105    pub(crate) last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
106    pub(crate) kms_key_arn: ::std::option::Option<::std::string::String>,
107    _request_id: Option<String>,
108}
109impl GetApplicationOutputBuilder {
110    /// <p>The unique identifier of the OpenSearch application.</p>
111    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
112        self.id = ::std::option::Option::Some(input.into());
113        self
114    }
115    /// <p>The unique identifier of the OpenSearch application.</p>
116    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
117        self.id = input;
118        self
119    }
120    /// <p>The unique identifier of the OpenSearch application.</p>
121    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
122        &self.id
123    }
124    /// <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>
125    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
126        self.arn = ::std::option::Option::Some(input.into());
127        self
128    }
129    /// <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>
130    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
131        self.arn = input;
132        self
133    }
134    /// <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>
135    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
136        &self.arn
137    }
138    /// <p>The name of the OpenSearch application.</p>
139    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
140        self.name = ::std::option::Option::Some(input.into());
141        self
142    }
143    /// <p>The name of the OpenSearch application.</p>
144    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
145        self.name = input;
146        self
147    }
148    /// <p>The name of the OpenSearch application.</p>
149    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
150        &self.name
151    }
152    /// <p>The endpoint URL of the OpenSearch application.</p>
153    pub fn endpoint(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
154        self.endpoint = ::std::option::Option::Some(input.into());
155        self
156    }
157    /// <p>The endpoint URL of the OpenSearch application.</p>
158    pub fn set_endpoint(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
159        self.endpoint = input;
160        self
161    }
162    /// <p>The endpoint URL of the OpenSearch application.</p>
163    pub fn get_endpoint(&self) -> &::std::option::Option<::std::string::String> {
164        &self.endpoint
165    }
166    /// <p>The current status of the OpenSearch application. Possible values: <code>CREATING</code>, <code>UPDATING</code>, <code>DELETING</code>, <code>FAILED</code>, <code>ACTIVE</code>, and <code>DELETED</code>.</p>
167    pub fn status(mut self, input: crate::types::ApplicationStatus) -> Self {
168        self.status = ::std::option::Option::Some(input);
169        self
170    }
171    /// <p>The current status of the OpenSearch application. Possible values: <code>CREATING</code>, <code>UPDATING</code>, <code>DELETING</code>, <code>FAILED</code>, <code>ACTIVE</code>, and <code>DELETED</code>.</p>
172    pub fn set_status(mut self, input: ::std::option::Option<crate::types::ApplicationStatus>) -> Self {
173        self.status = input;
174        self
175    }
176    /// <p>The current status of the OpenSearch application. Possible values: <code>CREATING</code>, <code>UPDATING</code>, <code>DELETING</code>, <code>FAILED</code>, <code>ACTIVE</code>, and <code>DELETED</code>.</p>
177    pub fn get_status(&self) -> &::std::option::Option<crate::types::ApplicationStatus> {
178        &self.status
179    }
180    /// <p>The IAM Identity Center settings configured for the OpenSearch application.</p>
181    pub fn iam_identity_center_options(mut self, input: crate::types::IamIdentityCenterOptions) -> Self {
182        self.iam_identity_center_options = ::std::option::Option::Some(input);
183        self
184    }
185    /// <p>The IAM Identity Center settings configured for the OpenSearch application.</p>
186    pub fn set_iam_identity_center_options(mut self, input: ::std::option::Option<crate::types::IamIdentityCenterOptions>) -> Self {
187        self.iam_identity_center_options = input;
188        self
189    }
190    /// <p>The IAM Identity Center settings configured for the OpenSearch application.</p>
191    pub fn get_iam_identity_center_options(&self) -> &::std::option::Option<crate::types::IamIdentityCenterOptions> {
192        &self.iam_identity_center_options
193    }
194    /// Appends an item to `data_sources`.
195    ///
196    /// To override the contents of this collection use [`set_data_sources`](Self::set_data_sources).
197    ///
198    /// <p>The data sources associated with the OpenSearch application.</p>
199    pub fn data_sources(mut self, input: crate::types::DataSource) -> Self {
200        let mut v = self.data_sources.unwrap_or_default();
201        v.push(input);
202        self.data_sources = ::std::option::Option::Some(v);
203        self
204    }
205    /// <p>The data sources associated with the OpenSearch application.</p>
206    pub fn set_data_sources(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DataSource>>) -> Self {
207        self.data_sources = input;
208        self
209    }
210    /// <p>The data sources associated with the OpenSearch application.</p>
211    pub fn get_data_sources(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DataSource>> {
212        &self.data_sources
213    }
214    /// Appends an item to `app_configs`.
215    ///
216    /// To override the contents of this collection use [`set_app_configs`](Self::set_app_configs).
217    ///
218    /// <p>The configuration settings of the OpenSearch application.</p>
219    pub fn app_configs(mut self, input: crate::types::AppConfig) -> Self {
220        let mut v = self.app_configs.unwrap_or_default();
221        v.push(input);
222        self.app_configs = ::std::option::Option::Some(v);
223        self
224    }
225    /// <p>The configuration settings of the OpenSearch application.</p>
226    pub fn set_app_configs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AppConfig>>) -> Self {
227        self.app_configs = input;
228        self
229    }
230    /// <p>The configuration settings of the OpenSearch application.</p>
231    pub fn get_app_configs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AppConfig>> {
232        &self.app_configs
233    }
234    /// <p>The timestamp when the OpenSearch application was created.</p>
235    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
236        self.created_at = ::std::option::Option::Some(input);
237        self
238    }
239    /// <p>The timestamp when the OpenSearch application was created.</p>
240    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
241        self.created_at = input;
242        self
243    }
244    /// <p>The timestamp when the OpenSearch application was created.</p>
245    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
246        &self.created_at
247    }
248    /// <p>The timestamp of the last update to the OpenSearch application.</p>
249    pub fn last_updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
250        self.last_updated_at = ::std::option::Option::Some(input);
251        self
252    }
253    /// <p>The timestamp of the last update to the OpenSearch application.</p>
254    pub fn set_last_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
255        self.last_updated_at = input;
256        self
257    }
258    /// <p>The timestamp of the last update to the OpenSearch application.</p>
259    pub fn get_last_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
260        &self.last_updated_at
261    }
262    /// <p>The Amazon Resource Name (ARN) of the KMS key used to encrypt the application's data at rest.</p>
263    pub fn kms_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
264        self.kms_key_arn = ::std::option::Option::Some(input.into());
265        self
266    }
267    /// <p>The Amazon Resource Name (ARN) of the KMS key used to encrypt the application's data at rest.</p>
268    pub fn set_kms_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
269        self.kms_key_arn = input;
270        self
271    }
272    /// <p>The Amazon Resource Name (ARN) of the KMS key used to encrypt the application's data at rest.</p>
273    pub fn get_kms_key_arn(&self) -> &::std::option::Option<::std::string::String> {
274        &self.kms_key_arn
275    }
276    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
277        self._request_id = Some(request_id.into());
278        self
279    }
280
281    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
282        self._request_id = request_id;
283        self
284    }
285    /// Consumes the builder and constructs a [`GetApplicationOutput`](crate::operation::get_application::GetApplicationOutput).
286    pub fn build(self) -> crate::operation::get_application::GetApplicationOutput {
287        crate::operation::get_application::GetApplicationOutput {
288            id: self.id,
289            arn: self.arn,
290            name: self.name,
291            endpoint: self.endpoint,
292            status: self.status,
293            iam_identity_center_options: self.iam_identity_center_options,
294            data_sources: self.data_sources,
295            app_configs: self.app_configs,
296            created_at: self.created_at,
297            last_updated_at: self.last_updated_at,
298            kms_key_arn: self.kms_key_arn,
299            _request_id: self._request_id,
300        }
301    }
302}