use std::fmt::Write;
pub mod add_lf_tags_to_resource_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) catalog_id: std::option::Option<std::string::String>,
pub(crate) resource: std::option::Option<crate::model::Resource>,
pub(crate) lf_tags: std::option::Option<std::vec::Vec<crate::model::LfTagPair>>,
}
impl Builder {
pub fn catalog_id(mut self, input: impl Into<std::string::String>) -> Self {
self.catalog_id = Some(input.into());
self
}
pub fn set_catalog_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.catalog_id = input;
self
}
pub fn resource(mut self, input: crate::model::Resource) -> Self {
self.resource = Some(input);
self
}
pub fn set_resource(mut self, input: std::option::Option<crate::model::Resource>) -> Self {
self.resource = input;
self
}
pub fn lf_tags(mut self, input: crate::model::LfTagPair) -> Self {
let mut v = self.lf_tags.unwrap_or_default();
v.push(input);
self.lf_tags = Some(v);
self
}
pub fn set_lf_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::LfTagPair>>,
) -> Self {
self.lf_tags = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::AddLfTagsToResourceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::AddLfTagsToResourceInput {
catalog_id: self.catalog_id,
resource: self.resource,
lf_tags: self.lf_tags,
})
}
}
}
impl AddLfTagsToResourceInput {
#[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::AddLFTagsToResource,
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::AddLfTagsToResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/AddLFTagsToResource").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::AddLfTagsToResourceInput,
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_add_lf_tags_to_resource(
&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::AddLFTagsToResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"AddLFTagsToResource",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::add_lf_tags_to_resource_input::Builder {
crate::input::add_lf_tags_to_resource_input::Builder::default()
}
}
pub mod assume_decorated_role_with_saml_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) saml_assertion: std::option::Option<std::string::String>,
pub(crate) role_arn: std::option::Option<std::string::String>,
pub(crate) principal_arn: std::option::Option<std::string::String>,
pub(crate) duration_seconds: std::option::Option<i32>,
}
impl Builder {
pub fn saml_assertion(mut self, input: impl Into<std::string::String>) -> Self {
self.saml_assertion = Some(input.into());
self
}
pub fn set_saml_assertion(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.saml_assertion = 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 principal_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.principal_arn = Some(input.into());
self
}
pub fn set_principal_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.principal_arn = input;
self
}
pub fn duration_seconds(mut self, input: i32) -> Self {
self.duration_seconds = Some(input);
self
}
pub fn set_duration_seconds(mut self, input: std::option::Option<i32>) -> Self {
self.duration_seconds = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::AssumeDecoratedRoleWithSamlInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::AssumeDecoratedRoleWithSamlInput {
saml_assertion: self.saml_assertion,
role_arn: self.role_arn,
principal_arn: self.principal_arn,
duration_seconds: self.duration_seconds,
})
}
}
}
impl AssumeDecoratedRoleWithSamlInput {
#[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::AssumeDecoratedRoleWithSAML,
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::AssumeDecoratedRoleWithSamlInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/AssumeDecoratedRoleWithSAML").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::AssumeDecoratedRoleWithSamlInput,
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_assume_decorated_role_with_saml(&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::AssumeDecoratedRoleWithSAML::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"AssumeDecoratedRoleWithSAML",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::assume_decorated_role_with_saml_input::Builder {
crate::input::assume_decorated_role_with_saml_input::Builder::default()
}
}
pub mod batch_grant_permissions_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) catalog_id: std::option::Option<std::string::String>,
pub(crate) entries:
std::option::Option<std::vec::Vec<crate::model::BatchPermissionsRequestEntry>>,
}
impl Builder {
pub fn catalog_id(mut self, input: impl Into<std::string::String>) -> Self {
self.catalog_id = Some(input.into());
self
}
pub fn set_catalog_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.catalog_id = input;
self
}
pub fn entries(mut self, input: crate::model::BatchPermissionsRequestEntry) -> Self {
let mut v = self.entries.unwrap_or_default();
v.push(input);
self.entries = Some(v);
self
}
pub fn set_entries(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::BatchPermissionsRequestEntry>>,
) -> Self {
self.entries = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::BatchGrantPermissionsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::BatchGrantPermissionsInput {
catalog_id: self.catalog_id,
entries: self.entries,
})
}
}
}
impl BatchGrantPermissionsInput {
#[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::BatchGrantPermissions,
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::BatchGrantPermissionsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/BatchGrantPermissions").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::BatchGrantPermissionsInput,
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_grant_permissions(
&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::BatchGrantPermissions::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchGrantPermissions",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::batch_grant_permissions_input::Builder {
crate::input::batch_grant_permissions_input::Builder::default()
}
}
pub mod batch_revoke_permissions_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) catalog_id: std::option::Option<std::string::String>,
pub(crate) entries:
std::option::Option<std::vec::Vec<crate::model::BatchPermissionsRequestEntry>>,
}
impl Builder {
pub fn catalog_id(mut self, input: impl Into<std::string::String>) -> Self {
self.catalog_id = Some(input.into());
self
}
pub fn set_catalog_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.catalog_id = input;
self
}
pub fn entries(mut self, input: crate::model::BatchPermissionsRequestEntry) -> Self {
let mut v = self.entries.unwrap_or_default();
v.push(input);
self.entries = Some(v);
self
}
pub fn set_entries(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::BatchPermissionsRequestEntry>>,
) -> Self {
self.entries = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::BatchRevokePermissionsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::BatchRevokePermissionsInput {
catalog_id: self.catalog_id,
entries: self.entries,
})
}
}
}
impl BatchRevokePermissionsInput {
#[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::BatchRevokePermissions,
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::BatchRevokePermissionsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/BatchRevokePermissions").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::BatchRevokePermissionsInput,
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_revoke_permissions(
&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::BatchRevokePermissions::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchRevokePermissions",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::batch_revoke_permissions_input::Builder {
crate::input::batch_revoke_permissions_input::Builder::default()
}
}
pub mod cancel_transaction_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) transaction_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn transaction_id(mut self, input: impl Into<std::string::String>) -> Self {
self.transaction_id = Some(input.into());
self
}
pub fn set_transaction_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.transaction_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CancelTransactionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CancelTransactionInput {
transaction_id: self.transaction_id,
})
}
}
}
impl CancelTransactionInput {
#[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::CancelTransaction,
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::CancelTransactionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/CancelTransaction").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CancelTransactionInput,
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_cancel_transaction(&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::CancelTransaction::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CancelTransaction",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::cancel_transaction_input::Builder {
crate::input::cancel_transaction_input::Builder::default()
}
}
pub mod commit_transaction_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) transaction_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn transaction_id(mut self, input: impl Into<std::string::String>) -> Self {
self.transaction_id = Some(input.into());
self
}
pub fn set_transaction_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.transaction_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CommitTransactionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CommitTransactionInput {
transaction_id: self.transaction_id,
})
}
}
}
impl CommitTransactionInput {
#[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::CommitTransaction,
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::CommitTransactionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/CommitTransaction").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CommitTransactionInput,
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_commit_transaction(&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::CommitTransaction::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CommitTransaction",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::commit_transaction_input::Builder {
crate::input::commit_transaction_input::Builder::default()
}
}
pub mod create_data_cells_filter_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) table_data: std::option::Option<crate::model::DataCellsFilter>,
}
impl Builder {
pub fn table_data(mut self, input: crate::model::DataCellsFilter) -> Self {
self.table_data = Some(input);
self
}
pub fn set_table_data(
mut self,
input: std::option::Option<crate::model::DataCellsFilter>,
) -> Self {
self.table_data = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateDataCellsFilterInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateDataCellsFilterInput {
table_data: self.table_data,
})
}
}
}
impl CreateDataCellsFilterInput {
#[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::CreateDataCellsFilter,
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::CreateDataCellsFilterInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/CreateDataCellsFilter").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateDataCellsFilterInput,
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_data_cells_filter(
&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::CreateDataCellsFilter::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateDataCellsFilter",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_data_cells_filter_input::Builder {
crate::input::create_data_cells_filter_input::Builder::default()
}
}
pub mod create_lf_tag_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) catalog_id: std::option::Option<std::string::String>,
pub(crate) tag_key: std::option::Option<std::string::String>,
pub(crate) tag_values: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn catalog_id(mut self, input: impl Into<std::string::String>) -> Self {
self.catalog_id = Some(input.into());
self
}
pub fn set_catalog_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.catalog_id = input;
self
}
pub fn tag_key(mut self, input: impl Into<std::string::String>) -> Self {
self.tag_key = Some(input.into());
self
}
pub fn set_tag_key(mut self, input: std::option::Option<std::string::String>) -> Self {
self.tag_key = input;
self
}
pub fn tag_values(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.tag_values.unwrap_or_default();
v.push(input.into());
self.tag_values = Some(v);
self
}
pub fn set_tag_values(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.tag_values = input;
self
}
pub fn build(
self,
) -> Result<crate::input::CreateLfTagInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::CreateLfTagInput {
catalog_id: self.catalog_id,
tag_key: self.tag_key,
tag_values: self.tag_values,
})
}
}
}
impl CreateLfTagInput {
#[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::CreateLFTag,
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::CreateLfTagInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/CreateLFTag").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateLfTagInput,
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_lf_tag(&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::CreateLFTag::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateLFTag",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_lf_tag_input::Builder {
crate::input::create_lf_tag_input::Builder::default()
}
}
pub mod delete_data_cells_filter_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) table_catalog_id: std::option::Option<std::string::String>,
pub(crate) database_name: std::option::Option<std::string::String>,
pub(crate) table_name: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn table_catalog_id(mut self, input: impl Into<std::string::String>) -> Self {
self.table_catalog_id = Some(input.into());
self
}
pub fn set_table_catalog_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.table_catalog_id = input;
self
}
pub fn database_name(mut self, input: impl Into<std::string::String>) -> Self {
self.database_name = Some(input.into());
self
}
pub fn set_database_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.database_name = input;
self
}
pub fn table_name(mut self, input: impl Into<std::string::String>) -> Self {
self.table_name = Some(input.into());
self
}
pub fn set_table_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.table_name = 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::DeleteDataCellsFilterInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteDataCellsFilterInput {
table_catalog_id: self.table_catalog_id,
database_name: self.database_name,
table_name: self.table_name,
name: self.name,
})
}
}
}
impl DeleteDataCellsFilterInput {
#[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::DeleteDataCellsFilter,
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::DeleteDataCellsFilterInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/DeleteDataCellsFilter").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteDataCellsFilterInput,
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_delete_data_cells_filter(
&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::DeleteDataCellsFilter::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteDataCellsFilter",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_data_cells_filter_input::Builder {
crate::input::delete_data_cells_filter_input::Builder::default()
}
}
pub mod delete_lf_tag_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) catalog_id: std::option::Option<std::string::String>,
pub(crate) tag_key: std::option::Option<std::string::String>,
}
impl Builder {
pub fn catalog_id(mut self, input: impl Into<std::string::String>) -> Self {
self.catalog_id = Some(input.into());
self
}
pub fn set_catalog_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.catalog_id = input;
self
}
pub fn tag_key(mut self, input: impl Into<std::string::String>) -> Self {
self.tag_key = Some(input.into());
self
}
pub fn set_tag_key(mut self, input: std::option::Option<std::string::String>) -> Self {
self.tag_key = input;
self
}
pub fn build(
self,
) -> Result<crate::input::DeleteLfTagInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::DeleteLfTagInput {
catalog_id: self.catalog_id,
tag_key: self.tag_key,
})
}
}
}
impl DeleteLfTagInput {
#[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::DeleteLFTag,
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::DeleteLfTagInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/DeleteLFTag").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteLfTagInput,
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_delete_lf_tag(&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::DeleteLFTag::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteLFTag",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_lf_tag_input::Builder {
crate::input::delete_lf_tag_input::Builder::default()
}
}
pub mod delete_objects_on_cancel_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) catalog_id: std::option::Option<std::string::String>,
pub(crate) database_name: std::option::Option<std::string::String>,
pub(crate) table_name: std::option::Option<std::string::String>,
pub(crate) transaction_id: std::option::Option<std::string::String>,
pub(crate) objects: std::option::Option<std::vec::Vec<crate::model::VirtualObject>>,
}
impl Builder {
pub fn catalog_id(mut self, input: impl Into<std::string::String>) -> Self {
self.catalog_id = Some(input.into());
self
}
pub fn set_catalog_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.catalog_id = input;
self
}
pub fn database_name(mut self, input: impl Into<std::string::String>) -> Self {
self.database_name = Some(input.into());
self
}
pub fn set_database_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.database_name = input;
self
}
pub fn table_name(mut self, input: impl Into<std::string::String>) -> Self {
self.table_name = Some(input.into());
self
}
pub fn set_table_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.table_name = input;
self
}
pub fn transaction_id(mut self, input: impl Into<std::string::String>) -> Self {
self.transaction_id = Some(input.into());
self
}
pub fn set_transaction_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.transaction_id = input;
self
}
pub fn objects(mut self, input: crate::model::VirtualObject) -> Self {
let mut v = self.objects.unwrap_or_default();
v.push(input);
self.objects = Some(v);
self
}
pub fn set_objects(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::VirtualObject>>,
) -> Self {
self.objects = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteObjectsOnCancelInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteObjectsOnCancelInput {
catalog_id: self.catalog_id,
database_name: self.database_name,
table_name: self.table_name,
transaction_id: self.transaction_id,
objects: self.objects,
})
}
}
}
impl DeleteObjectsOnCancelInput {
#[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::DeleteObjectsOnCancel,
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::DeleteObjectsOnCancelInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/DeleteObjectsOnCancel").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteObjectsOnCancelInput,
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_delete_objects_on_cancel(
&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::DeleteObjectsOnCancel::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteObjectsOnCancel",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_objects_on_cancel_input::Builder {
crate::input::delete_objects_on_cancel_input::Builder::default()
}
}
pub mod deregister_resource_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeregisterResourceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeregisterResourceInput {
resource_arn: self.resource_arn,
})
}
}
}
impl DeregisterResourceInput {
#[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::DeregisterResource,
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::DeregisterResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/DeregisterResource").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeregisterResourceInput,
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_deregister_resource(&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::DeregisterResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeregisterResource",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::deregister_resource_input::Builder {
crate::input::deregister_resource_input::Builder::default()
}
}
pub mod describe_resource_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeResourceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeResourceInput {
resource_arn: self.resource_arn,
})
}
}
}
impl DescribeResourceInput {
#[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::DescribeResource,
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::DescribeResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/DescribeResource").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeResourceInput,
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_describe_resource(&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::DescribeResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeResource",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_resource_input::Builder {
crate::input::describe_resource_input::Builder::default()
}
}
pub mod describe_transaction_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) transaction_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn transaction_id(mut self, input: impl Into<std::string::String>) -> Self {
self.transaction_id = Some(input.into());
self
}
pub fn set_transaction_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.transaction_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeTransactionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeTransactionInput {
transaction_id: self.transaction_id,
})
}
}
}
impl DescribeTransactionInput {
#[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::DescribeTransaction,
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::DescribeTransactionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/DescribeTransaction").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeTransactionInput,
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_describe_transaction(&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::DescribeTransaction::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeTransaction",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_transaction_input::Builder {
crate::input::describe_transaction_input::Builder::default()
}
}
pub mod extend_transaction_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) transaction_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn transaction_id(mut self, input: impl Into<std::string::String>) -> Self {
self.transaction_id = Some(input.into());
self
}
pub fn set_transaction_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.transaction_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ExtendTransactionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ExtendTransactionInput {
transaction_id: self.transaction_id,
})
}
}
}
impl ExtendTransactionInput {
#[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::ExtendTransaction,
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::ExtendTransactionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/ExtendTransaction").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ExtendTransactionInput,
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_extend_transaction(&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::ExtendTransaction::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ExtendTransaction",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::extend_transaction_input::Builder {
crate::input::extend_transaction_input::Builder::default()
}
}
pub mod get_data_lake_settings_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) catalog_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn catalog_id(mut self, input: impl Into<std::string::String>) -> Self {
self.catalog_id = Some(input.into());
self
}
pub fn set_catalog_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.catalog_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetDataLakeSettingsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetDataLakeSettingsInput {
catalog_id: self.catalog_id,
})
}
}
}
impl GetDataLakeSettingsInput {
#[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::GetDataLakeSettings,
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::GetDataLakeSettingsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/GetDataLakeSettings").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetDataLakeSettingsInput,
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_get_data_lake_settings(
&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::GetDataLakeSettings::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetDataLakeSettings",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_data_lake_settings_input::Builder {
crate::input::get_data_lake_settings_input::Builder::default()
}
}
pub mod get_effective_permissions_for_path_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) catalog_id: std::option::Option<std::string::String>,
pub(crate) resource_arn: 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 catalog_id(mut self, input: impl Into<std::string::String>) -> Self {
self.catalog_id = Some(input.into());
self
}
pub fn set_catalog_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.catalog_id = input;
self
}
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = 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::GetEffectivePermissionsForPathInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetEffectivePermissionsForPathInput {
catalog_id: self.catalog_id,
resource_arn: self.resource_arn,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
impl GetEffectivePermissionsForPathInput {
#[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::GetEffectivePermissionsForPath,
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::GetEffectivePermissionsForPathInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/GetEffectivePermissionsForPath")
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetEffectivePermissionsForPathInput,
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_get_effective_permissions_for_path(&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::GetEffectivePermissionsForPath::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetEffectivePermissionsForPath",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_effective_permissions_for_path_input::Builder {
crate::input::get_effective_permissions_for_path_input::Builder::default()
}
}
pub mod get_lf_tag_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) catalog_id: std::option::Option<std::string::String>,
pub(crate) tag_key: std::option::Option<std::string::String>,
}
impl Builder {
pub fn catalog_id(mut self, input: impl Into<std::string::String>) -> Self {
self.catalog_id = Some(input.into());
self
}
pub fn set_catalog_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.catalog_id = input;
self
}
pub fn tag_key(mut self, input: impl Into<std::string::String>) -> Self {
self.tag_key = Some(input.into());
self
}
pub fn set_tag_key(mut self, input: std::option::Option<std::string::String>) -> Self {
self.tag_key = input;
self
}
pub fn build(
self,
) -> Result<crate::input::GetLfTagInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::GetLfTagInput {
catalog_id: self.catalog_id,
tag_key: self.tag_key,
})
}
}
}
impl GetLfTagInput {
#[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::GetLFTag,
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::GetLfTagInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/GetLFTag").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetLfTagInput,
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_get_lf_tag(&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::GetLFTag::new())
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetLFTag",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_lf_tag_input::Builder {
crate::input::get_lf_tag_input::Builder::default()
}
}
pub mod get_query_state_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) query_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn query_id(mut self, input: impl Into<std::string::String>) -> Self {
self.query_id = Some(input.into());
self
}
pub fn set_query_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.query_id = input;
self
}
pub fn build(
self,
) -> Result<crate::input::GetQueryStateInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::GetQueryStateInput {
query_id: self.query_id,
})
}
}
}
impl GetQueryStateInput {
#[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::GetQueryState,
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::GetQueryStateInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/GetQueryState").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetQueryStateInput,
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_get_query_state(&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);
}
let endpoint_prefix = aws_smithy_http::endpoint::EndpointPrefix::new("query-")?;
request.properties_mut().insert(endpoint_prefix);
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::GetQueryState::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetQueryState",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_query_state_input::Builder {
crate::input::get_query_state_input::Builder::default()
}
}
pub mod get_query_statistics_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) query_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn query_id(mut self, input: impl Into<std::string::String>) -> Self {
self.query_id = Some(input.into());
self
}
pub fn set_query_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.query_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetQueryStatisticsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetQueryStatisticsInput {
query_id: self.query_id,
})
}
}
}
impl GetQueryStatisticsInput {
#[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::GetQueryStatistics,
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::GetQueryStatisticsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/GetQueryStatistics").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetQueryStatisticsInput,
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_get_query_statistics(&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);
}
let endpoint_prefix = aws_smithy_http::endpoint::EndpointPrefix::new("query-")?;
request.properties_mut().insert(endpoint_prefix);
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::GetQueryStatistics::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetQueryStatistics",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_query_statistics_input::Builder {
crate::input::get_query_statistics_input::Builder::default()
}
}
pub mod get_resource_lf_tags_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) catalog_id: std::option::Option<std::string::String>,
pub(crate) resource: std::option::Option<crate::model::Resource>,
pub(crate) show_assigned_lf_tags: std::option::Option<bool>,
}
impl Builder {
pub fn catalog_id(mut self, input: impl Into<std::string::String>) -> Self {
self.catalog_id = Some(input.into());
self
}
pub fn set_catalog_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.catalog_id = input;
self
}
pub fn resource(mut self, input: crate::model::Resource) -> Self {
self.resource = Some(input);
self
}
pub fn set_resource(mut self, input: std::option::Option<crate::model::Resource>) -> Self {
self.resource = input;
self
}
pub fn show_assigned_lf_tags(mut self, input: bool) -> Self {
self.show_assigned_lf_tags = Some(input);
self
}
pub fn set_show_assigned_lf_tags(mut self, input: std::option::Option<bool>) -> Self {
self.show_assigned_lf_tags = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetResourceLfTagsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetResourceLfTagsInput {
catalog_id: self.catalog_id,
resource: self.resource,
show_assigned_lf_tags: self.show_assigned_lf_tags,
})
}
}
}
impl GetResourceLfTagsInput {
#[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::GetResourceLFTags,
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::GetResourceLfTagsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/GetResourceLFTags").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetResourceLfTagsInput,
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_get_resource_lf_tags(&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::GetResourceLFTags::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetResourceLFTags",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_resource_lf_tags_input::Builder {
crate::input::get_resource_lf_tags_input::Builder::default()
}
}
pub mod get_table_objects_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) catalog_id: std::option::Option<std::string::String>,
pub(crate) database_name: std::option::Option<std::string::String>,
pub(crate) table_name: std::option::Option<std::string::String>,
pub(crate) transaction_id: std::option::Option<std::string::String>,
pub(crate) query_as_of_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) partition_predicate: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn catalog_id(mut self, input: impl Into<std::string::String>) -> Self {
self.catalog_id = Some(input.into());
self
}
pub fn set_catalog_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.catalog_id = input;
self
}
pub fn database_name(mut self, input: impl Into<std::string::String>) -> Self {
self.database_name = Some(input.into());
self
}
pub fn set_database_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.database_name = input;
self
}
pub fn table_name(mut self, input: impl Into<std::string::String>) -> Self {
self.table_name = Some(input.into());
self
}
pub fn set_table_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.table_name = input;
self
}
pub fn transaction_id(mut self, input: impl Into<std::string::String>) -> Self {
self.transaction_id = Some(input.into());
self
}
pub fn set_transaction_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.transaction_id = input;
self
}
pub fn query_as_of_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.query_as_of_time = Some(input);
self
}
pub fn set_query_as_of_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.query_as_of_time = input;
self
}
pub fn partition_predicate(mut self, input: impl Into<std::string::String>) -> Self {
self.partition_predicate = Some(input.into());
self
}
pub fn set_partition_predicate(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.partition_predicate = 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 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 build(
self,
) -> Result<crate::input::GetTableObjectsInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::GetTableObjectsInput {
catalog_id: self.catalog_id,
database_name: self.database_name,
table_name: self.table_name,
transaction_id: self.transaction_id,
query_as_of_time: self.query_as_of_time,
partition_predicate: self.partition_predicate,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
impl GetTableObjectsInput {
#[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::GetTableObjects,
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::GetTableObjectsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/GetTableObjects").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetTableObjectsInput,
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_get_table_objects(&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::GetTableObjects::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetTableObjects",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_table_objects_input::Builder {
crate::input::get_table_objects_input::Builder::default()
}
}
pub mod get_temporary_glue_partition_credentials_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) table_arn: std::option::Option<std::string::String>,
pub(crate) partition: std::option::Option<crate::model::PartitionValueList>,
pub(crate) permissions: std::option::Option<std::vec::Vec<crate::model::Permission>>,
pub(crate) duration_seconds: std::option::Option<i32>,
pub(crate) audit_context: std::option::Option<crate::model::AuditContext>,
pub(crate) supported_permission_types:
std::option::Option<std::vec::Vec<crate::model::PermissionType>>,
}
impl Builder {
pub fn table_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.table_arn = Some(input.into());
self
}
pub fn set_table_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.table_arn = input;
self
}
pub fn partition(mut self, input: crate::model::PartitionValueList) -> Self {
self.partition = Some(input);
self
}
pub fn set_partition(
mut self,
input: std::option::Option<crate::model::PartitionValueList>,
) -> Self {
self.partition = input;
self
}
pub fn permissions(mut self, input: crate::model::Permission) -> Self {
let mut v = self.permissions.unwrap_or_default();
v.push(input);
self.permissions = Some(v);
self
}
pub fn set_permissions(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Permission>>,
) -> Self {
self.permissions = input;
self
}
pub fn duration_seconds(mut self, input: i32) -> Self {
self.duration_seconds = Some(input);
self
}
pub fn set_duration_seconds(mut self, input: std::option::Option<i32>) -> Self {
self.duration_seconds = input;
self
}
pub fn audit_context(mut self, input: crate::model::AuditContext) -> Self {
self.audit_context = Some(input);
self
}
pub fn set_audit_context(
mut self,
input: std::option::Option<crate::model::AuditContext>,
) -> Self {
self.audit_context = input;
self
}
pub fn supported_permission_types(mut self, input: crate::model::PermissionType) -> Self {
let mut v = self.supported_permission_types.unwrap_or_default();
v.push(input);
self.supported_permission_types = Some(v);
self
}
pub fn set_supported_permission_types(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::PermissionType>>,
) -> Self {
self.supported_permission_types = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetTemporaryGluePartitionCredentialsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetTemporaryGluePartitionCredentialsInput {
table_arn: self.table_arn,
partition: self.partition,
permissions: self.permissions,
duration_seconds: self.duration_seconds,
audit_context: self.audit_context,
supported_permission_types: self.supported_permission_types,
})
}
}
}
impl GetTemporaryGluePartitionCredentialsInput {
#[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::GetTemporaryGluePartitionCredentials,
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::GetTemporaryGluePartitionCredentialsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/GetTemporaryGluePartitionCredentials")
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetTemporaryGluePartitionCredentialsInput,
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_get_temporary_glue_partition_credentials(&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::GetTemporaryGluePartitionCredentials::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetTemporaryGluePartitionCredentials",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_temporary_glue_partition_credentials_input::Builder {
crate::input::get_temporary_glue_partition_credentials_input::Builder::default()
}
}
pub mod get_temporary_glue_table_credentials_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) table_arn: std::option::Option<std::string::String>,
pub(crate) permissions: std::option::Option<std::vec::Vec<crate::model::Permission>>,
pub(crate) duration_seconds: std::option::Option<i32>,
pub(crate) audit_context: std::option::Option<crate::model::AuditContext>,
pub(crate) supported_permission_types:
std::option::Option<std::vec::Vec<crate::model::PermissionType>>,
}
impl Builder {
pub fn table_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.table_arn = Some(input.into());
self
}
pub fn set_table_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.table_arn = input;
self
}
pub fn permissions(mut self, input: crate::model::Permission) -> Self {
let mut v = self.permissions.unwrap_or_default();
v.push(input);
self.permissions = Some(v);
self
}
pub fn set_permissions(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Permission>>,
) -> Self {
self.permissions = input;
self
}
pub fn duration_seconds(mut self, input: i32) -> Self {
self.duration_seconds = Some(input);
self
}
pub fn set_duration_seconds(mut self, input: std::option::Option<i32>) -> Self {
self.duration_seconds = input;
self
}
pub fn audit_context(mut self, input: crate::model::AuditContext) -> Self {
self.audit_context = Some(input);
self
}
pub fn set_audit_context(
mut self,
input: std::option::Option<crate::model::AuditContext>,
) -> Self {
self.audit_context = input;
self
}
pub fn supported_permission_types(mut self, input: crate::model::PermissionType) -> Self {
let mut v = self.supported_permission_types.unwrap_or_default();
v.push(input);
self.supported_permission_types = Some(v);
self
}
pub fn set_supported_permission_types(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::PermissionType>>,
) -> Self {
self.supported_permission_types = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetTemporaryGlueTableCredentialsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetTemporaryGlueTableCredentialsInput {
table_arn: self.table_arn,
permissions: self.permissions,
duration_seconds: self.duration_seconds,
audit_context: self.audit_context,
supported_permission_types: self.supported_permission_types,
})
}
}
}
impl GetTemporaryGlueTableCredentialsInput {
#[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::GetTemporaryGlueTableCredentials,
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::GetTemporaryGlueTableCredentialsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/GetTemporaryGlueTableCredentials")
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetTemporaryGlueTableCredentialsInput,
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_get_temporary_glue_table_credentials(&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::GetTemporaryGlueTableCredentials::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetTemporaryGlueTableCredentials",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_temporary_glue_table_credentials_input::Builder {
crate::input::get_temporary_glue_table_credentials_input::Builder::default()
}
}
pub mod get_work_unit_results_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) query_id: std::option::Option<std::string::String>,
pub(crate) work_unit_id: std::option::Option<i64>,
pub(crate) work_unit_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn query_id(mut self, input: impl Into<std::string::String>) -> Self {
self.query_id = Some(input.into());
self
}
pub fn set_query_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.query_id = input;
self
}
pub fn work_unit_id(mut self, input: i64) -> Self {
self.work_unit_id = Some(input);
self
}
pub fn set_work_unit_id(mut self, input: std::option::Option<i64>) -> Self {
self.work_unit_id = input;
self
}
pub fn work_unit_token(mut self, input: impl Into<std::string::String>) -> Self {
self.work_unit_token = Some(input.into());
self
}
pub fn set_work_unit_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.work_unit_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetWorkUnitResultsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetWorkUnitResultsInput {
query_id: self.query_id,
work_unit_id: self.work_unit_id.unwrap_or_default(),
work_unit_token: self.work_unit_token,
})
}
}
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("query_id", &self.query_id);
formatter.field("work_unit_id", &self.work_unit_id);
formatter.field("work_unit_token", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
}
impl GetWorkUnitResultsInput {
#[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::GetWorkUnitResults,
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::GetWorkUnitResultsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/GetWorkUnitResults").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetWorkUnitResultsInput,
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_get_work_unit_results(&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);
}
let endpoint_prefix = aws_smithy_http::endpoint::EndpointPrefix::new("data-")?;
request.properties_mut().insert(endpoint_prefix);
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::GetWorkUnitResults::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetWorkUnitResults",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_work_unit_results_input::Builder {
crate::input::get_work_unit_results_input::Builder::default()
}
}
pub mod get_work_units_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) page_size: std::option::Option<i32>,
pub(crate) query_id: std::option::Option<std::string::String>,
}
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 page_size(mut self, input: i32) -> Self {
self.page_size = Some(input);
self
}
pub fn set_page_size(mut self, input: std::option::Option<i32>) -> Self {
self.page_size = input;
self
}
pub fn query_id(mut self, input: impl Into<std::string::String>) -> Self {
self.query_id = Some(input.into());
self
}
pub fn set_query_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.query_id = input;
self
}
pub fn build(
self,
) -> Result<crate::input::GetWorkUnitsInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::GetWorkUnitsInput {
next_token: self.next_token,
page_size: self.page_size,
query_id: self.query_id,
})
}
}
}
impl GetWorkUnitsInput {
#[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::GetWorkUnits,
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::GetWorkUnitsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/GetWorkUnits").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetWorkUnitsInput,
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_get_work_units(&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);
}
let endpoint_prefix = aws_smithy_http::endpoint::EndpointPrefix::new("query-")?;
request.properties_mut().insert(endpoint_prefix);
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::GetWorkUnits::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetWorkUnits",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_work_units_input::Builder {
crate::input::get_work_units_input::Builder::default()
}
}
pub mod grant_permissions_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) catalog_id: std::option::Option<std::string::String>,
pub(crate) principal: std::option::Option<crate::model::DataLakePrincipal>,
pub(crate) resource: std::option::Option<crate::model::Resource>,
pub(crate) permissions: std::option::Option<std::vec::Vec<crate::model::Permission>>,
pub(crate) permissions_with_grant_option:
std::option::Option<std::vec::Vec<crate::model::Permission>>,
}
impl Builder {
pub fn catalog_id(mut self, input: impl Into<std::string::String>) -> Self {
self.catalog_id = Some(input.into());
self
}
pub fn set_catalog_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.catalog_id = input;
self
}
pub fn principal(mut self, input: crate::model::DataLakePrincipal) -> Self {
self.principal = Some(input);
self
}
pub fn set_principal(
mut self,
input: std::option::Option<crate::model::DataLakePrincipal>,
) -> Self {
self.principal = input;
self
}
pub fn resource(mut self, input: crate::model::Resource) -> Self {
self.resource = Some(input);
self
}
pub fn set_resource(mut self, input: std::option::Option<crate::model::Resource>) -> Self {
self.resource = input;
self
}
pub fn permissions(mut self, input: crate::model::Permission) -> Self {
let mut v = self.permissions.unwrap_or_default();
v.push(input);
self.permissions = Some(v);
self
}
pub fn set_permissions(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Permission>>,
) -> Self {
self.permissions = input;
self
}
pub fn permissions_with_grant_option(mut self, input: crate::model::Permission) -> Self {
let mut v = self.permissions_with_grant_option.unwrap_or_default();
v.push(input);
self.permissions_with_grant_option = Some(v);
self
}
pub fn set_permissions_with_grant_option(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Permission>>,
) -> Self {
self.permissions_with_grant_option = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GrantPermissionsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GrantPermissionsInput {
catalog_id: self.catalog_id,
principal: self.principal,
resource: self.resource,
permissions: self.permissions,
permissions_with_grant_option: self.permissions_with_grant_option,
})
}
}
}
impl GrantPermissionsInput {
#[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::GrantPermissions,
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::GrantPermissionsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/GrantPermissions").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GrantPermissionsInput,
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_grant_permissions(&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::GrantPermissions::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GrantPermissions",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::grant_permissions_input::Builder {
crate::input::grant_permissions_input::Builder::default()
}
}
pub mod list_data_cells_filter_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) table: std::option::Option<crate::model::TableResource>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn table(mut self, input: crate::model::TableResource) -> Self {
self.table = Some(input);
self
}
pub fn set_table(
mut self,
input: std::option::Option<crate::model::TableResource>,
) -> Self {
self.table = 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::ListDataCellsFilterInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListDataCellsFilterInput {
table: self.table,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
impl ListDataCellsFilterInput {
#[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::ListDataCellsFilter,
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::ListDataCellsFilterInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/ListDataCellsFilter").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListDataCellsFilterInput,
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_list_data_cells_filter(
&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::ListDataCellsFilter::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListDataCellsFilter",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_data_cells_filter_input::Builder {
crate::input::list_data_cells_filter_input::Builder::default()
}
}
pub mod list_lf_tags_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) catalog_id: std::option::Option<std::string::String>,
pub(crate) resource_share_type: std::option::Option<crate::model::ResourceShareType>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn catalog_id(mut self, input: impl Into<std::string::String>) -> Self {
self.catalog_id = Some(input.into());
self
}
pub fn set_catalog_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.catalog_id = input;
self
}
pub fn resource_share_type(mut self, input: crate::model::ResourceShareType) -> Self {
self.resource_share_type = Some(input);
self
}
pub fn set_resource_share_type(
mut self,
input: std::option::Option<crate::model::ResourceShareType>,
) -> Self {
self.resource_share_type = 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 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 build(
self,
) -> Result<crate::input::ListLfTagsInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::ListLfTagsInput {
catalog_id: self.catalog_id,
resource_share_type: self.resource_share_type,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
impl ListLfTagsInput {
#[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::ListLFTags,
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::ListLfTagsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/ListLFTags").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListLfTagsInput,
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_list_lf_tags(&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::ListLFTags::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListLFTags",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_lf_tags_input::Builder {
crate::input::list_lf_tags_input::Builder::default()
}
}
pub mod list_permissions_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) catalog_id: std::option::Option<std::string::String>,
pub(crate) principal: std::option::Option<crate::model::DataLakePrincipal>,
pub(crate) resource_type: std::option::Option<crate::model::DataLakeResourceType>,
pub(crate) resource: std::option::Option<crate::model::Resource>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) include_related: std::option::Option<std::string::String>,
}
impl Builder {
pub fn catalog_id(mut self, input: impl Into<std::string::String>) -> Self {
self.catalog_id = Some(input.into());
self
}
pub fn set_catalog_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.catalog_id = input;
self
}
pub fn principal(mut self, input: crate::model::DataLakePrincipal) -> Self {
self.principal = Some(input);
self
}
pub fn set_principal(
mut self,
input: std::option::Option<crate::model::DataLakePrincipal>,
) -> Self {
self.principal = input;
self
}
pub fn resource_type(mut self, input: crate::model::DataLakeResourceType) -> Self {
self.resource_type = Some(input);
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<crate::model::DataLakeResourceType>,
) -> Self {
self.resource_type = input;
self
}
pub fn resource(mut self, input: crate::model::Resource) -> Self {
self.resource = Some(input);
self
}
pub fn set_resource(mut self, input: std::option::Option<crate::model::Resource>) -> Self {
self.resource = 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 include_related(mut self, input: impl Into<std::string::String>) -> Self {
self.include_related = Some(input.into());
self
}
pub fn set_include_related(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.include_related = input;
self
}
pub fn build(
self,
) -> Result<crate::input::ListPermissionsInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::ListPermissionsInput {
catalog_id: self.catalog_id,
principal: self.principal,
resource_type: self.resource_type,
resource: self.resource,
next_token: self.next_token,
max_results: self.max_results,
include_related: self.include_related,
})
}
}
}
impl ListPermissionsInput {
#[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::ListPermissions,
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::ListPermissionsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/ListPermissions").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListPermissionsInput,
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_list_permissions(&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::ListPermissions::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListPermissions",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_permissions_input::Builder {
crate::input::list_permissions_input::Builder::default()
}
}
pub mod list_resources_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) filter_condition_list:
std::option::Option<std::vec::Vec<crate::model::FilterCondition>>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn filter_condition_list(mut self, input: crate::model::FilterCondition) -> Self {
let mut v = self.filter_condition_list.unwrap_or_default();
v.push(input);
self.filter_condition_list = Some(v);
self
}
pub fn set_filter_condition_list(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::FilterCondition>>,
) -> Self {
self.filter_condition_list = 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 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 build(
self,
) -> Result<crate::input::ListResourcesInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::ListResourcesInput {
filter_condition_list: self.filter_condition_list,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
impl ListResourcesInput {
#[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::ListResources,
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::ListResourcesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/ListResources").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListResourcesInput,
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_list_resources(&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::ListResources::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListResources",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_resources_input::Builder {
crate::input::list_resources_input::Builder::default()
}
}
pub mod list_table_storage_optimizers_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) catalog_id: std::option::Option<std::string::String>,
pub(crate) database_name: std::option::Option<std::string::String>,
pub(crate) table_name: std::option::Option<std::string::String>,
pub(crate) storage_optimizer_type: std::option::Option<crate::model::OptimizerType>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn catalog_id(mut self, input: impl Into<std::string::String>) -> Self {
self.catalog_id = Some(input.into());
self
}
pub fn set_catalog_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.catalog_id = input;
self
}
pub fn database_name(mut self, input: impl Into<std::string::String>) -> Self {
self.database_name = Some(input.into());
self
}
pub fn set_database_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.database_name = input;
self
}
pub fn table_name(mut self, input: impl Into<std::string::String>) -> Self {
self.table_name = Some(input.into());
self
}
pub fn set_table_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.table_name = input;
self
}
pub fn storage_optimizer_type(mut self, input: crate::model::OptimizerType) -> Self {
self.storage_optimizer_type = Some(input);
self
}
pub fn set_storage_optimizer_type(
mut self,
input: std::option::Option<crate::model::OptimizerType>,
) -> Self {
self.storage_optimizer_type = 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 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 build(
self,
) -> Result<
crate::input::ListTableStorageOptimizersInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListTableStorageOptimizersInput {
catalog_id: self.catalog_id,
database_name: self.database_name,
table_name: self.table_name,
storage_optimizer_type: self.storage_optimizer_type,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
impl ListTableStorageOptimizersInput {
#[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::ListTableStorageOptimizers,
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::ListTableStorageOptimizersInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/ListTableStorageOptimizers").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListTableStorageOptimizersInput,
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_list_table_storage_optimizers(&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::ListTableStorageOptimizers::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListTableStorageOptimizers",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_table_storage_optimizers_input::Builder {
crate::input::list_table_storage_optimizers_input::Builder::default()
}
}
pub mod list_transactions_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) catalog_id: std::option::Option<std::string::String>,
pub(crate) status_filter: std::option::Option<crate::model::TransactionStatusFilter>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn catalog_id(mut self, input: impl Into<std::string::String>) -> Self {
self.catalog_id = Some(input.into());
self
}
pub fn set_catalog_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.catalog_id = input;
self
}
pub fn status_filter(mut self, input: crate::model::TransactionStatusFilter) -> Self {
self.status_filter = Some(input);
self
}
pub fn set_status_filter(
mut self,
input: std::option::Option<crate::model::TransactionStatusFilter>,
) -> Self {
self.status_filter = 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 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 build(
self,
) -> Result<
crate::input::ListTransactionsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListTransactionsInput {
catalog_id: self.catalog_id,
status_filter: self.status_filter,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
impl ListTransactionsInput {
#[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::ListTransactions,
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::ListTransactionsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/ListTransactions").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListTransactionsInput,
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_list_transactions(&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::ListTransactions::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListTransactions",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_transactions_input::Builder {
crate::input::list_transactions_input::Builder::default()
}
}
pub mod put_data_lake_settings_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) catalog_id: std::option::Option<std::string::String>,
pub(crate) data_lake_settings: std::option::Option<crate::model::DataLakeSettings>,
}
impl Builder {
pub fn catalog_id(mut self, input: impl Into<std::string::String>) -> Self {
self.catalog_id = Some(input.into());
self
}
pub fn set_catalog_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.catalog_id = input;
self
}
pub fn data_lake_settings(mut self, input: crate::model::DataLakeSettings) -> Self {
self.data_lake_settings = Some(input);
self
}
pub fn set_data_lake_settings(
mut self,
input: std::option::Option<crate::model::DataLakeSettings>,
) -> Self {
self.data_lake_settings = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::PutDataLakeSettingsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::PutDataLakeSettingsInput {
catalog_id: self.catalog_id,
data_lake_settings: self.data_lake_settings,
})
}
}
}
impl PutDataLakeSettingsInput {
#[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::PutDataLakeSettings,
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::PutDataLakeSettingsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/PutDataLakeSettings").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutDataLakeSettingsInput,
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_put_data_lake_settings(
&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::PutDataLakeSettings::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutDataLakeSettings",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::put_data_lake_settings_input::Builder {
crate::input::put_data_lake_settings_input::Builder::default()
}
}
pub mod register_resource_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) use_service_linked_role: std::option::Option<bool>,
pub(crate) role_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn use_service_linked_role(mut self, input: bool) -> Self {
self.use_service_linked_role = Some(input);
self
}
pub fn set_use_service_linked_role(mut self, input: std::option::Option<bool>) -> Self {
self.use_service_linked_role = 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::RegisterResourceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::RegisterResourceInput {
resource_arn: self.resource_arn,
use_service_linked_role: self.use_service_linked_role,
role_arn: self.role_arn,
})
}
}
}
impl RegisterResourceInput {
#[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::RegisterResource,
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::RegisterResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/RegisterResource").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::RegisterResourceInput,
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_register_resource(&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::RegisterResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"RegisterResource",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::register_resource_input::Builder {
crate::input::register_resource_input::Builder::default()
}
}
pub mod remove_lf_tags_from_resource_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) catalog_id: std::option::Option<std::string::String>,
pub(crate) resource: std::option::Option<crate::model::Resource>,
pub(crate) lf_tags: std::option::Option<std::vec::Vec<crate::model::LfTagPair>>,
}
impl Builder {
pub fn catalog_id(mut self, input: impl Into<std::string::String>) -> Self {
self.catalog_id = Some(input.into());
self
}
pub fn set_catalog_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.catalog_id = input;
self
}
pub fn resource(mut self, input: crate::model::Resource) -> Self {
self.resource = Some(input);
self
}
pub fn set_resource(mut self, input: std::option::Option<crate::model::Resource>) -> Self {
self.resource = input;
self
}
pub fn lf_tags(mut self, input: crate::model::LfTagPair) -> Self {
let mut v = self.lf_tags.unwrap_or_default();
v.push(input);
self.lf_tags = Some(v);
self
}
pub fn set_lf_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::LfTagPair>>,
) -> Self {
self.lf_tags = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::RemoveLfTagsFromResourceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::RemoveLfTagsFromResourceInput {
catalog_id: self.catalog_id,
resource: self.resource,
lf_tags: self.lf_tags,
})
}
}
}
impl RemoveLfTagsFromResourceInput {
#[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::RemoveLFTagsFromResource,
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::RemoveLfTagsFromResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/RemoveLFTagsFromResource").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::RemoveLfTagsFromResourceInput,
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_remove_lf_tags_from_resource(
&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::RemoveLFTagsFromResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"RemoveLFTagsFromResource",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::remove_lf_tags_from_resource_input::Builder {
crate::input::remove_lf_tags_from_resource_input::Builder::default()
}
}
pub mod revoke_permissions_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) catalog_id: std::option::Option<std::string::String>,
pub(crate) principal: std::option::Option<crate::model::DataLakePrincipal>,
pub(crate) resource: std::option::Option<crate::model::Resource>,
pub(crate) permissions: std::option::Option<std::vec::Vec<crate::model::Permission>>,
pub(crate) permissions_with_grant_option:
std::option::Option<std::vec::Vec<crate::model::Permission>>,
}
impl Builder {
pub fn catalog_id(mut self, input: impl Into<std::string::String>) -> Self {
self.catalog_id = Some(input.into());
self
}
pub fn set_catalog_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.catalog_id = input;
self
}
pub fn principal(mut self, input: crate::model::DataLakePrincipal) -> Self {
self.principal = Some(input);
self
}
pub fn set_principal(
mut self,
input: std::option::Option<crate::model::DataLakePrincipal>,
) -> Self {
self.principal = input;
self
}
pub fn resource(mut self, input: crate::model::Resource) -> Self {
self.resource = Some(input);
self
}
pub fn set_resource(mut self, input: std::option::Option<crate::model::Resource>) -> Self {
self.resource = input;
self
}
pub fn permissions(mut self, input: crate::model::Permission) -> Self {
let mut v = self.permissions.unwrap_or_default();
v.push(input);
self.permissions = Some(v);
self
}
pub fn set_permissions(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Permission>>,
) -> Self {
self.permissions = input;
self
}
pub fn permissions_with_grant_option(mut self, input: crate::model::Permission) -> Self {
let mut v = self.permissions_with_grant_option.unwrap_or_default();
v.push(input);
self.permissions_with_grant_option = Some(v);
self
}
pub fn set_permissions_with_grant_option(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Permission>>,
) -> Self {
self.permissions_with_grant_option = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::RevokePermissionsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::RevokePermissionsInput {
catalog_id: self.catalog_id,
principal: self.principal,
resource: self.resource,
permissions: self.permissions,
permissions_with_grant_option: self.permissions_with_grant_option,
})
}
}
}
impl RevokePermissionsInput {
#[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::RevokePermissions,
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::RevokePermissionsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/RevokePermissions").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::RevokePermissionsInput,
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_revoke_permissions(&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::RevokePermissions::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"RevokePermissions",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::revoke_permissions_input::Builder {
crate::input::revoke_permissions_input::Builder::default()
}
}
pub mod search_databases_by_lf_tags_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) catalog_id: std::option::Option<std::string::String>,
pub(crate) expression: std::option::Option<std::vec::Vec<crate::model::LfTag>>,
}
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 catalog_id(mut self, input: impl Into<std::string::String>) -> Self {
self.catalog_id = Some(input.into());
self
}
pub fn set_catalog_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.catalog_id = input;
self
}
pub fn expression(mut self, input: crate::model::LfTag) -> Self {
let mut v = self.expression.unwrap_or_default();
v.push(input);
self.expression = Some(v);
self
}
pub fn set_expression(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::LfTag>>,
) -> Self {
self.expression = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::SearchDatabasesByLfTagsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::SearchDatabasesByLfTagsInput {
next_token: self.next_token,
max_results: self.max_results,
catalog_id: self.catalog_id,
expression: self.expression,
})
}
}
}
impl SearchDatabasesByLfTagsInput {
#[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::SearchDatabasesByLFTags,
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::SearchDatabasesByLfTagsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/SearchDatabasesByLFTags").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::SearchDatabasesByLfTagsInput,
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_search_databases_by_lf_tags(
&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::SearchDatabasesByLFTags::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"SearchDatabasesByLFTags",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::search_databases_by_lf_tags_input::Builder {
crate::input::search_databases_by_lf_tags_input::Builder::default()
}
}
pub mod search_tables_by_lf_tags_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) catalog_id: std::option::Option<std::string::String>,
pub(crate) expression: std::option::Option<std::vec::Vec<crate::model::LfTag>>,
}
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 catalog_id(mut self, input: impl Into<std::string::String>) -> Self {
self.catalog_id = Some(input.into());
self
}
pub fn set_catalog_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.catalog_id = input;
self
}
pub fn expression(mut self, input: crate::model::LfTag) -> Self {
let mut v = self.expression.unwrap_or_default();
v.push(input);
self.expression = Some(v);
self
}
pub fn set_expression(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::LfTag>>,
) -> Self {
self.expression = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::SearchTablesByLfTagsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::SearchTablesByLfTagsInput {
next_token: self.next_token,
max_results: self.max_results,
catalog_id: self.catalog_id,
expression: self.expression,
})
}
}
}
impl SearchTablesByLfTagsInput {
#[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::SearchTablesByLFTags,
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::SearchTablesByLfTagsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/SearchTablesByLFTags").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::SearchTablesByLfTagsInput,
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_search_tables_by_lf_tags(
&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::SearchTablesByLFTags::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"SearchTablesByLFTags",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::search_tables_by_lf_tags_input::Builder {
crate::input::search_tables_by_lf_tags_input::Builder::default()
}
}
pub mod start_query_planning_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) query_planning_context: std::option::Option<crate::model::QueryPlanningContext>,
pub(crate) query_string: std::option::Option<std::string::String>,
}
impl Builder {
pub fn query_planning_context(mut self, input: crate::model::QueryPlanningContext) -> Self {
self.query_planning_context = Some(input);
self
}
pub fn set_query_planning_context(
mut self,
input: std::option::Option<crate::model::QueryPlanningContext>,
) -> Self {
self.query_planning_context = input;
self
}
pub fn query_string(mut self, input: impl Into<std::string::String>) -> Self {
self.query_string = Some(input.into());
self
}
pub fn set_query_string(mut self, input: std::option::Option<std::string::String>) -> Self {
self.query_string = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::StartQueryPlanningInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::StartQueryPlanningInput {
query_planning_context: self.query_planning_context,
query_string: self.query_string,
})
}
}
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("query_planning_context", &self.query_planning_context);
formatter.field("query_string", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
}
impl StartQueryPlanningInput {
#[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::StartQueryPlanning,
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::StartQueryPlanningInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/StartQueryPlanning").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StartQueryPlanningInput,
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_query_planning(&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);
}
let endpoint_prefix = aws_smithy_http::endpoint::EndpointPrefix::new("query-")?;
request.properties_mut().insert(endpoint_prefix);
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::StartQueryPlanning::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartQueryPlanning",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::start_query_planning_input::Builder {
crate::input::start_query_planning_input::Builder::default()
}
}
pub mod start_transaction_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) transaction_type: std::option::Option<crate::model::TransactionType>,
}
impl Builder {
pub fn transaction_type(mut self, input: crate::model::TransactionType) -> Self {
self.transaction_type = Some(input);
self
}
pub fn set_transaction_type(
mut self,
input: std::option::Option<crate::model::TransactionType>,
) -> Self {
self.transaction_type = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::StartTransactionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::StartTransactionInput {
transaction_type: self.transaction_type,
})
}
}
}
impl StartTransactionInput {
#[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::StartTransaction,
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::StartTransactionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/StartTransaction").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StartTransactionInput,
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_transaction(&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::StartTransaction::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartTransaction",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::start_transaction_input::Builder {
crate::input::start_transaction_input::Builder::default()
}
}
pub mod update_lf_tag_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) catalog_id: std::option::Option<std::string::String>,
pub(crate) tag_key: std::option::Option<std::string::String>,
pub(crate) tag_values_to_delete: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) tag_values_to_add: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn catalog_id(mut self, input: impl Into<std::string::String>) -> Self {
self.catalog_id = Some(input.into());
self
}
pub fn set_catalog_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.catalog_id = input;
self
}
pub fn tag_key(mut self, input: impl Into<std::string::String>) -> Self {
self.tag_key = Some(input.into());
self
}
pub fn set_tag_key(mut self, input: std::option::Option<std::string::String>) -> Self {
self.tag_key = input;
self
}
pub fn tag_values_to_delete(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.tag_values_to_delete.unwrap_or_default();
v.push(input.into());
self.tag_values_to_delete = Some(v);
self
}
pub fn set_tag_values_to_delete(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.tag_values_to_delete = input;
self
}
pub fn tag_values_to_add(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.tag_values_to_add.unwrap_or_default();
v.push(input.into());
self.tag_values_to_add = Some(v);
self
}
pub fn set_tag_values_to_add(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.tag_values_to_add = input;
self
}
pub fn build(
self,
) -> Result<crate::input::UpdateLfTagInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::UpdateLfTagInput {
catalog_id: self.catalog_id,
tag_key: self.tag_key,
tag_values_to_delete: self.tag_values_to_delete,
tag_values_to_add: self.tag_values_to_add,
})
}
}
}
impl UpdateLfTagInput {
#[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::UpdateLFTag,
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::UpdateLfTagInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/UpdateLFTag").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateLfTagInput,
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_update_lf_tag(&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::UpdateLFTag::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateLFTag",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_lf_tag_input::Builder {
crate::input::update_lf_tag_input::Builder::default()
}
}
pub mod update_resource_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) role_arn: std::option::Option<std::string::String>,
pub(crate) resource_arn: std::option::Option<std::string::String>,
}
impl Builder {
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 resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn build(
self,
) -> Result<crate::input::UpdateResourceInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::UpdateResourceInput {
role_arn: self.role_arn,
resource_arn: self.resource_arn,
})
}
}
}
impl UpdateResourceInput {
#[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::UpdateResource,
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::UpdateResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/UpdateResource").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateResourceInput,
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_update_resource(&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::UpdateResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateResource",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_resource_input::Builder {
crate::input::update_resource_input::Builder::default()
}
}
pub mod update_table_objects_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) catalog_id: std::option::Option<std::string::String>,
pub(crate) database_name: std::option::Option<std::string::String>,
pub(crate) table_name: std::option::Option<std::string::String>,
pub(crate) transaction_id: std::option::Option<std::string::String>,
pub(crate) write_operations:
std::option::Option<std::vec::Vec<crate::model::WriteOperation>>,
}
impl Builder {
pub fn catalog_id(mut self, input: impl Into<std::string::String>) -> Self {
self.catalog_id = Some(input.into());
self
}
pub fn set_catalog_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.catalog_id = input;
self
}
pub fn database_name(mut self, input: impl Into<std::string::String>) -> Self {
self.database_name = Some(input.into());
self
}
pub fn set_database_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.database_name = input;
self
}
pub fn table_name(mut self, input: impl Into<std::string::String>) -> Self {
self.table_name = Some(input.into());
self
}
pub fn set_table_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.table_name = input;
self
}
pub fn transaction_id(mut self, input: impl Into<std::string::String>) -> Self {
self.transaction_id = Some(input.into());
self
}
pub fn set_transaction_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.transaction_id = input;
self
}
pub fn write_operations(mut self, input: crate::model::WriteOperation) -> Self {
let mut v = self.write_operations.unwrap_or_default();
v.push(input);
self.write_operations = Some(v);
self
}
pub fn set_write_operations(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::WriteOperation>>,
) -> Self {
self.write_operations = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateTableObjectsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateTableObjectsInput {
catalog_id: self.catalog_id,
database_name: self.database_name,
table_name: self.table_name,
transaction_id: self.transaction_id,
write_operations: self.write_operations,
})
}
}
}
impl UpdateTableObjectsInput {
#[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::UpdateTableObjects,
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::UpdateTableObjectsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/UpdateTableObjects").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateTableObjectsInput,
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_update_table_objects(&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::UpdateTableObjects::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateTableObjects",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_table_objects_input::Builder {
crate::input::update_table_objects_input::Builder::default()
}
}
pub mod update_table_storage_optimizer_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) catalog_id: std::option::Option<std::string::String>,
pub(crate) database_name: std::option::Option<std::string::String>,
pub(crate) table_name: std::option::Option<std::string::String>,
pub(crate) storage_optimizer_config: std::option::Option<
std::collections::HashMap<
crate::model::OptimizerType,
std::collections::HashMap<std::string::String, std::string::String>,
>,
>,
}
impl Builder {
pub fn catalog_id(mut self, input: impl Into<std::string::String>) -> Self {
self.catalog_id = Some(input.into());
self
}
pub fn set_catalog_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.catalog_id = input;
self
}
pub fn database_name(mut self, input: impl Into<std::string::String>) -> Self {
self.database_name = Some(input.into());
self
}
pub fn set_database_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.database_name = input;
self
}
pub fn table_name(mut self, input: impl Into<std::string::String>) -> Self {
self.table_name = Some(input.into());
self
}
pub fn set_table_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.table_name = input;
self
}
pub fn storage_optimizer_config(
mut self,
k: crate::model::OptimizerType,
v: std::collections::HashMap<std::string::String, std::string::String>,
) -> Self {
let mut hash_map = self.storage_optimizer_config.unwrap_or_default();
hash_map.insert(k, v);
self.storage_optimizer_config = Some(hash_map);
self
}
pub fn set_storage_optimizer_config(
mut self,
input: std::option::Option<
std::collections::HashMap<
crate::model::OptimizerType,
std::collections::HashMap<std::string::String, std::string::String>,
>,
>,
) -> Self {
self.storage_optimizer_config = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateTableStorageOptimizerInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateTableStorageOptimizerInput {
catalog_id: self.catalog_id,
database_name: self.database_name,
table_name: self.table_name,
storage_optimizer_config: self.storage_optimizer_config,
})
}
}
}
impl UpdateTableStorageOptimizerInput {
#[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::UpdateTableStorageOptimizer,
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::UpdateTableStorageOptimizerInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/UpdateTableStorageOptimizer").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateTableStorageOptimizerInput,
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_update_table_storage_optimizer(&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::UpdateTableStorageOptimizer::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateTableStorageOptimizer",
"lakeformation",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_table_storage_optimizer_input::Builder {
crate::input::update_table_storage_optimizer_input::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateTableStorageOptimizerInput {
#[doc(hidden)]
pub catalog_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub database_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub table_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub storage_optimizer_config: std::option::Option<
std::collections::HashMap<
crate::model::OptimizerType,
std::collections::HashMap<std::string::String, std::string::String>,
>,
>,
}
impl UpdateTableStorageOptimizerInput {
pub fn catalog_id(&self) -> std::option::Option<&str> {
self.catalog_id.as_deref()
}
pub fn database_name(&self) -> std::option::Option<&str> {
self.database_name.as_deref()
}
pub fn table_name(&self) -> std::option::Option<&str> {
self.table_name.as_deref()
}
pub fn storage_optimizer_config(
&self,
) -> std::option::Option<
&std::collections::HashMap<
crate::model::OptimizerType,
std::collections::HashMap<std::string::String, std::string::String>,
>,
> {
self.storage_optimizer_config.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateTableObjectsInput {
#[doc(hidden)]
pub catalog_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub database_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub table_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub transaction_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub write_operations: std::option::Option<std::vec::Vec<crate::model::WriteOperation>>,
}
impl UpdateTableObjectsInput {
pub fn catalog_id(&self) -> std::option::Option<&str> {
self.catalog_id.as_deref()
}
pub fn database_name(&self) -> std::option::Option<&str> {
self.database_name.as_deref()
}
pub fn table_name(&self) -> std::option::Option<&str> {
self.table_name.as_deref()
}
pub fn transaction_id(&self) -> std::option::Option<&str> {
self.transaction_id.as_deref()
}
pub fn write_operations(&self) -> std::option::Option<&[crate::model::WriteOperation]> {
self.write_operations.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateResourceInput {
#[doc(hidden)]
pub role_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_arn: std::option::Option<std::string::String>,
}
impl UpdateResourceInput {
pub fn role_arn(&self) -> std::option::Option<&str> {
self.role_arn.as_deref()
}
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateLfTagInput {
#[doc(hidden)]
pub catalog_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tag_key: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tag_values_to_delete: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub tag_values_to_add: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl UpdateLfTagInput {
pub fn catalog_id(&self) -> std::option::Option<&str> {
self.catalog_id.as_deref()
}
pub fn tag_key(&self) -> std::option::Option<&str> {
self.tag_key.as_deref()
}
pub fn tag_values_to_delete(&self) -> std::option::Option<&[std::string::String]> {
self.tag_values_to_delete.as_deref()
}
pub fn tag_values_to_add(&self) -> std::option::Option<&[std::string::String]> {
self.tag_values_to_add.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StartTransactionInput {
#[doc(hidden)]
pub transaction_type: std::option::Option<crate::model::TransactionType>,
}
impl StartTransactionInput {
pub fn transaction_type(&self) -> std::option::Option<&crate::model::TransactionType> {
self.transaction_type.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StartQueryPlanningInput {
#[doc(hidden)]
pub query_planning_context: std::option::Option<crate::model::QueryPlanningContext>,
#[doc(hidden)]
pub query_string: std::option::Option<std::string::String>,
}
impl StartQueryPlanningInput {
pub fn query_planning_context(
&self,
) -> std::option::Option<&crate::model::QueryPlanningContext> {
self.query_planning_context.as_ref()
}
pub fn query_string(&self) -> std::option::Option<&str> {
self.query_string.as_deref()
}
}
impl std::fmt::Debug for StartQueryPlanningInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StartQueryPlanningInput");
formatter.field("query_planning_context", &self.query_planning_context);
formatter.field("query_string", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SearchTablesByLfTagsInput {
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
#[doc(hidden)]
pub catalog_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub expression: std::option::Option<std::vec::Vec<crate::model::LfTag>>,
}
impl SearchTablesByLfTagsInput {
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 catalog_id(&self) -> std::option::Option<&str> {
self.catalog_id.as_deref()
}
pub fn expression(&self) -> std::option::Option<&[crate::model::LfTag]> {
self.expression.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SearchDatabasesByLfTagsInput {
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
#[doc(hidden)]
pub catalog_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub expression: std::option::Option<std::vec::Vec<crate::model::LfTag>>,
}
impl SearchDatabasesByLfTagsInput {
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 catalog_id(&self) -> std::option::Option<&str> {
self.catalog_id.as_deref()
}
pub fn expression(&self) -> std::option::Option<&[crate::model::LfTag]> {
self.expression.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RevokePermissionsInput {
#[doc(hidden)]
pub catalog_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub principal: std::option::Option<crate::model::DataLakePrincipal>,
#[doc(hidden)]
pub resource: std::option::Option<crate::model::Resource>,
#[doc(hidden)]
pub permissions: std::option::Option<std::vec::Vec<crate::model::Permission>>,
#[doc(hidden)]
pub permissions_with_grant_option: std::option::Option<std::vec::Vec<crate::model::Permission>>,
}
impl RevokePermissionsInput {
pub fn catalog_id(&self) -> std::option::Option<&str> {
self.catalog_id.as_deref()
}
pub fn principal(&self) -> std::option::Option<&crate::model::DataLakePrincipal> {
self.principal.as_ref()
}
pub fn resource(&self) -> std::option::Option<&crate::model::Resource> {
self.resource.as_ref()
}
pub fn permissions(&self) -> std::option::Option<&[crate::model::Permission]> {
self.permissions.as_deref()
}
pub fn permissions_with_grant_option(
&self,
) -> std::option::Option<&[crate::model::Permission]> {
self.permissions_with_grant_option.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RemoveLfTagsFromResourceInput {
#[doc(hidden)]
pub catalog_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource: std::option::Option<crate::model::Resource>,
#[doc(hidden)]
pub lf_tags: std::option::Option<std::vec::Vec<crate::model::LfTagPair>>,
}
impl RemoveLfTagsFromResourceInput {
pub fn catalog_id(&self) -> std::option::Option<&str> {
self.catalog_id.as_deref()
}
pub fn resource(&self) -> std::option::Option<&crate::model::Resource> {
self.resource.as_ref()
}
pub fn lf_tags(&self) -> std::option::Option<&[crate::model::LfTagPair]> {
self.lf_tags.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RegisterResourceInput {
#[doc(hidden)]
pub resource_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub use_service_linked_role: std::option::Option<bool>,
#[doc(hidden)]
pub role_arn: std::option::Option<std::string::String>,
}
impl RegisterResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn use_service_linked_role(&self) -> std::option::Option<bool> {
self.use_service_linked_role
}
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 PutDataLakeSettingsInput {
#[doc(hidden)]
pub catalog_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub data_lake_settings: std::option::Option<crate::model::DataLakeSettings>,
}
impl PutDataLakeSettingsInput {
pub fn catalog_id(&self) -> std::option::Option<&str> {
self.catalog_id.as_deref()
}
pub fn data_lake_settings(&self) -> std::option::Option<&crate::model::DataLakeSettings> {
self.data_lake_settings.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListTransactionsInput {
#[doc(hidden)]
pub catalog_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub status_filter: std::option::Option<crate::model::TransactionStatusFilter>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListTransactionsInput {
pub fn catalog_id(&self) -> std::option::Option<&str> {
self.catalog_id.as_deref()
}
pub fn status_filter(&self) -> std::option::Option<&crate::model::TransactionStatusFilter> {
self.status_filter.as_ref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListTableStorageOptimizersInput {
#[doc(hidden)]
pub catalog_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub database_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub table_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub storage_optimizer_type: std::option::Option<crate::model::OptimizerType>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListTableStorageOptimizersInput {
pub fn catalog_id(&self) -> std::option::Option<&str> {
self.catalog_id.as_deref()
}
pub fn database_name(&self) -> std::option::Option<&str> {
self.database_name.as_deref()
}
pub fn table_name(&self) -> std::option::Option<&str> {
self.table_name.as_deref()
}
pub fn storage_optimizer_type(&self) -> std::option::Option<&crate::model::OptimizerType> {
self.storage_optimizer_type.as_ref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListResourcesInput {
#[doc(hidden)]
pub filter_condition_list: std::option::Option<std::vec::Vec<crate::model::FilterCondition>>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListResourcesInput {
pub fn filter_condition_list(&self) -> std::option::Option<&[crate::model::FilterCondition]> {
self.filter_condition_list.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListPermissionsInput {
#[doc(hidden)]
pub catalog_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub principal: std::option::Option<crate::model::DataLakePrincipal>,
#[doc(hidden)]
pub resource_type: std::option::Option<crate::model::DataLakeResourceType>,
#[doc(hidden)]
pub resource: std::option::Option<crate::model::Resource>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
#[doc(hidden)]
pub include_related: std::option::Option<std::string::String>,
}
impl ListPermissionsInput {
pub fn catalog_id(&self) -> std::option::Option<&str> {
self.catalog_id.as_deref()
}
pub fn principal(&self) -> std::option::Option<&crate::model::DataLakePrincipal> {
self.principal.as_ref()
}
pub fn resource_type(&self) -> std::option::Option<&crate::model::DataLakeResourceType> {
self.resource_type.as_ref()
}
pub fn resource(&self) -> std::option::Option<&crate::model::Resource> {
self.resource.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
}
pub fn include_related(&self) -> std::option::Option<&str> {
self.include_related.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListLfTagsInput {
#[doc(hidden)]
pub catalog_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_share_type: std::option::Option<crate::model::ResourceShareType>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListLfTagsInput {
pub fn catalog_id(&self) -> std::option::Option<&str> {
self.catalog_id.as_deref()
}
pub fn resource_share_type(&self) -> std::option::Option<&crate::model::ResourceShareType> {
self.resource_share_type.as_ref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListDataCellsFilterInput {
#[doc(hidden)]
pub table: std::option::Option<crate::model::TableResource>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
}
impl ListDataCellsFilterInput {
pub fn table(&self) -> std::option::Option<&crate::model::TableResource> {
self.table.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 GrantPermissionsInput {
#[doc(hidden)]
pub catalog_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub principal: std::option::Option<crate::model::DataLakePrincipal>,
#[doc(hidden)]
pub resource: std::option::Option<crate::model::Resource>,
#[doc(hidden)]
pub permissions: std::option::Option<std::vec::Vec<crate::model::Permission>>,
#[doc(hidden)]
pub permissions_with_grant_option: std::option::Option<std::vec::Vec<crate::model::Permission>>,
}
impl GrantPermissionsInput {
pub fn catalog_id(&self) -> std::option::Option<&str> {
self.catalog_id.as_deref()
}
pub fn principal(&self) -> std::option::Option<&crate::model::DataLakePrincipal> {
self.principal.as_ref()
}
pub fn resource(&self) -> std::option::Option<&crate::model::Resource> {
self.resource.as_ref()
}
pub fn permissions(&self) -> std::option::Option<&[crate::model::Permission]> {
self.permissions.as_deref()
}
pub fn permissions_with_grant_option(
&self,
) -> std::option::Option<&[crate::model::Permission]> {
self.permissions_with_grant_option.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetWorkUnitsInput {
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub page_size: std::option::Option<i32>,
#[doc(hidden)]
pub query_id: std::option::Option<std::string::String>,
}
impl GetWorkUnitsInput {
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn page_size(&self) -> std::option::Option<i32> {
self.page_size
}
pub fn query_id(&self) -> std::option::Option<&str> {
self.query_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetWorkUnitResultsInput {
#[doc(hidden)]
pub query_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub work_unit_id: i64,
#[doc(hidden)]
pub work_unit_token: std::option::Option<std::string::String>,
}
impl GetWorkUnitResultsInput {
pub fn query_id(&self) -> std::option::Option<&str> {
self.query_id.as_deref()
}
pub fn work_unit_id(&self) -> i64 {
self.work_unit_id
}
pub fn work_unit_token(&self) -> std::option::Option<&str> {
self.work_unit_token.as_deref()
}
}
impl std::fmt::Debug for GetWorkUnitResultsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetWorkUnitResultsInput");
formatter.field("query_id", &self.query_id);
formatter.field("work_unit_id", &self.work_unit_id);
formatter.field("work_unit_token", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetTemporaryGlueTableCredentialsInput {
#[doc(hidden)]
pub table_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub permissions: std::option::Option<std::vec::Vec<crate::model::Permission>>,
#[doc(hidden)]
pub duration_seconds: std::option::Option<i32>,
#[doc(hidden)]
pub audit_context: std::option::Option<crate::model::AuditContext>,
#[doc(hidden)]
pub supported_permission_types:
std::option::Option<std::vec::Vec<crate::model::PermissionType>>,
}
impl GetTemporaryGlueTableCredentialsInput {
pub fn table_arn(&self) -> std::option::Option<&str> {
self.table_arn.as_deref()
}
pub fn permissions(&self) -> std::option::Option<&[crate::model::Permission]> {
self.permissions.as_deref()
}
pub fn duration_seconds(&self) -> std::option::Option<i32> {
self.duration_seconds
}
pub fn audit_context(&self) -> std::option::Option<&crate::model::AuditContext> {
self.audit_context.as_ref()
}
pub fn supported_permission_types(
&self,
) -> std::option::Option<&[crate::model::PermissionType]> {
self.supported_permission_types.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetTemporaryGluePartitionCredentialsInput {
#[doc(hidden)]
pub table_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub partition: std::option::Option<crate::model::PartitionValueList>,
#[doc(hidden)]
pub permissions: std::option::Option<std::vec::Vec<crate::model::Permission>>,
#[doc(hidden)]
pub duration_seconds: std::option::Option<i32>,
#[doc(hidden)]
pub audit_context: std::option::Option<crate::model::AuditContext>,
#[doc(hidden)]
pub supported_permission_types:
std::option::Option<std::vec::Vec<crate::model::PermissionType>>,
}
impl GetTemporaryGluePartitionCredentialsInput {
pub fn table_arn(&self) -> std::option::Option<&str> {
self.table_arn.as_deref()
}
pub fn partition(&self) -> std::option::Option<&crate::model::PartitionValueList> {
self.partition.as_ref()
}
pub fn permissions(&self) -> std::option::Option<&[crate::model::Permission]> {
self.permissions.as_deref()
}
pub fn duration_seconds(&self) -> std::option::Option<i32> {
self.duration_seconds
}
pub fn audit_context(&self) -> std::option::Option<&crate::model::AuditContext> {
self.audit_context.as_ref()
}
pub fn supported_permission_types(
&self,
) -> std::option::Option<&[crate::model::PermissionType]> {
self.supported_permission_types.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetTableObjectsInput {
#[doc(hidden)]
pub catalog_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub database_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub table_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub transaction_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub query_as_of_time: std::option::Option<aws_smithy_types::DateTime>,
#[doc(hidden)]
pub partition_predicate: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl GetTableObjectsInput {
pub fn catalog_id(&self) -> std::option::Option<&str> {
self.catalog_id.as_deref()
}
pub fn database_name(&self) -> std::option::Option<&str> {
self.database_name.as_deref()
}
pub fn table_name(&self) -> std::option::Option<&str> {
self.table_name.as_deref()
}
pub fn transaction_id(&self) -> std::option::Option<&str> {
self.transaction_id.as_deref()
}
pub fn query_as_of_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.query_as_of_time.as_ref()
}
pub fn partition_predicate(&self) -> std::option::Option<&str> {
self.partition_predicate.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetResourceLfTagsInput {
#[doc(hidden)]
pub catalog_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource: std::option::Option<crate::model::Resource>,
#[doc(hidden)]
pub show_assigned_lf_tags: std::option::Option<bool>,
}
impl GetResourceLfTagsInput {
pub fn catalog_id(&self) -> std::option::Option<&str> {
self.catalog_id.as_deref()
}
pub fn resource(&self) -> std::option::Option<&crate::model::Resource> {
self.resource.as_ref()
}
pub fn show_assigned_lf_tags(&self) -> std::option::Option<bool> {
self.show_assigned_lf_tags
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetQueryStatisticsInput {
#[doc(hidden)]
pub query_id: std::option::Option<std::string::String>,
}
impl GetQueryStatisticsInput {
pub fn query_id(&self) -> std::option::Option<&str> {
self.query_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetQueryStateInput {
#[doc(hidden)]
pub query_id: std::option::Option<std::string::String>,
}
impl GetQueryStateInput {
pub fn query_id(&self) -> std::option::Option<&str> {
self.query_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetLfTagInput {
#[doc(hidden)]
pub catalog_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tag_key: std::option::Option<std::string::String>,
}
impl GetLfTagInput {
pub fn catalog_id(&self) -> std::option::Option<&str> {
self.catalog_id.as_deref()
}
pub fn tag_key(&self) -> std::option::Option<&str> {
self.tag_key.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetEffectivePermissionsForPathInput {
#[doc(hidden)]
pub catalog_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_arn: 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 GetEffectivePermissionsForPathInput {
pub fn catalog_id(&self) -> std::option::Option<&str> {
self.catalog_id.as_deref()
}
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.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 GetDataLakeSettingsInput {
#[doc(hidden)]
pub catalog_id: std::option::Option<std::string::String>,
}
impl GetDataLakeSettingsInput {
pub fn catalog_id(&self) -> std::option::Option<&str> {
self.catalog_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ExtendTransactionInput {
#[doc(hidden)]
pub transaction_id: std::option::Option<std::string::String>,
}
impl ExtendTransactionInput {
pub fn transaction_id(&self) -> std::option::Option<&str> {
self.transaction_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeTransactionInput {
#[doc(hidden)]
pub transaction_id: std::option::Option<std::string::String>,
}
impl DescribeTransactionInput {
pub fn transaction_id(&self) -> std::option::Option<&str> {
self.transaction_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeResourceInput {
#[doc(hidden)]
pub resource_arn: std::option::Option<std::string::String>,
}
impl DescribeResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeregisterResourceInput {
#[doc(hidden)]
pub resource_arn: std::option::Option<std::string::String>,
}
impl DeregisterResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteObjectsOnCancelInput {
#[doc(hidden)]
pub catalog_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub database_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub table_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub transaction_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub objects: std::option::Option<std::vec::Vec<crate::model::VirtualObject>>,
}
impl DeleteObjectsOnCancelInput {
pub fn catalog_id(&self) -> std::option::Option<&str> {
self.catalog_id.as_deref()
}
pub fn database_name(&self) -> std::option::Option<&str> {
self.database_name.as_deref()
}
pub fn table_name(&self) -> std::option::Option<&str> {
self.table_name.as_deref()
}
pub fn transaction_id(&self) -> std::option::Option<&str> {
self.transaction_id.as_deref()
}
pub fn objects(&self) -> std::option::Option<&[crate::model::VirtualObject]> {
self.objects.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteLfTagInput {
#[doc(hidden)]
pub catalog_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tag_key: std::option::Option<std::string::String>,
}
impl DeleteLfTagInput {
pub fn catalog_id(&self) -> std::option::Option<&str> {
self.catalog_id.as_deref()
}
pub fn tag_key(&self) -> std::option::Option<&str> {
self.tag_key.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteDataCellsFilterInput {
#[doc(hidden)]
pub table_catalog_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub database_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub table_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
}
impl DeleteDataCellsFilterInput {
pub fn table_catalog_id(&self) -> std::option::Option<&str> {
self.table_catalog_id.as_deref()
}
pub fn database_name(&self) -> std::option::Option<&str> {
self.database_name.as_deref()
}
pub fn table_name(&self) -> std::option::Option<&str> {
self.table_name.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 CreateLfTagInput {
#[doc(hidden)]
pub catalog_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tag_key: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tag_values: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl CreateLfTagInput {
pub fn catalog_id(&self) -> std::option::Option<&str> {
self.catalog_id.as_deref()
}
pub fn tag_key(&self) -> std::option::Option<&str> {
self.tag_key.as_deref()
}
pub fn tag_values(&self) -> std::option::Option<&[std::string::String]> {
self.tag_values.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateDataCellsFilterInput {
#[doc(hidden)]
pub table_data: std::option::Option<crate::model::DataCellsFilter>,
}
impl CreateDataCellsFilterInput {
pub fn table_data(&self) -> std::option::Option<&crate::model::DataCellsFilter> {
self.table_data.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CommitTransactionInput {
#[doc(hidden)]
pub transaction_id: std::option::Option<std::string::String>,
}
impl CommitTransactionInput {
pub fn transaction_id(&self) -> std::option::Option<&str> {
self.transaction_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CancelTransactionInput {
#[doc(hidden)]
pub transaction_id: std::option::Option<std::string::String>,
}
impl CancelTransactionInput {
pub fn transaction_id(&self) -> std::option::Option<&str> {
self.transaction_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BatchRevokePermissionsInput {
#[doc(hidden)]
pub catalog_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub entries: std::option::Option<std::vec::Vec<crate::model::BatchPermissionsRequestEntry>>,
}
impl BatchRevokePermissionsInput {
pub fn catalog_id(&self) -> std::option::Option<&str> {
self.catalog_id.as_deref()
}
pub fn entries(&self) -> std::option::Option<&[crate::model::BatchPermissionsRequestEntry]> {
self.entries.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BatchGrantPermissionsInput {
#[doc(hidden)]
pub catalog_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub entries: std::option::Option<std::vec::Vec<crate::model::BatchPermissionsRequestEntry>>,
}
impl BatchGrantPermissionsInput {
pub fn catalog_id(&self) -> std::option::Option<&str> {
self.catalog_id.as_deref()
}
pub fn entries(&self) -> std::option::Option<&[crate::model::BatchPermissionsRequestEntry]> {
self.entries.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AssumeDecoratedRoleWithSamlInput {
#[doc(hidden)]
pub saml_assertion: std::option::Option<std::string::String>,
#[doc(hidden)]
pub role_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub principal_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub duration_seconds: std::option::Option<i32>,
}
impl AssumeDecoratedRoleWithSamlInput {
pub fn saml_assertion(&self) -> std::option::Option<&str> {
self.saml_assertion.as_deref()
}
pub fn role_arn(&self) -> std::option::Option<&str> {
self.role_arn.as_deref()
}
pub fn principal_arn(&self) -> std::option::Option<&str> {
self.principal_arn.as_deref()
}
pub fn duration_seconds(&self) -> std::option::Option<i32> {
self.duration_seconds
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AddLfTagsToResourceInput {
#[doc(hidden)]
pub catalog_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource: std::option::Option<crate::model::Resource>,
#[doc(hidden)]
pub lf_tags: std::option::Option<std::vec::Vec<crate::model::LfTagPair>>,
}
impl AddLfTagsToResourceInput {
pub fn catalog_id(&self) -> std::option::Option<&str> {
self.catalog_id.as_deref()
}
pub fn resource(&self) -> std::option::Option<&crate::model::Resource> {
self.resource.as_ref()
}
pub fn lf_tags(&self) -> std::option::Option<&[crate::model::LfTagPair]> {
self.lf_tags.as_deref()
}
}