#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct NetworkInterface {
pub attachment_id: ::std::option::Option<::std::string::String>,
pub ipv6_address: ::std::option::Option<::std::string::String>,
pub private_ipv4_address: ::std::option::Option<::std::string::String>,
}
impl NetworkInterface {
pub fn attachment_id(&self) -> ::std::option::Option<&str> {
self.attachment_id.as_deref()
}
pub fn ipv6_address(&self) -> ::std::option::Option<&str> {
self.ipv6_address.as_deref()
}
pub fn private_ipv4_address(&self) -> ::std::option::Option<&str> {
self.private_ipv4_address.as_deref()
}
}
impl NetworkInterface {
pub fn builder() -> crate::types::builders::NetworkInterfaceBuilder {
crate::types::builders::NetworkInterfaceBuilder::default()
}
}
#[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 {
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
}
pub fn set_attachment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.attachment_id = input;
self
}
pub fn get_attachment_id(&self) -> &::std::option::Option<::std::string::String> {
&self.attachment_id
}
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
}
pub fn set_ipv6_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.ipv6_address = input;
self
}
pub fn get_ipv6_address(&self) -> &::std::option::Option<::std::string::String> {
&self.ipv6_address
}
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
}
pub fn set_private_ipv4_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.private_ipv4_address = input;
self
}
pub fn get_private_ipv4_address(&self) -> &::std::option::Option<::std::string::String> {
&self.private_ipv4_address
}
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,
}
}
}