aws_sdk_cleanrooms/operation/create_membership/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_membership::_create_membership_input::CreateMembershipInputBuilder;
3
4pub use crate::operation::create_membership::_create_membership_output::CreateMembershipOutputBuilder;
5
6impl crate::operation::create_membership::builders::CreateMembershipInputBuilder {
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_membership::CreateMembershipOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_membership::CreateMembershipError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_membership();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `CreateMembership`.
24///
25/// <p>Creates a membership for a specific collaboration identifier and joins the collaboration.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CreateMembershipFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::create_membership::builders::CreateMembershipInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::create_membership::CreateMembershipOutput,
35 crate::operation::create_membership::CreateMembershipError,
36 > for CreateMembershipFluentBuilder
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_membership::CreateMembershipOutput,
44 crate::operation::create_membership::CreateMembershipError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl CreateMembershipFluentBuilder {
51 /// Creates a new `CreateMembershipFluentBuilder`.
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 CreateMembership as a reference.
60 pub fn as_input(&self) -> &crate::operation::create_membership::builders::CreateMembershipInputBuilder {
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_membership::CreateMembershipOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::create_membership::CreateMembershipError,
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_membership::CreateMembership::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::create_membership::CreateMembership::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_membership::CreateMembershipOutput,
97 crate::operation::create_membership::CreateMembershipError,
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 /// <p>The unique ID for the associated collaboration.</p>
112 pub fn collaboration_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113 self.inner = self.inner.collaboration_identifier(input.into());
114 self
115 }
116 /// <p>The unique ID for the associated collaboration.</p>
117 pub fn set_collaboration_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118 self.inner = self.inner.set_collaboration_identifier(input);
119 self
120 }
121 /// <p>The unique ID for the associated collaboration.</p>
122 pub fn get_collaboration_identifier(&self) -> &::std::option::Option<::std::string::String> {
123 self.inner.get_collaboration_identifier()
124 }
125 /// <p>An indicator as to whether query logging has been enabled or disabled for the membership.</p>
126 /// <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>
127 pub fn query_log_status(mut self, input: crate::types::MembershipQueryLogStatus) -> Self {
128 self.inner = self.inner.query_log_status(input);
129 self
130 }
131 /// <p>An indicator as to whether query logging has been enabled or disabled for the membership.</p>
132 /// <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>
133 pub fn set_query_log_status(mut self, input: ::std::option::Option<crate::types::MembershipQueryLogStatus>) -> Self {
134 self.inner = self.inner.set_query_log_status(input);
135 self
136 }
137 /// <p>An indicator as to whether query logging has been enabled or disabled for the membership.</p>
138 /// <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>
139 pub fn get_query_log_status(&self) -> &::std::option::Option<crate::types::MembershipQueryLogStatus> {
140 self.inner.get_query_log_status()
141 }
142 /// <p>An indicator as to whether job logging has been enabled or disabled for the collaboration.</p>
143 /// <p>When <code>ENABLED</code>, Clean Rooms logs details about jobs run within this collaboration and those logs can be viewed in Amazon CloudWatch Logs. The default value is <code>DISABLED</code>.</p>
144 pub fn job_log_status(mut self, input: crate::types::MembershipJobLogStatus) -> Self {
145 self.inner = self.inner.job_log_status(input);
146 self
147 }
148 /// <p>An indicator as to whether job logging has been enabled or disabled for the collaboration.</p>
149 /// <p>When <code>ENABLED</code>, Clean Rooms logs details about jobs run within this collaboration and those logs can be viewed in Amazon CloudWatch Logs. The default value is <code>DISABLED</code>.</p>
150 pub fn set_job_log_status(mut self, input: ::std::option::Option<crate::types::MembershipJobLogStatus>) -> Self {
151 self.inner = self.inner.set_job_log_status(input);
152 self
153 }
154 /// <p>An indicator as to whether job logging has been enabled or disabled for the collaboration.</p>
155 /// <p>When <code>ENABLED</code>, Clean Rooms logs details about jobs run within this collaboration and those logs can be viewed in Amazon CloudWatch Logs. The default value is <code>DISABLED</code>.</p>
156 pub fn get_job_log_status(&self) -> &::std::option::Option<crate::types::MembershipJobLogStatus> {
157 self.inner.get_job_log_status()
158 }
159 ///
160 /// Adds a key-value pair to `tags`.
161 ///
162 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
163 ///
164 /// <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>
165 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
166 self.inner = self.inner.tags(k.into(), v.into());
167 self
168 }
169 /// <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>
170 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
171 self.inner = self.inner.set_tags(input);
172 self
173 }
174 /// <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>
175 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
176 self.inner.get_tags()
177 }
178 /// <p>The default protected query result configuration as specified by the member who can receive results.</p>
179 pub fn default_result_configuration(mut self, input: crate::types::MembershipProtectedQueryResultConfiguration) -> Self {
180 self.inner = self.inner.default_result_configuration(input);
181 self
182 }
183 /// <p>The default protected query result configuration as specified by the member who can receive results.</p>
184 pub fn set_default_result_configuration(
185 mut self,
186 input: ::std::option::Option<crate::types::MembershipProtectedQueryResultConfiguration>,
187 ) -> Self {
188 self.inner = self.inner.set_default_result_configuration(input);
189 self
190 }
191 /// <p>The default protected query result configuration as specified by the member who can receive results.</p>
192 pub fn get_default_result_configuration(&self) -> &::std::option::Option<crate::types::MembershipProtectedQueryResultConfiguration> {
193 self.inner.get_default_result_configuration()
194 }
195 /// <p>The default job result configuration that determines how job results are protected and managed within this membership. This configuration applies to all jobs.</p>
196 pub fn default_job_result_configuration(mut self, input: crate::types::MembershipProtectedJobResultConfiguration) -> Self {
197 self.inner = self.inner.default_job_result_configuration(input);
198 self
199 }
200 /// <p>The default job result configuration that determines how job results are protected and managed within this membership. This configuration applies to all jobs.</p>
201 pub fn set_default_job_result_configuration(
202 mut self,
203 input: ::std::option::Option<crate::types::MembershipProtectedJobResultConfiguration>,
204 ) -> Self {
205 self.inner = self.inner.set_default_job_result_configuration(input);
206 self
207 }
208 /// <p>The default job result configuration that determines how job results are protected and managed within this membership. This configuration applies to all jobs.</p>
209 pub fn get_default_job_result_configuration(&self) -> &::std::option::Option<crate::types::MembershipProtectedJobResultConfiguration> {
210 self.inner.get_default_job_result_configuration()
211 }
212 /// <p>The payment responsibilities accepted by the collaboration member.</p>
213 /// <p>Not required if the collaboration member has the member ability to run queries.</p>
214 /// <p>Required if the collaboration member doesn't have the member ability to run queries but is configured as a payer by the collaboration creator.</p>
215 pub fn payment_configuration(mut self, input: crate::types::MembershipPaymentConfiguration) -> Self {
216 self.inner = self.inner.payment_configuration(input);
217 self
218 }
219 /// <p>The payment responsibilities accepted by the collaboration member.</p>
220 /// <p>Not required if the collaboration member has the member ability to run queries.</p>
221 /// <p>Required if the collaboration member doesn't have the member ability to run queries but is configured as a payer by the collaboration creator.</p>
222 pub fn set_payment_configuration(mut self, input: ::std::option::Option<crate::types::MembershipPaymentConfiguration>) -> Self {
223 self.inner = self.inner.set_payment_configuration(input);
224 self
225 }
226 /// <p>The payment responsibilities accepted by the collaboration member.</p>
227 /// <p>Not required if the collaboration member has the member ability to run queries.</p>
228 /// <p>Required if the collaboration member doesn't have the member ability to run queries but is configured as a payer by the collaboration creator.</p>
229 pub fn get_payment_configuration(&self) -> &::std::option::Option<crate::types::MembershipPaymentConfiguration> {
230 self.inner.get_payment_configuration()
231 }
232 /// <p>An indicator as to whether Amazon CloudWatch metrics have been enabled or disabled for the membership.</p>
233 /// <p>Amazon CloudWatch metrics are only available when the collaboration has metrics enabled. This option can be set by collaboration members who have the ability to run queries (analysis runners) or by members who are configured as payers.</p>
234 /// <p>When <code>true</code>, metrics about query execution are collected in Amazon CloudWatch. The default value is <code>false</code>.</p>
235 pub fn is_metrics_enabled(mut self, input: bool) -> Self {
236 self.inner = self.inner.is_metrics_enabled(input);
237 self
238 }
239 /// <p>An indicator as to whether Amazon CloudWatch metrics have been enabled or disabled for the membership.</p>
240 /// <p>Amazon CloudWatch metrics are only available when the collaboration has metrics enabled. This option can be set by collaboration members who have the ability to run queries (analysis runners) or by members who are configured as payers.</p>
241 /// <p>When <code>true</code>, metrics about query execution are collected in Amazon CloudWatch. The default value is <code>false</code>.</p>
242 pub fn set_is_metrics_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
243 self.inner = self.inner.set_is_metrics_enabled(input);
244 self
245 }
246 /// <p>An indicator as to whether Amazon CloudWatch metrics have been enabled or disabled for the membership.</p>
247 /// <p>Amazon CloudWatch metrics are only available when the collaboration has metrics enabled. This option can be set by collaboration members who have the ability to run queries (analysis runners) or by members who are configured as payers.</p>
248 /// <p>When <code>true</code>, metrics about query execution are collected in Amazon CloudWatch. The default value is <code>false</code>.</p>
249 pub fn get_is_metrics_enabled(&self) -> &::std::option::Option<bool> {
250 self.inner.get_is_metrics_enabled()
251 }
252}