Skip to main content

aws_sdk_cleanrooms/operation/create_collaboration/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_collaboration::_create_collaboration_input::CreateCollaborationInputBuilder;
3
4pub use crate::operation::create_collaboration::_create_collaboration_output::CreateCollaborationOutputBuilder;
5
6impl crate::operation::create_collaboration::builders::CreateCollaborationInputBuilder {
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_collaboration::CreateCollaborationOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_collaboration::CreateCollaborationError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_collaboration();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateCollaboration`.
24///
25/// <p>Creates a new collaboration.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CreateCollaborationFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::create_collaboration::builders::CreateCollaborationInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::create_collaboration::CreateCollaborationOutput,
35        crate::operation::create_collaboration::CreateCollaborationError,
36    > for CreateCollaborationFluentBuilder
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_collaboration::CreateCollaborationOutput,
44            crate::operation::create_collaboration::CreateCollaborationError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl CreateCollaborationFluentBuilder {
51    /// Creates a new `CreateCollaborationFluentBuilder`.
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 CreateCollaboration as a reference.
60    pub fn as_input(&self) -> &crate::operation::create_collaboration::builders::CreateCollaborationInputBuilder {
61        &self.inner
62    }
63    /// Sends the request and returns the response.
64    ///
65    /// If an error occurs, an `SdkError` will be returned with additional details that
66    /// can be matched against.
67    ///
68    /// By default, any retryable failures will be retried twice. Retry behavior
69    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70    /// set when configuring the client.
71    pub async fn send(
72        self,
73    ) -> ::std::result::Result<
74        crate::operation::create_collaboration::CreateCollaborationOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::create_collaboration::CreateCollaborationError,
77            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78        >,
79    > {
80        let input = self
81            .inner
82            .build()
83            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84        let runtime_plugins = crate::operation::create_collaboration::CreateCollaboration::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::create_collaboration::CreateCollaboration::orchestrate(&runtime_plugins, input).await
90    }
91
92    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93    pub fn customize(
94        self,
95    ) -> crate::client::customize::CustomizableOperation<
96        crate::operation::create_collaboration::CreateCollaborationOutput,
97        crate::operation::create_collaboration::CreateCollaborationError,
98        Self,
99    > {
100        crate::client::customize::CustomizableOperation::new(self)
101    }
102    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103        self.set_config_override(::std::option::Option::Some(config_override.into()));
104        self
105    }
106
107    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108        self.config_override = config_override;
109        self
110    }
111    ///
112    /// Appends an item to `members`.
113    ///
114    /// To override the contents of this collection use [`set_members`](Self::set_members).
115    ///
116    /// <p>A list of initial members, not including the creator. This list is immutable.</p>
117    pub fn members(mut self, input: crate::types::MemberSpecification) -> Self {
118        self.inner = self.inner.members(input);
119        self
120    }
121    /// <p>A list of initial members, not including the creator. This list is immutable.</p>
122    pub fn set_members(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::MemberSpecification>>) -> Self {
123        self.inner = self.inner.set_members(input);
124        self
125    }
126    /// <p>A list of initial members, not including the creator. This list is immutable.</p>
127    pub fn get_members(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::MemberSpecification>> {
128        self.inner.get_members()
129    }
130    /// <p>The display name for a collaboration.</p>
131    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
132        self.inner = self.inner.name(input.into());
133        self
134    }
135    /// <p>The display name for a collaboration.</p>
136    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137        self.inner = self.inner.set_name(input);
138        self
139    }
140    /// <p>The display name for a collaboration.</p>
141    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
142        self.inner.get_name()
143    }
144    /// <p>A description of the collaboration provided by the collaboration owner.</p>
145    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
146        self.inner = self.inner.description(input.into());
147        self
148    }
149    /// <p>A description of the collaboration provided by the collaboration owner.</p>
150    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
151        self.inner = self.inner.set_description(input);
152        self
153    }
154    /// <p>A description of the collaboration provided by the collaboration owner.</p>
155    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
156        self.inner.get_description()
157    }
158    ///
159    /// Appends an item to `creatorMemberAbilities`.
160    ///
161    /// To override the contents of this collection use [`set_creator_member_abilities`](Self::set_creator_member_abilities).
162    ///
163    /// <p>The abilities granted to the collaboration creator.</p>
164    pub fn creator_member_abilities(mut self, input: crate::types::MemberAbility) -> Self {
165        self.inner = self.inner.creator_member_abilities(input);
166        self
167    }
168    /// <p>The abilities granted to the collaboration creator.</p>
169    pub fn set_creator_member_abilities(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::MemberAbility>>) -> Self {
170        self.inner = self.inner.set_creator_member_abilities(input);
171        self
172    }
173    /// <p>The abilities granted to the collaboration creator.</p>
174    pub fn get_creator_member_abilities(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::MemberAbility>> {
175        self.inner.get_creator_member_abilities()
176    }
177    /// <p>The ML abilities granted to the collaboration creator.</p>
178    pub fn creator_ml_member_abilities(mut self, input: crate::types::MlMemberAbilities) -> Self {
179        self.inner = self.inner.creator_ml_member_abilities(input);
180        self
181    }
182    /// <p>The ML abilities granted to the collaboration creator.</p>
183    pub fn set_creator_ml_member_abilities(mut self, input: ::std::option::Option<crate::types::MlMemberAbilities>) -> Self {
184        self.inner = self.inner.set_creator_ml_member_abilities(input);
185        self
186    }
187    /// <p>The ML abilities granted to the collaboration creator.</p>
188    pub fn get_creator_ml_member_abilities(&self) -> &::std::option::Option<crate::types::MlMemberAbilities> {
189        self.inner.get_creator_ml_member_abilities()
190    }
191    /// <p>The display name of the collaboration creator.</p>
192    pub fn creator_display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
193        self.inner = self.inner.creator_display_name(input.into());
194        self
195    }
196    /// <p>The display name of the collaboration creator.</p>
197    pub fn set_creator_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
198        self.inner = self.inner.set_creator_display_name(input);
199        self
200    }
201    /// <p>The display name of the collaboration creator.</p>
202    pub fn get_creator_display_name(&self) -> &::std::option::Option<::std::string::String> {
203        self.inner.get_creator_display_name()
204    }
205    /// <p>The settings for client-side encryption with Cryptographic Computing for Clean Rooms.</p>
206    pub fn data_encryption_metadata(mut self, input: crate::types::DataEncryptionMetadata) -> Self {
207        self.inner = self.inner.data_encryption_metadata(input);
208        self
209    }
210    /// <p>The settings for client-side encryption with Cryptographic Computing for Clean Rooms.</p>
211    pub fn set_data_encryption_metadata(mut self, input: ::std::option::Option<crate::types::DataEncryptionMetadata>) -> Self {
212        self.inner = self.inner.set_data_encryption_metadata(input);
213        self
214    }
215    /// <p>The settings for client-side encryption with Cryptographic Computing for Clean Rooms.</p>
216    pub fn get_data_encryption_metadata(&self) -> &::std::option::Option<crate::types::DataEncryptionMetadata> {
217        self.inner.get_data_encryption_metadata()
218    }
219    /// <p>An indicator as to whether query logging has been enabled or disabled for the collaboration.</p>
220    /// <p>When <code>ENABLED</code>, Clean Rooms logs details about queries run within this collaboration and those logs can be viewed in Amazon CloudWatch Logs. The default value is <code>DISABLED</code>.</p>
221    pub fn query_log_status(mut self, input: crate::types::CollaborationQueryLogStatus) -> Self {
222        self.inner = self.inner.query_log_status(input);
223        self
224    }
225    /// <p>An indicator as to whether query logging has been enabled or disabled for the collaboration.</p>
226    /// <p>When <code>ENABLED</code>, Clean Rooms logs details about queries run within this collaboration and those logs can be viewed in Amazon CloudWatch Logs. The default value is <code>DISABLED</code>.</p>
227    pub fn set_query_log_status(mut self, input: ::std::option::Option<crate::types::CollaborationQueryLogStatus>) -> Self {
228        self.inner = self.inner.set_query_log_status(input);
229        self
230    }
231    /// <p>An indicator as to whether query logging has been enabled or disabled for the collaboration.</p>
232    /// <p>When <code>ENABLED</code>, Clean Rooms logs details about queries run within this collaboration and those logs can be viewed in Amazon CloudWatch Logs. The default value is <code>DISABLED</code>.</p>
233    pub fn get_query_log_status(&self) -> &::std::option::Option<crate::types::CollaborationQueryLogStatus> {
234        self.inner.get_query_log_status()
235    }
236    /// <p>Specifies whether job logs are enabled for this collaboration.</p>
237    /// <p>When <code>ENABLED</code>, Clean Rooms logs details about jobs run within this collaboration; those logs can be viewed in Amazon CloudWatch Logs. The default value is <code>DISABLED</code>.</p>
238    pub fn job_log_status(mut self, input: crate::types::CollaborationJobLogStatus) -> Self {
239        self.inner = self.inner.job_log_status(input);
240        self
241    }
242    /// <p>Specifies whether job logs are enabled for this collaboration.</p>
243    /// <p>When <code>ENABLED</code>, Clean Rooms logs details about jobs run within this collaboration; those logs can be viewed in Amazon CloudWatch Logs. The default value is <code>DISABLED</code>.</p>
244    pub fn set_job_log_status(mut self, input: ::std::option::Option<crate::types::CollaborationJobLogStatus>) -> Self {
245        self.inner = self.inner.set_job_log_status(input);
246        self
247    }
248    /// <p>Specifies whether job logs are enabled for this collaboration.</p>
249    /// <p>When <code>ENABLED</code>, Clean Rooms logs details about jobs run within this collaboration; those logs can be viewed in Amazon CloudWatch Logs. The default value is <code>DISABLED</code>.</p>
250    pub fn get_job_log_status(&self) -> &::std::option::Option<crate::types::CollaborationJobLogStatus> {
251        self.inner.get_job_log_status()
252    }
253    ///
254    /// Adds a key-value pair to `tags`.
255    ///
256    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
257    ///
258    /// <p>An optional label that you can assign to a resource when you create it. Each tag consists of a key and an optional value, both of which you define. When you use tagging, you can also use tag-based access control in IAM policies to control access to this resource.</p>
259    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
260        self.inner = self.inner.tags(k.into(), v.into());
261        self
262    }
263    /// <p>An optional label that you can assign to a resource when you create it. Each tag consists of a key and an optional value, both of which you define. When you use tagging, you can also use tag-based access control in IAM policies to control access to this resource.</p>
264    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
265        self.inner = self.inner.set_tags(input);
266        self
267    }
268    /// <p>An optional label that you can assign to a resource when you create it. Each tag consists of a key and an optional value, both of which you define. When you use tagging, you can also use tag-based access control in IAM policies to control access to this resource.</p>
269    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
270        self.inner.get_tags()
271    }
272    /// <p>The collaboration creator's payment responsibilities set by the collaboration creator.</p>
273    /// <p>If the collaboration creator hasn't specified anyone as the member paying for query compute costs, then the member who can query is the default payer.</p>
274    pub fn creator_payment_configuration(mut self, input: crate::types::PaymentConfiguration) -> Self {
275        self.inner = self.inner.creator_payment_configuration(input);
276        self
277    }
278    /// <p>The collaboration creator's payment responsibilities set by the collaboration creator.</p>
279    /// <p>If the collaboration creator hasn't specified anyone as the member paying for query compute costs, then the member who can query is the default payer.</p>
280    pub fn set_creator_payment_configuration(mut self, input: ::std::option::Option<crate::types::PaymentConfiguration>) -> Self {
281        self.inner = self.inner.set_creator_payment_configuration(input);
282        self
283    }
284    /// <p>The collaboration creator's payment responsibilities set by the collaboration creator.</p>
285    /// <p>If the collaboration creator hasn't specified anyone as the member paying for query compute costs, then the member who can query is the default payer.</p>
286    pub fn get_creator_payment_configuration(&self) -> &::std::option::Option<crate::types::PaymentConfiguration> {
287        self.inner.get_creator_payment_configuration()
288    }
289    /// <p>The analytics engine.</p><note>
290    /// <p>After July 16, 2025, the <code>CLEAN_ROOMS_SQL</code> parameter will no longer be available.</p>
291    /// </note>
292    pub fn analytics_engine(mut self, input: crate::types::AnalyticsEngine) -> Self {
293        self.inner = self.inner.analytics_engine(input);
294        self
295    }
296    /// <p>The analytics engine.</p><note>
297    /// <p>After July 16, 2025, the <code>CLEAN_ROOMS_SQL</code> parameter will no longer be available.</p>
298    /// </note>
299    pub fn set_analytics_engine(mut self, input: ::std::option::Option<crate::types::AnalyticsEngine>) -> Self {
300        self.inner = self.inner.set_analytics_engine(input);
301        self
302    }
303    /// <p>The analytics engine.</p><note>
304    /// <p>After July 16, 2025, the <code>CLEAN_ROOMS_SQL</code> parameter will no longer be available.</p>
305    /// </note>
306    pub fn get_analytics_engine(&self) -> &::std::option::Option<crate::types::AnalyticsEngine> {
307        self.inner.get_analytics_engine()
308    }
309    ///
310    /// Appends an item to `autoApprovedChangeRequestTypes`.
311    ///
312    /// To override the contents of this collection use [`set_auto_approved_change_request_types`](Self::set_auto_approved_change_request_types).
313    ///
314    /// <p>The types of change requests that are automatically approved for this collaboration.</p>
315    pub fn auto_approved_change_request_types(mut self, input: crate::types::AutoApprovedChangeType) -> Self {
316        self.inner = self.inner.auto_approved_change_request_types(input);
317        self
318    }
319    /// <p>The types of change requests that are automatically approved for this collaboration.</p>
320    pub fn set_auto_approved_change_request_types(
321        mut self,
322        input: ::std::option::Option<::std::vec::Vec<crate::types::AutoApprovedChangeType>>,
323    ) -> Self {
324        self.inner = self.inner.set_auto_approved_change_request_types(input);
325        self
326    }
327    /// <p>The types of change requests that are automatically approved for this collaboration.</p>
328    pub fn get_auto_approved_change_request_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AutoApprovedChangeType>> {
329        self.inner.get_auto_approved_change_request_types()
330    }
331    ///
332    /// Appends an item to `allowedResultRegions`.
333    ///
334    /// To override the contents of this collection use [`set_allowed_result_regions`](Self::set_allowed_result_regions).
335    ///
336    /// <p>The Amazon Web Services Regions where collaboration query results can be stored. When specified, results can only be written to these Regions. This parameter enables you to meet your compliance and data governance requirements, and implement regional data governance policies.</p>
337    pub fn allowed_result_regions(mut self, input: crate::types::SupportedS3Region) -> Self {
338        self.inner = self.inner.allowed_result_regions(input);
339        self
340    }
341    /// <p>The Amazon Web Services Regions where collaboration query results can be stored. When specified, results can only be written to these Regions. This parameter enables you to meet your compliance and data governance requirements, and implement regional data governance policies.</p>
342    pub fn set_allowed_result_regions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SupportedS3Region>>) -> Self {
343        self.inner = self.inner.set_allowed_result_regions(input);
344        self
345    }
346    /// <p>The Amazon Web Services Regions where collaboration query results can be stored. When specified, results can only be written to these Regions. This parameter enables you to meet your compliance and data governance requirements, and implement regional data governance policies.</p>
347    pub fn get_allowed_result_regions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SupportedS3Region>> {
348        self.inner.get_allowed_result_regions()
349    }
350    /// <p>An indicator as to whether metrics have been enabled or disabled for the collaboration.</p>
351    /// <p>When <code>true</code>, collaboration members can opt in to Amazon CloudWatch metrics for their membership queries. The default value is <code>false</code>.</p>
352    pub fn is_metrics_enabled(mut self, input: bool) -> Self {
353        self.inner = self.inner.is_metrics_enabled(input);
354        self
355    }
356    /// <p>An indicator as to whether metrics have been enabled or disabled for the collaboration.</p>
357    /// <p>When <code>true</code>, collaboration members can opt in to Amazon CloudWatch metrics for their membership queries. The default value is <code>false</code>.</p>
358    pub fn set_is_metrics_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
359        self.inner = self.inner.set_is_metrics_enabled(input);
360        self
361    }
362    /// <p>An indicator as to whether metrics have been enabled or disabled for the collaboration.</p>
363    /// <p>When <code>true</code>, collaboration members can opt in to Amazon CloudWatch metrics for their membership queries. The default value is <code>false</code>.</p>
364    pub fn get_is_metrics_enabled(&self) -> &::std::option::Option<bool> {
365        self.inner.get_is_metrics_enabled()
366    }
367}