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

/// <p>An Amazon FSx for NetApp ONTAP storage virtual machine (SVM) has four endpoints that are used to access data or to manage the SVM using the NetApp ONTAP CLI, REST API, or NetApp CloudManager. They are the <code>Iscsi</code>, <code>Management</code>, <code>Nfs</code>, and <code>Smb</code> endpoints.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SvmEndpoint {
    /// <p>The file system's DNS name. You can mount your file system using its DNS name.</p>
    pub dns_name: ::std::option::Option<::std::string::String>,
    /// <p>The SVM endpoint's IP addresses.</p>
    pub ip_addresses: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl SvmEndpoint {
    /// <p>The file system's DNS name. You can mount your file system using its DNS name.</p>
    pub fn dns_name(&self) -> ::std::option::Option<&str> {
        self.dns_name.as_deref()
    }
    /// <p>The SVM endpoint's IP addresses.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.ip_addresses.is_none()`.
    pub fn ip_addresses(&self) -> &[::std::string::String] {
        self.ip_addresses.as_deref().unwrap_or_default()
    }
}
impl SvmEndpoint {
    /// Creates a new builder-style object to manufacture [`SvmEndpoint`](crate::types::SvmEndpoint).
    pub fn builder() -> crate::types::builders::SvmEndpointBuilder {
        crate::types::builders::SvmEndpointBuilder::default()
    }
}

/// A builder for [`SvmEndpoint`](crate::types::SvmEndpoint).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct SvmEndpointBuilder {
    pub(crate) dns_name: ::std::option::Option<::std::string::String>,
    pub(crate) ip_addresses: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl SvmEndpointBuilder {
    /// <p>The file system's DNS name. You can mount your file system using its DNS name.</p>
    pub fn dns_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.dns_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The file system's DNS name. You can mount your file system using its DNS name.</p>
    pub fn set_dns_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.dns_name = input;
        self
    }
    /// <p>The file system's DNS name. You can mount your file system using its DNS name.</p>
    pub fn get_dns_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.dns_name
    }
    /// Appends an item to `ip_addresses`.
    ///
    /// To override the contents of this collection use [`set_ip_addresses`](Self::set_ip_addresses).
    ///
    /// <p>The SVM endpoint's IP addresses.</p>
    pub fn ip_addresses(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.ip_addresses.unwrap_or_default();
        v.push(input.into());
        self.ip_addresses = ::std::option::Option::Some(v);
        self
    }
    /// <p>The SVM endpoint's IP addresses.</p>
    pub fn set_ip_addresses(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.ip_addresses = input;
        self
    }
    /// <p>The SVM endpoint's IP addresses.</p>
    pub fn get_ip_addresses(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.ip_addresses
    }
    /// Consumes the builder and constructs a [`SvmEndpoint`](crate::types::SvmEndpoint).
    pub fn build(self) -> crate::types::SvmEndpoint {
        crate::types::SvmEndpoint {
            dns_name: self.dns_name,
            ip_addresses: self.ip_addresses,
        }
    }
}