aws_sdk_opensearch/operation/create_application/_create_application_input.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 CreateApplicationInput {
6 /// <p>Unique, case-sensitive identifier to ensure idempotency of the request.</p>
7 pub client_token: ::std::option::Option<::std::string::String>,
8 /// <p>The unique name of the OpenSearch application. Names must be unique within an Amazon Web Services Region for each account.</p>
9 pub name: ::std::option::Option<::std::string::String>,
10 /// <p>The data sources to link to the OpenSearch application.</p>
11 pub data_sources: ::std::option::Option<::std::vec::Vec<crate::types::DataSource>>,
12 /// <p>Configuration settings for integrating Amazon Web Services IAM Identity Center with the OpenSearch application.</p>
13 pub iam_identity_center_options: ::std::option::Option<crate::types::IamIdentityCenterOptionsInput>,
14 /// <p>Configuration settings for the OpenSearch application, including administrative options.</p>
15 pub app_configs: ::std::option::Option<::std::vec::Vec<crate::types::AppConfig>>,
16 /// <p>A list of tags attached to a domain.</p>
17 pub tag_list: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
18 /// <p>The Amazon Resource Name (ARN) of the KMS key used to encrypt the application's data at rest. If provided, the application uses your customer-managed key for encryption. If omitted, the application uses an AWS-managed key. The KMS key must be in the same region as the application.</p>
19 pub kms_key_arn: ::std::option::Option<::std::string::String>,
20}
21impl CreateApplicationInput {
22 /// <p>Unique, case-sensitive identifier to ensure idempotency of the request.</p>
23 pub fn client_token(&self) -> ::std::option::Option<&str> {
24 self.client_token.as_deref()
25 }
26 /// <p>The unique name of the OpenSearch application. Names must be unique within an Amazon Web Services Region for each account.</p>
27 pub fn name(&self) -> ::std::option::Option<&str> {
28 self.name.as_deref()
29 }
30 /// <p>The data sources to link to the OpenSearch application.</p>
31 ///
32 /// 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()`.
33 pub fn data_sources(&self) -> &[crate::types::DataSource] {
34 self.data_sources.as_deref().unwrap_or_default()
35 }
36 /// <p>Configuration settings for integrating Amazon Web Services IAM Identity Center with the OpenSearch application.</p>
37 pub fn iam_identity_center_options(&self) -> ::std::option::Option<&crate::types::IamIdentityCenterOptionsInput> {
38 self.iam_identity_center_options.as_ref()
39 }
40 /// <p>Configuration settings for the OpenSearch application, including administrative options.</p>
41 ///
42 /// 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()`.
43 pub fn app_configs(&self) -> &[crate::types::AppConfig] {
44 self.app_configs.as_deref().unwrap_or_default()
45 }
46 /// <p>A list of tags attached to a domain.</p>
47 ///
48 /// 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()`.
49 pub fn tag_list(&self) -> &[crate::types::Tag] {
50 self.tag_list.as_deref().unwrap_or_default()
51 }
52 /// <p>The Amazon Resource Name (ARN) of the KMS key used to encrypt the application's data at rest. If provided, the application uses your customer-managed key for encryption. If omitted, the application uses an AWS-managed key. The KMS key must be in the same region as the application.</p>
53 pub fn kms_key_arn(&self) -> ::std::option::Option<&str> {
54 self.kms_key_arn.as_deref()
55 }
56}
57impl CreateApplicationInput {
58 /// Creates a new builder-style object to manufacture [`CreateApplicationInput`](crate::operation::create_application::CreateApplicationInput).
59 pub fn builder() -> crate::operation::create_application::builders::CreateApplicationInputBuilder {
60 crate::operation::create_application::builders::CreateApplicationInputBuilder::default()
61 }
62}
63
64/// A builder for [`CreateApplicationInput`](crate::operation::create_application::CreateApplicationInput).
65#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
66#[non_exhaustive]
67pub struct CreateApplicationInputBuilder {
68 pub(crate) client_token: ::std::option::Option<::std::string::String>,
69 pub(crate) name: ::std::option::Option<::std::string::String>,
70 pub(crate) data_sources: ::std::option::Option<::std::vec::Vec<crate::types::DataSource>>,
71 pub(crate) iam_identity_center_options: ::std::option::Option<crate::types::IamIdentityCenterOptionsInput>,
72 pub(crate) app_configs: ::std::option::Option<::std::vec::Vec<crate::types::AppConfig>>,
73 pub(crate) tag_list: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
74 pub(crate) kms_key_arn: ::std::option::Option<::std::string::String>,
75}
76impl CreateApplicationInputBuilder {
77 /// <p>Unique, case-sensitive identifier to ensure idempotency of the request.</p>
78 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
79 self.client_token = ::std::option::Option::Some(input.into());
80 self
81 }
82 /// <p>Unique, case-sensitive identifier to ensure idempotency of the request.</p>
83 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
84 self.client_token = input;
85 self
86 }
87 /// <p>Unique, case-sensitive identifier to ensure idempotency of the request.</p>
88 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
89 &self.client_token
90 }
91 /// <p>The unique name of the OpenSearch application. Names must be unique within an Amazon Web Services Region for each account.</p>
92 /// This field is required.
93 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
94 self.name = ::std::option::Option::Some(input.into());
95 self
96 }
97 /// <p>The unique name of the OpenSearch application. Names must be unique within an Amazon Web Services Region for each account.</p>
98 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99 self.name = input;
100 self
101 }
102 /// <p>The unique name of the OpenSearch application. Names must be unique within an Amazon Web Services Region for each account.</p>
103 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
104 &self.name
105 }
106 /// Appends an item to `data_sources`.
107 ///
108 /// To override the contents of this collection use [`set_data_sources`](Self::set_data_sources).
109 ///
110 /// <p>The data sources to link to the OpenSearch application.</p>
111 pub fn data_sources(mut self, input: crate::types::DataSource) -> Self {
112 let mut v = self.data_sources.unwrap_or_default();
113 v.push(input);
114 self.data_sources = ::std::option::Option::Some(v);
115 self
116 }
117 /// <p>The data sources to link to the OpenSearch application.</p>
118 pub fn set_data_sources(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DataSource>>) -> Self {
119 self.data_sources = input;
120 self
121 }
122 /// <p>The data sources to link to the OpenSearch application.</p>
123 pub fn get_data_sources(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DataSource>> {
124 &self.data_sources
125 }
126 /// <p>Configuration settings for integrating Amazon Web Services IAM Identity Center with the OpenSearch application.</p>
127 pub fn iam_identity_center_options(mut self, input: crate::types::IamIdentityCenterOptionsInput) -> Self {
128 self.iam_identity_center_options = ::std::option::Option::Some(input);
129 self
130 }
131 /// <p>Configuration settings for integrating Amazon Web Services IAM Identity Center with the OpenSearch application.</p>
132 pub fn set_iam_identity_center_options(mut self, input: ::std::option::Option<crate::types::IamIdentityCenterOptionsInput>) -> Self {
133 self.iam_identity_center_options = input;
134 self
135 }
136 /// <p>Configuration settings for integrating Amazon Web Services IAM Identity Center with the OpenSearch application.</p>
137 pub fn get_iam_identity_center_options(&self) -> &::std::option::Option<crate::types::IamIdentityCenterOptionsInput> {
138 &self.iam_identity_center_options
139 }
140 /// Appends an item to `app_configs`.
141 ///
142 /// To override the contents of this collection use [`set_app_configs`](Self::set_app_configs).
143 ///
144 /// <p>Configuration settings for the OpenSearch application, including administrative options.</p>
145 pub fn app_configs(mut self, input: crate::types::AppConfig) -> Self {
146 let mut v = self.app_configs.unwrap_or_default();
147 v.push(input);
148 self.app_configs = ::std::option::Option::Some(v);
149 self
150 }
151 /// <p>Configuration settings for the OpenSearch application, including administrative options.</p>
152 pub fn set_app_configs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AppConfig>>) -> Self {
153 self.app_configs = input;
154 self
155 }
156 /// <p>Configuration settings for the OpenSearch application, including administrative options.</p>
157 pub fn get_app_configs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AppConfig>> {
158 &self.app_configs
159 }
160 /// Appends an item to `tag_list`.
161 ///
162 /// To override the contents of this collection use [`set_tag_list`](Self::set_tag_list).
163 ///
164 /// <p>A list of tags attached to a domain.</p>
165 pub fn tag_list(mut self, input: crate::types::Tag) -> Self {
166 let mut v = self.tag_list.unwrap_or_default();
167 v.push(input);
168 self.tag_list = ::std::option::Option::Some(v);
169 self
170 }
171 /// <p>A list of tags attached to a domain.</p>
172 pub fn set_tag_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
173 self.tag_list = input;
174 self
175 }
176 /// <p>A list of tags attached to a domain.</p>
177 pub fn get_tag_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
178 &self.tag_list
179 }
180 /// <p>The Amazon Resource Name (ARN) of the KMS key used to encrypt the application's data at rest. If provided, the application uses your customer-managed key for encryption. If omitted, the application uses an AWS-managed key. The KMS key must be in the same region as the application.</p>
181 pub fn kms_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
182 self.kms_key_arn = ::std::option::Option::Some(input.into());
183 self
184 }
185 /// <p>The Amazon Resource Name (ARN) of the KMS key used to encrypt the application's data at rest. If provided, the application uses your customer-managed key for encryption. If omitted, the application uses an AWS-managed key. The KMS key must be in the same region as the application.</p>
186 pub fn set_kms_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
187 self.kms_key_arn = input;
188 self
189 }
190 /// <p>The Amazon Resource Name (ARN) of the KMS key used to encrypt the application's data at rest. If provided, the application uses your customer-managed key for encryption. If omitted, the application uses an AWS-managed key. The KMS key must be in the same region as the application.</p>
191 pub fn get_kms_key_arn(&self) -> &::std::option::Option<::std::string::String> {
192 &self.kms_key_arn
193 }
194 /// Consumes the builder and constructs a [`CreateApplicationInput`](crate::operation::create_application::CreateApplicationInput).
195 pub fn build(
196 self,
197 ) -> ::std::result::Result<crate::operation::create_application::CreateApplicationInput, ::aws_smithy_types::error::operation::BuildError> {
198 ::std::result::Result::Ok(crate::operation::create_application::CreateApplicationInput {
199 client_token: self.client_token,
200 name: self.name,
201 data_sources: self.data_sources,
202 iam_identity_center_options: self.iam_identity_center_options,
203 app_configs: self.app_configs,
204 tag_list: self.tag_list,
205 kms_key_arn: self.kms_key_arn,
206 })
207 }
208}