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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The snapshot configuration used when creating an Amazon FSx for OpenZFS volume from a snapshot.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct OpenZfsOriginSnapshotConfiguration {
    /// <p>The Amazon Resource Name (ARN) for a given resource. ARNs uniquely identify Amazon Web Services resources. We require an ARN when you need to specify a resource unambiguously across all of Amazon Web Services. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i>.</p>
    pub snapshot_arn: ::std::option::Option<::std::string::String>,
    /// <p>The strategy used when copying data from the snapshot to the new volume.</p>
    /// <ul>
    /// <li>
    /// <p><code>CLONE</code> - The new volume references the data in the origin snapshot. Cloning a snapshot is faster than copying the data from a snapshot to a new volume and doesn't consume disk throughput. However, the origin snapshot can't be deleted if there is a volume using its copied data.</p></li>
    /// <li>
    /// <p><code>FULL_COPY</code> - Copies all data from the snapshot to the new volume.</p></li>
    /// </ul><note>
    /// <p>The <code>INCREMENTAL_COPY</code> option is only for updating an existing volume by using a snapshot from another FSx for OpenZFS file system. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/APIReference/API_CopySnapshotAndUpdateVolume.html">CopySnapshotAndUpdateVolume</a>.</p>
    /// </note>
    pub copy_strategy: ::std::option::Option<crate::types::OpenZfsCopyStrategy>,
}
impl OpenZfsOriginSnapshotConfiguration {
    /// <p>The Amazon Resource Name (ARN) for a given resource. ARNs uniquely identify Amazon Web Services resources. We require an ARN when you need to specify a resource unambiguously across all of Amazon Web Services. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i>.</p>
    pub fn snapshot_arn(&self) -> ::std::option::Option<&str> {
        self.snapshot_arn.as_deref()
    }
    /// <p>The strategy used when copying data from the snapshot to the new volume.</p>
    /// <ul>
    /// <li>
    /// <p><code>CLONE</code> - The new volume references the data in the origin snapshot. Cloning a snapshot is faster than copying the data from a snapshot to a new volume and doesn't consume disk throughput. However, the origin snapshot can't be deleted if there is a volume using its copied data.</p></li>
    /// <li>
    /// <p><code>FULL_COPY</code> - Copies all data from the snapshot to the new volume.</p></li>
    /// </ul><note>
    /// <p>The <code>INCREMENTAL_COPY</code> option is only for updating an existing volume by using a snapshot from another FSx for OpenZFS file system. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/APIReference/API_CopySnapshotAndUpdateVolume.html">CopySnapshotAndUpdateVolume</a>.</p>
    /// </note>
    pub fn copy_strategy(&self) -> ::std::option::Option<&crate::types::OpenZfsCopyStrategy> {
        self.copy_strategy.as_ref()
    }
}
impl OpenZfsOriginSnapshotConfiguration {
    /// Creates a new builder-style object to manufacture [`OpenZfsOriginSnapshotConfiguration`](crate::types::OpenZfsOriginSnapshotConfiguration).
    pub fn builder() -> crate::types::builders::OpenZfsOriginSnapshotConfigurationBuilder {
        crate::types::builders::OpenZfsOriginSnapshotConfigurationBuilder::default()
    }
}

/// A builder for [`OpenZfsOriginSnapshotConfiguration`](crate::types::OpenZfsOriginSnapshotConfiguration).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct OpenZfsOriginSnapshotConfigurationBuilder {
    pub(crate) snapshot_arn: ::std::option::Option<::std::string::String>,
    pub(crate) copy_strategy: ::std::option::Option<crate::types::OpenZfsCopyStrategy>,
}
impl OpenZfsOriginSnapshotConfigurationBuilder {
    /// <p>The Amazon Resource Name (ARN) for a given resource. ARNs uniquely identify Amazon Web Services resources. We require an ARN when you need to specify a resource unambiguously across all of Amazon Web Services. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i>.</p>
    pub fn snapshot_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.snapshot_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) for a given resource. ARNs uniquely identify Amazon Web Services resources. We require an ARN when you need to specify a resource unambiguously across all of Amazon Web Services. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i>.</p>
    pub fn set_snapshot_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.snapshot_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) for a given resource. ARNs uniquely identify Amazon Web Services resources. We require an ARN when you need to specify a resource unambiguously across all of Amazon Web Services. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i>.</p>
    pub fn get_snapshot_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.snapshot_arn
    }
    /// <p>The strategy used when copying data from the snapshot to the new volume.</p>
    /// <ul>
    /// <li>
    /// <p><code>CLONE</code> - The new volume references the data in the origin snapshot. Cloning a snapshot is faster than copying the data from a snapshot to a new volume and doesn't consume disk throughput. However, the origin snapshot can't be deleted if there is a volume using its copied data.</p></li>
    /// <li>
    /// <p><code>FULL_COPY</code> - Copies all data from the snapshot to the new volume.</p></li>
    /// </ul><note>
    /// <p>The <code>INCREMENTAL_COPY</code> option is only for updating an existing volume by using a snapshot from another FSx for OpenZFS file system. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/APIReference/API_CopySnapshotAndUpdateVolume.html">CopySnapshotAndUpdateVolume</a>.</p>
    /// </note>
    pub fn copy_strategy(mut self, input: crate::types::OpenZfsCopyStrategy) -> Self {
        self.copy_strategy = ::std::option::Option::Some(input);
        self
    }
    /// <p>The strategy used when copying data from the snapshot to the new volume.</p>
    /// <ul>
    /// <li>
    /// <p><code>CLONE</code> - The new volume references the data in the origin snapshot. Cloning a snapshot is faster than copying the data from a snapshot to a new volume and doesn't consume disk throughput. However, the origin snapshot can't be deleted if there is a volume using its copied data.</p></li>
    /// <li>
    /// <p><code>FULL_COPY</code> - Copies all data from the snapshot to the new volume.</p></li>
    /// </ul><note>
    /// <p>The <code>INCREMENTAL_COPY</code> option is only for updating an existing volume by using a snapshot from another FSx for OpenZFS file system. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/APIReference/API_CopySnapshotAndUpdateVolume.html">CopySnapshotAndUpdateVolume</a>.</p>
    /// </note>
    pub fn set_copy_strategy(mut self, input: ::std::option::Option<crate::types::OpenZfsCopyStrategy>) -> Self {
        self.copy_strategy = input;
        self
    }
    /// <p>The strategy used when copying data from the snapshot to the new volume.</p>
    /// <ul>
    /// <li>
    /// <p><code>CLONE</code> - The new volume references the data in the origin snapshot. Cloning a snapshot is faster than copying the data from a snapshot to a new volume and doesn't consume disk throughput. However, the origin snapshot can't be deleted if there is a volume using its copied data.</p></li>
    /// <li>
    /// <p><code>FULL_COPY</code> - Copies all data from the snapshot to the new volume.</p></li>
    /// </ul><note>
    /// <p>The <code>INCREMENTAL_COPY</code> option is only for updating an existing volume by using a snapshot from another FSx for OpenZFS file system. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/APIReference/API_CopySnapshotAndUpdateVolume.html">CopySnapshotAndUpdateVolume</a>.</p>
    /// </note>
    pub fn get_copy_strategy(&self) -> &::std::option::Option<crate::types::OpenZfsCopyStrategy> {
        &self.copy_strategy
    }
    /// Consumes the builder and constructs a [`OpenZfsOriginSnapshotConfiguration`](crate::types::OpenZfsOriginSnapshotConfiguration).
    pub fn build(self) -> crate::types::OpenZfsOriginSnapshotConfiguration {
        crate::types::OpenZfsOriginSnapshotConfiguration {
            snapshot_arn: self.snapshot_arn,
            copy_strategy: self.copy_strategy,
        }
    }
}