1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The request object for the <code>DeleteBackup</code> operation.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteBackupInput {
/// <p>The ID of the backup that you want to delete.</p>
#[doc(hidden)]
pub backup_id: std::option::Option<std::string::String>,
/// <p>A string of up to 63 ASCII characters that Amazon FSx uses to ensure idempotent deletion. This parameter is automatically filled on your behalf when using the CLI or SDK.</p>
#[doc(hidden)]
pub client_request_token: std::option::Option<std::string::String>,
}
impl DeleteBackupInput {
/// <p>The ID of the backup that you want to delete.</p>
pub fn backup_id(&self) -> std::option::Option<&str> {
self.backup_id.as_deref()
}
/// <p>A string of up to 63 ASCII characters that Amazon FSx uses to ensure idempotent deletion. This parameter is automatically filled on your behalf when using the CLI or SDK.</p>
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
}
impl DeleteBackupInput {
/// Creates a new builder-style object to manufacture [`DeleteBackupInput`](crate::operation::delete_backup::DeleteBackupInput).
pub fn builder() -> crate::operation::delete_backup::builders::DeleteBackupInputBuilder {
crate::operation::delete_backup::builders::DeleteBackupInputBuilder::default()
}
}
/// A builder for [`DeleteBackupInput`](crate::operation::delete_backup::DeleteBackupInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct DeleteBackupInputBuilder {
pub(crate) backup_id: std::option::Option<std::string::String>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
}
impl DeleteBackupInputBuilder {
/// <p>The ID of the backup that you want to delete.</p>
pub fn backup_id(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_id = Some(input.into());
self
}
/// <p>The ID of the backup that you want to delete.</p>
pub fn set_backup_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.backup_id = input;
self
}
/// <p>A string of up to 63 ASCII characters that Amazon FSx uses to ensure idempotent deletion. This parameter is automatically filled on your behalf when using the CLI or SDK.</p>
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
/// <p>A string of up to 63 ASCII characters that Amazon FSx uses to ensure idempotent deletion. This parameter is automatically filled on your behalf when using the CLI or SDK.</p>
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
/// Consumes the builder and constructs a [`DeleteBackupInput`](crate::operation::delete_backup::DeleteBackupInput).
pub fn build(
self,
) -> Result<
crate::operation::delete_backup::DeleteBackupInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::operation::delete_backup::DeleteBackupInput {
backup_id: self.backup_id,
client_request_token: self.client_request_token,
})
}
}