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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A value that specifies whether to delete all child volumes and snapshots. </p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DeleteVolumeOpenZfsConfiguration {
    /// <p>To delete the volume's child volumes, snapshots, and clones, use the string <code>DELETE_CHILD_VOLUMES_AND_SNAPSHOTS</code>.</p>
    pub options: ::std::option::Option<::std::vec::Vec<crate::types::DeleteOpenZfsVolumeOption>>,
}
impl DeleteVolumeOpenZfsConfiguration {
    /// <p>To delete the volume's child volumes, snapshots, and clones, use the string <code>DELETE_CHILD_VOLUMES_AND_SNAPSHOTS</code>.</p>
    pub fn options(&self) -> ::std::option::Option<&[crate::types::DeleteOpenZfsVolumeOption]> {
        self.options.as_deref()
    }
}
impl DeleteVolumeOpenZfsConfiguration {
    /// Creates a new builder-style object to manufacture [`DeleteVolumeOpenZfsConfiguration`](crate::types::DeleteVolumeOpenZfsConfiguration).
    pub fn builder() -> crate::types::builders::DeleteVolumeOpenZfsConfigurationBuilder {
        crate::types::builders::DeleteVolumeOpenZfsConfigurationBuilder::default()
    }
}

/// A builder for [`DeleteVolumeOpenZfsConfiguration`](crate::types::DeleteVolumeOpenZfsConfiguration).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct DeleteVolumeOpenZfsConfigurationBuilder {
    pub(crate) options: ::std::option::Option<::std::vec::Vec<crate::types::DeleteOpenZfsVolumeOption>>,
}
impl DeleteVolumeOpenZfsConfigurationBuilder {
    /// Appends an item to `options`.
    ///
    /// To override the contents of this collection use [`set_options`](Self::set_options).
    ///
    /// <p>To delete the volume's child volumes, snapshots, and clones, use the string <code>DELETE_CHILD_VOLUMES_AND_SNAPSHOTS</code>.</p>
    pub fn options(mut self, input: crate::types::DeleteOpenZfsVolumeOption) -> Self {
        let mut v = self.options.unwrap_or_default();
        v.push(input);
        self.options = ::std::option::Option::Some(v);
        self
    }
    /// <p>To delete the volume's child volumes, snapshots, and clones, use the string <code>DELETE_CHILD_VOLUMES_AND_SNAPSHOTS</code>.</p>
    pub fn set_options(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DeleteOpenZfsVolumeOption>>) -> Self {
        self.options = input;
        self
    }
    /// <p>To delete the volume's child volumes, snapshots, and clones, use the string <code>DELETE_CHILD_VOLUMES_AND_SNAPSHOTS</code>.</p>
    pub fn get_options(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DeleteOpenZfsVolumeOption>> {
        &self.options
    }
    /// Consumes the builder and constructs a [`DeleteVolumeOpenZfsConfiguration`](crate::types::DeleteVolumeOpenZfsConfiguration).
    pub fn build(self) -> crate::types::DeleteVolumeOpenZfsConfiguration {
        crate::types::DeleteVolumeOpenZfsConfiguration { options: self.options }
    }
}