aws_sdk_cleanroomsml/operation/create_configured_model_algorithm_association/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_configured_model_algorithm_association::_create_configured_model_algorithm_association_output::CreateConfiguredModelAlgorithmAssociationOutputBuilder;
3
4pub use crate::operation::create_configured_model_algorithm_association::_create_configured_model_algorithm_association_input::CreateConfiguredModelAlgorithmAssociationInputBuilder;
5
6impl crate::operation::create_configured_model_algorithm_association::builders::CreateConfiguredModelAlgorithmAssociationInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::create_configured_model_algorithm_association::CreateConfiguredModelAlgorithmAssociationOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_configured_model_algorithm_association::CreateConfiguredModelAlgorithmAssociationError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_configured_model_algorithm_association();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `CreateConfiguredModelAlgorithmAssociation`.
24///
25/// <p>Associates a configured model algorithm to a collaboration for use by any member of the collaboration.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CreateConfiguredModelAlgorithmAssociationFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::create_configured_model_algorithm_association::builders::CreateConfiguredModelAlgorithmAssociationInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::create_configured_model_algorithm_association::CreateConfiguredModelAlgorithmAssociationOutput,
35 crate::operation::create_configured_model_algorithm_association::CreateConfiguredModelAlgorithmAssociationError,
36 > for CreateConfiguredModelAlgorithmAssociationFluentBuilder
37{
38 fn send(
39 self,
40 config_override: crate::config::Builder,
41 ) -> crate::client::customize::internal::BoxFuture<
42 crate::client::customize::internal::SendResult<
43 crate::operation::create_configured_model_algorithm_association::CreateConfiguredModelAlgorithmAssociationOutput,
44 crate::operation::create_configured_model_algorithm_association::CreateConfiguredModelAlgorithmAssociationError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl CreateConfiguredModelAlgorithmAssociationFluentBuilder {
51 /// Creates a new `CreateConfiguredModelAlgorithmAssociationFluentBuilder`.
52 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53 Self {
54 handle,
55 inner: ::std::default::Default::default(),
56 config_override: ::std::option::Option::None,
57 }
58 }
59 /// Access the CreateConfiguredModelAlgorithmAssociation as a reference.
60 pub fn as_input(
61 &self,
62 ) -> &crate::operation::create_configured_model_algorithm_association::builders::CreateConfiguredModelAlgorithmAssociationInputBuilder {
63 &self.inner
64 }
65 /// Sends the request and returns the response.
66 ///
67 /// If an error occurs, an `SdkError` will be returned with additional details that
68 /// can be matched against.
69 ///
70 /// By default, any retryable failures will be retried twice. Retry behavior
71 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
72 /// set when configuring the client.
73 pub async fn send(
74 self,
75 ) -> ::std::result::Result<
76 crate::operation::create_configured_model_algorithm_association::CreateConfiguredModelAlgorithmAssociationOutput,
77 ::aws_smithy_runtime_api::client::result::SdkError<
78 crate::operation::create_configured_model_algorithm_association::CreateConfiguredModelAlgorithmAssociationError,
79 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
80 >,
81 > {
82 let input = self
83 .inner
84 .build()
85 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
86 let runtime_plugins =
87 crate::operation::create_configured_model_algorithm_association::CreateConfiguredModelAlgorithmAssociation::operation_runtime_plugins(
88 self.handle.runtime_plugins.clone(),
89 &self.handle.conf,
90 self.config_override,
91 );
92 crate::operation::create_configured_model_algorithm_association::CreateConfiguredModelAlgorithmAssociation::orchestrate(
93 &runtime_plugins,
94 input,
95 )
96 .await
97 }
98
99 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
100 pub fn customize(
101 self,
102 ) -> crate::client::customize::CustomizableOperation<
103 crate::operation::create_configured_model_algorithm_association::CreateConfiguredModelAlgorithmAssociationOutput,
104 crate::operation::create_configured_model_algorithm_association::CreateConfiguredModelAlgorithmAssociationError,
105 Self,
106 > {
107 crate::client::customize::CustomizableOperation::new(self)
108 }
109 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
110 self.set_config_override(::std::option::Option::Some(config_override.into()));
111 self
112 }
113
114 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
115 self.config_override = config_override;
116 self
117 }
118 /// <p>The membership ID of the member who is associating this configured model algorithm.</p>
119 pub fn membership_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
120 self.inner = self.inner.membership_identifier(input.into());
121 self
122 }
123 /// <p>The membership ID of the member who is associating this configured model algorithm.</p>
124 pub fn set_membership_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
125 self.inner = self.inner.set_membership_identifier(input);
126 self
127 }
128 /// <p>The membership ID of the member who is associating this configured model algorithm.</p>
129 pub fn get_membership_identifier(&self) -> &::std::option::Option<::std::string::String> {
130 self.inner.get_membership_identifier()
131 }
132 /// <p>The Amazon Resource Name (ARN) of the configured model algorithm that you want to associate.</p>
133 pub fn configured_model_algorithm_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
134 self.inner = self.inner.configured_model_algorithm_arn(input.into());
135 self
136 }
137 /// <p>The Amazon Resource Name (ARN) of the configured model algorithm that you want to associate.</p>
138 pub fn set_configured_model_algorithm_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
139 self.inner = self.inner.set_configured_model_algorithm_arn(input);
140 self
141 }
142 /// <p>The Amazon Resource Name (ARN) of the configured model algorithm that you want to associate.</p>
143 pub fn get_configured_model_algorithm_arn(&self) -> &::std::option::Option<::std::string::String> {
144 self.inner.get_configured_model_algorithm_arn()
145 }
146 /// <p>The name of the configured model algorithm association.</p>
147 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
148 self.inner = self.inner.name(input.into());
149 self
150 }
151 /// <p>The name of the configured model algorithm association.</p>
152 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
153 self.inner = self.inner.set_name(input);
154 self
155 }
156 /// <p>The name of the configured model algorithm association.</p>
157 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
158 self.inner.get_name()
159 }
160 /// <p>The description of the configured model algorithm association.</p>
161 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
162 self.inner = self.inner.description(input.into());
163 self
164 }
165 /// <p>The description of the configured model algorithm association.</p>
166 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
167 self.inner = self.inner.set_description(input);
168 self
169 }
170 /// <p>The description of the configured model algorithm association.</p>
171 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
172 self.inner.get_description()
173 }
174 /// <p>Specifies the privacy configuration information for the configured model algorithm association. This information includes the maximum data size that can be exported.</p>
175 pub fn privacy_configuration(mut self, input: crate::types::PrivacyConfiguration) -> Self {
176 self.inner = self.inner.privacy_configuration(input);
177 self
178 }
179 /// <p>Specifies the privacy configuration information for the configured model algorithm association. This information includes the maximum data size that can be exported.</p>
180 pub fn set_privacy_configuration(mut self, input: ::std::option::Option<crate::types::PrivacyConfiguration>) -> Self {
181 self.inner = self.inner.set_privacy_configuration(input);
182 self
183 }
184 /// <p>Specifies the privacy configuration information for the configured model algorithm association. This information includes the maximum data size that can be exported.</p>
185 pub fn get_privacy_configuration(&self) -> &::std::option::Option<crate::types::PrivacyConfiguration> {
186 self.inner.get_privacy_configuration()
187 }
188 ///
189 /// Adds a key-value pair to `tags`.
190 ///
191 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
192 ///
193 /// <p>The optional metadata that you apply to the resource to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define.</p>
194 /// <p>The following basic restrictions apply to tags:</p>
195 /// <ul>
196 /// <li>
197 /// <p>Maximum number of tags per resource - 50.</p></li>
198 /// <li>
199 /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
200 /// <li>
201 /// <p>Maximum key length - 128 Unicode characters in UTF-8.</p></li>
202 /// <li>
203 /// <p>Maximum value length - 256 Unicode characters in UTF-8.</p></li>
204 /// <li>
205 /// <p>If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.</p></li>
206 /// <li>
207 /// <p>Tag keys and values are case sensitive.</p></li>
208 /// <li>
209 /// <p>Do not use aws:, AWS:, or any upper or lowercase combination of such as a prefix for keys as it is reserved for AWS use. You cannot edit or delete tag keys with this prefix. Values can have this prefix. If a tag value has aws as its prefix but the key does not, then Clean Rooms ML considers it to be a user tag and will count against the limit of 50 tags. Tags with only the key prefix of aws do not count against your tags per resource limit.</p></li>
210 /// </ul>
211 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
212 self.inner = self.inner.tags(k.into(), v.into());
213 self
214 }
215 /// <p>The optional metadata that you apply to the resource to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define.</p>
216 /// <p>The following basic restrictions apply to tags:</p>
217 /// <ul>
218 /// <li>
219 /// <p>Maximum number of tags per resource - 50.</p></li>
220 /// <li>
221 /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
222 /// <li>
223 /// <p>Maximum key length - 128 Unicode characters in UTF-8.</p></li>
224 /// <li>
225 /// <p>Maximum value length - 256 Unicode characters in UTF-8.</p></li>
226 /// <li>
227 /// <p>If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.</p></li>
228 /// <li>
229 /// <p>Tag keys and values are case sensitive.</p></li>
230 /// <li>
231 /// <p>Do not use aws:, AWS:, or any upper or lowercase combination of such as a prefix for keys as it is reserved for AWS use. You cannot edit or delete tag keys with this prefix. Values can have this prefix. If a tag value has aws as its prefix but the key does not, then Clean Rooms ML considers it to be a user tag and will count against the limit of 50 tags. Tags with only the key prefix of aws do not count against your tags per resource limit.</p></li>
232 /// </ul>
233 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
234 self.inner = self.inner.set_tags(input);
235 self
236 }
237 /// <p>The optional metadata that you apply to the resource to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define.</p>
238 /// <p>The following basic restrictions apply to tags:</p>
239 /// <ul>
240 /// <li>
241 /// <p>Maximum number of tags per resource - 50.</p></li>
242 /// <li>
243 /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
244 /// <li>
245 /// <p>Maximum key length - 128 Unicode characters in UTF-8.</p></li>
246 /// <li>
247 /// <p>Maximum value length - 256 Unicode characters in UTF-8.</p></li>
248 /// <li>
249 /// <p>If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.</p></li>
250 /// <li>
251 /// <p>Tag keys and values are case sensitive.</p></li>
252 /// <li>
253 /// <p>Do not use aws:, AWS:, or any upper or lowercase combination of such as a prefix for keys as it is reserved for AWS use. You cannot edit or delete tag keys with this prefix. Values can have this prefix. If a tag value has aws as its prefix but the key does not, then Clean Rooms ML considers it to be a user tag and will count against the limit of 50 tags. Tags with only the key prefix of aws do not count against your tags per resource limit.</p></li>
254 /// </ul>
255 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
256 self.inner.get_tags()
257 }
258}