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