aws_sdk_fsx/operation/delete_backup/
_delete_backup_input.rs

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