use std::fmt::Write;
pub mod batch_get_schema_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) collaboration_identifier: std::option::Option<std::string::String>,
pub(crate) names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn collaboration_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.collaboration_identifier = Some(input.into());
self
}
pub fn set_collaboration_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.collaboration_identifier = input;
self
}
pub fn names(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.names.unwrap_or_default();
v.push(input.into());
self.names = Some(v);
self
}
pub fn set_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.names = input;
self
}
pub fn build(
self,
) -> Result<crate::input::BatchGetSchemaInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::BatchGetSchemaInput {
collaboration_identifier: self.collaboration_identifier,
names: self.names,
})
}
}
}
impl BatchGetSchemaInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::BatchGetSchema,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::BatchGetSchemaInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_1 = &_input.collaboration_identifier;
let input_1 = input_1.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"collaboration_identifier",
"cannot be empty or unset",
)
})?;
let collaboration_identifier = aws_smithy_http::label::fmt_string(
input_1,
aws_smithy_http::label::EncodingStrategy::Default,
);
if collaboration_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"collaboration_identifier",
"cannot be empty or unset",
),
);
}
write!(
output,
"/collaborations/{collaborationIdentifier}/batch-schema",
collaborationIdentifier = collaboration_identifier
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::BatchGetSchemaInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_batch_get_schema(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::BatchGetSchema::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchGetSchema",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::batch_get_schema_input::Builder {
crate::input::batch_get_schema_input::Builder::default()
}
}
pub mod create_collaboration_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) members: std::option::Option<std::vec::Vec<crate::model::MemberSpecification>>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) creator_member_abilities:
std::option::Option<std::vec::Vec<crate::model::MemberAbility>>,
pub(crate) creator_display_name: std::option::Option<std::string::String>,
pub(crate) data_encryption_metadata:
std::option::Option<crate::model::DataEncryptionMetadata>,
pub(crate) query_log_status: std::option::Option<crate::model::CollaborationQueryLogStatus>,
}
impl Builder {
pub fn members(mut self, input: crate::model::MemberSpecification) -> Self {
let mut v = self.members.unwrap_or_default();
v.push(input);
self.members = Some(v);
self
}
pub fn set_members(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::MemberSpecification>>,
) -> Self {
self.members = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn creator_member_abilities(mut self, input: crate::model::MemberAbility) -> Self {
let mut v = self.creator_member_abilities.unwrap_or_default();
v.push(input);
self.creator_member_abilities = Some(v);
self
}
pub fn set_creator_member_abilities(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::MemberAbility>>,
) -> Self {
self.creator_member_abilities = input;
self
}
pub fn creator_display_name(mut self, input: impl Into<std::string::String>) -> Self {
self.creator_display_name = Some(input.into());
self
}
pub fn set_creator_display_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.creator_display_name = input;
self
}
pub fn data_encryption_metadata(
mut self,
input: crate::model::DataEncryptionMetadata,
) -> Self {
self.data_encryption_metadata = Some(input);
self
}
pub fn set_data_encryption_metadata(
mut self,
input: std::option::Option<crate::model::DataEncryptionMetadata>,
) -> Self {
self.data_encryption_metadata = input;
self
}
pub fn query_log_status(
mut self,
input: crate::model::CollaborationQueryLogStatus,
) -> Self {
self.query_log_status = Some(input);
self
}
pub fn set_query_log_status(
mut self,
input: std::option::Option<crate::model::CollaborationQueryLogStatus>,
) -> Self {
self.query_log_status = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateCollaborationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateCollaborationInput {
members: self.members,
name: self.name,
description: self.description,
creator_member_abilities: self.creator_member_abilities,
creator_display_name: self.creator_display_name,
data_encryption_metadata: self.data_encryption_metadata,
query_log_status: self.query_log_status,
})
}
}
}
impl CreateCollaborationInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateCollaboration,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::CreateCollaborationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/collaborations").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateCollaborationInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_collaboration(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateCollaboration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateCollaboration",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_collaboration_input::Builder {
crate::input::create_collaboration_input::Builder::default()
}
}
pub mod create_configured_table_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) table_reference: std::option::Option<crate::model::TableReference>,
pub(crate) allowed_columns: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) analysis_method: std::option::Option<crate::model::AnalysisMethod>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn table_reference(mut self, input: crate::model::TableReference) -> Self {
self.table_reference = Some(input);
self
}
pub fn set_table_reference(
mut self,
input: std::option::Option<crate::model::TableReference>,
) -> Self {
self.table_reference = input;
self
}
pub fn allowed_columns(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.allowed_columns.unwrap_or_default();
v.push(input.into());
self.allowed_columns = Some(v);
self
}
pub fn set_allowed_columns(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.allowed_columns = input;
self
}
pub fn analysis_method(mut self, input: crate::model::AnalysisMethod) -> Self {
self.analysis_method = Some(input);
self
}
pub fn set_analysis_method(
mut self,
input: std::option::Option<crate::model::AnalysisMethod>,
) -> Self {
self.analysis_method = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateConfiguredTableInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateConfiguredTableInput {
name: self.name,
description: self.description,
table_reference: self.table_reference,
allowed_columns: self.allowed_columns,
analysis_method: self.analysis_method,
})
}
}
}
impl CreateConfiguredTableInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateConfiguredTable,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::CreateConfiguredTableInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/configuredTables").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateConfiguredTableInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_configured_table(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateConfiguredTable::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateConfiguredTable",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_configured_table_input::Builder {
crate::input::create_configured_table_input::Builder::default()
}
}
pub mod create_configured_table_analysis_rule_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configured_table_identifier: std::option::Option<std::string::String>,
pub(crate) analysis_rule_type:
std::option::Option<crate::model::ConfiguredTableAnalysisRuleType>,
pub(crate) analysis_rule_policy:
std::option::Option<crate::model::ConfiguredTableAnalysisRulePolicy>,
}
impl Builder {
pub fn configured_table_identifier(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.configured_table_identifier = Some(input.into());
self
}
pub fn set_configured_table_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configured_table_identifier = input;
self
}
pub fn analysis_rule_type(
mut self,
input: crate::model::ConfiguredTableAnalysisRuleType,
) -> Self {
self.analysis_rule_type = Some(input);
self
}
pub fn set_analysis_rule_type(
mut self,
input: std::option::Option<crate::model::ConfiguredTableAnalysisRuleType>,
) -> Self {
self.analysis_rule_type = input;
self
}
pub fn analysis_rule_policy(
mut self,
input: crate::model::ConfiguredTableAnalysisRulePolicy,
) -> Self {
self.analysis_rule_policy = Some(input);
self
}
pub fn set_analysis_rule_policy(
mut self,
input: std::option::Option<crate::model::ConfiguredTableAnalysisRulePolicy>,
) -> Self {
self.analysis_rule_policy = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateConfiguredTableAnalysisRuleInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateConfiguredTableAnalysisRuleInput {
configured_table_identifier: self.configured_table_identifier,
analysis_rule_type: self.analysis_rule_type,
analysis_rule_policy: self.analysis_rule_policy,
})
}
}
}
impl CreateConfiguredTableAnalysisRuleInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateConfiguredTableAnalysisRule,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::CreateConfiguredTableAnalysisRuleInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_2 = &_input.configured_table_identifier;
let input_2 = input_2.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"configured_table_identifier",
"cannot be empty or unset",
)
})?;
let configured_table_identifier = aws_smithy_http::label::fmt_string(
input_2,
aws_smithy_http::label::EncodingStrategy::Default,
);
if configured_table_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"configured_table_identifier",
"cannot be empty or unset",
),
);
}
write!(
output,
"/configuredTables/{configuredTableIdentifier}/analysisRule",
configuredTableIdentifier = configured_table_identifier
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateConfiguredTableAnalysisRuleInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_configured_table_analysis_rule(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateConfiguredTableAnalysisRule::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateConfiguredTableAnalysisRule",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_configured_table_analysis_rule_input::Builder {
crate::input::create_configured_table_analysis_rule_input::Builder::default()
}
}
pub mod create_configured_table_association_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) membership_identifier: std::option::Option<std::string::String>,
pub(crate) configured_table_identifier: std::option::Option<std::string::String>,
pub(crate) role_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn membership_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.membership_identifier = Some(input.into());
self
}
pub fn set_membership_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.membership_identifier = input;
self
}
pub fn configured_table_identifier(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.configured_table_identifier = Some(input.into());
self
}
pub fn set_configured_table_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configured_table_identifier = input;
self
}
pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.role_arn = Some(input.into());
self
}
pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.role_arn = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateConfiguredTableAssociationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateConfiguredTableAssociationInput {
name: self.name,
description: self.description,
membership_identifier: self.membership_identifier,
configured_table_identifier: self.configured_table_identifier,
role_arn: self.role_arn,
})
}
}
}
impl CreateConfiguredTableAssociationInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateConfiguredTableAssociation,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::CreateConfiguredTableAssociationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_3 = &_input.membership_identifier;
let input_3 = input_3.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"membership_identifier",
"cannot be empty or unset",
)
})?;
let membership_identifier = aws_smithy_http::label::fmt_string(
input_3,
aws_smithy_http::label::EncodingStrategy::Default,
);
if membership_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"membership_identifier",
"cannot be empty or unset",
),
);
}
write!(
output,
"/memberships/{membershipIdentifier}/configuredTableAssociations",
membershipIdentifier = membership_identifier
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateConfiguredTableAssociationInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_configured_table_association(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateConfiguredTableAssociation::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateConfiguredTableAssociation",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_configured_table_association_input::Builder {
crate::input::create_configured_table_association_input::Builder::default()
}
}
pub mod create_membership_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) collaboration_identifier: std::option::Option<std::string::String>,
pub(crate) query_log_status: std::option::Option<crate::model::MembershipQueryLogStatus>,
}
impl Builder {
pub fn collaboration_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.collaboration_identifier = Some(input.into());
self
}
pub fn set_collaboration_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.collaboration_identifier = input;
self
}
pub fn query_log_status(mut self, input: crate::model::MembershipQueryLogStatus) -> Self {
self.query_log_status = Some(input);
self
}
pub fn set_query_log_status(
mut self,
input: std::option::Option<crate::model::MembershipQueryLogStatus>,
) -> Self {
self.query_log_status = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateMembershipInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateMembershipInput {
collaboration_identifier: self.collaboration_identifier,
query_log_status: self.query_log_status,
})
}
}
}
impl CreateMembershipInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateMembership,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::CreateMembershipInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/memberships").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateMembershipInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_membership(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateMembership::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateMembership",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_membership_input::Builder {
crate::input::create_membership_input::Builder::default()
}
}
pub mod delete_collaboration_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) collaboration_identifier: std::option::Option<std::string::String>,
}
impl Builder {
pub fn collaboration_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.collaboration_identifier = Some(input.into());
self
}
pub fn set_collaboration_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.collaboration_identifier = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteCollaborationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteCollaborationInput {
collaboration_identifier: self.collaboration_identifier,
})
}
}
}
impl DeleteCollaborationInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteCollaboration,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteCollaborationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_4 = &_input.collaboration_identifier;
let input_4 = input_4.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"collaboration_identifier",
"cannot be empty or unset",
)
})?;
let collaboration_identifier = aws_smithy_http::label::fmt_string(
input_4,
aws_smithy_http::label::EncodingStrategy::Default,
);
if collaboration_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"collaboration_identifier",
"cannot be empty or unset",
),
);
}
write!(
output,
"/collaborations/{collaborationIdentifier}",
collaborationIdentifier = collaboration_identifier
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteCollaborationInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteCollaboration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteCollaboration",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_collaboration_input::Builder {
crate::input::delete_collaboration_input::Builder::default()
}
}
pub mod delete_configured_table_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configured_table_identifier: std::option::Option<std::string::String>,
}
impl Builder {
pub fn configured_table_identifier(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.configured_table_identifier = Some(input.into());
self
}
pub fn set_configured_table_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configured_table_identifier = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteConfiguredTableInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteConfiguredTableInput {
configured_table_identifier: self.configured_table_identifier,
})
}
}
}
impl DeleteConfiguredTableInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteConfiguredTable,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteConfiguredTableInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_5 = &_input.configured_table_identifier;
let input_5 = input_5.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"configured_table_identifier",
"cannot be empty or unset",
)
})?;
let configured_table_identifier = aws_smithy_http::label::fmt_string(
input_5,
aws_smithy_http::label::EncodingStrategy::Default,
);
if configured_table_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"configured_table_identifier",
"cannot be empty or unset",
),
);
}
write!(
output,
"/configuredTables/{configuredTableIdentifier}",
configuredTableIdentifier = configured_table_identifier
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteConfiguredTableInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteConfiguredTable::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteConfiguredTable",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_configured_table_input::Builder {
crate::input::delete_configured_table_input::Builder::default()
}
}
pub mod delete_configured_table_analysis_rule_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configured_table_identifier: std::option::Option<std::string::String>,
pub(crate) analysis_rule_type:
std::option::Option<crate::model::ConfiguredTableAnalysisRuleType>,
}
impl Builder {
pub fn configured_table_identifier(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.configured_table_identifier = Some(input.into());
self
}
pub fn set_configured_table_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configured_table_identifier = input;
self
}
pub fn analysis_rule_type(
mut self,
input: crate::model::ConfiguredTableAnalysisRuleType,
) -> Self {
self.analysis_rule_type = Some(input);
self
}
pub fn set_analysis_rule_type(
mut self,
input: std::option::Option<crate::model::ConfiguredTableAnalysisRuleType>,
) -> Self {
self.analysis_rule_type = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteConfiguredTableAnalysisRuleInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteConfiguredTableAnalysisRuleInput {
configured_table_identifier: self.configured_table_identifier,
analysis_rule_type: self.analysis_rule_type,
})
}
}
}
impl DeleteConfiguredTableAnalysisRuleInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteConfiguredTableAnalysisRule,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteConfiguredTableAnalysisRuleInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_6 = &_input.configured_table_identifier;
let input_6 = input_6.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"configured_table_identifier",
"cannot be empty or unset",
)
})?;
let configured_table_identifier = aws_smithy_http::label::fmt_string(
input_6,
aws_smithy_http::label::EncodingStrategy::Default,
);
if configured_table_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"configured_table_identifier",
"cannot be empty or unset",
),
);
}
let input_7 = &_input.analysis_rule_type;
let input_7 = input_7.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"analysis_rule_type",
"cannot be empty or unset",
)
})?;
let analysis_rule_type = aws_smithy_http::label::fmt_string(
input_7,
aws_smithy_http::label::EncodingStrategy::Default,
);
if analysis_rule_type.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"analysis_rule_type",
"cannot be empty or unset",
),
);
}
write!(
output,
"/configuredTables/{configuredTableIdentifier}/analysisRule/{analysisRuleType}",
configuredTableIdentifier = configured_table_identifier,
analysisRuleType = analysis_rule_type
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteConfiguredTableAnalysisRuleInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteConfiguredTableAnalysisRule::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteConfiguredTableAnalysisRule",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_configured_table_analysis_rule_input::Builder {
crate::input::delete_configured_table_analysis_rule_input::Builder::default()
}
}
pub mod delete_configured_table_association_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configured_table_association_identifier:
std::option::Option<std::string::String>,
pub(crate) membership_identifier: std::option::Option<std::string::String>,
}
impl Builder {
pub fn configured_table_association_identifier(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.configured_table_association_identifier = Some(input.into());
self
}
pub fn set_configured_table_association_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configured_table_association_identifier = input;
self
}
pub fn membership_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.membership_identifier = Some(input.into());
self
}
pub fn set_membership_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.membership_identifier = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteConfiguredTableAssociationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteConfiguredTableAssociationInput {
configured_table_association_identifier: self
.configured_table_association_identifier,
membership_identifier: self.membership_identifier,
})
}
}
}
impl DeleteConfiguredTableAssociationInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteConfiguredTableAssociation,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteConfiguredTableAssociationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_8 = &_input.membership_identifier;
let input_8 = input_8.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"membership_identifier",
"cannot be empty or unset",
)
})?;
let membership_identifier = aws_smithy_http::label::fmt_string(
input_8,
aws_smithy_http::label::EncodingStrategy::Default,
);
if membership_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"membership_identifier",
"cannot be empty or unset",
),
);
}
let input_9 = &_input.configured_table_association_identifier;
let input_9 = input_9.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"configured_table_association_identifier",
"cannot be empty or unset",
)
})?;
let configured_table_association_identifier = aws_smithy_http::label::fmt_string(
input_9,
aws_smithy_http::label::EncodingStrategy::Default,
);
if configured_table_association_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"configured_table_association_identifier",
"cannot be empty or unset",
),
);
}
write!(output, "/memberships/{membershipIdentifier}/configuredTableAssociations/{configuredTableAssociationIdentifier}", membershipIdentifier = membership_identifier, configuredTableAssociationIdentifier = configured_table_association_identifier).expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteConfiguredTableAssociationInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteConfiguredTableAssociation::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteConfiguredTableAssociation",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_configured_table_association_input::Builder {
crate::input::delete_configured_table_association_input::Builder::default()
}
}
pub mod delete_member_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) collaboration_identifier: std::option::Option<std::string::String>,
pub(crate) account_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn collaboration_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.collaboration_identifier = Some(input.into());
self
}
pub fn set_collaboration_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.collaboration_identifier = input;
self
}
pub fn account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.account_id = Some(input.into());
self
}
pub fn set_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.account_id = input;
self
}
pub fn build(
self,
) -> Result<crate::input::DeleteMemberInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::DeleteMemberInput {
collaboration_identifier: self.collaboration_identifier,
account_id: self.account_id,
})
}
}
}
impl DeleteMemberInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteMember,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteMemberInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_10 = &_input.collaboration_identifier;
let input_10 = input_10.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"collaboration_identifier",
"cannot be empty or unset",
)
})?;
let collaboration_identifier = aws_smithy_http::label::fmt_string(
input_10,
aws_smithy_http::label::EncodingStrategy::Default,
);
if collaboration_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"collaboration_identifier",
"cannot be empty or unset",
),
);
}
let input_11 = &_input.account_id;
let input_11 = input_11.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"account_id",
"cannot be empty or unset",
)
})?;
let account_id = aws_smithy_http::label::fmt_string(
input_11,
aws_smithy_http::label::EncodingStrategy::Default,
);
if account_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"account_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/collaborations/{collaborationIdentifier}/member/{accountId}",
collaborationIdentifier = collaboration_identifier,
accountId = account_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteMemberInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteMember::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteMember",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_member_input::Builder {
crate::input::delete_member_input::Builder::default()
}
}
pub mod delete_membership_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) membership_identifier: std::option::Option<std::string::String>,
}
impl Builder {
pub fn membership_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.membership_identifier = Some(input.into());
self
}
pub fn set_membership_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.membership_identifier = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteMembershipInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteMembershipInput {
membership_identifier: self.membership_identifier,
})
}
}
}
impl DeleteMembershipInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteMembership,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteMembershipInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_12 = &_input.membership_identifier;
let input_12 = input_12.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"membership_identifier",
"cannot be empty or unset",
)
})?;
let membership_identifier = aws_smithy_http::label::fmt_string(
input_12,
aws_smithy_http::label::EncodingStrategy::Default,
);
if membership_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"membership_identifier",
"cannot be empty or unset",
),
);
}
write!(
output,
"/memberships/{membershipIdentifier}",
membershipIdentifier = membership_identifier
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteMembershipInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteMembership::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteMembership",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_membership_input::Builder {
crate::input::delete_membership_input::Builder::default()
}
}
pub mod get_collaboration_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) collaboration_identifier: std::option::Option<std::string::String>,
}
impl Builder {
pub fn collaboration_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.collaboration_identifier = Some(input.into());
self
}
pub fn set_collaboration_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.collaboration_identifier = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetCollaborationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetCollaborationInput {
collaboration_identifier: self.collaboration_identifier,
})
}
}
}
impl GetCollaborationInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetCollaboration,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetCollaborationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_13 = &_input.collaboration_identifier;
let input_13 = input_13.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"collaboration_identifier",
"cannot be empty or unset",
)
})?;
let collaboration_identifier = aws_smithy_http::label::fmt_string(
input_13,
aws_smithy_http::label::EncodingStrategy::Default,
);
if collaboration_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"collaboration_identifier",
"cannot be empty or unset",
),
);
}
write!(
output,
"/collaborations/{collaborationIdentifier}",
collaborationIdentifier = collaboration_identifier
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetCollaborationInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetCollaboration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetCollaboration",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_collaboration_input::Builder {
crate::input::get_collaboration_input::Builder::default()
}
}
pub mod get_configured_table_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configured_table_identifier: std::option::Option<std::string::String>,
}
impl Builder {
pub fn configured_table_identifier(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.configured_table_identifier = Some(input.into());
self
}
pub fn set_configured_table_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configured_table_identifier = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetConfiguredTableInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetConfiguredTableInput {
configured_table_identifier: self.configured_table_identifier,
})
}
}
}
impl GetConfiguredTableInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetConfiguredTable,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetConfiguredTableInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_14 = &_input.configured_table_identifier;
let input_14 = input_14.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"configured_table_identifier",
"cannot be empty or unset",
)
})?;
let configured_table_identifier = aws_smithy_http::label::fmt_string(
input_14,
aws_smithy_http::label::EncodingStrategy::Default,
);
if configured_table_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"configured_table_identifier",
"cannot be empty or unset",
),
);
}
write!(
output,
"/configuredTables/{configuredTableIdentifier}",
configuredTableIdentifier = configured_table_identifier
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetConfiguredTableInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetConfiguredTable::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetConfiguredTable",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_configured_table_input::Builder {
crate::input::get_configured_table_input::Builder::default()
}
}
pub mod get_configured_table_analysis_rule_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configured_table_identifier: std::option::Option<std::string::String>,
pub(crate) analysis_rule_type:
std::option::Option<crate::model::ConfiguredTableAnalysisRuleType>,
}
impl Builder {
pub fn configured_table_identifier(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.configured_table_identifier = Some(input.into());
self
}
pub fn set_configured_table_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configured_table_identifier = input;
self
}
pub fn analysis_rule_type(
mut self,
input: crate::model::ConfiguredTableAnalysisRuleType,
) -> Self {
self.analysis_rule_type = Some(input);
self
}
pub fn set_analysis_rule_type(
mut self,
input: std::option::Option<crate::model::ConfiguredTableAnalysisRuleType>,
) -> Self {
self.analysis_rule_type = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetConfiguredTableAnalysisRuleInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetConfiguredTableAnalysisRuleInput {
configured_table_identifier: self.configured_table_identifier,
analysis_rule_type: self.analysis_rule_type,
})
}
}
}
impl GetConfiguredTableAnalysisRuleInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetConfiguredTableAnalysisRule,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetConfiguredTableAnalysisRuleInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_15 = &_input.configured_table_identifier;
let input_15 = input_15.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"configured_table_identifier",
"cannot be empty or unset",
)
})?;
let configured_table_identifier = aws_smithy_http::label::fmt_string(
input_15,
aws_smithy_http::label::EncodingStrategy::Default,
);
if configured_table_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"configured_table_identifier",
"cannot be empty or unset",
),
);
}
let input_16 = &_input.analysis_rule_type;
let input_16 = input_16.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"analysis_rule_type",
"cannot be empty or unset",
)
})?;
let analysis_rule_type = aws_smithy_http::label::fmt_string(
input_16,
aws_smithy_http::label::EncodingStrategy::Default,
);
if analysis_rule_type.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"analysis_rule_type",
"cannot be empty or unset",
),
);
}
write!(
output,
"/configuredTables/{configuredTableIdentifier}/analysisRule/{analysisRuleType}",
configuredTableIdentifier = configured_table_identifier,
analysisRuleType = analysis_rule_type
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetConfiguredTableAnalysisRuleInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetConfiguredTableAnalysisRule::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetConfiguredTableAnalysisRule",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_configured_table_analysis_rule_input::Builder {
crate::input::get_configured_table_analysis_rule_input::Builder::default()
}
}
pub mod get_configured_table_association_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configured_table_association_identifier:
std::option::Option<std::string::String>,
pub(crate) membership_identifier: std::option::Option<std::string::String>,
}
impl Builder {
pub fn configured_table_association_identifier(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.configured_table_association_identifier = Some(input.into());
self
}
pub fn set_configured_table_association_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configured_table_association_identifier = input;
self
}
pub fn membership_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.membership_identifier = Some(input.into());
self
}
pub fn set_membership_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.membership_identifier = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetConfiguredTableAssociationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetConfiguredTableAssociationInput {
configured_table_association_identifier: self
.configured_table_association_identifier,
membership_identifier: self.membership_identifier,
})
}
}
}
impl GetConfiguredTableAssociationInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetConfiguredTableAssociation,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetConfiguredTableAssociationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_17 = &_input.membership_identifier;
let input_17 = input_17.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"membership_identifier",
"cannot be empty or unset",
)
})?;
let membership_identifier = aws_smithy_http::label::fmt_string(
input_17,
aws_smithy_http::label::EncodingStrategy::Default,
);
if membership_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"membership_identifier",
"cannot be empty or unset",
),
);
}
let input_18 = &_input.configured_table_association_identifier;
let input_18 = input_18.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"configured_table_association_identifier",
"cannot be empty or unset",
)
})?;
let configured_table_association_identifier = aws_smithy_http::label::fmt_string(
input_18,
aws_smithy_http::label::EncodingStrategy::Default,
);
if configured_table_association_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"configured_table_association_identifier",
"cannot be empty or unset",
),
);
}
write!(output, "/memberships/{membershipIdentifier}/configuredTableAssociations/{configuredTableAssociationIdentifier}", membershipIdentifier = membership_identifier, configuredTableAssociationIdentifier = configured_table_association_identifier).expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetConfiguredTableAssociationInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetConfiguredTableAssociation::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetConfiguredTableAssociation",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_configured_table_association_input::Builder {
crate::input::get_configured_table_association_input::Builder::default()
}
}
pub mod get_membership_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) membership_identifier: std::option::Option<std::string::String>,
}
impl Builder {
pub fn membership_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.membership_identifier = Some(input.into());
self
}
pub fn set_membership_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.membership_identifier = input;
self
}
pub fn build(
self,
) -> Result<crate::input::GetMembershipInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::GetMembershipInput {
membership_identifier: self.membership_identifier,
})
}
}
}
impl GetMembershipInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetMembership,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetMembershipInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_19 = &_input.membership_identifier;
let input_19 = input_19.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"membership_identifier",
"cannot be empty or unset",
)
})?;
let membership_identifier = aws_smithy_http::label::fmt_string(
input_19,
aws_smithy_http::label::EncodingStrategy::Default,
);
if membership_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"membership_identifier",
"cannot be empty or unset",
),
);
}
write!(
output,
"/memberships/{membershipIdentifier}",
membershipIdentifier = membership_identifier
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetMembershipInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetMembership::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetMembership",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_membership_input::Builder {
crate::input::get_membership_input::Builder::default()
}
}
pub mod get_protected_query_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) membership_identifier: std::option::Option<std::string::String>,
pub(crate) protected_query_identifier: std::option::Option<std::string::String>,
}
impl Builder {
pub fn membership_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.membership_identifier = Some(input.into());
self
}
pub fn set_membership_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.membership_identifier = input;
self
}
pub fn protected_query_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.protected_query_identifier = Some(input.into());
self
}
pub fn set_protected_query_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.protected_query_identifier = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetProtectedQueryInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetProtectedQueryInput {
membership_identifier: self.membership_identifier,
protected_query_identifier: self.protected_query_identifier,
})
}
}
}
impl GetProtectedQueryInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetProtectedQuery,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetProtectedQueryInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_20 = &_input.membership_identifier;
let input_20 = input_20.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"membership_identifier",
"cannot be empty or unset",
)
})?;
let membership_identifier = aws_smithy_http::label::fmt_string(
input_20,
aws_smithy_http::label::EncodingStrategy::Default,
);
if membership_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"membership_identifier",
"cannot be empty or unset",
),
);
}
let input_21 = &_input.protected_query_identifier;
let input_21 = input_21.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"protected_query_identifier",
"cannot be empty or unset",
)
})?;
let protected_query_identifier = aws_smithy_http::label::fmt_string(
input_21,
aws_smithy_http::label::EncodingStrategy::Default,
);
if protected_query_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"protected_query_identifier",
"cannot be empty or unset",
),
);
}
write!(output, "/memberships/{membershipIdentifier}/protectedQueries/{protectedQueryIdentifier}", membershipIdentifier = membership_identifier, protectedQueryIdentifier = protected_query_identifier).expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetProtectedQueryInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetProtectedQuery::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetProtectedQuery",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_protected_query_input::Builder {
crate::input::get_protected_query_input::Builder::default()
}
}
pub mod get_schema_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) collaboration_identifier: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn collaboration_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.collaboration_identifier = Some(input.into());
self
}
pub fn set_collaboration_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.collaboration_identifier = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn build(
self,
) -> Result<crate::input::GetSchemaInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::GetSchemaInput {
collaboration_identifier: self.collaboration_identifier,
name: self.name,
})
}
}
}
impl GetSchemaInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetSchema,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetSchemaInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_22 = &_input.collaboration_identifier;
let input_22 = input_22.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"collaboration_identifier",
"cannot be empty or unset",
)
})?;
let collaboration_identifier = aws_smithy_http::label::fmt_string(
input_22,
aws_smithy_http::label::EncodingStrategy::Default,
);
if collaboration_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"collaboration_identifier",
"cannot be empty or unset",
),
);
}
let input_23 = &_input.name;
let input_23 = input_23.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"name",
"cannot be empty or unset",
)
})?;
let name = aws_smithy_http::label::fmt_string(
input_23,
aws_smithy_http::label::EncodingStrategy::Default,
);
if name.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"name",
"cannot be empty or unset",
),
);
}
write!(
output,
"/collaborations/{collaborationIdentifier}/schemas/{name}",
collaborationIdentifier = collaboration_identifier,
name = name
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetSchemaInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op =
aws_smithy_http::operation::Operation::new(request, crate::operation::GetSchema::new())
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetSchema",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_schema_input::Builder {
crate::input::get_schema_input::Builder::default()
}
}
pub mod get_schema_analysis_rule_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) collaboration_identifier: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) r#type: std::option::Option<crate::model::AnalysisRuleType>,
}
impl Builder {
pub fn collaboration_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.collaboration_identifier = Some(input.into());
self
}
pub fn set_collaboration_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.collaboration_identifier = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn r#type(mut self, input: crate::model::AnalysisRuleType) -> Self {
self.r#type = Some(input);
self
}
pub fn set_type(
mut self,
input: std::option::Option<crate::model::AnalysisRuleType>,
) -> Self {
self.r#type = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetSchemaAnalysisRuleInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetSchemaAnalysisRuleInput {
collaboration_identifier: self.collaboration_identifier,
name: self.name,
r#type: self.r#type,
})
}
}
}
impl GetSchemaAnalysisRuleInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetSchemaAnalysisRule,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetSchemaAnalysisRuleInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_24 = &_input.collaboration_identifier;
let input_24 = input_24.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"collaboration_identifier",
"cannot be empty or unset",
)
})?;
let collaboration_identifier = aws_smithy_http::label::fmt_string(
input_24,
aws_smithy_http::label::EncodingStrategy::Default,
);
if collaboration_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"collaboration_identifier",
"cannot be empty or unset",
),
);
}
let input_25 = &_input.name;
let input_25 = input_25.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"name",
"cannot be empty or unset",
)
})?;
let name = aws_smithy_http::label::fmt_string(
input_25,
aws_smithy_http::label::EncodingStrategy::Default,
);
if name.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"name",
"cannot be empty or unset",
),
);
}
let input_26 = &_input.r#type;
let input_26 = input_26.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"r#type",
"cannot be empty or unset",
)
})?;
let r#type = aws_smithy_http::label::fmt_string(
input_26,
aws_smithy_http::label::EncodingStrategy::Default,
);
if r#type.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"r#type",
"cannot be empty or unset",
),
);
}
write!(output, "/collaborations/{collaborationIdentifier}/schemas/{name}/analysisRule/{type}", collaborationIdentifier = collaboration_identifier, name = name, type = r#type).expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetSchemaAnalysisRuleInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetSchemaAnalysisRule::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetSchemaAnalysisRule",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_schema_analysis_rule_input::Builder {
crate::input::get_schema_analysis_rule_input::Builder::default()
}
}
pub mod list_collaborations_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) member_status: std::option::Option<crate::model::FilterableMemberStatus>,
}
impl Builder {
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn member_status(mut self, input: crate::model::FilterableMemberStatus) -> Self {
self.member_status = Some(input);
self
}
pub fn set_member_status(
mut self,
input: std::option::Option<crate::model::FilterableMemberStatus>,
) -> Self {
self.member_status = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListCollaborationsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListCollaborationsInput {
next_token: self.next_token,
max_results: self.max_results,
member_status: self.member_status,
})
}
}
}
impl ListCollaborationsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListCollaborations,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListCollaborationsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/collaborations").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListCollaborationsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_27) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_27));
}
}
if let Some(inner_28) = &_input.max_results {
if *inner_28 != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_28).encode(),
);
}
}
if let Some(inner_29) = &_input.member_status {
{
query.push_kv(
"memberStatus",
&aws_smithy_http::query::fmt_string(&inner_29),
);
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListCollaborationsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListCollaborations::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListCollaborations",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_collaborations_input::Builder {
crate::input::list_collaborations_input::Builder::default()
}
}
pub mod list_configured_table_associations_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) membership_identifier: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn membership_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.membership_identifier = Some(input.into());
self
}
pub fn set_membership_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.membership_identifier = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListConfiguredTableAssociationsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListConfiguredTableAssociationsInput {
membership_identifier: self.membership_identifier,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
impl ListConfiguredTableAssociationsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListConfiguredTableAssociations,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListConfiguredTableAssociationsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_30 = &_input.membership_identifier;
let input_30 = input_30.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"membership_identifier",
"cannot be empty or unset",
)
})?;
let membership_identifier = aws_smithy_http::label::fmt_string(
input_30,
aws_smithy_http::label::EncodingStrategy::Default,
);
if membership_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"membership_identifier",
"cannot be empty or unset",
),
);
}
write!(
output,
"/memberships/{membershipIdentifier}/configuredTableAssociations",
membershipIdentifier = membership_identifier
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListConfiguredTableAssociationsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_31) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_31));
}
}
if let Some(inner_32) = &_input.max_results {
if *inner_32 != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_32).encode(),
);
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListConfiguredTableAssociationsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListConfiguredTableAssociations::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListConfiguredTableAssociations",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_configured_table_associations_input::Builder {
crate::input::list_configured_table_associations_input::Builder::default()
}
}
pub mod list_configured_tables_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListConfiguredTablesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListConfiguredTablesInput {
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
impl ListConfiguredTablesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListConfiguredTables,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListConfiguredTablesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/configuredTables").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListConfiguredTablesInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_33) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_33));
}
}
if let Some(inner_34) = &_input.max_results {
if *inner_34 != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_34).encode(),
);
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListConfiguredTablesInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListConfiguredTables::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListConfiguredTables",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_configured_tables_input::Builder {
crate::input::list_configured_tables_input::Builder::default()
}
}
pub mod list_members_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) collaboration_identifier: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn collaboration_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.collaboration_identifier = Some(input.into());
self
}
pub fn set_collaboration_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.collaboration_identifier = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> Result<crate::input::ListMembersInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::ListMembersInput {
collaboration_identifier: self.collaboration_identifier,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
impl ListMembersInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListMembers,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListMembersInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_35 = &_input.collaboration_identifier;
let input_35 = input_35.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"collaboration_identifier",
"cannot be empty or unset",
)
})?;
let collaboration_identifier = aws_smithy_http::label::fmt_string(
input_35,
aws_smithy_http::label::EncodingStrategy::Default,
);
if collaboration_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"collaboration_identifier",
"cannot be empty or unset",
),
);
}
write!(
output,
"/collaborations/{collaborationIdentifier}/members",
collaborationIdentifier = collaboration_identifier
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListMembersInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_36) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_36));
}
}
if let Some(inner_37) = &_input.max_results {
if *inner_37 != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_37).encode(),
);
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListMembersInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListMembers::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListMembers",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_members_input::Builder {
crate::input::list_members_input::Builder::default()
}
}
pub mod list_memberships_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) status: std::option::Option<crate::model::MembershipStatus>,
}
impl Builder {
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn status(mut self, input: crate::model::MembershipStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::MembershipStatus>,
) -> Self {
self.status = input;
self
}
pub fn build(
self,
) -> Result<crate::input::ListMembershipsInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::ListMembershipsInput {
next_token: self.next_token,
max_results: self.max_results,
status: self.status,
})
}
}
}
impl ListMembershipsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListMemberships,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListMembershipsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/memberships").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListMembershipsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_38) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_38));
}
}
if let Some(inner_39) = &_input.max_results {
if *inner_39 != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_39).encode(),
);
}
}
if let Some(inner_40) = &_input.status {
{
query.push_kv("status", &aws_smithy_http::query::fmt_string(&inner_40));
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListMembershipsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListMemberships::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListMemberships",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_memberships_input::Builder {
crate::input::list_memberships_input::Builder::default()
}
}
pub mod list_protected_queries_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) membership_identifier: std::option::Option<std::string::String>,
pub(crate) status: std::option::Option<crate::model::ProtectedQueryStatus>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn membership_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.membership_identifier = Some(input.into());
self
}
pub fn set_membership_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.membership_identifier = input;
self
}
pub fn status(mut self, input: crate::model::ProtectedQueryStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::ProtectedQueryStatus>,
) -> Self {
self.status = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListProtectedQueriesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListProtectedQueriesInput {
membership_identifier: self.membership_identifier,
status: self.status,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
impl ListProtectedQueriesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListProtectedQueries,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListProtectedQueriesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_41 = &_input.membership_identifier;
let input_41 = input_41.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"membership_identifier",
"cannot be empty or unset",
)
})?;
let membership_identifier = aws_smithy_http::label::fmt_string(
input_41,
aws_smithy_http::label::EncodingStrategy::Default,
);
if membership_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"membership_identifier",
"cannot be empty or unset",
),
);
}
write!(
output,
"/memberships/{membershipIdentifier}/protectedQueries",
membershipIdentifier = membership_identifier
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListProtectedQueriesInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_42) = &_input.status {
{
query.push_kv("status", &aws_smithy_http::query::fmt_string(&inner_42));
}
}
if let Some(inner_43) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_43));
}
}
if let Some(inner_44) = &_input.max_results {
if *inner_44 != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_44).encode(),
);
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListProtectedQueriesInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListProtectedQueries::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListProtectedQueries",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_protected_queries_input::Builder {
crate::input::list_protected_queries_input::Builder::default()
}
}
pub mod list_schemas_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) collaboration_identifier: std::option::Option<std::string::String>,
pub(crate) schema_type: std::option::Option<crate::model::SchemaType>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn collaboration_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.collaboration_identifier = Some(input.into());
self
}
pub fn set_collaboration_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.collaboration_identifier = input;
self
}
pub fn schema_type(mut self, input: crate::model::SchemaType) -> Self {
self.schema_type = Some(input);
self
}
pub fn set_schema_type(
mut self,
input: std::option::Option<crate::model::SchemaType>,
) -> Self {
self.schema_type = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> Result<crate::input::ListSchemasInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::ListSchemasInput {
collaboration_identifier: self.collaboration_identifier,
schema_type: self.schema_type,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
impl ListSchemasInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListSchemas,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListSchemasInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_45 = &_input.collaboration_identifier;
let input_45 = input_45.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"collaboration_identifier",
"cannot be empty or unset",
)
})?;
let collaboration_identifier = aws_smithy_http::label::fmt_string(
input_45,
aws_smithy_http::label::EncodingStrategy::Default,
);
if collaboration_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"collaboration_identifier",
"cannot be empty or unset",
),
);
}
write!(
output,
"/collaborations/{collaborationIdentifier}/schemas",
collaborationIdentifier = collaboration_identifier
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListSchemasInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_46) = &_input.schema_type {
{
query.push_kv("schemaType", &aws_smithy_http::query::fmt_string(&inner_46));
}
}
if let Some(inner_47) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_47));
}
}
if let Some(inner_48) = &_input.max_results {
if *inner_48 != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_48).encode(),
);
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListSchemasInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListSchemas::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListSchemas",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_schemas_input::Builder {
crate::input::list_schemas_input::Builder::default()
}
}
pub mod start_protected_query_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) r#type: std::option::Option<crate::model::ProtectedQueryType>,
pub(crate) membership_identifier: std::option::Option<std::string::String>,
pub(crate) sql_parameters: std::option::Option<crate::model::ProtectedQuerySqlParameters>,
pub(crate) result_configuration:
std::option::Option<crate::model::ProtectedQueryResultConfiguration>,
}
impl Builder {
pub fn r#type(mut self, input: crate::model::ProtectedQueryType) -> Self {
self.r#type = Some(input);
self
}
pub fn set_type(
mut self,
input: std::option::Option<crate::model::ProtectedQueryType>,
) -> Self {
self.r#type = input;
self
}
pub fn membership_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.membership_identifier = Some(input.into());
self
}
pub fn set_membership_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.membership_identifier = input;
self
}
pub fn sql_parameters(mut self, input: crate::model::ProtectedQuerySqlParameters) -> Self {
self.sql_parameters = Some(input);
self
}
pub fn set_sql_parameters(
mut self,
input: std::option::Option<crate::model::ProtectedQuerySqlParameters>,
) -> Self {
self.sql_parameters = input;
self
}
pub fn result_configuration(
mut self,
input: crate::model::ProtectedQueryResultConfiguration,
) -> Self {
self.result_configuration = Some(input);
self
}
pub fn set_result_configuration(
mut self,
input: std::option::Option<crate::model::ProtectedQueryResultConfiguration>,
) -> Self {
self.result_configuration = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::StartProtectedQueryInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::StartProtectedQueryInput {
r#type: self.r#type,
membership_identifier: self.membership_identifier,
sql_parameters: self.sql_parameters,
result_configuration: self.result_configuration,
})
}
}
impl std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field("r#type", &self.r#type);
formatter.field("membership_identifier", &self.membership_identifier);
formatter.field("sql_parameters", &"*** Sensitive Data Redacted ***");
formatter.field("result_configuration", &self.result_configuration);
formatter.finish()
}
}
}
impl StartProtectedQueryInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::StartProtectedQuery,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::StartProtectedQueryInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_49 = &_input.membership_identifier;
let input_49 = input_49.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"membership_identifier",
"cannot be empty or unset",
)
})?;
let membership_identifier = aws_smithy_http::label::fmt_string(
input_49,
aws_smithy_http::label::EncodingStrategy::Default,
);
if membership_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"membership_identifier",
"cannot be empty or unset",
),
);
}
write!(
output,
"/memberships/{membershipIdentifier}/protectedQueries",
membershipIdentifier = membership_identifier
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StartProtectedQueryInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_start_protected_query(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StartProtectedQuery::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartProtectedQuery",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::start_protected_query_input::Builder {
crate::input::start_protected_query_input::Builder::default()
}
}
pub mod update_collaboration_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) collaboration_identifier: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
}
impl Builder {
pub fn collaboration_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.collaboration_identifier = Some(input.into());
self
}
pub fn set_collaboration_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.collaboration_identifier = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateCollaborationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateCollaborationInput {
collaboration_identifier: self.collaboration_identifier,
name: self.name,
description: self.description,
})
}
}
}
impl UpdateCollaborationInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateCollaboration,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UpdateCollaborationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_50 = &_input.collaboration_identifier;
let input_50 = input_50.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"collaboration_identifier",
"cannot be empty or unset",
)
})?;
let collaboration_identifier = aws_smithy_http::label::fmt_string(
input_50,
aws_smithy_http::label::EncodingStrategy::Default,
);
if collaboration_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"collaboration_identifier",
"cannot be empty or unset",
),
);
}
write!(
output,
"/collaborations/{collaborationIdentifier}",
collaborationIdentifier = collaboration_identifier
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateCollaborationInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PATCH").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_collaboration(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateCollaboration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateCollaboration",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_collaboration_input::Builder {
crate::input::update_collaboration_input::Builder::default()
}
}
pub mod update_configured_table_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configured_table_identifier: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
}
impl Builder {
pub fn configured_table_identifier(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.configured_table_identifier = Some(input.into());
self
}
pub fn set_configured_table_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configured_table_identifier = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateConfiguredTableInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateConfiguredTableInput {
configured_table_identifier: self.configured_table_identifier,
name: self.name,
description: self.description,
})
}
}
}
impl UpdateConfiguredTableInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateConfiguredTable,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UpdateConfiguredTableInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_51 = &_input.configured_table_identifier;
let input_51 = input_51.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"configured_table_identifier",
"cannot be empty or unset",
)
})?;
let configured_table_identifier = aws_smithy_http::label::fmt_string(
input_51,
aws_smithy_http::label::EncodingStrategy::Default,
);
if configured_table_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"configured_table_identifier",
"cannot be empty or unset",
),
);
}
write!(
output,
"/configuredTables/{configuredTableIdentifier}",
configuredTableIdentifier = configured_table_identifier
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateConfiguredTableInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PATCH").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_configured_table(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateConfiguredTable::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateConfiguredTable",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_configured_table_input::Builder {
crate::input::update_configured_table_input::Builder::default()
}
}
pub mod update_configured_table_analysis_rule_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configured_table_identifier: std::option::Option<std::string::String>,
pub(crate) analysis_rule_type:
std::option::Option<crate::model::ConfiguredTableAnalysisRuleType>,
pub(crate) analysis_rule_policy:
std::option::Option<crate::model::ConfiguredTableAnalysisRulePolicy>,
}
impl Builder {
pub fn configured_table_identifier(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.configured_table_identifier = Some(input.into());
self
}
pub fn set_configured_table_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configured_table_identifier = input;
self
}
pub fn analysis_rule_type(
mut self,
input: crate::model::ConfiguredTableAnalysisRuleType,
) -> Self {
self.analysis_rule_type = Some(input);
self
}
pub fn set_analysis_rule_type(
mut self,
input: std::option::Option<crate::model::ConfiguredTableAnalysisRuleType>,
) -> Self {
self.analysis_rule_type = input;
self
}
pub fn analysis_rule_policy(
mut self,
input: crate::model::ConfiguredTableAnalysisRulePolicy,
) -> Self {
self.analysis_rule_policy = Some(input);
self
}
pub fn set_analysis_rule_policy(
mut self,
input: std::option::Option<crate::model::ConfiguredTableAnalysisRulePolicy>,
) -> Self {
self.analysis_rule_policy = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateConfiguredTableAnalysisRuleInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateConfiguredTableAnalysisRuleInput {
configured_table_identifier: self.configured_table_identifier,
analysis_rule_type: self.analysis_rule_type,
analysis_rule_policy: self.analysis_rule_policy,
})
}
}
}
impl UpdateConfiguredTableAnalysisRuleInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateConfiguredTableAnalysisRule,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UpdateConfiguredTableAnalysisRuleInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_52 = &_input.configured_table_identifier;
let input_52 = input_52.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"configured_table_identifier",
"cannot be empty or unset",
)
})?;
let configured_table_identifier = aws_smithy_http::label::fmt_string(
input_52,
aws_smithy_http::label::EncodingStrategy::Default,
);
if configured_table_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"configured_table_identifier",
"cannot be empty or unset",
),
);
}
let input_53 = &_input.analysis_rule_type;
let input_53 = input_53.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"analysis_rule_type",
"cannot be empty or unset",
)
})?;
let analysis_rule_type = aws_smithy_http::label::fmt_string(
input_53,
aws_smithy_http::label::EncodingStrategy::Default,
);
if analysis_rule_type.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"analysis_rule_type",
"cannot be empty or unset",
),
);
}
write!(
output,
"/configuredTables/{configuredTableIdentifier}/analysisRule/{analysisRuleType}",
configuredTableIdentifier = configured_table_identifier,
analysisRuleType = analysis_rule_type
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateConfiguredTableAnalysisRuleInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PATCH").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_configured_table_analysis_rule(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateConfiguredTableAnalysisRule::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateConfiguredTableAnalysisRule",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_configured_table_analysis_rule_input::Builder {
crate::input::update_configured_table_analysis_rule_input::Builder::default()
}
}
pub mod update_configured_table_association_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configured_table_association_identifier:
std::option::Option<std::string::String>,
pub(crate) membership_identifier: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) role_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn configured_table_association_identifier(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.configured_table_association_identifier = Some(input.into());
self
}
pub fn set_configured_table_association_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configured_table_association_identifier = input;
self
}
pub fn membership_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.membership_identifier = Some(input.into());
self
}
pub fn set_membership_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.membership_identifier = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.role_arn = Some(input.into());
self
}
pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.role_arn = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateConfiguredTableAssociationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateConfiguredTableAssociationInput {
configured_table_association_identifier: self
.configured_table_association_identifier,
membership_identifier: self.membership_identifier,
description: self.description,
role_arn: self.role_arn,
})
}
}
}
impl UpdateConfiguredTableAssociationInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateConfiguredTableAssociation,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UpdateConfiguredTableAssociationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_54 = &_input.membership_identifier;
let input_54 = input_54.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"membership_identifier",
"cannot be empty or unset",
)
})?;
let membership_identifier = aws_smithy_http::label::fmt_string(
input_54,
aws_smithy_http::label::EncodingStrategy::Default,
);
if membership_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"membership_identifier",
"cannot be empty or unset",
),
);
}
let input_55 = &_input.configured_table_association_identifier;
let input_55 = input_55.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"configured_table_association_identifier",
"cannot be empty or unset",
)
})?;
let configured_table_association_identifier = aws_smithy_http::label::fmt_string(
input_55,
aws_smithy_http::label::EncodingStrategy::Default,
);
if configured_table_association_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"configured_table_association_identifier",
"cannot be empty or unset",
),
);
}
write!(output, "/memberships/{membershipIdentifier}/configuredTableAssociations/{configuredTableAssociationIdentifier}", membershipIdentifier = membership_identifier, configuredTableAssociationIdentifier = configured_table_association_identifier).expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateConfiguredTableAssociationInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PATCH").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_configured_table_association(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateConfiguredTableAssociation::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateConfiguredTableAssociation",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_configured_table_association_input::Builder {
crate::input::update_configured_table_association_input::Builder::default()
}
}
pub mod update_membership_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) membership_identifier: std::option::Option<std::string::String>,
pub(crate) query_log_status: std::option::Option<crate::model::MembershipQueryLogStatus>,
}
impl Builder {
pub fn membership_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.membership_identifier = Some(input.into());
self
}
pub fn set_membership_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.membership_identifier = input;
self
}
pub fn query_log_status(mut self, input: crate::model::MembershipQueryLogStatus) -> Self {
self.query_log_status = Some(input);
self
}
pub fn set_query_log_status(
mut self,
input: std::option::Option<crate::model::MembershipQueryLogStatus>,
) -> Self {
self.query_log_status = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateMembershipInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateMembershipInput {
membership_identifier: self.membership_identifier,
query_log_status: self.query_log_status,
})
}
}
}
impl UpdateMembershipInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateMembership,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UpdateMembershipInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_56 = &_input.membership_identifier;
let input_56 = input_56.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"membership_identifier",
"cannot be empty or unset",
)
})?;
let membership_identifier = aws_smithy_http::label::fmt_string(
input_56,
aws_smithy_http::label::EncodingStrategy::Default,
);
if membership_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"membership_identifier",
"cannot be empty or unset",
),
);
}
write!(
output,
"/memberships/{membershipIdentifier}",
membershipIdentifier = membership_identifier
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateMembershipInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PATCH").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_membership(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateMembership::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateMembership",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_membership_input::Builder {
crate::input::update_membership_input::Builder::default()
}
}
pub mod update_protected_query_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) membership_identifier: std::option::Option<std::string::String>,
pub(crate) protected_query_identifier: std::option::Option<std::string::String>,
pub(crate) target_status: std::option::Option<crate::model::TargetProtectedQueryStatus>,
}
impl Builder {
pub fn membership_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.membership_identifier = Some(input.into());
self
}
pub fn set_membership_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.membership_identifier = input;
self
}
pub fn protected_query_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.protected_query_identifier = Some(input.into());
self
}
pub fn set_protected_query_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.protected_query_identifier = input;
self
}
pub fn target_status(mut self, input: crate::model::TargetProtectedQueryStatus) -> Self {
self.target_status = Some(input);
self
}
pub fn set_target_status(
mut self,
input: std::option::Option<crate::model::TargetProtectedQueryStatus>,
) -> Self {
self.target_status = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateProtectedQueryInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateProtectedQueryInput {
membership_identifier: self.membership_identifier,
protected_query_identifier: self.protected_query_identifier,
target_status: self.target_status,
})
}
}
}
impl UpdateProtectedQueryInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateProtectedQuery,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UpdateProtectedQueryInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_57 = &_input.membership_identifier;
let input_57 = input_57.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"membership_identifier",
"cannot be empty or unset",
)
})?;
let membership_identifier = aws_smithy_http::label::fmt_string(
input_57,
aws_smithy_http::label::EncodingStrategy::Default,
);
if membership_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"membership_identifier",
"cannot be empty or unset",
),
);
}
let input_58 = &_input.protected_query_identifier;
let input_58 = input_58.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"protected_query_identifier",
"cannot be empty or unset",
)
})?;
let protected_query_identifier = aws_smithy_http::label::fmt_string(
input_58,
aws_smithy_http::label::EncodingStrategy::Default,
);
if protected_query_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"protected_query_identifier",
"cannot be empty or unset",
),
);
}
write!(output, "/memberships/{membershipIdentifier}/protectedQueries/{protectedQueryIdentifier}", membershipIdentifier = membership_identifier, protectedQueryIdentifier = protected_query_identifier).expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateProtectedQueryInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PATCH").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_protected_query(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateProtectedQuery::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateProtectedQuery",
"cleanrooms",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_protected_query_input::Builder {
crate::input::update_protected_query_input::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateProtectedQueryInput {
#[doc(hidden)]
pub membership_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub protected_query_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub target_status: std::option::Option<crate::model::TargetProtectedQueryStatus>,
}
impl UpdateProtectedQueryInput {
pub fn membership_identifier(&self) -> std::option::Option<&str> {
self.membership_identifier.as_deref()
}
pub fn protected_query_identifier(&self) -> std::option::Option<&str> {
self.protected_query_identifier.as_deref()
}
pub fn target_status(&self) -> std::option::Option<&crate::model::TargetProtectedQueryStatus> {
self.target_status.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StartProtectedQueryInput {
#[doc(hidden)]
pub r#type: std::option::Option<crate::model::ProtectedQueryType>,
#[doc(hidden)]
pub membership_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub sql_parameters: std::option::Option<crate::model::ProtectedQuerySqlParameters>,
#[doc(hidden)]
pub result_configuration: std::option::Option<crate::model::ProtectedQueryResultConfiguration>,
}
impl StartProtectedQueryInput {
pub fn r#type(&self) -> std::option::Option<&crate::model::ProtectedQueryType> {
self.r#type.as_ref()
}
pub fn membership_identifier(&self) -> std::option::Option<&str> {
self.membership_identifier.as_deref()
}
pub fn sql_parameters(
&self,
) -> std::option::Option<&crate::model::ProtectedQuerySqlParameters> {
self.sql_parameters.as_ref()
}
pub fn result_configuration(
&self,
) -> std::option::Option<&crate::model::ProtectedQueryResultConfiguration> {
self.result_configuration.as_ref()
}
}
impl std::fmt::Debug for StartProtectedQueryInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StartProtectedQueryInput");
formatter.field("r#type", &self.r#type);
formatter.field("membership_identifier", &self.membership_identifier);
formatter.field("sql_parameters", &"*** Sensitive Data Redacted ***");
formatter.field("result_configuration", &self.result_configuration);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListProtectedQueriesInput {
#[doc(hidden)]
pub membership_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub status: std::option::Option<crate::model::ProtectedQueryStatus>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
}
impl ListProtectedQueriesInput {
pub fn membership_identifier(&self) -> std::option::Option<&str> {
self.membership_identifier.as_deref()
}
pub fn status(&self) -> std::option::Option<&crate::model::ProtectedQueryStatus> {
self.status.as_ref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetProtectedQueryInput {
#[doc(hidden)]
pub membership_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub protected_query_identifier: std::option::Option<std::string::String>,
}
impl GetProtectedQueryInput {
pub fn membership_identifier(&self) -> std::option::Option<&str> {
self.membership_identifier.as_deref()
}
pub fn protected_query_identifier(&self) -> std::option::Option<&str> {
self.protected_query_identifier.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListMembershipsInput {
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
#[doc(hidden)]
pub status: std::option::Option<crate::model::MembershipStatus>,
}
impl ListMembershipsInput {
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn status(&self) -> std::option::Option<&crate::model::MembershipStatus> {
self.status.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateMembershipInput {
#[doc(hidden)]
pub collaboration_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub query_log_status: std::option::Option<crate::model::MembershipQueryLogStatus>,
}
impl CreateMembershipInput {
pub fn collaboration_identifier(&self) -> std::option::Option<&str> {
self.collaboration_identifier.as_deref()
}
pub fn query_log_status(&self) -> std::option::Option<&crate::model::MembershipQueryLogStatus> {
self.query_log_status.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteMembershipInput {
#[doc(hidden)]
pub membership_identifier: std::option::Option<std::string::String>,
}
impl DeleteMembershipInput {
pub fn membership_identifier(&self) -> std::option::Option<&str> {
self.membership_identifier.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateMembershipInput {
#[doc(hidden)]
pub membership_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub query_log_status: std::option::Option<crate::model::MembershipQueryLogStatus>,
}
impl UpdateMembershipInput {
pub fn membership_identifier(&self) -> std::option::Option<&str> {
self.membership_identifier.as_deref()
}
pub fn query_log_status(&self) -> std::option::Option<&crate::model::MembershipQueryLogStatus> {
self.query_log_status.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetMembershipInput {
#[doc(hidden)]
pub membership_identifier: std::option::Option<std::string::String>,
}
impl GetMembershipInput {
pub fn membership_identifier(&self) -> std::option::Option<&str> {
self.membership_identifier.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateConfiguredTableAnalysisRuleInput {
#[doc(hidden)]
pub configured_table_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub analysis_rule_type: std::option::Option<crate::model::ConfiguredTableAnalysisRuleType>,
#[doc(hidden)]
pub analysis_rule_policy: std::option::Option<crate::model::ConfiguredTableAnalysisRulePolicy>,
}
impl UpdateConfiguredTableAnalysisRuleInput {
pub fn configured_table_identifier(&self) -> std::option::Option<&str> {
self.configured_table_identifier.as_deref()
}
pub fn analysis_rule_type(
&self,
) -> std::option::Option<&crate::model::ConfiguredTableAnalysisRuleType> {
self.analysis_rule_type.as_ref()
}
pub fn analysis_rule_policy(
&self,
) -> std::option::Option<&crate::model::ConfiguredTableAnalysisRulePolicy> {
self.analysis_rule_policy.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetConfiguredTableAnalysisRuleInput {
#[doc(hidden)]
pub configured_table_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub analysis_rule_type: std::option::Option<crate::model::ConfiguredTableAnalysisRuleType>,
}
impl GetConfiguredTableAnalysisRuleInput {
pub fn configured_table_identifier(&self) -> std::option::Option<&str> {
self.configured_table_identifier.as_deref()
}
pub fn analysis_rule_type(
&self,
) -> std::option::Option<&crate::model::ConfiguredTableAnalysisRuleType> {
self.analysis_rule_type.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteConfiguredTableAnalysisRuleInput {
#[doc(hidden)]
pub configured_table_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub analysis_rule_type: std::option::Option<crate::model::ConfiguredTableAnalysisRuleType>,
}
impl DeleteConfiguredTableAnalysisRuleInput {
pub fn configured_table_identifier(&self) -> std::option::Option<&str> {
self.configured_table_identifier.as_deref()
}
pub fn analysis_rule_type(
&self,
) -> std::option::Option<&crate::model::ConfiguredTableAnalysisRuleType> {
self.analysis_rule_type.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateConfiguredTableAnalysisRuleInput {
#[doc(hidden)]
pub configured_table_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub analysis_rule_type: std::option::Option<crate::model::ConfiguredTableAnalysisRuleType>,
#[doc(hidden)]
pub analysis_rule_policy: std::option::Option<crate::model::ConfiguredTableAnalysisRulePolicy>,
}
impl CreateConfiguredTableAnalysisRuleInput {
pub fn configured_table_identifier(&self) -> std::option::Option<&str> {
self.configured_table_identifier.as_deref()
}
pub fn analysis_rule_type(
&self,
) -> std::option::Option<&crate::model::ConfiguredTableAnalysisRuleType> {
self.analysis_rule_type.as_ref()
}
pub fn analysis_rule_policy(
&self,
) -> std::option::Option<&crate::model::ConfiguredTableAnalysisRulePolicy> {
self.analysis_rule_policy.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListConfiguredTablesInput {
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
}
impl ListConfiguredTablesInput {
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateConfiguredTableInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub table_reference: std::option::Option<crate::model::TableReference>,
#[doc(hidden)]
pub allowed_columns: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub analysis_method: std::option::Option<crate::model::AnalysisMethod>,
}
impl CreateConfiguredTableInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn table_reference(&self) -> std::option::Option<&crate::model::TableReference> {
self.table_reference.as_ref()
}
pub fn allowed_columns(&self) -> std::option::Option<&[std::string::String]> {
self.allowed_columns.as_deref()
}
pub fn analysis_method(&self) -> std::option::Option<&crate::model::AnalysisMethod> {
self.analysis_method.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteConfiguredTableInput {
#[doc(hidden)]
pub configured_table_identifier: std::option::Option<std::string::String>,
}
impl DeleteConfiguredTableInput {
pub fn configured_table_identifier(&self) -> std::option::Option<&str> {
self.configured_table_identifier.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateConfiguredTableInput {
#[doc(hidden)]
pub configured_table_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
}
impl UpdateConfiguredTableInput {
pub fn configured_table_identifier(&self) -> std::option::Option<&str> {
self.configured_table_identifier.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetConfiguredTableInput {
#[doc(hidden)]
pub configured_table_identifier: std::option::Option<std::string::String>,
}
impl GetConfiguredTableInput {
pub fn configured_table_identifier(&self) -> std::option::Option<&str> {
self.configured_table_identifier.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListConfiguredTableAssociationsInput {
#[doc(hidden)]
pub membership_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
}
impl ListConfiguredTableAssociationsInput {
pub fn membership_identifier(&self) -> std::option::Option<&str> {
self.membership_identifier.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateConfiguredTableAssociationInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub membership_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub configured_table_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub role_arn: std::option::Option<std::string::String>,
}
impl CreateConfiguredTableAssociationInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn membership_identifier(&self) -> std::option::Option<&str> {
self.membership_identifier.as_deref()
}
pub fn configured_table_identifier(&self) -> std::option::Option<&str> {
self.configured_table_identifier.as_deref()
}
pub fn role_arn(&self) -> std::option::Option<&str> {
self.role_arn.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteConfiguredTableAssociationInput {
#[doc(hidden)]
pub configured_table_association_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub membership_identifier: std::option::Option<std::string::String>,
}
impl DeleteConfiguredTableAssociationInput {
pub fn configured_table_association_identifier(&self) -> std::option::Option<&str> {
self.configured_table_association_identifier.as_deref()
}
pub fn membership_identifier(&self) -> std::option::Option<&str> {
self.membership_identifier.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateConfiguredTableAssociationInput {
#[doc(hidden)]
pub configured_table_association_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub membership_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub role_arn: std::option::Option<std::string::String>,
}
impl UpdateConfiguredTableAssociationInput {
pub fn configured_table_association_identifier(&self) -> std::option::Option<&str> {
self.configured_table_association_identifier.as_deref()
}
pub fn membership_identifier(&self) -> std::option::Option<&str> {
self.membership_identifier.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn role_arn(&self) -> std::option::Option<&str> {
self.role_arn.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetConfiguredTableAssociationInput {
#[doc(hidden)]
pub configured_table_association_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub membership_identifier: std::option::Option<std::string::String>,
}
impl GetConfiguredTableAssociationInput {
pub fn configured_table_association_identifier(&self) -> std::option::Option<&str> {
self.configured_table_association_identifier.as_deref()
}
pub fn membership_identifier(&self) -> std::option::Option<&str> {
self.membership_identifier.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListSchemasInput {
#[doc(hidden)]
pub collaboration_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub schema_type: std::option::Option<crate::model::SchemaType>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
}
impl ListSchemasInput {
pub fn collaboration_identifier(&self) -> std::option::Option<&str> {
self.collaboration_identifier.as_deref()
}
pub fn schema_type(&self) -> std::option::Option<&crate::model::SchemaType> {
self.schema_type.as_ref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListMembersInput {
#[doc(hidden)]
pub collaboration_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
}
impl ListMembersInput {
pub fn collaboration_identifier(&self) -> std::option::Option<&str> {
self.collaboration_identifier.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetSchemaAnalysisRuleInput {
#[doc(hidden)]
pub collaboration_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub r#type: std::option::Option<crate::model::AnalysisRuleType>,
}
impl GetSchemaAnalysisRuleInput {
pub fn collaboration_identifier(&self) -> std::option::Option<&str> {
self.collaboration_identifier.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn r#type(&self) -> std::option::Option<&crate::model::AnalysisRuleType> {
self.r#type.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetSchemaInput {
#[doc(hidden)]
pub collaboration_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
}
impl GetSchemaInput {
pub fn collaboration_identifier(&self) -> std::option::Option<&str> {
self.collaboration_identifier.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteMemberInput {
#[doc(hidden)]
pub collaboration_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub account_id: std::option::Option<std::string::String>,
}
impl DeleteMemberInput {
pub fn collaboration_identifier(&self) -> std::option::Option<&str> {
self.collaboration_identifier.as_deref()
}
pub fn account_id(&self) -> std::option::Option<&str> {
self.account_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BatchGetSchemaInput {
#[doc(hidden)]
pub collaboration_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl BatchGetSchemaInput {
pub fn collaboration_identifier(&self) -> std::option::Option<&str> {
self.collaboration_identifier.as_deref()
}
pub fn names(&self) -> std::option::Option<&[std::string::String]> {
self.names.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListCollaborationsInput {
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
#[doc(hidden)]
pub member_status: std::option::Option<crate::model::FilterableMemberStatus>,
}
impl ListCollaborationsInput {
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn member_status(&self) -> std::option::Option<&crate::model::FilterableMemberStatus> {
self.member_status.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateCollaborationInput {
#[doc(hidden)]
pub members: std::option::Option<std::vec::Vec<crate::model::MemberSpecification>>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub creator_member_abilities: std::option::Option<std::vec::Vec<crate::model::MemberAbility>>,
#[doc(hidden)]
pub creator_display_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub data_encryption_metadata: std::option::Option<crate::model::DataEncryptionMetadata>,
#[doc(hidden)]
pub query_log_status: std::option::Option<crate::model::CollaborationQueryLogStatus>,
}
impl CreateCollaborationInput {
pub fn members(&self) -> std::option::Option<&[crate::model::MemberSpecification]> {
self.members.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn creator_member_abilities(&self) -> std::option::Option<&[crate::model::MemberAbility]> {
self.creator_member_abilities.as_deref()
}
pub fn creator_display_name(&self) -> std::option::Option<&str> {
self.creator_display_name.as_deref()
}
pub fn data_encryption_metadata(
&self,
) -> std::option::Option<&crate::model::DataEncryptionMetadata> {
self.data_encryption_metadata.as_ref()
}
pub fn query_log_status(
&self,
) -> std::option::Option<&crate::model::CollaborationQueryLogStatus> {
self.query_log_status.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteCollaborationInput {
#[doc(hidden)]
pub collaboration_identifier: std::option::Option<std::string::String>,
}
impl DeleteCollaborationInput {
pub fn collaboration_identifier(&self) -> std::option::Option<&str> {
self.collaboration_identifier.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateCollaborationInput {
#[doc(hidden)]
pub collaboration_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
}
impl UpdateCollaborationInput {
pub fn collaboration_identifier(&self) -> std::option::Option<&str> {
self.collaboration_identifier.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetCollaborationInput {
#[doc(hidden)]
pub collaboration_identifier: std::option::Option<std::string::String>,
}
impl GetCollaborationInput {
pub fn collaboration_identifier(&self) -> std::option::Option<&str> {
self.collaboration_identifier.as_deref()
}
}