aws_sdk_fsx/operation/delete_snapshot/
_delete_snapshot_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeleteSnapshotInput {
6    /// <p>(Optional) An idempotency token for resource creation, in a string of up to 63 ASCII characters. This token is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.</p>
7    pub client_request_token: ::std::option::Option<::std::string::String>,
8    /// <p>The ID of the snapshot that you want to delete.</p>
9    pub snapshot_id: ::std::option::Option<::std::string::String>,
10}
11impl DeleteSnapshotInput {
12    /// <p>(Optional) An idempotency token for resource creation, in a string of up to 63 ASCII characters. This token is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.</p>
13    pub fn client_request_token(&self) -> ::std::option::Option<&str> {
14        self.client_request_token.as_deref()
15    }
16    /// <p>The ID of the snapshot that you want to delete.</p>
17    pub fn snapshot_id(&self) -> ::std::option::Option<&str> {
18        self.snapshot_id.as_deref()
19    }
20}
21impl DeleteSnapshotInput {
22    /// Creates a new builder-style object to manufacture [`DeleteSnapshotInput`](crate::operation::delete_snapshot::DeleteSnapshotInput).
23    pub fn builder() -> crate::operation::delete_snapshot::builders::DeleteSnapshotInputBuilder {
24        crate::operation::delete_snapshot::builders::DeleteSnapshotInputBuilder::default()
25    }
26}
27
28/// A builder for [`DeleteSnapshotInput`](crate::operation::delete_snapshot::DeleteSnapshotInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct DeleteSnapshotInputBuilder {
32    pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
33    pub(crate) snapshot_id: ::std::option::Option<::std::string::String>,
34}
35impl DeleteSnapshotInputBuilder {
36    /// <p>(Optional) An idempotency token for resource creation, in a string of up to 63 ASCII characters. This token is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.</p>
37    pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
38        self.client_request_token = ::std::option::Option::Some(input.into());
39        self
40    }
41    /// <p>(Optional) An idempotency token for resource creation, in a string of up to 63 ASCII characters. This token is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.</p>
42    pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
43        self.client_request_token = input;
44        self
45    }
46    /// <p>(Optional) An idempotency token for resource creation, in a string of up to 63 ASCII characters. This token is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.</p>
47    pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
48        &self.client_request_token
49    }
50    /// <p>The ID of the snapshot that you want to delete.</p>
51    /// This field is required.
52    pub fn snapshot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.snapshot_id = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The ID of the snapshot that you want to delete.</p>
57    pub fn set_snapshot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.snapshot_id = input;
59        self
60    }
61    /// <p>The ID of the snapshot that you want to delete.</p>
62    pub fn get_snapshot_id(&self) -> &::std::option::Option<::std::string::String> {
63        &self.snapshot_id
64    }
65    /// Consumes the builder and constructs a [`DeleteSnapshotInput`](crate::operation::delete_snapshot::DeleteSnapshotInput).
66    pub fn build(
67        self,
68    ) -> ::std::result::Result<crate::operation::delete_snapshot::DeleteSnapshotInput, ::aws_smithy_types::error::operation::BuildError> {
69        ::std::result::Result::Ok(crate::operation::delete_snapshot::DeleteSnapshotInput {
70            client_request_token: self.client_request_token,
71            snapshot_id: self.snapshot_id,
72        })
73    }
74}