use std::fmt::Write;
pub mod create_backup_plan_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_plan: std::option::Option<crate::model::BackupPlanInput>,
pub(crate) backup_plan_tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
pub(crate) creator_request_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn backup_plan(mut self, input: crate::model::BackupPlanInput) -> Self {
self.backup_plan = Some(input);
self
}
pub fn set_backup_plan(
mut self,
input: std::option::Option<crate::model::BackupPlanInput>,
) -> Self {
self.backup_plan = input;
self
}
pub fn backup_plan_tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.backup_plan_tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.backup_plan_tags = Some(hash_map);
self
}
pub fn set_backup_plan_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.backup_plan_tags = input;
self
}
pub fn creator_request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.creator_request_id = Some(input.into());
self
}
pub fn set_creator_request_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.creator_request_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CreateBackupPlanInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateBackupPlanInput {
backup_plan: self.backup_plan,
backup_plan_tags: self.backup_plan_tags,
creator_request_id: self.creator_request_id,
})
}
}
}
#[doc(hidden)]
pub type CreateBackupPlanInputOperationOutputAlias = crate::operation::CreateBackupPlan;
#[doc(hidden)]
pub type CreateBackupPlanInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl CreateBackupPlanInput {
#[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::CreateBackupPlan,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::CreateBackupPlanInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/backup/plans").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateBackupPlanInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::CreateBackupPlanInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/json",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_create_backup_plan(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateBackupPlan::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateBackupPlan",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::create_backup_plan_input::Builder {
crate::input::create_backup_plan_input::Builder::default()
}
}
pub mod create_backup_selection_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_plan_id: std::option::Option<std::string::String>,
pub(crate) backup_selection: std::option::Option<crate::model::BackupSelection>,
pub(crate) creator_request_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn backup_plan_id(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_plan_id = Some(input.into());
self
}
pub fn set_backup_plan_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.backup_plan_id = input;
self
}
pub fn backup_selection(mut self, input: crate::model::BackupSelection) -> Self {
self.backup_selection = Some(input);
self
}
pub fn set_backup_selection(
mut self,
input: std::option::Option<crate::model::BackupSelection>,
) -> Self {
self.backup_selection = input;
self
}
pub fn creator_request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.creator_request_id = Some(input.into());
self
}
pub fn set_creator_request_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.creator_request_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CreateBackupSelectionInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateBackupSelectionInput {
backup_plan_id: self.backup_plan_id,
backup_selection: self.backup_selection,
creator_request_id: self.creator_request_id,
})
}
}
}
#[doc(hidden)]
pub type CreateBackupSelectionInputOperationOutputAlias = crate::operation::CreateBackupSelection;
#[doc(hidden)]
pub type CreateBackupSelectionInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl CreateBackupSelectionInput {
#[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::CreateBackupSelection,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::CreateBackupSelectionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_1 = &_input.backup_plan_id;
let input_1 =
input_1
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_plan_id",
details: "cannot be empty or unset",
})?;
let backup_plan_id = aws_smithy_http::label::fmt_string(input_1, false);
if backup_plan_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_plan_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/backup/plans/{BackupPlanId}/selections",
BackupPlanId = backup_plan_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateBackupSelectionInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::CreateBackupSelectionInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/json",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_create_backup_selection(
&self,
)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateBackupSelection::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateBackupSelection",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::create_backup_selection_input::Builder {
crate::input::create_backup_selection_input::Builder::default()
}
}
pub mod create_backup_vault_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_vault_name: std::option::Option<std::string::String>,
pub(crate) backup_vault_tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
pub(crate) encryption_key_arn: std::option::Option<std::string::String>,
pub(crate) creator_request_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn backup_vault_name(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_vault_name = Some(input.into());
self
}
pub fn set_backup_vault_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.backup_vault_name = input;
self
}
pub fn backup_vault_tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.backup_vault_tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.backup_vault_tags = Some(hash_map);
self
}
pub fn set_backup_vault_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.backup_vault_tags = input;
self
}
pub fn encryption_key_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.encryption_key_arn = Some(input.into());
self
}
pub fn set_encryption_key_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.encryption_key_arn = input;
self
}
pub fn creator_request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.creator_request_id = Some(input.into());
self
}
pub fn set_creator_request_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.creator_request_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CreateBackupVaultInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateBackupVaultInput {
backup_vault_name: self.backup_vault_name,
backup_vault_tags: self.backup_vault_tags,
encryption_key_arn: self.encryption_key_arn,
creator_request_id: self.creator_request_id,
})
}
}
}
#[doc(hidden)]
pub type CreateBackupVaultInputOperationOutputAlias = crate::operation::CreateBackupVault;
#[doc(hidden)]
pub type CreateBackupVaultInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl CreateBackupVaultInput {
#[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::CreateBackupVault,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::CreateBackupVaultInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_2 = &_input.backup_vault_name;
let input_2 =
input_2
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
})?;
let backup_vault_name = aws_smithy_http::label::fmt_string(input_2, false);
if backup_vault_name.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
});
}
write!(
output,
"/backup-vaults/{BackupVaultName}",
BackupVaultName = backup_vault_name
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateBackupVaultInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::CreateBackupVaultInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/json",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_create_backup_vault(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateBackupVault::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateBackupVault",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::create_backup_vault_input::Builder {
crate::input::create_backup_vault_input::Builder::default()
}
}
pub mod create_framework_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) framework_name: std::option::Option<std::string::String>,
pub(crate) framework_description: std::option::Option<std::string::String>,
pub(crate) framework_controls:
std::option::Option<std::vec::Vec<crate::model::FrameworkControl>>,
pub(crate) idempotency_token: std::option::Option<std::string::String>,
pub(crate) framework_tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
pub fn framework_name(mut self, input: impl Into<std::string::String>) -> Self {
self.framework_name = Some(input.into());
self
}
pub fn set_framework_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.framework_name = input;
self
}
pub fn framework_description(mut self, input: impl Into<std::string::String>) -> Self {
self.framework_description = Some(input.into());
self
}
pub fn set_framework_description(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.framework_description = input;
self
}
pub fn framework_controls(
mut self,
input: impl Into<crate::model::FrameworkControl>,
) -> Self {
let mut v = self.framework_controls.unwrap_or_default();
v.push(input.into());
self.framework_controls = Some(v);
self
}
pub fn set_framework_controls(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::FrameworkControl>>,
) -> Self {
self.framework_controls = input;
self
}
pub fn idempotency_token(mut self, input: impl Into<std::string::String>) -> Self {
self.idempotency_token = Some(input.into());
self
}
pub fn set_idempotency_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.idempotency_token = input;
self
}
pub fn framework_tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.framework_tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.framework_tags = Some(hash_map);
self
}
pub fn set_framework_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.framework_tags = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CreateFrameworkInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateFrameworkInput {
framework_name: self.framework_name,
framework_description: self.framework_description,
framework_controls: self.framework_controls,
idempotency_token: self.idempotency_token,
framework_tags: self.framework_tags,
})
}
}
}
#[doc(hidden)]
pub type CreateFrameworkInputOperationOutputAlias = crate::operation::CreateFramework;
#[doc(hidden)]
pub type CreateFrameworkInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl CreateFrameworkInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateFramework,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::CreateFrameworkInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/audit/frameworks").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateFrameworkInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::CreateFrameworkInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/json",
);
Ok(builder)
}
if self.idempotency_token.is_none() {
self.idempotency_token = Some(_config.make_token.make_idempotency_token());
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_create_framework(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateFramework::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateFramework",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::create_framework_input::Builder {
crate::input::create_framework_input::Builder::default()
}
}
pub mod create_report_plan_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) report_plan_name: std::option::Option<std::string::String>,
pub(crate) report_plan_description: std::option::Option<std::string::String>,
pub(crate) report_delivery_channel:
std::option::Option<crate::model::ReportDeliveryChannel>,
pub(crate) report_setting: std::option::Option<crate::model::ReportSetting>,
pub(crate) report_plan_tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
pub(crate) idempotency_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn report_plan_name(mut self, input: impl Into<std::string::String>) -> Self {
self.report_plan_name = Some(input.into());
self
}
pub fn set_report_plan_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.report_plan_name = input;
self
}
pub fn report_plan_description(mut self, input: impl Into<std::string::String>) -> Self {
self.report_plan_description = Some(input.into());
self
}
pub fn set_report_plan_description(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.report_plan_description = input;
self
}
pub fn report_delivery_channel(
mut self,
input: crate::model::ReportDeliveryChannel,
) -> Self {
self.report_delivery_channel = Some(input);
self
}
pub fn set_report_delivery_channel(
mut self,
input: std::option::Option<crate::model::ReportDeliveryChannel>,
) -> Self {
self.report_delivery_channel = input;
self
}
pub fn report_setting(mut self, input: crate::model::ReportSetting) -> Self {
self.report_setting = Some(input);
self
}
pub fn set_report_setting(
mut self,
input: std::option::Option<crate::model::ReportSetting>,
) -> Self {
self.report_setting = input;
self
}
pub fn report_plan_tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.report_plan_tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.report_plan_tags = Some(hash_map);
self
}
pub fn set_report_plan_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.report_plan_tags = input;
self
}
pub fn idempotency_token(mut self, input: impl Into<std::string::String>) -> Self {
self.idempotency_token = Some(input.into());
self
}
pub fn set_idempotency_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.idempotency_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CreateReportPlanInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateReportPlanInput {
report_plan_name: self.report_plan_name,
report_plan_description: self.report_plan_description,
report_delivery_channel: self.report_delivery_channel,
report_setting: self.report_setting,
report_plan_tags: self.report_plan_tags,
idempotency_token: self.idempotency_token,
})
}
}
}
#[doc(hidden)]
pub type CreateReportPlanInputOperationOutputAlias = crate::operation::CreateReportPlan;
#[doc(hidden)]
pub type CreateReportPlanInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl CreateReportPlanInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateReportPlan,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::CreateReportPlanInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/audit/report-plans").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateReportPlanInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::CreateReportPlanInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/json",
);
Ok(builder)
}
if self.idempotency_token.is_none() {
self.idempotency_token = Some(_config.make_token.make_idempotency_token());
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_create_report_plan(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateReportPlan::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateReportPlan",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::create_report_plan_input::Builder {
crate::input::create_report_plan_input::Builder::default()
}
}
pub mod delete_backup_plan_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_plan_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn backup_plan_id(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_plan_id = Some(input.into());
self
}
pub fn set_backup_plan_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.backup_plan_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteBackupPlanInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteBackupPlanInput {
backup_plan_id: self.backup_plan_id,
})
}
}
}
#[doc(hidden)]
pub type DeleteBackupPlanInputOperationOutputAlias = crate::operation::DeleteBackupPlan;
#[doc(hidden)]
pub type DeleteBackupPlanInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteBackupPlanInput {
#[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::DeleteBackupPlan,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteBackupPlanInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_3 = &_input.backup_plan_id;
let input_3 =
input_3
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_plan_id",
details: "cannot be empty or unset",
})?;
let backup_plan_id = aws_smithy_http::label::fmt_string(input_3, false);
if backup_plan_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_plan_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/backup/plans/{BackupPlanId}",
BackupPlanId = backup_plan_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteBackupPlanInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DeleteBackupPlanInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteBackupPlan::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteBackupPlan",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::delete_backup_plan_input::Builder {
crate::input::delete_backup_plan_input::Builder::default()
}
}
pub mod delete_backup_selection_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_plan_id: std::option::Option<std::string::String>,
pub(crate) selection_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn backup_plan_id(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_plan_id = Some(input.into());
self
}
pub fn set_backup_plan_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.backup_plan_id = input;
self
}
pub fn selection_id(mut self, input: impl Into<std::string::String>) -> Self {
self.selection_id = Some(input.into());
self
}
pub fn set_selection_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.selection_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteBackupSelectionInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteBackupSelectionInput {
backup_plan_id: self.backup_plan_id,
selection_id: self.selection_id,
})
}
}
}
#[doc(hidden)]
pub type DeleteBackupSelectionInputOperationOutputAlias = crate::operation::DeleteBackupSelection;
#[doc(hidden)]
pub type DeleteBackupSelectionInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteBackupSelectionInput {
#[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::DeleteBackupSelection,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteBackupSelectionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_4 = &_input.backup_plan_id;
let input_4 =
input_4
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_plan_id",
details: "cannot be empty or unset",
})?;
let backup_plan_id = aws_smithy_http::label::fmt_string(input_4, false);
if backup_plan_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_plan_id",
details: "cannot be empty or unset",
});
}
let input_5 = &_input.selection_id;
let input_5 =
input_5
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "selection_id",
details: "cannot be empty or unset",
})?;
let selection_id = aws_smithy_http::label::fmt_string(input_5, false);
if selection_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "selection_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/backup/plans/{BackupPlanId}/selections/{SelectionId}",
BackupPlanId = backup_plan_id,
SelectionId = selection_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteBackupSelectionInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DeleteBackupSelectionInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteBackupSelection::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteBackupSelection",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::delete_backup_selection_input::Builder {
crate::input::delete_backup_selection_input::Builder::default()
}
}
pub mod delete_backup_vault_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_vault_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn backup_vault_name(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_vault_name = Some(input.into());
self
}
pub fn set_backup_vault_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.backup_vault_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteBackupVaultInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteBackupVaultInput {
backup_vault_name: self.backup_vault_name,
})
}
}
}
#[doc(hidden)]
pub type DeleteBackupVaultInputOperationOutputAlias = crate::operation::DeleteBackupVault;
#[doc(hidden)]
pub type DeleteBackupVaultInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteBackupVaultInput {
#[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::DeleteBackupVault,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteBackupVaultInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_6 = &_input.backup_vault_name;
let input_6 =
input_6
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
})?;
let backup_vault_name = aws_smithy_http::label::fmt_string(input_6, false);
if backup_vault_name.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
});
}
write!(
output,
"/backup-vaults/{BackupVaultName}",
BackupVaultName = backup_vault_name
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteBackupVaultInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DeleteBackupVaultInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteBackupVault::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteBackupVault",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::delete_backup_vault_input::Builder {
crate::input::delete_backup_vault_input::Builder::default()
}
}
pub mod delete_backup_vault_access_policy_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_vault_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn backup_vault_name(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_vault_name = Some(input.into());
self
}
pub fn set_backup_vault_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.backup_vault_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteBackupVaultAccessPolicyInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteBackupVaultAccessPolicyInput {
backup_vault_name: self.backup_vault_name,
})
}
}
}
#[doc(hidden)]
pub type DeleteBackupVaultAccessPolicyInputOperationOutputAlias =
crate::operation::DeleteBackupVaultAccessPolicy;
#[doc(hidden)]
pub type DeleteBackupVaultAccessPolicyInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteBackupVaultAccessPolicyInput {
#[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::DeleteBackupVaultAccessPolicy,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteBackupVaultAccessPolicyInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_7 = &_input.backup_vault_name;
let input_7 =
input_7
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
})?;
let backup_vault_name = aws_smithy_http::label::fmt_string(input_7, false);
if backup_vault_name.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
});
}
write!(
output,
"/backup-vaults/{BackupVaultName}/access-policy",
BackupVaultName = backup_vault_name
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteBackupVaultAccessPolicyInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DeleteBackupVaultAccessPolicyInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteBackupVaultAccessPolicy::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteBackupVaultAccessPolicy",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::delete_backup_vault_access_policy_input::Builder {
crate::input::delete_backup_vault_access_policy_input::Builder::default()
}
}
pub mod delete_backup_vault_lock_configuration_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_vault_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn backup_vault_name(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_vault_name = Some(input.into());
self
}
pub fn set_backup_vault_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.backup_vault_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteBackupVaultLockConfigurationInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteBackupVaultLockConfigurationInput {
backup_vault_name: self.backup_vault_name,
})
}
}
}
#[doc(hidden)]
pub type DeleteBackupVaultLockConfigurationInputOperationOutputAlias =
crate::operation::DeleteBackupVaultLockConfiguration;
#[doc(hidden)]
pub type DeleteBackupVaultLockConfigurationInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteBackupVaultLockConfigurationInput {
#[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::DeleteBackupVaultLockConfiguration,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteBackupVaultLockConfigurationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_8 = &_input.backup_vault_name;
let input_8 =
input_8
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
})?;
let backup_vault_name = aws_smithy_http::label::fmt_string(input_8, false);
if backup_vault_name.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
});
}
write!(
output,
"/backup-vaults/{BackupVaultName}/vault-lock",
BackupVaultName = backup_vault_name
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteBackupVaultLockConfigurationInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DeleteBackupVaultLockConfigurationInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteBackupVaultLockConfiguration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteBackupVaultLockConfiguration",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::delete_backup_vault_lock_configuration_input::Builder {
crate::input::delete_backup_vault_lock_configuration_input::Builder::default()
}
}
pub mod delete_backup_vault_notifications_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_vault_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn backup_vault_name(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_vault_name = Some(input.into());
self
}
pub fn set_backup_vault_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.backup_vault_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteBackupVaultNotificationsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteBackupVaultNotificationsInput {
backup_vault_name: self.backup_vault_name,
})
}
}
}
#[doc(hidden)]
pub type DeleteBackupVaultNotificationsInputOperationOutputAlias =
crate::operation::DeleteBackupVaultNotifications;
#[doc(hidden)]
pub type DeleteBackupVaultNotificationsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteBackupVaultNotificationsInput {
#[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::DeleteBackupVaultNotifications,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteBackupVaultNotificationsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_9 = &_input.backup_vault_name;
let input_9 =
input_9
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
})?;
let backup_vault_name = aws_smithy_http::label::fmt_string(input_9, false);
if backup_vault_name.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
});
}
write!(
output,
"/backup-vaults/{BackupVaultName}/notification-configuration",
BackupVaultName = backup_vault_name
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteBackupVaultNotificationsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DeleteBackupVaultNotificationsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteBackupVaultNotifications::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteBackupVaultNotifications",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::delete_backup_vault_notifications_input::Builder {
crate::input::delete_backup_vault_notifications_input::Builder::default()
}
}
pub mod delete_framework_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) framework_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn framework_name(mut self, input: impl Into<std::string::String>) -> Self {
self.framework_name = Some(input.into());
self
}
pub fn set_framework_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.framework_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteFrameworkInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteFrameworkInput {
framework_name: self.framework_name,
})
}
}
}
#[doc(hidden)]
pub type DeleteFrameworkInputOperationOutputAlias = crate::operation::DeleteFramework;
#[doc(hidden)]
pub type DeleteFrameworkInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteFrameworkInput {
#[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::DeleteFramework,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteFrameworkInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_10 = &_input.framework_name;
let input_10 =
input_10
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "framework_name",
details: "cannot be empty or unset",
})?;
let framework_name = aws_smithy_http::label::fmt_string(input_10, false);
if framework_name.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "framework_name",
details: "cannot be empty or unset",
});
}
write!(
output,
"/audit/frameworks/{FrameworkName}",
FrameworkName = framework_name
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteFrameworkInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DeleteFrameworkInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteFramework::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteFramework",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::delete_framework_input::Builder {
crate::input::delete_framework_input::Builder::default()
}
}
pub mod delete_recovery_point_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_vault_name: std::option::Option<std::string::String>,
pub(crate) recovery_point_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn backup_vault_name(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_vault_name = Some(input.into());
self
}
pub fn set_backup_vault_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.backup_vault_name = input;
self
}
pub fn recovery_point_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.recovery_point_arn = Some(input.into());
self
}
pub fn set_recovery_point_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.recovery_point_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteRecoveryPointInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteRecoveryPointInput {
backup_vault_name: self.backup_vault_name,
recovery_point_arn: self.recovery_point_arn,
})
}
}
}
#[doc(hidden)]
pub type DeleteRecoveryPointInputOperationOutputAlias = crate::operation::DeleteRecoveryPoint;
#[doc(hidden)]
pub type DeleteRecoveryPointInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteRecoveryPointInput {
#[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::DeleteRecoveryPoint,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteRecoveryPointInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_11 = &_input.backup_vault_name;
let input_11 =
input_11
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
})?;
let backup_vault_name = aws_smithy_http::label::fmt_string(input_11, false);
if backup_vault_name.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
});
}
let input_12 = &_input.recovery_point_arn;
let input_12 =
input_12
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "recovery_point_arn",
details: "cannot be empty or unset",
})?;
let recovery_point_arn = aws_smithy_http::label::fmt_string(input_12, false);
if recovery_point_arn.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "recovery_point_arn",
details: "cannot be empty or unset",
});
}
write!(
output,
"/backup-vaults/{BackupVaultName}/recovery-points/{RecoveryPointArn}",
BackupVaultName = backup_vault_name,
RecoveryPointArn = recovery_point_arn
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteRecoveryPointInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DeleteRecoveryPointInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteRecoveryPoint::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteRecoveryPoint",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::delete_recovery_point_input::Builder {
crate::input::delete_recovery_point_input::Builder::default()
}
}
pub mod delete_report_plan_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) report_plan_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn report_plan_name(mut self, input: impl Into<std::string::String>) -> Self {
self.report_plan_name = Some(input.into());
self
}
pub fn set_report_plan_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.report_plan_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteReportPlanInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteReportPlanInput {
report_plan_name: self.report_plan_name,
})
}
}
}
#[doc(hidden)]
pub type DeleteReportPlanInputOperationOutputAlias = crate::operation::DeleteReportPlan;
#[doc(hidden)]
pub type DeleteReportPlanInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteReportPlanInput {
#[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::DeleteReportPlan,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteReportPlanInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_13 = &_input.report_plan_name;
let input_13 =
input_13
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "report_plan_name",
details: "cannot be empty or unset",
})?;
let report_plan_name = aws_smithy_http::label::fmt_string(input_13, false);
if report_plan_name.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "report_plan_name",
details: "cannot be empty or unset",
});
}
write!(
output,
"/audit/report-plans/{ReportPlanName}",
ReportPlanName = report_plan_name
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteReportPlanInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DeleteReportPlanInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteReportPlan::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteReportPlan",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::delete_report_plan_input::Builder {
crate::input::delete_report_plan_input::Builder::default()
}
}
pub mod describe_backup_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_job_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn backup_job_id(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_job_id = Some(input.into());
self
}
pub fn set_backup_job_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.backup_job_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeBackupJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeBackupJobInput {
backup_job_id: self.backup_job_id,
})
}
}
}
#[doc(hidden)]
pub type DescribeBackupJobInputOperationOutputAlias = crate::operation::DescribeBackupJob;
#[doc(hidden)]
pub type DescribeBackupJobInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeBackupJobInput {
#[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::DescribeBackupJob,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeBackupJobInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_14 = &_input.backup_job_id;
let input_14 =
input_14
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_job_id",
details: "cannot be empty or unset",
})?;
let backup_job_id = aws_smithy_http::label::fmt_string(input_14, false);
if backup_job_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_job_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/backup-jobs/{BackupJobId}",
BackupJobId = backup_job_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeBackupJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DescribeBackupJobInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeBackupJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeBackupJob",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::describe_backup_job_input::Builder {
crate::input::describe_backup_job_input::Builder::default()
}
}
pub mod describe_backup_vault_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_vault_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn backup_vault_name(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_vault_name = Some(input.into());
self
}
pub fn set_backup_vault_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.backup_vault_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeBackupVaultInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeBackupVaultInput {
backup_vault_name: self.backup_vault_name,
})
}
}
}
#[doc(hidden)]
pub type DescribeBackupVaultInputOperationOutputAlias = crate::operation::DescribeBackupVault;
#[doc(hidden)]
pub type DescribeBackupVaultInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeBackupVaultInput {
#[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::DescribeBackupVault,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeBackupVaultInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_15 = &_input.backup_vault_name;
let input_15 =
input_15
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
})?;
let backup_vault_name = aws_smithy_http::label::fmt_string(input_15, false);
if backup_vault_name.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
});
}
write!(
output,
"/backup-vaults/{BackupVaultName}",
BackupVaultName = backup_vault_name
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeBackupVaultInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DescribeBackupVaultInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeBackupVault::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeBackupVault",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::describe_backup_vault_input::Builder {
crate::input::describe_backup_vault_input::Builder::default()
}
}
pub mod describe_copy_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) copy_job_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn copy_job_id(mut self, input: impl Into<std::string::String>) -> Self {
self.copy_job_id = Some(input.into());
self
}
pub fn set_copy_job_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.copy_job_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeCopyJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeCopyJobInput {
copy_job_id: self.copy_job_id,
})
}
}
}
#[doc(hidden)]
pub type DescribeCopyJobInputOperationOutputAlias = crate::operation::DescribeCopyJob;
#[doc(hidden)]
pub type DescribeCopyJobInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeCopyJobInput {
#[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::DescribeCopyJob,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeCopyJobInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_16 = &_input.copy_job_id;
let input_16 =
input_16
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "copy_job_id",
details: "cannot be empty or unset",
})?;
let copy_job_id = aws_smithy_http::label::fmt_string(input_16, false);
if copy_job_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "copy_job_id",
details: "cannot be empty or unset",
});
}
write!(output, "/copy-jobs/{CopyJobId}", CopyJobId = copy_job_id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeCopyJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DescribeCopyJobInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeCopyJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeCopyJob",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::describe_copy_job_input::Builder {
crate::input::describe_copy_job_input::Builder::default()
}
}
pub mod describe_framework_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) framework_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn framework_name(mut self, input: impl Into<std::string::String>) -> Self {
self.framework_name = Some(input.into());
self
}
pub fn set_framework_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.framework_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeFrameworkInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeFrameworkInput {
framework_name: self.framework_name,
})
}
}
}
#[doc(hidden)]
pub type DescribeFrameworkInputOperationOutputAlias = crate::operation::DescribeFramework;
#[doc(hidden)]
pub type DescribeFrameworkInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeFrameworkInput {
#[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::DescribeFramework,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeFrameworkInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_17 = &_input.framework_name;
let input_17 =
input_17
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "framework_name",
details: "cannot be empty or unset",
})?;
let framework_name = aws_smithy_http::label::fmt_string(input_17, false);
if framework_name.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "framework_name",
details: "cannot be empty or unset",
});
}
write!(
output,
"/audit/frameworks/{FrameworkName}",
FrameworkName = framework_name
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeFrameworkInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DescribeFrameworkInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeFramework::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeFramework",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::describe_framework_input::Builder {
crate::input::describe_framework_input::Builder::default()
}
}
pub mod describe_global_settings_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {}
impl Builder {
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeGlobalSettingsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeGlobalSettingsInput {})
}
}
}
#[doc(hidden)]
pub type DescribeGlobalSettingsInputOperationOutputAlias = crate::operation::DescribeGlobalSettings;
#[doc(hidden)]
pub type DescribeGlobalSettingsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeGlobalSettingsInput {
#[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::DescribeGlobalSettings,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeGlobalSettingsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/global-settings").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeGlobalSettingsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DescribeGlobalSettingsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeGlobalSettings::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeGlobalSettings",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::describe_global_settings_input::Builder {
crate::input::describe_global_settings_input::Builder::default()
}
}
pub mod describe_protected_resource_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, 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,
) -> std::result::Result<
crate::input::DescribeProtectedResourceInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeProtectedResourceInput {
resource_arn: self.resource_arn,
})
}
}
}
#[doc(hidden)]
pub type DescribeProtectedResourceInputOperationOutputAlias =
crate::operation::DescribeProtectedResource;
#[doc(hidden)]
pub type DescribeProtectedResourceInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeProtectedResourceInput {
#[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::DescribeProtectedResource,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeProtectedResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_18 = &_input.resource_arn;
let input_18 =
input_18
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "resource_arn",
details: "cannot be empty or unset",
})?;
let resource_arn = aws_smithy_http::label::fmt_string(input_18, false);
if resource_arn.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "resource_arn",
details: "cannot be empty or unset",
});
}
write!(
output,
"/resources/{ResourceArn}",
ResourceArn = resource_arn
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeProtectedResourceInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DescribeProtectedResourceInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeProtectedResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeProtectedResource",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::describe_protected_resource_input::Builder {
crate::input::describe_protected_resource_input::Builder::default()
}
}
pub mod describe_recovery_point_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_vault_name: std::option::Option<std::string::String>,
pub(crate) recovery_point_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn backup_vault_name(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_vault_name = Some(input.into());
self
}
pub fn set_backup_vault_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.backup_vault_name = input;
self
}
pub fn recovery_point_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.recovery_point_arn = Some(input.into());
self
}
pub fn set_recovery_point_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.recovery_point_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeRecoveryPointInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeRecoveryPointInput {
backup_vault_name: self.backup_vault_name,
recovery_point_arn: self.recovery_point_arn,
})
}
}
}
#[doc(hidden)]
pub type DescribeRecoveryPointInputOperationOutputAlias = crate::operation::DescribeRecoveryPoint;
#[doc(hidden)]
pub type DescribeRecoveryPointInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeRecoveryPointInput {
#[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::DescribeRecoveryPoint,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeRecoveryPointInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_19 = &_input.backup_vault_name;
let input_19 =
input_19
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
})?;
let backup_vault_name = aws_smithy_http::label::fmt_string(input_19, false);
if backup_vault_name.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
});
}
let input_20 = &_input.recovery_point_arn;
let input_20 =
input_20
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "recovery_point_arn",
details: "cannot be empty or unset",
})?;
let recovery_point_arn = aws_smithy_http::label::fmt_string(input_20, false);
if recovery_point_arn.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "recovery_point_arn",
details: "cannot be empty or unset",
});
}
write!(
output,
"/backup-vaults/{BackupVaultName}/recovery-points/{RecoveryPointArn}",
BackupVaultName = backup_vault_name,
RecoveryPointArn = recovery_point_arn
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeRecoveryPointInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DescribeRecoveryPointInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeRecoveryPoint::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeRecoveryPoint",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::describe_recovery_point_input::Builder {
crate::input::describe_recovery_point_input::Builder::default()
}
}
pub mod describe_region_settings_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {}
impl Builder {
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeRegionSettingsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeRegionSettingsInput {})
}
}
}
#[doc(hidden)]
pub type DescribeRegionSettingsInputOperationOutputAlias = crate::operation::DescribeRegionSettings;
#[doc(hidden)]
pub type DescribeRegionSettingsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeRegionSettingsInput {
#[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::DescribeRegionSettings,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeRegionSettingsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/account-settings").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeRegionSettingsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DescribeRegionSettingsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeRegionSettings::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeRegionSettings",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::describe_region_settings_input::Builder {
crate::input::describe_region_settings_input::Builder::default()
}
}
pub mod describe_report_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) report_job_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn report_job_id(mut self, input: impl Into<std::string::String>) -> Self {
self.report_job_id = Some(input.into());
self
}
pub fn set_report_job_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.report_job_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeReportJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeReportJobInput {
report_job_id: self.report_job_id,
})
}
}
}
#[doc(hidden)]
pub type DescribeReportJobInputOperationOutputAlias = crate::operation::DescribeReportJob;
#[doc(hidden)]
pub type DescribeReportJobInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeReportJobInput {
#[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::DescribeReportJob,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeReportJobInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_21 = &_input.report_job_id;
let input_21 =
input_21
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "report_job_id",
details: "cannot be empty or unset",
})?;
let report_job_id = aws_smithy_http::label::fmt_string(input_21, false);
if report_job_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "report_job_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/audit/report-jobs/{ReportJobId}",
ReportJobId = report_job_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeReportJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DescribeReportJobInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeReportJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeReportJob",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::describe_report_job_input::Builder {
crate::input::describe_report_job_input::Builder::default()
}
}
pub mod describe_report_plan_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) report_plan_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn report_plan_name(mut self, input: impl Into<std::string::String>) -> Self {
self.report_plan_name = Some(input.into());
self
}
pub fn set_report_plan_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.report_plan_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeReportPlanInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeReportPlanInput {
report_plan_name: self.report_plan_name,
})
}
}
}
#[doc(hidden)]
pub type DescribeReportPlanInputOperationOutputAlias = crate::operation::DescribeReportPlan;
#[doc(hidden)]
pub type DescribeReportPlanInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeReportPlanInput {
#[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::DescribeReportPlan,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeReportPlanInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_22 = &_input.report_plan_name;
let input_22 =
input_22
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "report_plan_name",
details: "cannot be empty or unset",
})?;
let report_plan_name = aws_smithy_http::label::fmt_string(input_22, false);
if report_plan_name.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "report_plan_name",
details: "cannot be empty or unset",
});
}
write!(
output,
"/audit/report-plans/{ReportPlanName}",
ReportPlanName = report_plan_name
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeReportPlanInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DescribeReportPlanInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeReportPlan::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeReportPlan",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::describe_report_plan_input::Builder {
crate::input::describe_report_plan_input::Builder::default()
}
}
pub mod describe_restore_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) restore_job_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn restore_job_id(mut self, input: impl Into<std::string::String>) -> Self {
self.restore_job_id = Some(input.into());
self
}
pub fn set_restore_job_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.restore_job_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeRestoreJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeRestoreJobInput {
restore_job_id: self.restore_job_id,
})
}
}
}
#[doc(hidden)]
pub type DescribeRestoreJobInputOperationOutputAlias = crate::operation::DescribeRestoreJob;
#[doc(hidden)]
pub type DescribeRestoreJobInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeRestoreJobInput {
#[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::DescribeRestoreJob,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeRestoreJobInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_23 = &_input.restore_job_id;
let input_23 =
input_23
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "restore_job_id",
details: "cannot be empty or unset",
})?;
let restore_job_id = aws_smithy_http::label::fmt_string(input_23, false);
if restore_job_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "restore_job_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/restore-jobs/{RestoreJobId}",
RestoreJobId = restore_job_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeRestoreJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DescribeRestoreJobInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeRestoreJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeRestoreJob",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::describe_restore_job_input::Builder {
crate::input::describe_restore_job_input::Builder::default()
}
}
pub mod disassociate_recovery_point_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_vault_name: std::option::Option<std::string::String>,
pub(crate) recovery_point_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn backup_vault_name(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_vault_name = Some(input.into());
self
}
pub fn set_backup_vault_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.backup_vault_name = input;
self
}
pub fn recovery_point_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.recovery_point_arn = Some(input.into());
self
}
pub fn set_recovery_point_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.recovery_point_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DisassociateRecoveryPointInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DisassociateRecoveryPointInput {
backup_vault_name: self.backup_vault_name,
recovery_point_arn: self.recovery_point_arn,
})
}
}
}
#[doc(hidden)]
pub type DisassociateRecoveryPointInputOperationOutputAlias =
crate::operation::DisassociateRecoveryPoint;
#[doc(hidden)]
pub type DisassociateRecoveryPointInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DisassociateRecoveryPointInput {
#[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::DisassociateRecoveryPoint,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DisassociateRecoveryPointInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_24 = &_input.backup_vault_name;
let input_24 =
input_24
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
})?;
let backup_vault_name = aws_smithy_http::label::fmt_string(input_24, false);
if backup_vault_name.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
});
}
let input_25 = &_input.recovery_point_arn;
let input_25 =
input_25
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "recovery_point_arn",
details: "cannot be empty or unset",
})?;
let recovery_point_arn = aws_smithy_http::label::fmt_string(input_25, false);
if recovery_point_arn.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "recovery_point_arn",
details: "cannot be empty or unset",
});
}
write!(
output,
"/backup-vaults/{BackupVaultName}/recovery-points/{RecoveryPointArn}/disassociate",
BackupVaultName = backup_vault_name,
RecoveryPointArn = recovery_point_arn
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DisassociateRecoveryPointInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DisassociateRecoveryPointInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DisassociateRecoveryPoint::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DisassociateRecoveryPoint",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::disassociate_recovery_point_input::Builder {
crate::input::disassociate_recovery_point_input::Builder::default()
}
}
pub mod export_backup_plan_template_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_plan_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn backup_plan_id(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_plan_id = Some(input.into());
self
}
pub fn set_backup_plan_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.backup_plan_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ExportBackupPlanTemplateInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ExportBackupPlanTemplateInput {
backup_plan_id: self.backup_plan_id,
})
}
}
}
#[doc(hidden)]
pub type ExportBackupPlanTemplateInputOperationOutputAlias =
crate::operation::ExportBackupPlanTemplate;
#[doc(hidden)]
pub type ExportBackupPlanTemplateInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ExportBackupPlanTemplateInput {
#[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::ExportBackupPlanTemplate,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ExportBackupPlanTemplateInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_26 = &_input.backup_plan_id;
let input_26 =
input_26
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_plan_id",
details: "cannot be empty or unset",
})?;
let backup_plan_id = aws_smithy_http::label::fmt_string(input_26, false);
if backup_plan_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_plan_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/backup/plans/{BackupPlanId}/toTemplate",
BackupPlanId = backup_plan_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ExportBackupPlanTemplateInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ExportBackupPlanTemplateInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ExportBackupPlanTemplate::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ExportBackupPlanTemplate",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::export_backup_plan_template_input::Builder {
crate::input::export_backup_plan_template_input::Builder::default()
}
}
pub mod get_backup_plan_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_plan_id: std::option::Option<std::string::String>,
pub(crate) version_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn backup_plan_id(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_plan_id = Some(input.into());
self
}
pub fn set_backup_plan_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.backup_plan_id = input;
self
}
pub fn version_id(mut self, input: impl Into<std::string::String>) -> Self {
self.version_id = Some(input.into());
self
}
pub fn set_version_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.version_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetBackupPlanInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetBackupPlanInput {
backup_plan_id: self.backup_plan_id,
version_id: self.version_id,
})
}
}
}
#[doc(hidden)]
pub type GetBackupPlanInputOperationOutputAlias = crate::operation::GetBackupPlan;
#[doc(hidden)]
pub type GetBackupPlanInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl GetBackupPlanInput {
#[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::GetBackupPlan,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::GetBackupPlanInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_27 = &_input.backup_plan_id;
let input_27 =
input_27
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_plan_id",
details: "cannot be empty or unset",
})?;
let backup_plan_id = aws_smithy_http::label::fmt_string(input_27, false);
if backup_plan_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_plan_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/backup/plans/{BackupPlanId}",
BackupPlanId = backup_plan_id
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::GetBackupPlanInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_28) = &_input.version_id {
query.push_kv("versionId", &aws_smithy_http::query::fmt_string(&inner_28));
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetBackupPlanInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::GetBackupPlanInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetBackupPlan::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetBackupPlan",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::get_backup_plan_input::Builder {
crate::input::get_backup_plan_input::Builder::default()
}
}
pub mod get_backup_plan_from_json_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_plan_template_json: std::option::Option<std::string::String>,
}
impl Builder {
pub fn backup_plan_template_json(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_plan_template_json = Some(input.into());
self
}
pub fn set_backup_plan_template_json(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.backup_plan_template_json = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetBackupPlanFromJsonInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetBackupPlanFromJsonInput {
backup_plan_template_json: self.backup_plan_template_json,
})
}
}
}
#[doc(hidden)]
pub type GetBackupPlanFromJsonInputOperationOutputAlias = crate::operation::GetBackupPlanFromJSON;
#[doc(hidden)]
pub type GetBackupPlanFromJsonInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl GetBackupPlanFromJsonInput {
#[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::GetBackupPlanFromJSON,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::GetBackupPlanFromJsonInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/backup/template/json/toPlan").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetBackupPlanFromJsonInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::GetBackupPlanFromJsonInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/json",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_get_backup_plan_from_json(
&self,
)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetBackupPlanFromJSON::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetBackupPlanFromJSON",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::get_backup_plan_from_json_input::Builder {
crate::input::get_backup_plan_from_json_input::Builder::default()
}
}
pub mod get_backup_plan_from_template_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_plan_template_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn backup_plan_template_id(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_plan_template_id = Some(input.into());
self
}
pub fn set_backup_plan_template_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.backup_plan_template_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetBackupPlanFromTemplateInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetBackupPlanFromTemplateInput {
backup_plan_template_id: self.backup_plan_template_id,
})
}
}
}
#[doc(hidden)]
pub type GetBackupPlanFromTemplateInputOperationOutputAlias =
crate::operation::GetBackupPlanFromTemplate;
#[doc(hidden)]
pub type GetBackupPlanFromTemplateInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl GetBackupPlanFromTemplateInput {
#[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::GetBackupPlanFromTemplate,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::GetBackupPlanFromTemplateInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_29 = &_input.backup_plan_template_id;
let input_29 =
input_29
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_plan_template_id",
details: "cannot be empty or unset",
})?;
let backup_plan_template_id = aws_smithy_http::label::fmt_string(input_29, false);
if backup_plan_template_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_plan_template_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/backup/template/plans/{BackupPlanTemplateId}/toPlan",
BackupPlanTemplateId = backup_plan_template_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetBackupPlanFromTemplateInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::GetBackupPlanFromTemplateInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetBackupPlanFromTemplate::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetBackupPlanFromTemplate",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::get_backup_plan_from_template_input::Builder {
crate::input::get_backup_plan_from_template_input::Builder::default()
}
}
pub mod get_backup_selection_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_plan_id: std::option::Option<std::string::String>,
pub(crate) selection_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn backup_plan_id(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_plan_id = Some(input.into());
self
}
pub fn set_backup_plan_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.backup_plan_id = input;
self
}
pub fn selection_id(mut self, input: impl Into<std::string::String>) -> Self {
self.selection_id = Some(input.into());
self
}
pub fn set_selection_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.selection_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetBackupSelectionInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetBackupSelectionInput {
backup_plan_id: self.backup_plan_id,
selection_id: self.selection_id,
})
}
}
}
#[doc(hidden)]
pub type GetBackupSelectionInputOperationOutputAlias = crate::operation::GetBackupSelection;
#[doc(hidden)]
pub type GetBackupSelectionInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl GetBackupSelectionInput {
#[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::GetBackupSelection,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::GetBackupSelectionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_30 = &_input.backup_plan_id;
let input_30 =
input_30
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_plan_id",
details: "cannot be empty or unset",
})?;
let backup_plan_id = aws_smithy_http::label::fmt_string(input_30, false);
if backup_plan_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_plan_id",
details: "cannot be empty or unset",
});
}
let input_31 = &_input.selection_id;
let input_31 =
input_31
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "selection_id",
details: "cannot be empty or unset",
})?;
let selection_id = aws_smithy_http::label::fmt_string(input_31, false);
if selection_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "selection_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/backup/plans/{BackupPlanId}/selections/{SelectionId}",
BackupPlanId = backup_plan_id,
SelectionId = selection_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetBackupSelectionInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::GetBackupSelectionInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetBackupSelection::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetBackupSelection",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::get_backup_selection_input::Builder {
crate::input::get_backup_selection_input::Builder::default()
}
}
pub mod get_backup_vault_access_policy_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_vault_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn backup_vault_name(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_vault_name = Some(input.into());
self
}
pub fn set_backup_vault_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.backup_vault_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetBackupVaultAccessPolicyInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetBackupVaultAccessPolicyInput {
backup_vault_name: self.backup_vault_name,
})
}
}
}
#[doc(hidden)]
pub type GetBackupVaultAccessPolicyInputOperationOutputAlias =
crate::operation::GetBackupVaultAccessPolicy;
#[doc(hidden)]
pub type GetBackupVaultAccessPolicyInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl GetBackupVaultAccessPolicyInput {
#[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::GetBackupVaultAccessPolicy,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::GetBackupVaultAccessPolicyInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_32 = &_input.backup_vault_name;
let input_32 =
input_32
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
})?;
let backup_vault_name = aws_smithy_http::label::fmt_string(input_32, false);
if backup_vault_name.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
});
}
write!(
output,
"/backup-vaults/{BackupVaultName}/access-policy",
BackupVaultName = backup_vault_name
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetBackupVaultAccessPolicyInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::GetBackupVaultAccessPolicyInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetBackupVaultAccessPolicy::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetBackupVaultAccessPolicy",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::get_backup_vault_access_policy_input::Builder {
crate::input::get_backup_vault_access_policy_input::Builder::default()
}
}
pub mod get_backup_vault_notifications_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_vault_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn backup_vault_name(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_vault_name = Some(input.into());
self
}
pub fn set_backup_vault_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.backup_vault_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetBackupVaultNotificationsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetBackupVaultNotificationsInput {
backup_vault_name: self.backup_vault_name,
})
}
}
}
#[doc(hidden)]
pub type GetBackupVaultNotificationsInputOperationOutputAlias =
crate::operation::GetBackupVaultNotifications;
#[doc(hidden)]
pub type GetBackupVaultNotificationsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl GetBackupVaultNotificationsInput {
#[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::GetBackupVaultNotifications,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::GetBackupVaultNotificationsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_33 = &_input.backup_vault_name;
let input_33 =
input_33
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
})?;
let backup_vault_name = aws_smithy_http::label::fmt_string(input_33, false);
if backup_vault_name.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
});
}
write!(
output,
"/backup-vaults/{BackupVaultName}/notification-configuration",
BackupVaultName = backup_vault_name
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetBackupVaultNotificationsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::GetBackupVaultNotificationsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetBackupVaultNotifications::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetBackupVaultNotifications",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::get_backup_vault_notifications_input::Builder {
crate::input::get_backup_vault_notifications_input::Builder::default()
}
}
pub mod get_recovery_point_restore_metadata_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_vault_name: std::option::Option<std::string::String>,
pub(crate) recovery_point_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn backup_vault_name(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_vault_name = Some(input.into());
self
}
pub fn set_backup_vault_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.backup_vault_name = input;
self
}
pub fn recovery_point_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.recovery_point_arn = Some(input.into());
self
}
pub fn set_recovery_point_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.recovery_point_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetRecoveryPointRestoreMetadataInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetRecoveryPointRestoreMetadataInput {
backup_vault_name: self.backup_vault_name,
recovery_point_arn: self.recovery_point_arn,
})
}
}
}
#[doc(hidden)]
pub type GetRecoveryPointRestoreMetadataInputOperationOutputAlias =
crate::operation::GetRecoveryPointRestoreMetadata;
#[doc(hidden)]
pub type GetRecoveryPointRestoreMetadataInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl GetRecoveryPointRestoreMetadataInput {
#[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::GetRecoveryPointRestoreMetadata,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::GetRecoveryPointRestoreMetadataInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_34 = &_input.backup_vault_name;
let input_34 =
input_34
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
})?;
let backup_vault_name = aws_smithy_http::label::fmt_string(input_34, false);
if backup_vault_name.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
});
}
let input_35 = &_input.recovery_point_arn;
let input_35 =
input_35
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "recovery_point_arn",
details: "cannot be empty or unset",
})?;
let recovery_point_arn = aws_smithy_http::label::fmt_string(input_35, false);
if recovery_point_arn.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "recovery_point_arn",
details: "cannot be empty or unset",
});
}
write!(output, "/backup-vaults/{BackupVaultName}/recovery-points/{RecoveryPointArn}/restore-metadata", BackupVaultName = backup_vault_name, RecoveryPointArn = recovery_point_arn).expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetRecoveryPointRestoreMetadataInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::GetRecoveryPointRestoreMetadataInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetRecoveryPointRestoreMetadata::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetRecoveryPointRestoreMetadata",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::get_recovery_point_restore_metadata_input::Builder {
crate::input::get_recovery_point_restore_metadata_input::Builder::default()
}
}
pub mod get_supported_resource_types_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {}
impl Builder {
pub fn build(
self,
) -> std::result::Result<
crate::input::GetSupportedResourceTypesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetSupportedResourceTypesInput {})
}
}
}
#[doc(hidden)]
pub type GetSupportedResourceTypesInputOperationOutputAlias =
crate::operation::GetSupportedResourceTypes;
#[doc(hidden)]
pub type GetSupportedResourceTypesInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl GetSupportedResourceTypesInput {
#[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::GetSupportedResourceTypes,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::GetSupportedResourceTypesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/supported-resource-types").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetSupportedResourceTypesInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::GetSupportedResourceTypesInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetSupportedResourceTypes::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetSupportedResourceTypes",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::get_supported_resource_types_input::Builder {
crate::input::get_supported_resource_types_input::Builder::default()
}
}
pub mod list_backup_jobs_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, 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) by_resource_arn: std::option::Option<std::string::String>,
pub(crate) by_state: std::option::Option<crate::model::BackupJobState>,
pub(crate) by_backup_vault_name: std::option::Option<std::string::String>,
pub(crate) by_created_before: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) by_created_after: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) by_resource_type: std::option::Option<std::string::String>,
pub(crate) by_account_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 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 by_resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.by_resource_arn = Some(input.into());
self
}
pub fn set_by_resource_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.by_resource_arn = input;
self
}
pub fn by_state(mut self, input: crate::model::BackupJobState) -> Self {
self.by_state = Some(input);
self
}
pub fn set_by_state(
mut self,
input: std::option::Option<crate::model::BackupJobState>,
) -> Self {
self.by_state = input;
self
}
pub fn by_backup_vault_name(mut self, input: impl Into<std::string::String>) -> Self {
self.by_backup_vault_name = Some(input.into());
self
}
pub fn set_by_backup_vault_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.by_backup_vault_name = input;
self
}
pub fn by_created_before(mut self, input: aws_smithy_types::DateTime) -> Self {
self.by_created_before = Some(input);
self
}
pub fn set_by_created_before(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.by_created_before = input;
self
}
pub fn by_created_after(mut self, input: aws_smithy_types::DateTime) -> Self {
self.by_created_after = Some(input);
self
}
pub fn set_by_created_after(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.by_created_after = input;
self
}
pub fn by_resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.by_resource_type = Some(input.into());
self
}
pub fn set_by_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.by_resource_type = input;
self
}
pub fn by_account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.by_account_id = Some(input.into());
self
}
pub fn set_by_account_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.by_account_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListBackupJobsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListBackupJobsInput {
next_token: self.next_token,
max_results: self.max_results,
by_resource_arn: self.by_resource_arn,
by_state: self.by_state,
by_backup_vault_name: self.by_backup_vault_name,
by_created_before: self.by_created_before,
by_created_after: self.by_created_after,
by_resource_type: self.by_resource_type,
by_account_id: self.by_account_id,
})
}
}
}
#[doc(hidden)]
pub type ListBackupJobsInputOperationOutputAlias = crate::operation::ListBackupJobs;
#[doc(hidden)]
pub type ListBackupJobsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListBackupJobsInput {
#[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::ListBackupJobs,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListBackupJobsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/backup-jobs").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListBackupJobsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_36) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_36));
}
if let Some(inner_37) = &_input.max_results {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_37).encode(),
);
}
if let Some(inner_38) = &_input.by_resource_arn {
query.push_kv(
"resourceArn",
&aws_smithy_http::query::fmt_string(&inner_38),
);
}
if let Some(inner_39) = &_input.by_state {
query.push_kv("state", &aws_smithy_http::query::fmt_string(&inner_39));
}
if let Some(inner_40) = &_input.by_backup_vault_name {
query.push_kv(
"backupVaultName",
&aws_smithy_http::query::fmt_string(&inner_40),
);
}
if let Some(inner_41) = &_input.by_created_before {
query.push_kv(
"createdBefore",
&aws_smithy_http::query::fmt_timestamp(
inner_41,
aws_smithy_types::date_time::Format::DateTime,
)?,
);
}
if let Some(inner_42) = &_input.by_created_after {
query.push_kv(
"createdAfter",
&aws_smithy_http::query::fmt_timestamp(
inner_42,
aws_smithy_types::date_time::Format::DateTime,
)?,
);
}
if let Some(inner_43) = &_input.by_resource_type {
query.push_kv(
"resourceType",
&aws_smithy_http::query::fmt_string(&inner_43),
);
}
if let Some(inner_44) = &_input.by_account_id {
query.push_kv("accountId", &aws_smithy_http::query::fmt_string(&inner_44));
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListBackupJobsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListBackupJobsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListBackupJobs::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListBackupJobs",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_backup_jobs_input::Builder {
crate::input::list_backup_jobs_input::Builder::default()
}
}
pub mod list_backup_plans_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, 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) include_deleted: std::option::Option<bool>,
}
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 include_deleted(mut self, input: bool) -> Self {
self.include_deleted = Some(input);
self
}
pub fn set_include_deleted(mut self, input: std::option::Option<bool>) -> Self {
self.include_deleted = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListBackupPlansInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListBackupPlansInput {
next_token: self.next_token,
max_results: self.max_results,
include_deleted: self.include_deleted,
})
}
}
}
#[doc(hidden)]
pub type ListBackupPlansInputOperationOutputAlias = crate::operation::ListBackupPlans;
#[doc(hidden)]
pub type ListBackupPlansInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListBackupPlansInput {
#[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::ListBackupPlans,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListBackupPlansInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/backup/plans").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListBackupPlansInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_45) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_45));
}
if let Some(inner_46) = &_input.max_results {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_46).encode(),
);
}
if let Some(inner_47) = &_input.include_deleted {
query.push_kv(
"includeDeleted",
aws_smithy_types::primitive::Encoder::from(*inner_47).encode(),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListBackupPlansInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListBackupPlansInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListBackupPlans::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListBackupPlans",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_backup_plans_input::Builder {
crate::input::list_backup_plans_input::Builder::default()
}
}
pub mod list_backup_plan_templates_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListBackupPlanTemplatesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListBackupPlanTemplatesInput {
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListBackupPlanTemplatesInputOperationOutputAlias =
crate::operation::ListBackupPlanTemplates;
#[doc(hidden)]
pub type ListBackupPlanTemplatesInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListBackupPlanTemplatesInput {
#[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::ListBackupPlanTemplates,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListBackupPlanTemplatesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/backup/template/plans").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListBackupPlanTemplatesInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_48) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_48));
}
if let Some(inner_49) = &_input.max_results {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_49).encode(),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListBackupPlanTemplatesInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListBackupPlanTemplatesInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListBackupPlanTemplates::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListBackupPlanTemplates",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_backup_plan_templates_input::Builder {
crate::input::list_backup_plan_templates_input::Builder::default()
}
}
pub mod list_backup_plan_versions_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_plan_id: 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 backup_plan_id(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_plan_id = Some(input.into());
self
}
pub fn set_backup_plan_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.backup_plan_id = 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,
) -> std::result::Result<
crate::input::ListBackupPlanVersionsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListBackupPlanVersionsInput {
backup_plan_id: self.backup_plan_id,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListBackupPlanVersionsInputOperationOutputAlias = crate::operation::ListBackupPlanVersions;
#[doc(hidden)]
pub type ListBackupPlanVersionsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListBackupPlanVersionsInput {
#[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::ListBackupPlanVersions,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListBackupPlanVersionsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_50 = &_input.backup_plan_id;
let input_50 =
input_50
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_plan_id",
details: "cannot be empty or unset",
})?;
let backup_plan_id = aws_smithy_http::label::fmt_string(input_50, false);
if backup_plan_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_plan_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/backup/plans/{BackupPlanId}/versions",
BackupPlanId = backup_plan_id
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListBackupPlanVersionsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_51) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_51));
}
if let Some(inner_52) = &_input.max_results {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_52).encode(),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListBackupPlanVersionsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListBackupPlanVersionsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListBackupPlanVersions::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListBackupPlanVersions",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_backup_plan_versions_input::Builder {
crate::input::list_backup_plan_versions_input::Builder::default()
}
}
pub mod list_backup_selections_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_plan_id: 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 backup_plan_id(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_plan_id = Some(input.into());
self
}
pub fn set_backup_plan_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.backup_plan_id = 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,
) -> std::result::Result<
crate::input::ListBackupSelectionsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListBackupSelectionsInput {
backup_plan_id: self.backup_plan_id,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListBackupSelectionsInputOperationOutputAlias = crate::operation::ListBackupSelections;
#[doc(hidden)]
pub type ListBackupSelectionsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListBackupSelectionsInput {
#[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::ListBackupSelections,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListBackupSelectionsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_53 = &_input.backup_plan_id;
let input_53 =
input_53
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_plan_id",
details: "cannot be empty or unset",
})?;
let backup_plan_id = aws_smithy_http::label::fmt_string(input_53, false);
if backup_plan_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_plan_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/backup/plans/{BackupPlanId}/selections",
BackupPlanId = backup_plan_id
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListBackupSelectionsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_54) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_54));
}
if let Some(inner_55) = &_input.max_results {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_55).encode(),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListBackupSelectionsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListBackupSelectionsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListBackupSelections::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListBackupSelections",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_backup_selections_input::Builder {
crate::input::list_backup_selections_input::Builder::default()
}
}
pub mod list_backup_vaults_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListBackupVaultsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListBackupVaultsInput {
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListBackupVaultsInputOperationOutputAlias = crate::operation::ListBackupVaults;
#[doc(hidden)]
pub type ListBackupVaultsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListBackupVaultsInput {
#[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::ListBackupVaults,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListBackupVaultsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/backup-vaults").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListBackupVaultsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_56) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_56));
}
if let Some(inner_57) = &_input.max_results {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_57).encode(),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListBackupVaultsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListBackupVaultsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListBackupVaults::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListBackupVaults",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_backup_vaults_input::Builder {
crate::input::list_backup_vaults_input::Builder::default()
}
}
pub mod list_copy_jobs_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, 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) by_resource_arn: std::option::Option<std::string::String>,
pub(crate) by_state: std::option::Option<crate::model::CopyJobState>,
pub(crate) by_created_before: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) by_created_after: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) by_resource_type: std::option::Option<std::string::String>,
pub(crate) by_destination_vault_arn: std::option::Option<std::string::String>,
pub(crate) by_account_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 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 by_resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.by_resource_arn = Some(input.into());
self
}
pub fn set_by_resource_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.by_resource_arn = input;
self
}
pub fn by_state(mut self, input: crate::model::CopyJobState) -> Self {
self.by_state = Some(input);
self
}
pub fn set_by_state(
mut self,
input: std::option::Option<crate::model::CopyJobState>,
) -> Self {
self.by_state = input;
self
}
pub fn by_created_before(mut self, input: aws_smithy_types::DateTime) -> Self {
self.by_created_before = Some(input);
self
}
pub fn set_by_created_before(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.by_created_before = input;
self
}
pub fn by_created_after(mut self, input: aws_smithy_types::DateTime) -> Self {
self.by_created_after = Some(input);
self
}
pub fn set_by_created_after(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.by_created_after = input;
self
}
pub fn by_resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.by_resource_type = Some(input.into());
self
}
pub fn set_by_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.by_resource_type = input;
self
}
pub fn by_destination_vault_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.by_destination_vault_arn = Some(input.into());
self
}
pub fn set_by_destination_vault_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.by_destination_vault_arn = input;
self
}
pub fn by_account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.by_account_id = Some(input.into());
self
}
pub fn set_by_account_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.by_account_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListCopyJobsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListCopyJobsInput {
next_token: self.next_token,
max_results: self.max_results,
by_resource_arn: self.by_resource_arn,
by_state: self.by_state,
by_created_before: self.by_created_before,
by_created_after: self.by_created_after,
by_resource_type: self.by_resource_type,
by_destination_vault_arn: self.by_destination_vault_arn,
by_account_id: self.by_account_id,
})
}
}
}
#[doc(hidden)]
pub type ListCopyJobsInputOperationOutputAlias = crate::operation::ListCopyJobs;
#[doc(hidden)]
pub type ListCopyJobsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListCopyJobsInput {
#[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::ListCopyJobs,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListCopyJobsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/copy-jobs").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListCopyJobsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_58) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_58));
}
if let Some(inner_59) = &_input.max_results {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_59).encode(),
);
}
if let Some(inner_60) = &_input.by_resource_arn {
query.push_kv(
"resourceArn",
&aws_smithy_http::query::fmt_string(&inner_60),
);
}
if let Some(inner_61) = &_input.by_state {
query.push_kv("state", &aws_smithy_http::query::fmt_string(&inner_61));
}
if let Some(inner_62) = &_input.by_created_before {
query.push_kv(
"createdBefore",
&aws_smithy_http::query::fmt_timestamp(
inner_62,
aws_smithy_types::date_time::Format::DateTime,
)?,
);
}
if let Some(inner_63) = &_input.by_created_after {
query.push_kv(
"createdAfter",
&aws_smithy_http::query::fmt_timestamp(
inner_63,
aws_smithy_types::date_time::Format::DateTime,
)?,
);
}
if let Some(inner_64) = &_input.by_resource_type {
query.push_kv(
"resourceType",
&aws_smithy_http::query::fmt_string(&inner_64),
);
}
if let Some(inner_65) = &_input.by_destination_vault_arn {
query.push_kv(
"destinationVaultArn",
&aws_smithy_http::query::fmt_string(&inner_65),
);
}
if let Some(inner_66) = &_input.by_account_id {
query.push_kv("accountId", &aws_smithy_http::query::fmt_string(&inner_66));
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListCopyJobsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListCopyJobsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListCopyJobs::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListCopyJobs",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_copy_jobs_input::Builder {
crate::input::list_copy_jobs_input::Builder::default()
}
}
pub mod list_frameworks_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
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,
) -> std::result::Result<
crate::input::ListFrameworksInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListFrameworksInput {
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type ListFrameworksInputOperationOutputAlias = crate::operation::ListFrameworks;
#[doc(hidden)]
pub type ListFrameworksInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListFrameworksInput {
#[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::ListFrameworks,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListFrameworksInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/audit/frameworks").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListFrameworksInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_67) = &_input.max_results {
query.push_kv(
"MaxResults",
aws_smithy_types::primitive::Encoder::from(*inner_67).encode(),
);
}
if let Some(inner_68) = &_input.next_token {
query.push_kv("NextToken", &aws_smithy_http::query::fmt_string(&inner_68));
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListFrameworksInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListFrameworksInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListFrameworks::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListFrameworks",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_frameworks_input::Builder {
crate::input::list_frameworks_input::Builder::default()
}
}
pub mod list_protected_resources_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListProtectedResourcesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListProtectedResourcesInput {
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListProtectedResourcesInputOperationOutputAlias = crate::operation::ListProtectedResources;
#[doc(hidden)]
pub type ListProtectedResourcesInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListProtectedResourcesInput {
#[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::ListProtectedResources,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListProtectedResourcesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/resources").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListProtectedResourcesInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_69) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_69));
}
if let Some(inner_70) = &_input.max_results {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_70).encode(),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListProtectedResourcesInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListProtectedResourcesInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListProtectedResources::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListProtectedResources",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_protected_resources_input::Builder {
crate::input::list_protected_resources_input::Builder::default()
}
}
pub mod list_recovery_points_by_backup_vault_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_vault_name: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) by_resource_arn: std::option::Option<std::string::String>,
pub(crate) by_resource_type: std::option::Option<std::string::String>,
pub(crate) by_backup_plan_id: std::option::Option<std::string::String>,
pub(crate) by_created_before: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) by_created_after: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
pub fn backup_vault_name(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_vault_name = Some(input.into());
self
}
pub fn set_backup_vault_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.backup_vault_name = 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 by_resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.by_resource_arn = Some(input.into());
self
}
pub fn set_by_resource_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.by_resource_arn = input;
self
}
pub fn by_resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.by_resource_type = Some(input.into());
self
}
pub fn set_by_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.by_resource_type = input;
self
}
pub fn by_backup_plan_id(mut self, input: impl Into<std::string::String>) -> Self {
self.by_backup_plan_id = Some(input.into());
self
}
pub fn set_by_backup_plan_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.by_backup_plan_id = input;
self
}
pub fn by_created_before(mut self, input: aws_smithy_types::DateTime) -> Self {
self.by_created_before = Some(input);
self
}
pub fn set_by_created_before(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.by_created_before = input;
self
}
pub fn by_created_after(mut self, input: aws_smithy_types::DateTime) -> Self {
self.by_created_after = Some(input);
self
}
pub fn set_by_created_after(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.by_created_after = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListRecoveryPointsByBackupVaultInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListRecoveryPointsByBackupVaultInput {
backup_vault_name: self.backup_vault_name,
next_token: self.next_token,
max_results: self.max_results,
by_resource_arn: self.by_resource_arn,
by_resource_type: self.by_resource_type,
by_backup_plan_id: self.by_backup_plan_id,
by_created_before: self.by_created_before,
by_created_after: self.by_created_after,
})
}
}
}
#[doc(hidden)]
pub type ListRecoveryPointsByBackupVaultInputOperationOutputAlias =
crate::operation::ListRecoveryPointsByBackupVault;
#[doc(hidden)]
pub type ListRecoveryPointsByBackupVaultInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListRecoveryPointsByBackupVaultInput {
#[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::ListRecoveryPointsByBackupVault,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListRecoveryPointsByBackupVaultInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_71 = &_input.backup_vault_name;
let input_71 =
input_71
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
})?;
let backup_vault_name = aws_smithy_http::label::fmt_string(input_71, false);
if backup_vault_name.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
});
}
write!(
output,
"/backup-vaults/{BackupVaultName}/recovery-points",
BackupVaultName = backup_vault_name
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListRecoveryPointsByBackupVaultInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_72) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_72));
}
if let Some(inner_73) = &_input.max_results {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_73).encode(),
);
}
if let Some(inner_74) = &_input.by_resource_arn {
query.push_kv(
"resourceArn",
&aws_smithy_http::query::fmt_string(&inner_74),
);
}
if let Some(inner_75) = &_input.by_resource_type {
query.push_kv(
"resourceType",
&aws_smithy_http::query::fmt_string(&inner_75),
);
}
if let Some(inner_76) = &_input.by_backup_plan_id {
query.push_kv(
"backupPlanId",
&aws_smithy_http::query::fmt_string(&inner_76),
);
}
if let Some(inner_77) = &_input.by_created_before {
query.push_kv(
"createdBefore",
&aws_smithy_http::query::fmt_timestamp(
inner_77,
aws_smithy_types::date_time::Format::DateTime,
)?,
);
}
if let Some(inner_78) = &_input.by_created_after {
query.push_kv(
"createdAfter",
&aws_smithy_http::query::fmt_timestamp(
inner_78,
aws_smithy_types::date_time::Format::DateTime,
)?,
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListRecoveryPointsByBackupVaultInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListRecoveryPointsByBackupVaultInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListRecoveryPointsByBackupVault::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListRecoveryPointsByBackupVault",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_recovery_points_by_backup_vault_input::Builder {
crate::input::list_recovery_points_by_backup_vault_input::Builder::default()
}
}
pub mod list_recovery_points_by_resource_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
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 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,
) -> std::result::Result<
crate::input::ListRecoveryPointsByResourceInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListRecoveryPointsByResourceInput {
resource_arn: self.resource_arn,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListRecoveryPointsByResourceInputOperationOutputAlias =
crate::operation::ListRecoveryPointsByResource;
#[doc(hidden)]
pub type ListRecoveryPointsByResourceInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListRecoveryPointsByResourceInput {
#[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::ListRecoveryPointsByResource,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListRecoveryPointsByResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_79 = &_input.resource_arn;
let input_79 =
input_79
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "resource_arn",
details: "cannot be empty or unset",
})?;
let resource_arn = aws_smithy_http::label::fmt_string(input_79, false);
if resource_arn.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "resource_arn",
details: "cannot be empty or unset",
});
}
write!(
output,
"/resources/{ResourceArn}/recovery-points",
ResourceArn = resource_arn
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListRecoveryPointsByResourceInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_80) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_80));
}
if let Some(inner_81) = &_input.max_results {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_81).encode(),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListRecoveryPointsByResourceInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListRecoveryPointsByResourceInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListRecoveryPointsByResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListRecoveryPointsByResource",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_recovery_points_by_resource_input::Builder {
crate::input::list_recovery_points_by_resource_input::Builder::default()
}
}
pub mod list_report_jobs_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) by_report_plan_name: std::option::Option<std::string::String>,
pub(crate) by_creation_before: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) by_creation_after: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) by_status: 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 by_report_plan_name(mut self, input: impl Into<std::string::String>) -> Self {
self.by_report_plan_name = Some(input.into());
self
}
pub fn set_by_report_plan_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.by_report_plan_name = input;
self
}
pub fn by_creation_before(mut self, input: aws_smithy_types::DateTime) -> Self {
self.by_creation_before = Some(input);
self
}
pub fn set_by_creation_before(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.by_creation_before = input;
self
}
pub fn by_creation_after(mut self, input: aws_smithy_types::DateTime) -> Self {
self.by_creation_after = Some(input);
self
}
pub fn set_by_creation_after(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.by_creation_after = input;
self
}
pub fn by_status(mut self, input: impl Into<std::string::String>) -> Self {
self.by_status = Some(input.into());
self
}
pub fn set_by_status(mut self, input: std::option::Option<std::string::String>) -> Self {
self.by_status = 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,
) -> std::result::Result<
crate::input::ListReportJobsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListReportJobsInput {
by_report_plan_name: self.by_report_plan_name,
by_creation_before: self.by_creation_before,
by_creation_after: self.by_creation_after,
by_status: self.by_status,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type ListReportJobsInputOperationOutputAlias = crate::operation::ListReportJobs;
#[doc(hidden)]
pub type ListReportJobsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListReportJobsInput {
#[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::ListReportJobs,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListReportJobsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/audit/report-jobs").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListReportJobsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_82) = &_input.by_report_plan_name {
query.push_kv(
"ReportPlanName",
&aws_smithy_http::query::fmt_string(&inner_82),
);
}
if let Some(inner_83) = &_input.by_creation_before {
query.push_kv(
"CreationBefore",
&aws_smithy_http::query::fmt_timestamp(
inner_83,
aws_smithy_types::date_time::Format::DateTime,
)?,
);
}
if let Some(inner_84) = &_input.by_creation_after {
query.push_kv(
"CreationAfter",
&aws_smithy_http::query::fmt_timestamp(
inner_84,
aws_smithy_types::date_time::Format::DateTime,
)?,
);
}
if let Some(inner_85) = &_input.by_status {
query.push_kv("Status", &aws_smithy_http::query::fmt_string(&inner_85));
}
if let Some(inner_86) = &_input.max_results {
query.push_kv(
"MaxResults",
aws_smithy_types::primitive::Encoder::from(*inner_86).encode(),
);
}
if let Some(inner_87) = &_input.next_token {
query.push_kv("NextToken", &aws_smithy_http::query::fmt_string(&inner_87));
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListReportJobsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListReportJobsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListReportJobs::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListReportJobs",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_report_jobs_input::Builder {
crate::input::list_report_jobs_input::Builder::default()
}
}
pub mod list_report_plans_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
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,
) -> std::result::Result<
crate::input::ListReportPlansInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListReportPlansInput {
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type ListReportPlansInputOperationOutputAlias = crate::operation::ListReportPlans;
#[doc(hidden)]
pub type ListReportPlansInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListReportPlansInput {
#[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::ListReportPlans,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListReportPlansInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/audit/report-plans").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListReportPlansInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_88) = &_input.max_results {
query.push_kv(
"MaxResults",
aws_smithy_types::primitive::Encoder::from(*inner_88).encode(),
);
}
if let Some(inner_89) = &_input.next_token {
query.push_kv("NextToken", &aws_smithy_http::query::fmt_string(&inner_89));
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListReportPlansInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListReportPlansInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListReportPlans::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListReportPlans",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_report_plans_input::Builder {
crate::input::list_report_plans_input::Builder::default()
}
}
pub mod list_restore_jobs_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, 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) by_account_id: std::option::Option<std::string::String>,
pub(crate) by_created_before: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) by_created_after: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) by_status: std::option::Option<crate::model::RestoreJobStatus>,
}
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 by_account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.by_account_id = Some(input.into());
self
}
pub fn set_by_account_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.by_account_id = input;
self
}
pub fn by_created_before(mut self, input: aws_smithy_types::DateTime) -> Self {
self.by_created_before = Some(input);
self
}
pub fn set_by_created_before(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.by_created_before = input;
self
}
pub fn by_created_after(mut self, input: aws_smithy_types::DateTime) -> Self {
self.by_created_after = Some(input);
self
}
pub fn set_by_created_after(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.by_created_after = input;
self
}
pub fn by_status(mut self, input: crate::model::RestoreJobStatus) -> Self {
self.by_status = Some(input);
self
}
pub fn set_by_status(
mut self,
input: std::option::Option<crate::model::RestoreJobStatus>,
) -> Self {
self.by_status = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListRestoreJobsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListRestoreJobsInput {
next_token: self.next_token,
max_results: self.max_results,
by_account_id: self.by_account_id,
by_created_before: self.by_created_before,
by_created_after: self.by_created_after,
by_status: self.by_status,
})
}
}
}
#[doc(hidden)]
pub type ListRestoreJobsInputOperationOutputAlias = crate::operation::ListRestoreJobs;
#[doc(hidden)]
pub type ListRestoreJobsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListRestoreJobsInput {
#[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::ListRestoreJobs,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListRestoreJobsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/restore-jobs").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListRestoreJobsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_90) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_90));
}
if let Some(inner_91) = &_input.max_results {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_91).encode(),
);
}
if let Some(inner_92) = &_input.by_account_id {
query.push_kv("accountId", &aws_smithy_http::query::fmt_string(&inner_92));
}
if let Some(inner_93) = &_input.by_created_before {
query.push_kv(
"createdBefore",
&aws_smithy_http::query::fmt_timestamp(
inner_93,
aws_smithy_types::date_time::Format::DateTime,
)?,
);
}
if let Some(inner_94) = &_input.by_created_after {
query.push_kv(
"createdAfter",
&aws_smithy_http::query::fmt_timestamp(
inner_94,
aws_smithy_types::date_time::Format::DateTime,
)?,
);
}
if let Some(inner_95) = &_input.by_status {
query.push_kv("status", &aws_smithy_http::query::fmt_string(&inner_95));
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListRestoreJobsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListRestoreJobsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListRestoreJobs::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListRestoreJobs",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_restore_jobs_input::Builder {
crate::input::list_restore_jobs_input::Builder::default()
}
}
pub mod list_tags_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
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 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,
) -> std::result::Result<crate::input::ListTagsInput, aws_smithy_http::operation::BuildError>
{
Ok(crate::input::ListTagsInput {
resource_arn: self.resource_arn,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListTagsInputOperationOutputAlias = crate::operation::ListTags;
#[doc(hidden)]
pub type ListTagsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListTagsInput {
#[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::ListTags,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListTagsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_96 = &_input.resource_arn;
let input_96 =
input_96
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "resource_arn",
details: "cannot be empty or unset",
})?;
let resource_arn = aws_smithy_http::label::fmt_string(input_96, false);
if resource_arn.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "resource_arn",
details: "cannot be empty or unset",
});
}
write!(output, "/tags/{ResourceArn}", ResourceArn = resource_arn)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListTagsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_97) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_97));
}
if let Some(inner_98) = &_input.max_results {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_98).encode(),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListTagsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListTagsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op =
aws_smithy_http::operation::Operation::new(request, crate::operation::ListTags::new())
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListTags", "backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_tags_input::Builder {
crate::input::list_tags_input::Builder::default()
}
}
pub mod put_backup_vault_access_policy_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_vault_name: std::option::Option<std::string::String>,
pub(crate) policy: std::option::Option<std::string::String>,
}
impl Builder {
pub fn backup_vault_name(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_vault_name = Some(input.into());
self
}
pub fn set_backup_vault_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.backup_vault_name = input;
self
}
pub fn policy(mut self, input: impl Into<std::string::String>) -> Self {
self.policy = Some(input.into());
self
}
pub fn set_policy(mut self, input: std::option::Option<std::string::String>) -> Self {
self.policy = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::PutBackupVaultAccessPolicyInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::PutBackupVaultAccessPolicyInput {
backup_vault_name: self.backup_vault_name,
policy: self.policy,
})
}
}
}
#[doc(hidden)]
pub type PutBackupVaultAccessPolicyInputOperationOutputAlias =
crate::operation::PutBackupVaultAccessPolicy;
#[doc(hidden)]
pub type PutBackupVaultAccessPolicyInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl PutBackupVaultAccessPolicyInput {
#[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::PutBackupVaultAccessPolicy,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::PutBackupVaultAccessPolicyInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_99 = &_input.backup_vault_name;
let input_99 =
input_99
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
})?;
let backup_vault_name = aws_smithy_http::label::fmt_string(input_99, false);
if backup_vault_name.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
});
}
write!(
output,
"/backup-vaults/{BackupVaultName}/access-policy",
BackupVaultName = backup_vault_name
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutBackupVaultAccessPolicyInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::PutBackupVaultAccessPolicyInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/json",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_put_backup_vault_access_policy(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::PutBackupVaultAccessPolicy::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutBackupVaultAccessPolicy",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::put_backup_vault_access_policy_input::Builder {
crate::input::put_backup_vault_access_policy_input::Builder::default()
}
}
pub mod put_backup_vault_lock_configuration_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_vault_name: std::option::Option<std::string::String>,
pub(crate) min_retention_days: std::option::Option<i64>,
pub(crate) max_retention_days: std::option::Option<i64>,
pub(crate) changeable_for_days: std::option::Option<i64>,
}
impl Builder {
pub fn backup_vault_name(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_vault_name = Some(input.into());
self
}
pub fn set_backup_vault_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.backup_vault_name = input;
self
}
pub fn min_retention_days(mut self, input: i64) -> Self {
self.min_retention_days = Some(input);
self
}
pub fn set_min_retention_days(mut self, input: std::option::Option<i64>) -> Self {
self.min_retention_days = input;
self
}
pub fn max_retention_days(mut self, input: i64) -> Self {
self.max_retention_days = Some(input);
self
}
pub fn set_max_retention_days(mut self, input: std::option::Option<i64>) -> Self {
self.max_retention_days = input;
self
}
pub fn changeable_for_days(mut self, input: i64) -> Self {
self.changeable_for_days = Some(input);
self
}
pub fn set_changeable_for_days(mut self, input: std::option::Option<i64>) -> Self {
self.changeable_for_days = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::PutBackupVaultLockConfigurationInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::PutBackupVaultLockConfigurationInput {
backup_vault_name: self.backup_vault_name,
min_retention_days: self.min_retention_days,
max_retention_days: self.max_retention_days,
changeable_for_days: self.changeable_for_days,
})
}
}
}
#[doc(hidden)]
pub type PutBackupVaultLockConfigurationInputOperationOutputAlias =
crate::operation::PutBackupVaultLockConfiguration;
#[doc(hidden)]
pub type PutBackupVaultLockConfigurationInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl PutBackupVaultLockConfigurationInput {
#[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::PutBackupVaultLockConfiguration,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::PutBackupVaultLockConfigurationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_100 = &_input.backup_vault_name;
let input_100 =
input_100
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
})?;
let backup_vault_name = aws_smithy_http::label::fmt_string(input_100, false);
if backup_vault_name.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
});
}
write!(
output,
"/backup-vaults/{BackupVaultName}/vault-lock",
BackupVaultName = backup_vault_name
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutBackupVaultLockConfigurationInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::PutBackupVaultLockConfigurationInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/json",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_put_backup_vault_lock_configuration(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::PutBackupVaultLockConfiguration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutBackupVaultLockConfiguration",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::put_backup_vault_lock_configuration_input::Builder {
crate::input::put_backup_vault_lock_configuration_input::Builder::default()
}
}
pub mod put_backup_vault_notifications_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_vault_name: std::option::Option<std::string::String>,
pub(crate) sns_topic_arn: std::option::Option<std::string::String>,
pub(crate) backup_vault_events:
std::option::Option<std::vec::Vec<crate::model::BackupVaultEvent>>,
}
impl Builder {
pub fn backup_vault_name(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_vault_name = Some(input.into());
self
}
pub fn set_backup_vault_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.backup_vault_name = input;
self
}
pub fn sns_topic_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.sns_topic_arn = Some(input.into());
self
}
pub fn set_sns_topic_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.sns_topic_arn = input;
self
}
pub fn backup_vault_events(
mut self,
input: impl Into<crate::model::BackupVaultEvent>,
) -> Self {
let mut v = self.backup_vault_events.unwrap_or_default();
v.push(input.into());
self.backup_vault_events = Some(v);
self
}
pub fn set_backup_vault_events(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::BackupVaultEvent>>,
) -> Self {
self.backup_vault_events = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::PutBackupVaultNotificationsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::PutBackupVaultNotificationsInput {
backup_vault_name: self.backup_vault_name,
sns_topic_arn: self.sns_topic_arn,
backup_vault_events: self.backup_vault_events,
})
}
}
}
#[doc(hidden)]
pub type PutBackupVaultNotificationsInputOperationOutputAlias =
crate::operation::PutBackupVaultNotifications;
#[doc(hidden)]
pub type PutBackupVaultNotificationsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl PutBackupVaultNotificationsInput {
#[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::PutBackupVaultNotifications,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::PutBackupVaultNotificationsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_101 = &_input.backup_vault_name;
let input_101 =
input_101
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
})?;
let backup_vault_name = aws_smithy_http::label::fmt_string(input_101, false);
if backup_vault_name.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
});
}
write!(
output,
"/backup-vaults/{BackupVaultName}/notification-configuration",
BackupVaultName = backup_vault_name
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutBackupVaultNotificationsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::PutBackupVaultNotificationsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/json",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_put_backup_vault_notifications(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::PutBackupVaultNotifications::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutBackupVaultNotifications",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::put_backup_vault_notifications_input::Builder {
crate::input::put_backup_vault_notifications_input::Builder::default()
}
}
pub mod start_backup_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_vault_name: std::option::Option<std::string::String>,
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) iam_role_arn: std::option::Option<std::string::String>,
pub(crate) idempotency_token: std::option::Option<std::string::String>,
pub(crate) start_window_minutes: std::option::Option<i64>,
pub(crate) complete_window_minutes: std::option::Option<i64>,
pub(crate) lifecycle: std::option::Option<crate::model::Lifecycle>,
pub(crate) recovery_point_tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
pub(crate) backup_options: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
pub fn backup_vault_name(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_vault_name = Some(input.into());
self
}
pub fn set_backup_vault_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.backup_vault_name = 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 iam_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.iam_role_arn = Some(input.into());
self
}
pub fn set_iam_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.iam_role_arn = input;
self
}
pub fn idempotency_token(mut self, input: impl Into<std::string::String>) -> Self {
self.idempotency_token = Some(input.into());
self
}
pub fn set_idempotency_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.idempotency_token = input;
self
}
pub fn start_window_minutes(mut self, input: i64) -> Self {
self.start_window_minutes = Some(input);
self
}
pub fn set_start_window_minutes(mut self, input: std::option::Option<i64>) -> Self {
self.start_window_minutes = input;
self
}
pub fn complete_window_minutes(mut self, input: i64) -> Self {
self.complete_window_minutes = Some(input);
self
}
pub fn set_complete_window_minutes(mut self, input: std::option::Option<i64>) -> Self {
self.complete_window_minutes = input;
self
}
pub fn lifecycle(mut self, input: crate::model::Lifecycle) -> Self {
self.lifecycle = Some(input);
self
}
pub fn set_lifecycle(
mut self,
input: std::option::Option<crate::model::Lifecycle>,
) -> Self {
self.lifecycle = input;
self
}
pub fn recovery_point_tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.recovery_point_tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.recovery_point_tags = Some(hash_map);
self
}
pub fn set_recovery_point_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.recovery_point_tags = input;
self
}
pub fn backup_options(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.backup_options.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.backup_options = Some(hash_map);
self
}
pub fn set_backup_options(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.backup_options = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::StartBackupJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::StartBackupJobInput {
backup_vault_name: self.backup_vault_name,
resource_arn: self.resource_arn,
iam_role_arn: self.iam_role_arn,
idempotency_token: self.idempotency_token,
start_window_minutes: self.start_window_minutes,
complete_window_minutes: self.complete_window_minutes,
lifecycle: self.lifecycle,
recovery_point_tags: self.recovery_point_tags,
backup_options: self.backup_options,
})
}
}
}
#[doc(hidden)]
pub type StartBackupJobInputOperationOutputAlias = crate::operation::StartBackupJob;
#[doc(hidden)]
pub type StartBackupJobInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl StartBackupJobInput {
#[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::StartBackupJob,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::StartBackupJobInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/backup-jobs").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StartBackupJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::StartBackupJobInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/json",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_start_backup_job(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StartBackupJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartBackupJob",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::start_backup_job_input::Builder {
crate::input::start_backup_job_input::Builder::default()
}
}
pub mod start_copy_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) recovery_point_arn: std::option::Option<std::string::String>,
pub(crate) source_backup_vault_name: std::option::Option<std::string::String>,
pub(crate) destination_backup_vault_arn: std::option::Option<std::string::String>,
pub(crate) iam_role_arn: std::option::Option<std::string::String>,
pub(crate) idempotency_token: std::option::Option<std::string::String>,
pub(crate) lifecycle: std::option::Option<crate::model::Lifecycle>,
}
impl Builder {
pub fn recovery_point_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.recovery_point_arn = Some(input.into());
self
}
pub fn set_recovery_point_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.recovery_point_arn = input;
self
}
pub fn source_backup_vault_name(mut self, input: impl Into<std::string::String>) -> Self {
self.source_backup_vault_name = Some(input.into());
self
}
pub fn set_source_backup_vault_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.source_backup_vault_name = input;
self
}
pub fn destination_backup_vault_arn(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.destination_backup_vault_arn = Some(input.into());
self
}
pub fn set_destination_backup_vault_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.destination_backup_vault_arn = input;
self
}
pub fn iam_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.iam_role_arn = Some(input.into());
self
}
pub fn set_iam_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.iam_role_arn = input;
self
}
pub fn idempotency_token(mut self, input: impl Into<std::string::String>) -> Self {
self.idempotency_token = Some(input.into());
self
}
pub fn set_idempotency_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.idempotency_token = input;
self
}
pub fn lifecycle(mut self, input: crate::model::Lifecycle) -> Self {
self.lifecycle = Some(input);
self
}
pub fn set_lifecycle(
mut self,
input: std::option::Option<crate::model::Lifecycle>,
) -> Self {
self.lifecycle = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::StartCopyJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::StartCopyJobInput {
recovery_point_arn: self.recovery_point_arn,
source_backup_vault_name: self.source_backup_vault_name,
destination_backup_vault_arn: self.destination_backup_vault_arn,
iam_role_arn: self.iam_role_arn,
idempotency_token: self.idempotency_token,
lifecycle: self.lifecycle,
})
}
}
}
#[doc(hidden)]
pub type StartCopyJobInputOperationOutputAlias = crate::operation::StartCopyJob;
#[doc(hidden)]
pub type StartCopyJobInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl StartCopyJobInput {
#[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::StartCopyJob,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::StartCopyJobInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/copy-jobs").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StartCopyJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::StartCopyJobInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/json",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = crate::operation_ser::serialize_operation_crate_operation_start_copy_job(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StartCopyJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartCopyJob",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::start_copy_job_input::Builder {
crate::input::start_copy_job_input::Builder::default()
}
}
pub mod start_report_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) report_plan_name: std::option::Option<std::string::String>,
pub(crate) idempotency_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn report_plan_name(mut self, input: impl Into<std::string::String>) -> Self {
self.report_plan_name = Some(input.into());
self
}
pub fn set_report_plan_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.report_plan_name = input;
self
}
pub fn idempotency_token(mut self, input: impl Into<std::string::String>) -> Self {
self.idempotency_token = Some(input.into());
self
}
pub fn set_idempotency_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.idempotency_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::StartReportJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::StartReportJobInput {
report_plan_name: self.report_plan_name,
idempotency_token: self.idempotency_token,
})
}
}
}
#[doc(hidden)]
pub type StartReportJobInputOperationOutputAlias = crate::operation::StartReportJob;
#[doc(hidden)]
pub type StartReportJobInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl StartReportJobInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::StartReportJob,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::StartReportJobInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_102 = &_input.report_plan_name;
let input_102 =
input_102
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "report_plan_name",
details: "cannot be empty or unset",
})?;
let report_plan_name = aws_smithy_http::label::fmt_string(input_102, false);
if report_plan_name.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "report_plan_name",
details: "cannot be empty or unset",
});
}
write!(
output,
"/audit/report-jobs/{ReportPlanName}",
ReportPlanName = report_plan_name
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StartReportJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::StartReportJobInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/json",
);
Ok(builder)
}
if self.idempotency_token.is_none() {
self.idempotency_token = Some(_config.make_token.make_idempotency_token());
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_start_report_job(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StartReportJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartReportJob",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::start_report_job_input::Builder {
crate::input::start_report_job_input::Builder::default()
}
}
pub mod start_restore_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) recovery_point_arn: std::option::Option<std::string::String>,
pub(crate) metadata: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
pub(crate) iam_role_arn: std::option::Option<std::string::String>,
pub(crate) idempotency_token: std::option::Option<std::string::String>,
pub(crate) resource_type: std::option::Option<std::string::String>,
}
impl Builder {
pub fn recovery_point_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.recovery_point_arn = Some(input.into());
self
}
pub fn set_recovery_point_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.recovery_point_arn = input;
self
}
pub fn metadata(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.metadata.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.metadata = Some(hash_map);
self
}
pub fn set_metadata(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.metadata = input;
self
}
pub fn iam_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.iam_role_arn = Some(input.into());
self
}
pub fn set_iam_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.iam_role_arn = input;
self
}
pub fn idempotency_token(mut self, input: impl Into<std::string::String>) -> Self {
self.idempotency_token = Some(input.into());
self
}
pub fn set_idempotency_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.idempotency_token = input;
self
}
pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_type = Some(input.into());
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_type = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::StartRestoreJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::StartRestoreJobInput {
recovery_point_arn: self.recovery_point_arn,
metadata: self.metadata,
iam_role_arn: self.iam_role_arn,
idempotency_token: self.idempotency_token,
resource_type: self.resource_type,
})
}
}
}
#[doc(hidden)]
pub type StartRestoreJobInputOperationOutputAlias = crate::operation::StartRestoreJob;
#[doc(hidden)]
pub type StartRestoreJobInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl StartRestoreJobInput {
#[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::StartRestoreJob,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::StartRestoreJobInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/restore-jobs").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StartRestoreJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::StartRestoreJobInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/json",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_start_restore_job(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StartRestoreJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartRestoreJob",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::start_restore_job_input::Builder {
crate::input::start_restore_job_input::Builder::default()
}
}
pub mod stop_backup_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_job_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn backup_job_id(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_job_id = Some(input.into());
self
}
pub fn set_backup_job_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.backup_job_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::StopBackupJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::StopBackupJobInput {
backup_job_id: self.backup_job_id,
})
}
}
}
#[doc(hidden)]
pub type StopBackupJobInputOperationOutputAlias = crate::operation::StopBackupJob;
#[doc(hidden)]
pub type StopBackupJobInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl StopBackupJobInput {
#[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::StopBackupJob,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::StopBackupJobInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_103 = &_input.backup_job_id;
let input_103 =
input_103
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_job_id",
details: "cannot be empty or unset",
})?;
let backup_job_id = aws_smithy_http::label::fmt_string(input_103, false);
if backup_job_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_job_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/backup-jobs/{BackupJobId}",
BackupJobId = backup_job_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StopBackupJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::StopBackupJobInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StopBackupJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StopBackupJob",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::stop_backup_job_input::Builder {
crate::input::stop_backup_job_input::Builder::default()
}
}
pub mod tag_resource_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, 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 tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::TagResourceInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::TagResourceInput {
resource_arn: self.resource_arn,
tags: self.tags,
})
}
}
}
#[doc(hidden)]
pub type TagResourceInputOperationOutputAlias = crate::operation::TagResource;
#[doc(hidden)]
pub type TagResourceInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl TagResourceInput {
#[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::TagResource,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::TagResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_104 = &_input.resource_arn;
let input_104 =
input_104
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "resource_arn",
details: "cannot be empty or unset",
})?;
let resource_arn = aws_smithy_http::label::fmt_string(input_104, false);
if resource_arn.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "resource_arn",
details: "cannot be empty or unset",
});
}
write!(output, "/tags/{ResourceArn}", ResourceArn = resource_arn)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::TagResourceInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::TagResourceInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/json",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = crate::operation_ser::serialize_operation_crate_operation_tag_resource(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::TagResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"TagResource",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::tag_resource_input::Builder {
crate::input::tag_resource_input::Builder::default()
}
}
pub mod untag_resource_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) tag_key_list: std::option::Option<std::vec::Vec<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 tag_key_list(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.tag_key_list.unwrap_or_default();
v.push(input.into());
self.tag_key_list = Some(v);
self
}
pub fn set_tag_key_list(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.tag_key_list = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UntagResourceInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UntagResourceInput {
resource_arn: self.resource_arn,
tag_key_list: self.tag_key_list,
})
}
}
}
#[doc(hidden)]
pub type UntagResourceInputOperationOutputAlias = crate::operation::UntagResource;
#[doc(hidden)]
pub type UntagResourceInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl UntagResourceInput {
#[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::UntagResource,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::UntagResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_105 = &_input.resource_arn;
let input_105 =
input_105
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "resource_arn",
details: "cannot be empty or unset",
})?;
let resource_arn = aws_smithy_http::label::fmt_string(input_105, false);
if resource_arn.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "resource_arn",
details: "cannot be empty or unset",
});
}
write!(output, "/untag/{ResourceArn}", ResourceArn = resource_arn)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UntagResourceInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::UntagResourceInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/json",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = crate::operation_ser::serialize_operation_crate_operation_untag_resource(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UntagResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UntagResource",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::untag_resource_input::Builder {
crate::input::untag_resource_input::Builder::default()
}
}
pub mod update_backup_plan_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_plan_id: std::option::Option<std::string::String>,
pub(crate) backup_plan: std::option::Option<crate::model::BackupPlanInput>,
}
impl Builder {
pub fn backup_plan_id(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_plan_id = Some(input.into());
self
}
pub fn set_backup_plan_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.backup_plan_id = input;
self
}
pub fn backup_plan(mut self, input: crate::model::BackupPlanInput) -> Self {
self.backup_plan = Some(input);
self
}
pub fn set_backup_plan(
mut self,
input: std::option::Option<crate::model::BackupPlanInput>,
) -> Self {
self.backup_plan = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdateBackupPlanInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdateBackupPlanInput {
backup_plan_id: self.backup_plan_id,
backup_plan: self.backup_plan,
})
}
}
}
#[doc(hidden)]
pub type UpdateBackupPlanInputOperationOutputAlias = crate::operation::UpdateBackupPlan;
#[doc(hidden)]
pub type UpdateBackupPlanInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl UpdateBackupPlanInput {
#[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::UpdateBackupPlan,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::UpdateBackupPlanInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_106 = &_input.backup_plan_id;
let input_106 =
input_106
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_plan_id",
details: "cannot be empty or unset",
})?;
let backup_plan_id = aws_smithy_http::label::fmt_string(input_106, false);
if backup_plan_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_plan_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/backup/plans/{BackupPlanId}",
BackupPlanId = backup_plan_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateBackupPlanInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::UpdateBackupPlanInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/json",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_update_backup_plan(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateBackupPlan::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateBackupPlan",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::update_backup_plan_input::Builder {
crate::input::update_backup_plan_input::Builder::default()
}
}
pub mod update_framework_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) framework_name: std::option::Option<std::string::String>,
pub(crate) framework_description: std::option::Option<std::string::String>,
pub(crate) framework_controls:
std::option::Option<std::vec::Vec<crate::model::FrameworkControl>>,
pub(crate) idempotency_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn framework_name(mut self, input: impl Into<std::string::String>) -> Self {
self.framework_name = Some(input.into());
self
}
pub fn set_framework_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.framework_name = input;
self
}
pub fn framework_description(mut self, input: impl Into<std::string::String>) -> Self {
self.framework_description = Some(input.into());
self
}
pub fn set_framework_description(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.framework_description = input;
self
}
pub fn framework_controls(
mut self,
input: impl Into<crate::model::FrameworkControl>,
) -> Self {
let mut v = self.framework_controls.unwrap_or_default();
v.push(input.into());
self.framework_controls = Some(v);
self
}
pub fn set_framework_controls(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::FrameworkControl>>,
) -> Self {
self.framework_controls = input;
self
}
pub fn idempotency_token(mut self, input: impl Into<std::string::String>) -> Self {
self.idempotency_token = Some(input.into());
self
}
pub fn set_idempotency_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.idempotency_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdateFrameworkInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdateFrameworkInput {
framework_name: self.framework_name,
framework_description: self.framework_description,
framework_controls: self.framework_controls,
idempotency_token: self.idempotency_token,
})
}
}
}
#[doc(hidden)]
pub type UpdateFrameworkInputOperationOutputAlias = crate::operation::UpdateFramework;
#[doc(hidden)]
pub type UpdateFrameworkInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl UpdateFrameworkInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateFramework,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::UpdateFrameworkInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_107 = &_input.framework_name;
let input_107 =
input_107
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "framework_name",
details: "cannot be empty or unset",
})?;
let framework_name = aws_smithy_http::label::fmt_string(input_107, false);
if framework_name.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "framework_name",
details: "cannot be empty or unset",
});
}
write!(
output,
"/audit/frameworks/{FrameworkName}",
FrameworkName = framework_name
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateFrameworkInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::UpdateFrameworkInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/json",
);
Ok(builder)
}
if self.idempotency_token.is_none() {
self.idempotency_token = Some(_config.make_token.make_idempotency_token());
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_update_framework(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateFramework::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateFramework",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::update_framework_input::Builder {
crate::input::update_framework_input::Builder::default()
}
}
pub mod update_global_settings_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) global_settings: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
pub fn global_settings(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.global_settings.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.global_settings = Some(hash_map);
self
}
pub fn set_global_settings(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.global_settings = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdateGlobalSettingsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdateGlobalSettingsInput {
global_settings: self.global_settings,
})
}
}
}
#[doc(hidden)]
pub type UpdateGlobalSettingsInputOperationOutputAlias = crate::operation::UpdateGlobalSettings;
#[doc(hidden)]
pub type UpdateGlobalSettingsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl UpdateGlobalSettingsInput {
#[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::UpdateGlobalSettings,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::UpdateGlobalSettingsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/global-settings").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateGlobalSettingsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::UpdateGlobalSettingsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/json",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_update_global_settings(
&self,
)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateGlobalSettings::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateGlobalSettings",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::update_global_settings_input::Builder {
crate::input::update_global_settings_input::Builder::default()
}
}
pub mod update_recovery_point_lifecycle_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_vault_name: std::option::Option<std::string::String>,
pub(crate) recovery_point_arn: std::option::Option<std::string::String>,
pub(crate) lifecycle: std::option::Option<crate::model::Lifecycle>,
}
impl Builder {
pub fn backup_vault_name(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_vault_name = Some(input.into());
self
}
pub fn set_backup_vault_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.backup_vault_name = input;
self
}
pub fn recovery_point_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.recovery_point_arn = Some(input.into());
self
}
pub fn set_recovery_point_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.recovery_point_arn = input;
self
}
pub fn lifecycle(mut self, input: crate::model::Lifecycle) -> Self {
self.lifecycle = Some(input);
self
}
pub fn set_lifecycle(
mut self,
input: std::option::Option<crate::model::Lifecycle>,
) -> Self {
self.lifecycle = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdateRecoveryPointLifecycleInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdateRecoveryPointLifecycleInput {
backup_vault_name: self.backup_vault_name,
recovery_point_arn: self.recovery_point_arn,
lifecycle: self.lifecycle,
})
}
}
}
#[doc(hidden)]
pub type UpdateRecoveryPointLifecycleInputOperationOutputAlias =
crate::operation::UpdateRecoveryPointLifecycle;
#[doc(hidden)]
pub type UpdateRecoveryPointLifecycleInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl UpdateRecoveryPointLifecycleInput {
#[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::UpdateRecoveryPointLifecycle,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::UpdateRecoveryPointLifecycleInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_108 = &_input.backup_vault_name;
let input_108 =
input_108
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
})?;
let backup_vault_name = aws_smithy_http::label::fmt_string(input_108, false);
if backup_vault_name.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "backup_vault_name",
details: "cannot be empty or unset",
});
}
let input_109 = &_input.recovery_point_arn;
let input_109 =
input_109
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "recovery_point_arn",
details: "cannot be empty or unset",
})?;
let recovery_point_arn = aws_smithy_http::label::fmt_string(input_109, false);
if recovery_point_arn.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "recovery_point_arn",
details: "cannot be empty or unset",
});
}
write!(
output,
"/backup-vaults/{BackupVaultName}/recovery-points/{RecoveryPointArn}",
BackupVaultName = backup_vault_name,
RecoveryPointArn = recovery_point_arn
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateRecoveryPointLifecycleInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::UpdateRecoveryPointLifecycleInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/json",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_update_recovery_point_lifecycle(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateRecoveryPointLifecycle::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateRecoveryPointLifecycle",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::update_recovery_point_lifecycle_input::Builder {
crate::input::update_recovery_point_lifecycle_input::Builder::default()
}
}
pub mod update_region_settings_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_type_opt_in_preference:
std::option::Option<std::collections::HashMap<std::string::String, bool>>,
}
impl Builder {
pub fn resource_type_opt_in_preference(
mut self,
k: impl Into<std::string::String>,
v: impl Into<bool>,
) -> Self {
let mut hash_map = self.resource_type_opt_in_preference.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.resource_type_opt_in_preference = Some(hash_map);
self
}
pub fn set_resource_type_opt_in_preference(
mut self,
input: std::option::Option<std::collections::HashMap<std::string::String, bool>>,
) -> Self {
self.resource_type_opt_in_preference = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdateRegionSettingsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdateRegionSettingsInput {
resource_type_opt_in_preference: self.resource_type_opt_in_preference,
})
}
}
}
#[doc(hidden)]
pub type UpdateRegionSettingsInputOperationOutputAlias = crate::operation::UpdateRegionSettings;
#[doc(hidden)]
pub type UpdateRegionSettingsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl UpdateRegionSettingsInput {
#[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::UpdateRegionSettings,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::UpdateRegionSettingsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/account-settings").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateRegionSettingsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::UpdateRegionSettingsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/json",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_update_region_settings(
&self,
)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateRegionSettings::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateRegionSettings",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::update_region_settings_input::Builder {
crate::input::update_region_settings_input::Builder::default()
}
}
pub mod update_report_plan_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) report_plan_name: std::option::Option<std::string::String>,
pub(crate) report_plan_description: std::option::Option<std::string::String>,
pub(crate) report_delivery_channel:
std::option::Option<crate::model::ReportDeliveryChannel>,
pub(crate) report_setting: std::option::Option<crate::model::ReportSetting>,
pub(crate) idempotency_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn report_plan_name(mut self, input: impl Into<std::string::String>) -> Self {
self.report_plan_name = Some(input.into());
self
}
pub fn set_report_plan_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.report_plan_name = input;
self
}
pub fn report_plan_description(mut self, input: impl Into<std::string::String>) -> Self {
self.report_plan_description = Some(input.into());
self
}
pub fn set_report_plan_description(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.report_plan_description = input;
self
}
pub fn report_delivery_channel(
mut self,
input: crate::model::ReportDeliveryChannel,
) -> Self {
self.report_delivery_channel = Some(input);
self
}
pub fn set_report_delivery_channel(
mut self,
input: std::option::Option<crate::model::ReportDeliveryChannel>,
) -> Self {
self.report_delivery_channel = input;
self
}
pub fn report_setting(mut self, input: crate::model::ReportSetting) -> Self {
self.report_setting = Some(input);
self
}
pub fn set_report_setting(
mut self,
input: std::option::Option<crate::model::ReportSetting>,
) -> Self {
self.report_setting = input;
self
}
pub fn idempotency_token(mut self, input: impl Into<std::string::String>) -> Self {
self.idempotency_token = Some(input.into());
self
}
pub fn set_idempotency_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.idempotency_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdateReportPlanInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdateReportPlanInput {
report_plan_name: self.report_plan_name,
report_plan_description: self.report_plan_description,
report_delivery_channel: self.report_delivery_channel,
report_setting: self.report_setting,
idempotency_token: self.idempotency_token,
})
}
}
}
#[doc(hidden)]
pub type UpdateReportPlanInputOperationOutputAlias = crate::operation::UpdateReportPlan;
#[doc(hidden)]
pub type UpdateReportPlanInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl UpdateReportPlanInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateReportPlan,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::UpdateReportPlanInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_110 = &_input.report_plan_name;
let input_110 =
input_110
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "report_plan_name",
details: "cannot be empty or unset",
})?;
let report_plan_name = aws_smithy_http::label::fmt_string(input_110, false);
if report_plan_name.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "report_plan_name",
details: "cannot be empty or unset",
});
}
write!(
output,
"/audit/report-plans/{ReportPlanName}",
ReportPlanName = report_plan_name
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateReportPlanInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::UpdateReportPlanInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/json",
);
Ok(builder)
}
if self.idempotency_token.is_none() {
self.idempotency_token = Some(_config.make_token.make_idempotency_token());
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_update_report_plan(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
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);
#[allow(unused_mut)]
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateReportPlan::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateReportPlan",
"backup",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::update_report_plan_input::Builder {
crate::input::update_report_plan_input::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateReportPlanInput {
pub report_plan_name: std::option::Option<std::string::String>,
pub report_plan_description: std::option::Option<std::string::String>,
pub report_delivery_channel: std::option::Option<crate::model::ReportDeliveryChannel>,
pub report_setting: std::option::Option<crate::model::ReportSetting>,
pub idempotency_token: std::option::Option<std::string::String>,
}
impl UpdateReportPlanInput {
pub fn report_plan_name(&self) -> std::option::Option<&str> {
self.report_plan_name.as_deref()
}
pub fn report_plan_description(&self) -> std::option::Option<&str> {
self.report_plan_description.as_deref()
}
pub fn report_delivery_channel(
&self,
) -> std::option::Option<&crate::model::ReportDeliveryChannel> {
self.report_delivery_channel.as_ref()
}
pub fn report_setting(&self) -> std::option::Option<&crate::model::ReportSetting> {
self.report_setting.as_ref()
}
pub fn idempotency_token(&self) -> std::option::Option<&str> {
self.idempotency_token.as_deref()
}
}
impl std::fmt::Debug for UpdateReportPlanInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateReportPlanInput");
formatter.field("report_plan_name", &self.report_plan_name);
formatter.field("report_plan_description", &self.report_plan_description);
formatter.field("report_delivery_channel", &self.report_delivery_channel);
formatter.field("report_setting", &self.report_setting);
formatter.field("idempotency_token", &self.idempotency_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateRegionSettingsInput {
pub resource_type_opt_in_preference:
std::option::Option<std::collections::HashMap<std::string::String, bool>>,
}
impl UpdateRegionSettingsInput {
pub fn resource_type_opt_in_preference(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, bool>> {
self.resource_type_opt_in_preference.as_ref()
}
}
impl std::fmt::Debug for UpdateRegionSettingsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateRegionSettingsInput");
formatter.field(
"resource_type_opt_in_preference",
&self.resource_type_opt_in_preference,
);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateRecoveryPointLifecycleInput {
pub backup_vault_name: std::option::Option<std::string::String>,
pub recovery_point_arn: std::option::Option<std::string::String>,
pub lifecycle: std::option::Option<crate::model::Lifecycle>,
}
impl UpdateRecoveryPointLifecycleInput {
pub fn backup_vault_name(&self) -> std::option::Option<&str> {
self.backup_vault_name.as_deref()
}
pub fn recovery_point_arn(&self) -> std::option::Option<&str> {
self.recovery_point_arn.as_deref()
}
pub fn lifecycle(&self) -> std::option::Option<&crate::model::Lifecycle> {
self.lifecycle.as_ref()
}
}
impl std::fmt::Debug for UpdateRecoveryPointLifecycleInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateRecoveryPointLifecycleInput");
formatter.field("backup_vault_name", &self.backup_vault_name);
formatter.field("recovery_point_arn", &self.recovery_point_arn);
formatter.field("lifecycle", &self.lifecycle);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateGlobalSettingsInput {
pub global_settings:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl UpdateGlobalSettingsInput {
pub fn global_settings(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.global_settings.as_ref()
}
}
impl std::fmt::Debug for UpdateGlobalSettingsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateGlobalSettingsInput");
formatter.field("global_settings", &self.global_settings);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateFrameworkInput {
pub framework_name: std::option::Option<std::string::String>,
pub framework_description: std::option::Option<std::string::String>,
pub framework_controls: std::option::Option<std::vec::Vec<crate::model::FrameworkControl>>,
pub idempotency_token: std::option::Option<std::string::String>,
}
impl UpdateFrameworkInput {
pub fn framework_name(&self) -> std::option::Option<&str> {
self.framework_name.as_deref()
}
pub fn framework_description(&self) -> std::option::Option<&str> {
self.framework_description.as_deref()
}
pub fn framework_controls(&self) -> std::option::Option<&[crate::model::FrameworkControl]> {
self.framework_controls.as_deref()
}
pub fn idempotency_token(&self) -> std::option::Option<&str> {
self.idempotency_token.as_deref()
}
}
impl std::fmt::Debug for UpdateFrameworkInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateFrameworkInput");
formatter.field("framework_name", &self.framework_name);
formatter.field("framework_description", &self.framework_description);
formatter.field("framework_controls", &self.framework_controls);
formatter.field("idempotency_token", &self.idempotency_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateBackupPlanInput {
pub backup_plan_id: std::option::Option<std::string::String>,
pub backup_plan: std::option::Option<crate::model::BackupPlanInput>,
}
impl UpdateBackupPlanInput {
pub fn backup_plan_id(&self) -> std::option::Option<&str> {
self.backup_plan_id.as_deref()
}
pub fn backup_plan(&self) -> std::option::Option<&crate::model::BackupPlanInput> {
self.backup_plan.as_ref()
}
}
impl std::fmt::Debug for UpdateBackupPlanInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateBackupPlanInput");
formatter.field("backup_plan_id", &self.backup_plan_id);
formatter.field("backup_plan", &self.backup_plan);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UntagResourceInput {
pub resource_arn: std::option::Option<std::string::String>,
pub tag_key_list: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl UntagResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn tag_key_list(&self) -> std::option::Option<&[std::string::String]> {
self.tag_key_list.as_deref()
}
}
impl std::fmt::Debug for UntagResourceInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UntagResourceInput");
formatter.field("resource_arn", &self.resource_arn);
formatter.field("tag_key_list", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct TagResourceInput {
pub resource_arn: std::option::Option<std::string::String>,
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl TagResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
}
impl std::fmt::Debug for TagResourceInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("TagResourceInput");
formatter.field("resource_arn", &self.resource_arn);
formatter.field("tags", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StopBackupJobInput {
pub backup_job_id: std::option::Option<std::string::String>,
}
impl StopBackupJobInput {
pub fn backup_job_id(&self) -> std::option::Option<&str> {
self.backup_job_id.as_deref()
}
}
impl std::fmt::Debug for StopBackupJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StopBackupJobInput");
formatter.field("backup_job_id", &self.backup_job_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StartRestoreJobInput {
pub recovery_point_arn: std::option::Option<std::string::String>,
pub metadata:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
pub iam_role_arn: std::option::Option<std::string::String>,
pub idempotency_token: std::option::Option<std::string::String>,
pub resource_type: std::option::Option<std::string::String>,
}
impl StartRestoreJobInput {
pub fn recovery_point_arn(&self) -> std::option::Option<&str> {
self.recovery_point_arn.as_deref()
}
pub fn metadata(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.metadata.as_ref()
}
pub fn iam_role_arn(&self) -> std::option::Option<&str> {
self.iam_role_arn.as_deref()
}
pub fn idempotency_token(&self) -> std::option::Option<&str> {
self.idempotency_token.as_deref()
}
pub fn resource_type(&self) -> std::option::Option<&str> {
self.resource_type.as_deref()
}
}
impl std::fmt::Debug for StartRestoreJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StartRestoreJobInput");
formatter.field("recovery_point_arn", &self.recovery_point_arn);
formatter.field("metadata", &"*** Sensitive Data Redacted ***");
formatter.field("iam_role_arn", &self.iam_role_arn);
formatter.field("idempotency_token", &self.idempotency_token);
formatter.field("resource_type", &self.resource_type);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StartReportJobInput {
pub report_plan_name: std::option::Option<std::string::String>,
pub idempotency_token: std::option::Option<std::string::String>,
}
impl StartReportJobInput {
pub fn report_plan_name(&self) -> std::option::Option<&str> {
self.report_plan_name.as_deref()
}
pub fn idempotency_token(&self) -> std::option::Option<&str> {
self.idempotency_token.as_deref()
}
}
impl std::fmt::Debug for StartReportJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StartReportJobInput");
formatter.field("report_plan_name", &self.report_plan_name);
formatter.field("idempotency_token", &self.idempotency_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StartCopyJobInput {
pub recovery_point_arn: std::option::Option<std::string::String>,
pub source_backup_vault_name: std::option::Option<std::string::String>,
pub destination_backup_vault_arn: std::option::Option<std::string::String>,
pub iam_role_arn: std::option::Option<std::string::String>,
pub idempotency_token: std::option::Option<std::string::String>,
pub lifecycle: std::option::Option<crate::model::Lifecycle>,
}
impl StartCopyJobInput {
pub fn recovery_point_arn(&self) -> std::option::Option<&str> {
self.recovery_point_arn.as_deref()
}
pub fn source_backup_vault_name(&self) -> std::option::Option<&str> {
self.source_backup_vault_name.as_deref()
}
pub fn destination_backup_vault_arn(&self) -> std::option::Option<&str> {
self.destination_backup_vault_arn.as_deref()
}
pub fn iam_role_arn(&self) -> std::option::Option<&str> {
self.iam_role_arn.as_deref()
}
pub fn idempotency_token(&self) -> std::option::Option<&str> {
self.idempotency_token.as_deref()
}
pub fn lifecycle(&self) -> std::option::Option<&crate::model::Lifecycle> {
self.lifecycle.as_ref()
}
}
impl std::fmt::Debug for StartCopyJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StartCopyJobInput");
formatter.field("recovery_point_arn", &self.recovery_point_arn);
formatter.field("source_backup_vault_name", &self.source_backup_vault_name);
formatter.field(
"destination_backup_vault_arn",
&self.destination_backup_vault_arn,
);
formatter.field("iam_role_arn", &self.iam_role_arn);
formatter.field("idempotency_token", &self.idempotency_token);
formatter.field("lifecycle", &self.lifecycle);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StartBackupJobInput {
pub backup_vault_name: std::option::Option<std::string::String>,
pub resource_arn: std::option::Option<std::string::String>,
pub iam_role_arn: std::option::Option<std::string::String>,
pub idempotency_token: std::option::Option<std::string::String>,
pub start_window_minutes: std::option::Option<i64>,
pub complete_window_minutes: std::option::Option<i64>,
pub lifecycle: std::option::Option<crate::model::Lifecycle>,
pub recovery_point_tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
pub backup_options:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl StartBackupJobInput {
pub fn backup_vault_name(&self) -> std::option::Option<&str> {
self.backup_vault_name.as_deref()
}
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn iam_role_arn(&self) -> std::option::Option<&str> {
self.iam_role_arn.as_deref()
}
pub fn idempotency_token(&self) -> std::option::Option<&str> {
self.idempotency_token.as_deref()
}
pub fn start_window_minutes(&self) -> std::option::Option<i64> {
self.start_window_minutes
}
pub fn complete_window_minutes(&self) -> std::option::Option<i64> {
self.complete_window_minutes
}
pub fn lifecycle(&self) -> std::option::Option<&crate::model::Lifecycle> {
self.lifecycle.as_ref()
}
pub fn recovery_point_tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.recovery_point_tags.as_ref()
}
pub fn backup_options(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.backup_options.as_ref()
}
}
impl std::fmt::Debug for StartBackupJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StartBackupJobInput");
formatter.field("backup_vault_name", &self.backup_vault_name);
formatter.field("resource_arn", &self.resource_arn);
formatter.field("iam_role_arn", &self.iam_role_arn);
formatter.field("idempotency_token", &self.idempotency_token);
formatter.field("start_window_minutes", &self.start_window_minutes);
formatter.field("complete_window_minutes", &self.complete_window_minutes);
formatter.field("lifecycle", &self.lifecycle);
formatter.field("recovery_point_tags", &"*** Sensitive Data Redacted ***");
formatter.field("backup_options", &self.backup_options);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PutBackupVaultNotificationsInput {
pub backup_vault_name: std::option::Option<std::string::String>,
pub sns_topic_arn: std::option::Option<std::string::String>,
pub backup_vault_events: std::option::Option<std::vec::Vec<crate::model::BackupVaultEvent>>,
}
impl PutBackupVaultNotificationsInput {
pub fn backup_vault_name(&self) -> std::option::Option<&str> {
self.backup_vault_name.as_deref()
}
pub fn sns_topic_arn(&self) -> std::option::Option<&str> {
self.sns_topic_arn.as_deref()
}
pub fn backup_vault_events(&self) -> std::option::Option<&[crate::model::BackupVaultEvent]> {
self.backup_vault_events.as_deref()
}
}
impl std::fmt::Debug for PutBackupVaultNotificationsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PutBackupVaultNotificationsInput");
formatter.field("backup_vault_name", &self.backup_vault_name);
formatter.field("sns_topic_arn", &self.sns_topic_arn);
formatter.field("backup_vault_events", &self.backup_vault_events);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PutBackupVaultLockConfigurationInput {
pub backup_vault_name: std::option::Option<std::string::String>,
pub min_retention_days: std::option::Option<i64>,
pub max_retention_days: std::option::Option<i64>,
pub changeable_for_days: std::option::Option<i64>,
}
impl PutBackupVaultLockConfigurationInput {
pub fn backup_vault_name(&self) -> std::option::Option<&str> {
self.backup_vault_name.as_deref()
}
pub fn min_retention_days(&self) -> std::option::Option<i64> {
self.min_retention_days
}
pub fn max_retention_days(&self) -> std::option::Option<i64> {
self.max_retention_days
}
pub fn changeable_for_days(&self) -> std::option::Option<i64> {
self.changeable_for_days
}
}
impl std::fmt::Debug for PutBackupVaultLockConfigurationInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PutBackupVaultLockConfigurationInput");
formatter.field("backup_vault_name", &self.backup_vault_name);
formatter.field("min_retention_days", &self.min_retention_days);
formatter.field("max_retention_days", &self.max_retention_days);
formatter.field("changeable_for_days", &self.changeable_for_days);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PutBackupVaultAccessPolicyInput {
pub backup_vault_name: std::option::Option<std::string::String>,
pub policy: std::option::Option<std::string::String>,
}
impl PutBackupVaultAccessPolicyInput {
pub fn backup_vault_name(&self) -> std::option::Option<&str> {
self.backup_vault_name.as_deref()
}
pub fn policy(&self) -> std::option::Option<&str> {
self.policy.as_deref()
}
}
impl std::fmt::Debug for PutBackupVaultAccessPolicyInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PutBackupVaultAccessPolicyInput");
formatter.field("backup_vault_name", &self.backup_vault_name);
formatter.field("policy", &self.policy);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListTagsInput {
pub resource_arn: std::option::Option<std::string::String>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListTagsInput {
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
}
}
impl std::fmt::Debug for ListTagsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListTagsInput");
formatter.field("resource_arn", &self.resource_arn);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListRestoreJobsInput {
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
pub by_account_id: std::option::Option<std::string::String>,
pub by_created_before: std::option::Option<aws_smithy_types::DateTime>,
pub by_created_after: std::option::Option<aws_smithy_types::DateTime>,
pub by_status: std::option::Option<crate::model::RestoreJobStatus>,
}
impl ListRestoreJobsInput {
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 by_account_id(&self) -> std::option::Option<&str> {
self.by_account_id.as_deref()
}
pub fn by_created_before(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.by_created_before.as_ref()
}
pub fn by_created_after(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.by_created_after.as_ref()
}
pub fn by_status(&self) -> std::option::Option<&crate::model::RestoreJobStatus> {
self.by_status.as_ref()
}
}
impl std::fmt::Debug for ListRestoreJobsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListRestoreJobsInput");
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.field("by_account_id", &self.by_account_id);
formatter.field("by_created_before", &self.by_created_before);
formatter.field("by_created_after", &self.by_created_after);
formatter.field("by_status", &self.by_status);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListReportPlansInput {
pub max_results: std::option::Option<i32>,
pub next_token: std::option::Option<std::string::String>,
}
impl ListReportPlansInput {
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()
}
}
impl std::fmt::Debug for ListReportPlansInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListReportPlansInput");
formatter.field("max_results", &self.max_results);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListReportJobsInput {
pub by_report_plan_name: std::option::Option<std::string::String>,
pub by_creation_before: std::option::Option<aws_smithy_types::DateTime>,
pub by_creation_after: std::option::Option<aws_smithy_types::DateTime>,
pub by_status: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
pub next_token: std::option::Option<std::string::String>,
}
impl ListReportJobsInput {
pub fn by_report_plan_name(&self) -> std::option::Option<&str> {
self.by_report_plan_name.as_deref()
}
pub fn by_creation_before(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.by_creation_before.as_ref()
}
pub fn by_creation_after(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.by_creation_after.as_ref()
}
pub fn by_status(&self) -> std::option::Option<&str> {
self.by_status.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()
}
}
impl std::fmt::Debug for ListReportJobsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListReportJobsInput");
formatter.field("by_report_plan_name", &self.by_report_plan_name);
formatter.field("by_creation_before", &self.by_creation_before);
formatter.field("by_creation_after", &self.by_creation_after);
formatter.field("by_status", &self.by_status);
formatter.field("max_results", &self.max_results);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListRecoveryPointsByResourceInput {
pub resource_arn: std::option::Option<std::string::String>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListRecoveryPointsByResourceInput {
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
}
}
impl std::fmt::Debug for ListRecoveryPointsByResourceInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListRecoveryPointsByResourceInput");
formatter.field("resource_arn", &self.resource_arn);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListRecoveryPointsByBackupVaultInput {
pub backup_vault_name: std::option::Option<std::string::String>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
pub by_resource_arn: std::option::Option<std::string::String>,
pub by_resource_type: std::option::Option<std::string::String>,
pub by_backup_plan_id: std::option::Option<std::string::String>,
pub by_created_before: std::option::Option<aws_smithy_types::DateTime>,
pub by_created_after: std::option::Option<aws_smithy_types::DateTime>,
}
impl ListRecoveryPointsByBackupVaultInput {
pub fn backup_vault_name(&self) -> std::option::Option<&str> {
self.backup_vault_name.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
}
pub fn by_resource_arn(&self) -> std::option::Option<&str> {
self.by_resource_arn.as_deref()
}
pub fn by_resource_type(&self) -> std::option::Option<&str> {
self.by_resource_type.as_deref()
}
pub fn by_backup_plan_id(&self) -> std::option::Option<&str> {
self.by_backup_plan_id.as_deref()
}
pub fn by_created_before(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.by_created_before.as_ref()
}
pub fn by_created_after(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.by_created_after.as_ref()
}
}
impl std::fmt::Debug for ListRecoveryPointsByBackupVaultInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListRecoveryPointsByBackupVaultInput");
formatter.field("backup_vault_name", &self.backup_vault_name);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.field("by_resource_arn", &self.by_resource_arn);
formatter.field("by_resource_type", &self.by_resource_type);
formatter.field("by_backup_plan_id", &self.by_backup_plan_id);
formatter.field("by_created_before", &self.by_created_before);
formatter.field("by_created_after", &self.by_created_after);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListProtectedResourcesInput {
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListProtectedResourcesInput {
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
}
}
impl std::fmt::Debug for ListProtectedResourcesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListProtectedResourcesInput");
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListFrameworksInput {
pub max_results: std::option::Option<i32>,
pub next_token: std::option::Option<std::string::String>,
}
impl ListFrameworksInput {
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()
}
}
impl std::fmt::Debug for ListFrameworksInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListFrameworksInput");
formatter.field("max_results", &self.max_results);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListCopyJobsInput {
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
pub by_resource_arn: std::option::Option<std::string::String>,
pub by_state: std::option::Option<crate::model::CopyJobState>,
pub by_created_before: std::option::Option<aws_smithy_types::DateTime>,
pub by_created_after: std::option::Option<aws_smithy_types::DateTime>,
pub by_resource_type: std::option::Option<std::string::String>,
pub by_destination_vault_arn: std::option::Option<std::string::String>,
pub by_account_id: std::option::Option<std::string::String>,
}
impl ListCopyJobsInput {
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 by_resource_arn(&self) -> std::option::Option<&str> {
self.by_resource_arn.as_deref()
}
pub fn by_state(&self) -> std::option::Option<&crate::model::CopyJobState> {
self.by_state.as_ref()
}
pub fn by_created_before(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.by_created_before.as_ref()
}
pub fn by_created_after(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.by_created_after.as_ref()
}
pub fn by_resource_type(&self) -> std::option::Option<&str> {
self.by_resource_type.as_deref()
}
pub fn by_destination_vault_arn(&self) -> std::option::Option<&str> {
self.by_destination_vault_arn.as_deref()
}
pub fn by_account_id(&self) -> std::option::Option<&str> {
self.by_account_id.as_deref()
}
}
impl std::fmt::Debug for ListCopyJobsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListCopyJobsInput");
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.field("by_resource_arn", &self.by_resource_arn);
formatter.field("by_state", &self.by_state);
formatter.field("by_created_before", &self.by_created_before);
formatter.field("by_created_after", &self.by_created_after);
formatter.field("by_resource_type", &self.by_resource_type);
formatter.field("by_destination_vault_arn", &self.by_destination_vault_arn);
formatter.field("by_account_id", &self.by_account_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListBackupVaultsInput {
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListBackupVaultsInput {
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
}
}
impl std::fmt::Debug for ListBackupVaultsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListBackupVaultsInput");
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListBackupSelectionsInput {
pub backup_plan_id: std::option::Option<std::string::String>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListBackupSelectionsInput {
pub fn backup_plan_id(&self) -> std::option::Option<&str> {
self.backup_plan_id.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
}
}
impl std::fmt::Debug for ListBackupSelectionsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListBackupSelectionsInput");
formatter.field("backup_plan_id", &self.backup_plan_id);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListBackupPlanVersionsInput {
pub backup_plan_id: std::option::Option<std::string::String>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListBackupPlanVersionsInput {
pub fn backup_plan_id(&self) -> std::option::Option<&str> {
self.backup_plan_id.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
}
}
impl std::fmt::Debug for ListBackupPlanVersionsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListBackupPlanVersionsInput");
formatter.field("backup_plan_id", &self.backup_plan_id);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListBackupPlanTemplatesInput {
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListBackupPlanTemplatesInput {
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
}
}
impl std::fmt::Debug for ListBackupPlanTemplatesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListBackupPlanTemplatesInput");
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListBackupPlansInput {
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
pub include_deleted: std::option::Option<bool>,
}
impl ListBackupPlansInput {
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_deleted(&self) -> std::option::Option<bool> {
self.include_deleted
}
}
impl std::fmt::Debug for ListBackupPlansInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListBackupPlansInput");
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.field("include_deleted", &self.include_deleted);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListBackupJobsInput {
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
pub by_resource_arn: std::option::Option<std::string::String>,
pub by_state: std::option::Option<crate::model::BackupJobState>,
pub by_backup_vault_name: std::option::Option<std::string::String>,
pub by_created_before: std::option::Option<aws_smithy_types::DateTime>,
pub by_created_after: std::option::Option<aws_smithy_types::DateTime>,
pub by_resource_type: std::option::Option<std::string::String>,
pub by_account_id: std::option::Option<std::string::String>,
}
impl ListBackupJobsInput {
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 by_resource_arn(&self) -> std::option::Option<&str> {
self.by_resource_arn.as_deref()
}
pub fn by_state(&self) -> std::option::Option<&crate::model::BackupJobState> {
self.by_state.as_ref()
}
pub fn by_backup_vault_name(&self) -> std::option::Option<&str> {
self.by_backup_vault_name.as_deref()
}
pub fn by_created_before(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.by_created_before.as_ref()
}
pub fn by_created_after(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.by_created_after.as_ref()
}
pub fn by_resource_type(&self) -> std::option::Option<&str> {
self.by_resource_type.as_deref()
}
pub fn by_account_id(&self) -> std::option::Option<&str> {
self.by_account_id.as_deref()
}
}
impl std::fmt::Debug for ListBackupJobsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListBackupJobsInput");
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.field("by_resource_arn", &self.by_resource_arn);
formatter.field("by_state", &self.by_state);
formatter.field("by_backup_vault_name", &self.by_backup_vault_name);
formatter.field("by_created_before", &self.by_created_before);
formatter.field("by_created_after", &self.by_created_after);
formatter.field("by_resource_type", &self.by_resource_type);
formatter.field("by_account_id", &self.by_account_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetSupportedResourceTypesInput {}
impl std::fmt::Debug for GetSupportedResourceTypesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetSupportedResourceTypesInput");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetRecoveryPointRestoreMetadataInput {
pub backup_vault_name: std::option::Option<std::string::String>,
pub recovery_point_arn: std::option::Option<std::string::String>,
}
impl GetRecoveryPointRestoreMetadataInput {
pub fn backup_vault_name(&self) -> std::option::Option<&str> {
self.backup_vault_name.as_deref()
}
pub fn recovery_point_arn(&self) -> std::option::Option<&str> {
self.recovery_point_arn.as_deref()
}
}
impl std::fmt::Debug for GetRecoveryPointRestoreMetadataInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetRecoveryPointRestoreMetadataInput");
formatter.field("backup_vault_name", &self.backup_vault_name);
formatter.field("recovery_point_arn", &self.recovery_point_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetBackupVaultNotificationsInput {
pub backup_vault_name: std::option::Option<std::string::String>,
}
impl GetBackupVaultNotificationsInput {
pub fn backup_vault_name(&self) -> std::option::Option<&str> {
self.backup_vault_name.as_deref()
}
}
impl std::fmt::Debug for GetBackupVaultNotificationsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetBackupVaultNotificationsInput");
formatter.field("backup_vault_name", &self.backup_vault_name);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetBackupVaultAccessPolicyInput {
pub backup_vault_name: std::option::Option<std::string::String>,
}
impl GetBackupVaultAccessPolicyInput {
pub fn backup_vault_name(&self) -> std::option::Option<&str> {
self.backup_vault_name.as_deref()
}
}
impl std::fmt::Debug for GetBackupVaultAccessPolicyInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetBackupVaultAccessPolicyInput");
formatter.field("backup_vault_name", &self.backup_vault_name);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetBackupSelectionInput {
pub backup_plan_id: std::option::Option<std::string::String>,
pub selection_id: std::option::Option<std::string::String>,
}
impl GetBackupSelectionInput {
pub fn backup_plan_id(&self) -> std::option::Option<&str> {
self.backup_plan_id.as_deref()
}
pub fn selection_id(&self) -> std::option::Option<&str> {
self.selection_id.as_deref()
}
}
impl std::fmt::Debug for GetBackupSelectionInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetBackupSelectionInput");
formatter.field("backup_plan_id", &self.backup_plan_id);
formatter.field("selection_id", &self.selection_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetBackupPlanFromTemplateInput {
pub backup_plan_template_id: std::option::Option<std::string::String>,
}
impl GetBackupPlanFromTemplateInput {
pub fn backup_plan_template_id(&self) -> std::option::Option<&str> {
self.backup_plan_template_id.as_deref()
}
}
impl std::fmt::Debug for GetBackupPlanFromTemplateInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetBackupPlanFromTemplateInput");
formatter.field("backup_plan_template_id", &self.backup_plan_template_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetBackupPlanFromJsonInput {
pub backup_plan_template_json: std::option::Option<std::string::String>,
}
impl GetBackupPlanFromJsonInput {
pub fn backup_plan_template_json(&self) -> std::option::Option<&str> {
self.backup_plan_template_json.as_deref()
}
}
impl std::fmt::Debug for GetBackupPlanFromJsonInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetBackupPlanFromJsonInput");
formatter.field("backup_plan_template_json", &self.backup_plan_template_json);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetBackupPlanInput {
pub backup_plan_id: std::option::Option<std::string::String>,
pub version_id: std::option::Option<std::string::String>,
}
impl GetBackupPlanInput {
pub fn backup_plan_id(&self) -> std::option::Option<&str> {
self.backup_plan_id.as_deref()
}
pub fn version_id(&self) -> std::option::Option<&str> {
self.version_id.as_deref()
}
}
impl std::fmt::Debug for GetBackupPlanInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetBackupPlanInput");
formatter.field("backup_plan_id", &self.backup_plan_id);
formatter.field("version_id", &self.version_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ExportBackupPlanTemplateInput {
pub backup_plan_id: std::option::Option<std::string::String>,
}
impl ExportBackupPlanTemplateInput {
pub fn backup_plan_id(&self) -> std::option::Option<&str> {
self.backup_plan_id.as_deref()
}
}
impl std::fmt::Debug for ExportBackupPlanTemplateInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ExportBackupPlanTemplateInput");
formatter.field("backup_plan_id", &self.backup_plan_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DisassociateRecoveryPointInput {
pub backup_vault_name: std::option::Option<std::string::String>,
pub recovery_point_arn: std::option::Option<std::string::String>,
}
impl DisassociateRecoveryPointInput {
pub fn backup_vault_name(&self) -> std::option::Option<&str> {
self.backup_vault_name.as_deref()
}
pub fn recovery_point_arn(&self) -> std::option::Option<&str> {
self.recovery_point_arn.as_deref()
}
}
impl std::fmt::Debug for DisassociateRecoveryPointInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DisassociateRecoveryPointInput");
formatter.field("backup_vault_name", &self.backup_vault_name);
formatter.field("recovery_point_arn", &self.recovery_point_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeRestoreJobInput {
pub restore_job_id: std::option::Option<std::string::String>,
}
impl DescribeRestoreJobInput {
pub fn restore_job_id(&self) -> std::option::Option<&str> {
self.restore_job_id.as_deref()
}
}
impl std::fmt::Debug for DescribeRestoreJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeRestoreJobInput");
formatter.field("restore_job_id", &self.restore_job_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeReportPlanInput {
pub report_plan_name: std::option::Option<std::string::String>,
}
impl DescribeReportPlanInput {
pub fn report_plan_name(&self) -> std::option::Option<&str> {
self.report_plan_name.as_deref()
}
}
impl std::fmt::Debug for DescribeReportPlanInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeReportPlanInput");
formatter.field("report_plan_name", &self.report_plan_name);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeReportJobInput {
pub report_job_id: std::option::Option<std::string::String>,
}
impl DescribeReportJobInput {
pub fn report_job_id(&self) -> std::option::Option<&str> {
self.report_job_id.as_deref()
}
}
impl std::fmt::Debug for DescribeReportJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeReportJobInput");
formatter.field("report_job_id", &self.report_job_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeRegionSettingsInput {}
impl std::fmt::Debug for DescribeRegionSettingsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeRegionSettingsInput");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeRecoveryPointInput {
pub backup_vault_name: std::option::Option<std::string::String>,
pub recovery_point_arn: std::option::Option<std::string::String>,
}
impl DescribeRecoveryPointInput {
pub fn backup_vault_name(&self) -> std::option::Option<&str> {
self.backup_vault_name.as_deref()
}
pub fn recovery_point_arn(&self) -> std::option::Option<&str> {
self.recovery_point_arn.as_deref()
}
}
impl std::fmt::Debug for DescribeRecoveryPointInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeRecoveryPointInput");
formatter.field("backup_vault_name", &self.backup_vault_name);
formatter.field("recovery_point_arn", &self.recovery_point_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeProtectedResourceInput {
pub resource_arn: std::option::Option<std::string::String>,
}
impl DescribeProtectedResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
}
impl std::fmt::Debug for DescribeProtectedResourceInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeProtectedResourceInput");
formatter.field("resource_arn", &self.resource_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeGlobalSettingsInput {}
impl std::fmt::Debug for DescribeGlobalSettingsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeGlobalSettingsInput");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeFrameworkInput {
pub framework_name: std::option::Option<std::string::String>,
}
impl DescribeFrameworkInput {
pub fn framework_name(&self) -> std::option::Option<&str> {
self.framework_name.as_deref()
}
}
impl std::fmt::Debug for DescribeFrameworkInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeFrameworkInput");
formatter.field("framework_name", &self.framework_name);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeCopyJobInput {
pub copy_job_id: std::option::Option<std::string::String>,
}
impl DescribeCopyJobInput {
pub fn copy_job_id(&self) -> std::option::Option<&str> {
self.copy_job_id.as_deref()
}
}
impl std::fmt::Debug for DescribeCopyJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeCopyJobInput");
formatter.field("copy_job_id", &self.copy_job_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeBackupVaultInput {
pub backup_vault_name: std::option::Option<std::string::String>,
}
impl DescribeBackupVaultInput {
pub fn backup_vault_name(&self) -> std::option::Option<&str> {
self.backup_vault_name.as_deref()
}
}
impl std::fmt::Debug for DescribeBackupVaultInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeBackupVaultInput");
formatter.field("backup_vault_name", &self.backup_vault_name);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeBackupJobInput {
pub backup_job_id: std::option::Option<std::string::String>,
}
impl DescribeBackupJobInput {
pub fn backup_job_id(&self) -> std::option::Option<&str> {
self.backup_job_id.as_deref()
}
}
impl std::fmt::Debug for DescribeBackupJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeBackupJobInput");
formatter.field("backup_job_id", &self.backup_job_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteReportPlanInput {
pub report_plan_name: std::option::Option<std::string::String>,
}
impl DeleteReportPlanInput {
pub fn report_plan_name(&self) -> std::option::Option<&str> {
self.report_plan_name.as_deref()
}
}
impl std::fmt::Debug for DeleteReportPlanInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteReportPlanInput");
formatter.field("report_plan_name", &self.report_plan_name);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteRecoveryPointInput {
pub backup_vault_name: std::option::Option<std::string::String>,
pub recovery_point_arn: std::option::Option<std::string::String>,
}
impl DeleteRecoveryPointInput {
pub fn backup_vault_name(&self) -> std::option::Option<&str> {
self.backup_vault_name.as_deref()
}
pub fn recovery_point_arn(&self) -> std::option::Option<&str> {
self.recovery_point_arn.as_deref()
}
}
impl std::fmt::Debug for DeleteRecoveryPointInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteRecoveryPointInput");
formatter.field("backup_vault_name", &self.backup_vault_name);
formatter.field("recovery_point_arn", &self.recovery_point_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteFrameworkInput {
pub framework_name: std::option::Option<std::string::String>,
}
impl DeleteFrameworkInput {
pub fn framework_name(&self) -> std::option::Option<&str> {
self.framework_name.as_deref()
}
}
impl std::fmt::Debug for DeleteFrameworkInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteFrameworkInput");
formatter.field("framework_name", &self.framework_name);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteBackupVaultNotificationsInput {
pub backup_vault_name: std::option::Option<std::string::String>,
}
impl DeleteBackupVaultNotificationsInput {
pub fn backup_vault_name(&self) -> std::option::Option<&str> {
self.backup_vault_name.as_deref()
}
}
impl std::fmt::Debug for DeleteBackupVaultNotificationsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteBackupVaultNotificationsInput");
formatter.field("backup_vault_name", &self.backup_vault_name);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteBackupVaultLockConfigurationInput {
pub backup_vault_name: std::option::Option<std::string::String>,
}
impl DeleteBackupVaultLockConfigurationInput {
pub fn backup_vault_name(&self) -> std::option::Option<&str> {
self.backup_vault_name.as_deref()
}
}
impl std::fmt::Debug for DeleteBackupVaultLockConfigurationInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteBackupVaultLockConfigurationInput");
formatter.field("backup_vault_name", &self.backup_vault_name);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteBackupVaultAccessPolicyInput {
pub backup_vault_name: std::option::Option<std::string::String>,
}
impl DeleteBackupVaultAccessPolicyInput {
pub fn backup_vault_name(&self) -> std::option::Option<&str> {
self.backup_vault_name.as_deref()
}
}
impl std::fmt::Debug for DeleteBackupVaultAccessPolicyInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteBackupVaultAccessPolicyInput");
formatter.field("backup_vault_name", &self.backup_vault_name);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteBackupVaultInput {
pub backup_vault_name: std::option::Option<std::string::String>,
}
impl DeleteBackupVaultInput {
pub fn backup_vault_name(&self) -> std::option::Option<&str> {
self.backup_vault_name.as_deref()
}
}
impl std::fmt::Debug for DeleteBackupVaultInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteBackupVaultInput");
formatter.field("backup_vault_name", &self.backup_vault_name);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteBackupSelectionInput {
pub backup_plan_id: std::option::Option<std::string::String>,
pub selection_id: std::option::Option<std::string::String>,
}
impl DeleteBackupSelectionInput {
pub fn backup_plan_id(&self) -> std::option::Option<&str> {
self.backup_plan_id.as_deref()
}
pub fn selection_id(&self) -> std::option::Option<&str> {
self.selection_id.as_deref()
}
}
impl std::fmt::Debug for DeleteBackupSelectionInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteBackupSelectionInput");
formatter.field("backup_plan_id", &self.backup_plan_id);
formatter.field("selection_id", &self.selection_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteBackupPlanInput {
pub backup_plan_id: std::option::Option<std::string::String>,
}
impl DeleteBackupPlanInput {
pub fn backup_plan_id(&self) -> std::option::Option<&str> {
self.backup_plan_id.as_deref()
}
}
impl std::fmt::Debug for DeleteBackupPlanInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteBackupPlanInput");
formatter.field("backup_plan_id", &self.backup_plan_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateReportPlanInput {
pub report_plan_name: std::option::Option<std::string::String>,
pub report_plan_description: std::option::Option<std::string::String>,
pub report_delivery_channel: std::option::Option<crate::model::ReportDeliveryChannel>,
pub report_setting: std::option::Option<crate::model::ReportSetting>,
pub report_plan_tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
pub idempotency_token: std::option::Option<std::string::String>,
}
impl CreateReportPlanInput {
pub fn report_plan_name(&self) -> std::option::Option<&str> {
self.report_plan_name.as_deref()
}
pub fn report_plan_description(&self) -> std::option::Option<&str> {
self.report_plan_description.as_deref()
}
pub fn report_delivery_channel(
&self,
) -> std::option::Option<&crate::model::ReportDeliveryChannel> {
self.report_delivery_channel.as_ref()
}
pub fn report_setting(&self) -> std::option::Option<&crate::model::ReportSetting> {
self.report_setting.as_ref()
}
pub fn report_plan_tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.report_plan_tags.as_ref()
}
pub fn idempotency_token(&self) -> std::option::Option<&str> {
self.idempotency_token.as_deref()
}
}
impl std::fmt::Debug for CreateReportPlanInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateReportPlanInput");
formatter.field("report_plan_name", &self.report_plan_name);
formatter.field("report_plan_description", &self.report_plan_description);
formatter.field("report_delivery_channel", &self.report_delivery_channel);
formatter.field("report_setting", &self.report_setting);
formatter.field("report_plan_tags", &self.report_plan_tags);
formatter.field("idempotency_token", &self.idempotency_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateFrameworkInput {
pub framework_name: std::option::Option<std::string::String>,
pub framework_description: std::option::Option<std::string::String>,
pub framework_controls: std::option::Option<std::vec::Vec<crate::model::FrameworkControl>>,
pub idempotency_token: std::option::Option<std::string::String>,
pub framework_tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl CreateFrameworkInput {
pub fn framework_name(&self) -> std::option::Option<&str> {
self.framework_name.as_deref()
}
pub fn framework_description(&self) -> std::option::Option<&str> {
self.framework_description.as_deref()
}
pub fn framework_controls(&self) -> std::option::Option<&[crate::model::FrameworkControl]> {
self.framework_controls.as_deref()
}
pub fn idempotency_token(&self) -> std::option::Option<&str> {
self.idempotency_token.as_deref()
}
pub fn framework_tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.framework_tags.as_ref()
}
}
impl std::fmt::Debug for CreateFrameworkInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateFrameworkInput");
formatter.field("framework_name", &self.framework_name);
formatter.field("framework_description", &self.framework_description);
formatter.field("framework_controls", &self.framework_controls);
formatter.field("idempotency_token", &self.idempotency_token);
formatter.field("framework_tags", &self.framework_tags);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateBackupVaultInput {
pub backup_vault_name: std::option::Option<std::string::String>,
pub backup_vault_tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
pub encryption_key_arn: std::option::Option<std::string::String>,
pub creator_request_id: std::option::Option<std::string::String>,
}
impl CreateBackupVaultInput {
pub fn backup_vault_name(&self) -> std::option::Option<&str> {
self.backup_vault_name.as_deref()
}
pub fn backup_vault_tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.backup_vault_tags.as_ref()
}
pub fn encryption_key_arn(&self) -> std::option::Option<&str> {
self.encryption_key_arn.as_deref()
}
pub fn creator_request_id(&self) -> std::option::Option<&str> {
self.creator_request_id.as_deref()
}
}
impl std::fmt::Debug for CreateBackupVaultInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateBackupVaultInput");
formatter.field("backup_vault_name", &self.backup_vault_name);
formatter.field("backup_vault_tags", &"*** Sensitive Data Redacted ***");
formatter.field("encryption_key_arn", &self.encryption_key_arn);
formatter.field("creator_request_id", &self.creator_request_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateBackupSelectionInput {
pub backup_plan_id: std::option::Option<std::string::String>,
pub backup_selection: std::option::Option<crate::model::BackupSelection>,
pub creator_request_id: std::option::Option<std::string::String>,
}
impl CreateBackupSelectionInput {
pub fn backup_plan_id(&self) -> std::option::Option<&str> {
self.backup_plan_id.as_deref()
}
pub fn backup_selection(&self) -> std::option::Option<&crate::model::BackupSelection> {
self.backup_selection.as_ref()
}
pub fn creator_request_id(&self) -> std::option::Option<&str> {
self.creator_request_id.as_deref()
}
}
impl std::fmt::Debug for CreateBackupSelectionInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateBackupSelectionInput");
formatter.field("backup_plan_id", &self.backup_plan_id);
formatter.field("backup_selection", &self.backup_selection);
formatter.field("creator_request_id", &self.creator_request_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateBackupPlanInput {
pub backup_plan: std::option::Option<crate::model::BackupPlanInput>,
pub backup_plan_tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
pub creator_request_id: std::option::Option<std::string::String>,
}
impl CreateBackupPlanInput {
pub fn backup_plan(&self) -> std::option::Option<&crate::model::BackupPlanInput> {
self.backup_plan.as_ref()
}
pub fn backup_plan_tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.backup_plan_tags.as_ref()
}
pub fn creator_request_id(&self) -> std::option::Option<&str> {
self.creator_request_id.as_deref()
}
}
impl std::fmt::Debug for CreateBackupPlanInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateBackupPlanInput");
formatter.field("backup_plan", &self.backup_plan);
formatter.field("backup_plan_tags", &"*** Sensitive Data Redacted ***");
formatter.field("creator_request_id", &self.creator_request_id);
formatter.finish()
}
}