aws_sdk_opensearch/operation/create_application/
_create_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 CreateApplicationOutput {
6    /// <p>The unique identifier assigned to the OpenSearch application.</p>
7    pub id: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the 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 linked to the OpenSearch application.</p>
13    pub data_sources: ::std::option::Option<::std::vec::Vec<crate::types::DataSource>>,
14    /// <p>The IAM Identity Center settings configured for the OpenSearch application.</p>
15    pub iam_identity_center_options: ::std::option::Option<crate::types::IamIdentityCenterOptions>,
16    /// <p>Configuration settings for the OpenSearch application, including administrative options.</p>
17    pub app_configs: ::std::option::Option<::std::vec::Vec<crate::types::AppConfig>>,
18    /// <p>A list of tags attached to a domain.</p>
19    pub tag_list: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
20    /// <p>The timestamp indicating when the OpenSearch application was created.</p>
21    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
22    _request_id: Option<String>,
23}
24impl CreateApplicationOutput {
25    /// <p>The unique identifier assigned to the OpenSearch application.</p>
26    pub fn id(&self) -> ::std::option::Option<&str> {
27        self.id.as_deref()
28    }
29    /// <p>The name of the 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 linked to the 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 settings configured for the 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>Configuration settings for the OpenSearch application, including administrative options.</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>A list of tags attached to a domain.</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 `.tag_list.is_none()`.
56    pub fn tag_list(&self) -> &[crate::types::Tag] {
57        self.tag_list.as_deref().unwrap_or_default()
58    }
59    /// <p>The timestamp indicating when the OpenSearch application was created.</p>
60    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
61        self.created_at.as_ref()
62    }
63}
64impl ::aws_types::request_id::RequestId for CreateApplicationOutput {
65    fn request_id(&self) -> Option<&str> {
66        self._request_id.as_deref()
67    }
68}
69impl CreateApplicationOutput {
70    /// Creates a new builder-style object to manufacture [`CreateApplicationOutput`](crate::operation::create_application::CreateApplicationOutput).
71    pub fn builder() -> crate::operation::create_application::builders::CreateApplicationOutputBuilder {
72        crate::operation::create_application::builders::CreateApplicationOutputBuilder::default()
73    }
74}
75
76/// A builder for [`CreateApplicationOutput`](crate::operation::create_application::CreateApplicationOutput).
77#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
78#[non_exhaustive]
79pub struct CreateApplicationOutputBuilder {
80    pub(crate) id: ::std::option::Option<::std::string::String>,
81    pub(crate) name: ::std::option::Option<::std::string::String>,
82    pub(crate) arn: ::std::option::Option<::std::string::String>,
83    pub(crate) data_sources: ::std::option::Option<::std::vec::Vec<crate::types::DataSource>>,
84    pub(crate) iam_identity_center_options: ::std::option::Option<crate::types::IamIdentityCenterOptions>,
85    pub(crate) app_configs: ::std::option::Option<::std::vec::Vec<crate::types::AppConfig>>,
86    pub(crate) tag_list: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
87    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
88    _request_id: Option<String>,
89}
90impl CreateApplicationOutputBuilder {
91    /// <p>The unique identifier assigned to the OpenSearch application.</p>
92    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
93        self.id = ::std::option::Option::Some(input.into());
94        self
95    }
96    /// <p>The unique identifier assigned to the OpenSearch application.</p>
97    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
98        self.id = input;
99        self
100    }
101    /// <p>The unique identifier assigned to the OpenSearch application.</p>
102    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
103        &self.id
104    }
105    /// <p>The name of the OpenSearch application.</p>
106    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
107        self.name = ::std::option::Option::Some(input.into());
108        self
109    }
110    /// <p>The name of the OpenSearch application.</p>
111    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
112        self.name = input;
113        self
114    }
115    /// <p>The name of the OpenSearch application.</p>
116    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
117        &self.name
118    }
119    /// <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>
120    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
121        self.arn = ::std::option::Option::Some(input.into());
122        self
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 set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
126        self.arn = input;
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 get_arn(&self) -> &::std::option::Option<::std::string::String> {
131        &self.arn
132    }
133    /// Appends an item to `data_sources`.
134    ///
135    /// To override the contents of this collection use [`set_data_sources`](Self::set_data_sources).
136    ///
137    /// <p>The data sources linked to the OpenSearch application.</p>
138    pub fn data_sources(mut self, input: crate::types::DataSource) -> Self {
139        let mut v = self.data_sources.unwrap_or_default();
140        v.push(input);
141        self.data_sources = ::std::option::Option::Some(v);
142        self
143    }
144    /// <p>The data sources linked to the OpenSearch application.</p>
145    pub fn set_data_sources(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DataSource>>) -> Self {
146        self.data_sources = input;
147        self
148    }
149    /// <p>The data sources linked to the OpenSearch application.</p>
150    pub fn get_data_sources(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DataSource>> {
151        &self.data_sources
152    }
153    /// <p>The IAM Identity Center settings configured for the OpenSearch application.</p>
154    pub fn iam_identity_center_options(mut self, input: crate::types::IamIdentityCenterOptions) -> Self {
155        self.iam_identity_center_options = ::std::option::Option::Some(input);
156        self
157    }
158    /// <p>The IAM Identity Center settings configured for the OpenSearch application.</p>
159    pub fn set_iam_identity_center_options(mut self, input: ::std::option::Option<crate::types::IamIdentityCenterOptions>) -> Self {
160        self.iam_identity_center_options = input;
161        self
162    }
163    /// <p>The IAM Identity Center settings configured for the OpenSearch application.</p>
164    pub fn get_iam_identity_center_options(&self) -> &::std::option::Option<crate::types::IamIdentityCenterOptions> {
165        &self.iam_identity_center_options
166    }
167    /// Appends an item to `app_configs`.
168    ///
169    /// To override the contents of this collection use [`set_app_configs`](Self::set_app_configs).
170    ///
171    /// <p>Configuration settings for the OpenSearch application, including administrative options.</p>
172    pub fn app_configs(mut self, input: crate::types::AppConfig) -> Self {
173        let mut v = self.app_configs.unwrap_or_default();
174        v.push(input);
175        self.app_configs = ::std::option::Option::Some(v);
176        self
177    }
178    /// <p>Configuration settings for the OpenSearch application, including administrative options.</p>
179    pub fn set_app_configs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AppConfig>>) -> Self {
180        self.app_configs = input;
181        self
182    }
183    /// <p>Configuration settings for the OpenSearch application, including administrative options.</p>
184    pub fn get_app_configs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AppConfig>> {
185        &self.app_configs
186    }
187    /// Appends an item to `tag_list`.
188    ///
189    /// To override the contents of this collection use [`set_tag_list`](Self::set_tag_list).
190    ///
191    /// <p>A list of tags attached to a domain.</p>
192    pub fn tag_list(mut self, input: crate::types::Tag) -> Self {
193        let mut v = self.tag_list.unwrap_or_default();
194        v.push(input);
195        self.tag_list = ::std::option::Option::Some(v);
196        self
197    }
198    /// <p>A list of tags attached to a domain.</p>
199    pub fn set_tag_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
200        self.tag_list = input;
201        self
202    }
203    /// <p>A list of tags attached to a domain.</p>
204    pub fn get_tag_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
205        &self.tag_list
206    }
207    /// <p>The timestamp indicating when the OpenSearch application was created.</p>
208    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
209        self.created_at = ::std::option::Option::Some(input);
210        self
211    }
212    /// <p>The timestamp indicating when the OpenSearch application was created.</p>
213    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
214        self.created_at = input;
215        self
216    }
217    /// <p>The timestamp indicating when the OpenSearch application was created.</p>
218    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
219        &self.created_at
220    }
221    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
222        self._request_id = Some(request_id.into());
223        self
224    }
225
226    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
227        self._request_id = request_id;
228        self
229    }
230    /// Consumes the builder and constructs a [`CreateApplicationOutput`](crate::operation::create_application::CreateApplicationOutput).
231    pub fn build(self) -> crate::operation::create_application::CreateApplicationOutput {
232        crate::operation::create_application::CreateApplicationOutput {
233            id: self.id,
234            name: self.name,
235            arn: self.arn,
236            data_sources: self.data_sources,
237            iam_identity_center_options: self.iam_identity_center_options,
238            app_configs: self.app_configs,
239            tag_list: self.tag_list,
240            created_at: self.created_at,
241            _request_id: self._request_id,
242        }
243    }
244}