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

/// <p>The structure that consists of name and type of volume.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Volume {
    /// <p>A unique identifier for the volume.</p>
    pub volume_name: ::std::option::Option<::std::string::String>,
    /// <p>The type of file system volume. Currently, FinSpace only supports <code>NAS_1</code> volume type.</p>
    pub volume_type: ::std::option::Option<crate::types::VolumeType>,
}
impl Volume {
    /// <p>A unique identifier for the volume.</p>
    pub fn volume_name(&self) -> ::std::option::Option<&str> {
        self.volume_name.as_deref()
    }
    /// <p>The type of file system volume. Currently, FinSpace only supports <code>NAS_1</code> volume type.</p>
    pub fn volume_type(&self) -> ::std::option::Option<&crate::types::VolumeType> {
        self.volume_type.as_ref()
    }
}
impl Volume {
    /// Creates a new builder-style object to manufacture [`Volume`](crate::types::Volume).
    pub fn builder() -> crate::types::builders::VolumeBuilder {
        crate::types::builders::VolumeBuilder::default()
    }
}

/// A builder for [`Volume`](crate::types::Volume).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct VolumeBuilder {
    pub(crate) volume_name: ::std::option::Option<::std::string::String>,
    pub(crate) volume_type: ::std::option::Option<crate::types::VolumeType>,
}
impl VolumeBuilder {
    /// <p>A unique identifier for the volume.</p>
    pub fn volume_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.volume_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique identifier for the volume.</p>
    pub fn set_volume_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.volume_name = input;
        self
    }
    /// <p>A unique identifier for the volume.</p>
    pub fn get_volume_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.volume_name
    }
    /// <p>The type of file system volume. Currently, FinSpace only supports <code>NAS_1</code> volume type.</p>
    pub fn volume_type(mut self, input: crate::types::VolumeType) -> Self {
        self.volume_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of file system volume. Currently, FinSpace only supports <code>NAS_1</code> volume type.</p>
    pub fn set_volume_type(mut self, input: ::std::option::Option<crate::types::VolumeType>) -> Self {
        self.volume_type = input;
        self
    }
    /// <p>The type of file system volume. Currently, FinSpace only supports <code>NAS_1</code> volume type.</p>
    pub fn get_volume_type(&self) -> &::std::option::Option<crate::types::VolumeType> {
        &self.volume_type
    }
    /// Consumes the builder and constructs a [`Volume`](crate::types::Volume).
    pub fn build(self) -> crate::types::Volume {
        crate::types::Volume {
            volume_name: self.volume_name,
            volume_type: self.volume_type,
        }
    }
}