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

/// <p>The size and type of temporary storage that is used to hold data during the savedown process. All the data written to this storage space is lost when the cluster node is restarted.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct KxSavedownStorageConfiguration {
    /// <p>The type of writeable storage space for temporarily storing your savedown data. The valid values are:</p>
    /// <ul>
    /// <li> <p>SDS01 – This type represents 3000 IOPS and io2 ebs volume type.</p> </li>
    /// </ul>
    pub r#type: crate::types::KxSavedownStorageType,
    /// <p>The size of temporary storage in gibibytes.</p>
    pub size: i32,
}
impl KxSavedownStorageConfiguration {
    /// <p>The type of writeable storage space for temporarily storing your savedown data. The valid values are:</p>
    /// <ul>
    /// <li> <p>SDS01 – This type represents 3000 IOPS and io2 ebs volume type.</p> </li>
    /// </ul>
    pub fn r#type(&self) -> &crate::types::KxSavedownStorageType {
        &self.r#type
    }
    /// <p>The size of temporary storage in gibibytes.</p>
    pub fn size(&self) -> i32 {
        self.size
    }
}
impl KxSavedownStorageConfiguration {
    /// Creates a new builder-style object to manufacture [`KxSavedownStorageConfiguration`](crate::types::KxSavedownStorageConfiguration).
    pub fn builder() -> crate::types::builders::KxSavedownStorageConfigurationBuilder {
        crate::types::builders::KxSavedownStorageConfigurationBuilder::default()
    }
}

/// A builder for [`KxSavedownStorageConfiguration`](crate::types::KxSavedownStorageConfiguration).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct KxSavedownStorageConfigurationBuilder {
    pub(crate) r#type: ::std::option::Option<crate::types::KxSavedownStorageType>,
    pub(crate) size: ::std::option::Option<i32>,
}
impl KxSavedownStorageConfigurationBuilder {
    /// <p>The type of writeable storage space for temporarily storing your savedown data. The valid values are:</p>
    /// <ul>
    /// <li> <p>SDS01 – This type represents 3000 IOPS and io2 ebs volume type.</p> </li>
    /// </ul>
    /// This field is required.
    pub fn r#type(mut self, input: crate::types::KxSavedownStorageType) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of writeable storage space for temporarily storing your savedown data. The valid values are:</p>
    /// <ul>
    /// <li> <p>SDS01 – This type represents 3000 IOPS and io2 ebs volume type.</p> </li>
    /// </ul>
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::KxSavedownStorageType>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The type of writeable storage space for temporarily storing your savedown data. The valid values are:</p>
    /// <ul>
    /// <li> <p>SDS01 – This type represents 3000 IOPS and io2 ebs volume type.</p> </li>
    /// </ul>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::KxSavedownStorageType> {
        &self.r#type
    }
    /// <p>The size of temporary storage in gibibytes.</p>
    /// This field is required.
    pub fn size(mut self, input: i32) -> Self {
        self.size = ::std::option::Option::Some(input);
        self
    }
    /// <p>The size of temporary storage in gibibytes.</p>
    pub fn set_size(mut self, input: ::std::option::Option<i32>) -> Self {
        self.size = input;
        self
    }
    /// <p>The size of temporary storage in gibibytes.</p>
    pub fn get_size(&self) -> &::std::option::Option<i32> {
        &self.size
    }
    /// Consumes the builder and constructs a [`KxSavedownStorageConfiguration`](crate::types::KxSavedownStorageConfiguration).
    /// This method will fail if any of the following fields are not set:
    /// - [`r#type`](crate::types::builders::KxSavedownStorageConfigurationBuilder::r#type)
    /// - [`size`](crate::types::builders::KxSavedownStorageConfigurationBuilder::size)
    pub fn build(self) -> ::std::result::Result<crate::types::KxSavedownStorageConfiguration, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::KxSavedownStorageConfiguration {
            r#type: self.r#type.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "r#type",
                    "r#type was not specified but it is required when building KxSavedownStorageConfiguration",
                )
            })?,
            size: self.size.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "size",
                    "size was not specified but it is required when building KxSavedownStorageConfiguration",
                )
            })?,
        })
    }
}