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