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

/// <p>An object that represents the elastic network interface for a multi-node parallel job node.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct NetworkInterface {
    /// <p>The attachment ID for the network interface.</p>
    pub attachment_id: ::std::option::Option<::std::string::String>,
    /// <p>The private IPv6 address for the network interface.</p>
    pub ipv6_address: ::std::option::Option<::std::string::String>,
    /// <p>The private IPv4 address for the network interface.</p>
    pub private_ipv4_address: ::std::option::Option<::std::string::String>,
}
impl NetworkInterface {
    /// <p>The attachment ID for the network interface.</p>
    pub fn attachment_id(&self) -> ::std::option::Option<&str> {
        self.attachment_id.as_deref()
    }
    /// <p>The private IPv6 address for the network interface.</p>
    pub fn ipv6_address(&self) -> ::std::option::Option<&str> {
        self.ipv6_address.as_deref()
    }
    /// <p>The private IPv4 address for the network interface.</p>
    pub fn private_ipv4_address(&self) -> ::std::option::Option<&str> {
        self.private_ipv4_address.as_deref()
    }
}
impl NetworkInterface {
    /// Creates a new builder-style object to manufacture [`NetworkInterface`](crate::types::NetworkInterface).
    pub fn builder() -> crate::types::builders::NetworkInterfaceBuilder {
        crate::types::builders::NetworkInterfaceBuilder::default()
    }
}

/// A builder for [`NetworkInterface`](crate::types::NetworkInterface).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct NetworkInterfaceBuilder {
    pub(crate) attachment_id: ::std::option::Option<::std::string::String>,
    pub(crate) ipv6_address: ::std::option::Option<::std::string::String>,
    pub(crate) private_ipv4_address: ::std::option::Option<::std::string::String>,
}
impl NetworkInterfaceBuilder {
    /// <p>The attachment ID for the network interface.</p>
    pub fn attachment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.attachment_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The attachment ID for the network interface.</p>
    pub fn set_attachment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.attachment_id = input;
        self
    }
    /// <p>The attachment ID for the network interface.</p>
    pub fn get_attachment_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.attachment_id
    }
    /// <p>The private IPv6 address for the network interface.</p>
    pub fn ipv6_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ipv6_address = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The private IPv6 address for the network interface.</p>
    pub fn set_ipv6_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ipv6_address = input;
        self
    }
    /// <p>The private IPv6 address for the network interface.</p>
    pub fn get_ipv6_address(&self) -> &::std::option::Option<::std::string::String> {
        &self.ipv6_address
    }
    /// <p>The private IPv4 address for the network interface.</p>
    pub fn private_ipv4_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.private_ipv4_address = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The private IPv4 address for the network interface.</p>
    pub fn set_private_ipv4_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.private_ipv4_address = input;
        self
    }
    /// <p>The private IPv4 address for the network interface.</p>
    pub fn get_private_ipv4_address(&self) -> &::std::option::Option<::std::string::String> {
        &self.private_ipv4_address
    }
    /// Consumes the builder and constructs a [`NetworkInterface`](crate::types::NetworkInterface).
    pub fn build(self) -> crate::types::NetworkInterface {
        crate::types::NetworkInterface {
            attachment_id: self.attachment_id,
            ipv6_address: self.ipv6_address,
            private_ipv4_address: self.private_ipv4_address,
        }
    }
}