#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Address {
pub allocation_id: ::std::option::Option<::std::string::String>,
pub association_id: ::std::option::Option<::std::string::String>,
pub domain: ::std::option::Option<crate::types::DomainType>,
pub network_interface_id: ::std::option::Option<::std::string::String>,
pub network_interface_owner_id: ::std::option::Option<::std::string::String>,
pub private_ip_address: ::std::option::Option<::std::string::String>,
pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub public_ipv4_pool: ::std::option::Option<::std::string::String>,
pub network_border_group: ::std::option::Option<::std::string::String>,
pub customer_owned_ip: ::std::option::Option<::std::string::String>,
pub customer_owned_ipv4_pool: ::std::option::Option<::std::string::String>,
pub carrier_ip: ::std::option::Option<::std::string::String>,
pub subnet_id: ::std::option::Option<::std::string::String>,
pub service_managed: ::std::option::Option<crate::types::ServiceManaged>,
pub instance_id: ::std::option::Option<::std::string::String>,
pub public_ip: ::std::option::Option<::std::string::String>,
}
impl Address {
pub fn allocation_id(&self) -> ::std::option::Option<&str> {
self.allocation_id.as_deref()
}
pub fn association_id(&self) -> ::std::option::Option<&str> {
self.association_id.as_deref()
}
pub fn domain(&self) -> ::std::option::Option<&crate::types::DomainType> {
self.domain.as_ref()
}
pub fn network_interface_id(&self) -> ::std::option::Option<&str> {
self.network_interface_id.as_deref()
}
pub fn network_interface_owner_id(&self) -> ::std::option::Option<&str> {
self.network_interface_owner_id.as_deref()
}
pub fn private_ip_address(&self) -> ::std::option::Option<&str> {
self.private_ip_address.as_deref()
}
pub fn tags(&self) -> &[crate::types::Tag] {
self.tags.as_deref().unwrap_or_default()
}
pub fn public_ipv4_pool(&self) -> ::std::option::Option<&str> {
self.public_ipv4_pool.as_deref()
}
pub fn network_border_group(&self) -> ::std::option::Option<&str> {
self.network_border_group.as_deref()
}
pub fn customer_owned_ip(&self) -> ::std::option::Option<&str> {
self.customer_owned_ip.as_deref()
}
pub fn customer_owned_ipv4_pool(&self) -> ::std::option::Option<&str> {
self.customer_owned_ipv4_pool.as_deref()
}
pub fn carrier_ip(&self) -> ::std::option::Option<&str> {
self.carrier_ip.as_deref()
}
pub fn subnet_id(&self) -> ::std::option::Option<&str> {
self.subnet_id.as_deref()
}
pub fn service_managed(&self) -> ::std::option::Option<&crate::types::ServiceManaged> {
self.service_managed.as_ref()
}
pub fn instance_id(&self) -> ::std::option::Option<&str> {
self.instance_id.as_deref()
}
pub fn public_ip(&self) -> ::std::option::Option<&str> {
self.public_ip.as_deref()
}
}
impl Address {
pub fn builder() -> crate::types::builders::AddressBuilder {
crate::types::builders::AddressBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AddressBuilder {
pub(crate) allocation_id: ::std::option::Option<::std::string::String>,
pub(crate) association_id: ::std::option::Option<::std::string::String>,
pub(crate) domain: ::std::option::Option<crate::types::DomainType>,
pub(crate) network_interface_id: ::std::option::Option<::std::string::String>,
pub(crate) network_interface_owner_id: ::std::option::Option<::std::string::String>,
pub(crate) private_ip_address: ::std::option::Option<::std::string::String>,
pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub(crate) public_ipv4_pool: ::std::option::Option<::std::string::String>,
pub(crate) network_border_group: ::std::option::Option<::std::string::String>,
pub(crate) customer_owned_ip: ::std::option::Option<::std::string::String>,
pub(crate) customer_owned_ipv4_pool: ::std::option::Option<::std::string::String>,
pub(crate) carrier_ip: ::std::option::Option<::std::string::String>,
pub(crate) subnet_id: ::std::option::Option<::std::string::String>,
pub(crate) service_managed: ::std::option::Option<crate::types::ServiceManaged>,
pub(crate) instance_id: ::std::option::Option<::std::string::String>,
pub(crate) public_ip: ::std::option::Option<::std::string::String>,
}
impl AddressBuilder {
pub fn allocation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.allocation_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_allocation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.allocation_id = input;
self
}
pub fn get_allocation_id(&self) -> &::std::option::Option<::std::string::String> {
&self.allocation_id
}
pub fn association_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.association_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_association_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.association_id = input;
self
}
pub fn get_association_id(&self) -> &::std::option::Option<::std::string::String> {
&self.association_id
}
pub fn domain(mut self, input: crate::types::DomainType) -> Self {
self.domain = ::std::option::Option::Some(input);
self
}
pub fn set_domain(mut self, input: ::std::option::Option<crate::types::DomainType>) -> Self {
self.domain = input;
self
}
pub fn get_domain(&self) -> &::std::option::Option<crate::types::DomainType> {
&self.domain
}
pub fn network_interface_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.network_interface_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_network_interface_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.network_interface_id = input;
self
}
pub fn get_network_interface_id(&self) -> &::std::option::Option<::std::string::String> {
&self.network_interface_id
}
pub fn network_interface_owner_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.network_interface_owner_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_network_interface_owner_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.network_interface_owner_id = input;
self
}
pub fn get_network_interface_owner_id(&self) -> &::std::option::Option<::std::string::String> {
&self.network_interface_owner_id
}
pub fn private_ip_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.private_ip_address = ::std::option::Option::Some(input.into());
self
}
pub fn set_private_ip_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.private_ip_address = input;
self
}
pub fn get_private_ip_address(&self) -> &::std::option::Option<::std::string::String> {
&self.private_ip_address
}
pub fn tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = ::std::option::Option::Some(v);
self
}
pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
self.tags = input;
self
}
pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
&self.tags
}
pub fn public_ipv4_pool(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.public_ipv4_pool = ::std::option::Option::Some(input.into());
self
}
pub fn set_public_ipv4_pool(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.public_ipv4_pool = input;
self
}
pub fn get_public_ipv4_pool(&self) -> &::std::option::Option<::std::string::String> {
&self.public_ipv4_pool
}
pub fn network_border_group(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.network_border_group = ::std::option::Option::Some(input.into());
self
}
pub fn set_network_border_group(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.network_border_group = input;
self
}
pub fn get_network_border_group(&self) -> &::std::option::Option<::std::string::String> {
&self.network_border_group
}
pub fn customer_owned_ip(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.customer_owned_ip = ::std::option::Option::Some(input.into());
self
}
pub fn set_customer_owned_ip(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.customer_owned_ip = input;
self
}
pub fn get_customer_owned_ip(&self) -> &::std::option::Option<::std::string::String> {
&self.customer_owned_ip
}
pub fn customer_owned_ipv4_pool(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.customer_owned_ipv4_pool = ::std::option::Option::Some(input.into());
self
}
pub fn set_customer_owned_ipv4_pool(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.customer_owned_ipv4_pool = input;
self
}
pub fn get_customer_owned_ipv4_pool(&self) -> &::std::option::Option<::std::string::String> {
&self.customer_owned_ipv4_pool
}
pub fn carrier_ip(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.carrier_ip = ::std::option::Option::Some(input.into());
self
}
pub fn set_carrier_ip(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.carrier_ip = input;
self
}
pub fn get_carrier_ip(&self) -> &::std::option::Option<::std::string::String> {
&self.carrier_ip
}
pub fn subnet_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.subnet_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_subnet_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.subnet_id = input;
self
}
pub fn get_subnet_id(&self) -> &::std::option::Option<::std::string::String> {
&self.subnet_id
}
pub fn service_managed(mut self, input: crate::types::ServiceManaged) -> Self {
self.service_managed = ::std::option::Option::Some(input);
self
}
pub fn set_service_managed(mut self, input: ::std::option::Option<crate::types::ServiceManaged>) -> Self {
self.service_managed = input;
self
}
pub fn get_service_managed(&self) -> &::std::option::Option<crate::types::ServiceManaged> {
&self.service_managed
}
pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.instance_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.instance_id = input;
self
}
pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
&self.instance_id
}
pub fn public_ip(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.public_ip = ::std::option::Option::Some(input.into());
self
}
pub fn set_public_ip(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.public_ip = input;
self
}
pub fn get_public_ip(&self) -> &::std::option::Option<::std::string::String> {
&self.public_ip
}
pub fn build(self) -> crate::types::Address {
crate::types::Address {
allocation_id: self.allocation_id,
association_id: self.association_id,
domain: self.domain,
network_interface_id: self.network_interface_id,
network_interface_owner_id: self.network_interface_owner_id,
private_ip_address: self.private_ip_address,
tags: self.tags,
public_ipv4_pool: self.public_ipv4_pool,
network_border_group: self.network_border_group,
customer_owned_ip: self.customer_owned_ip,
customer_owned_ipv4_pool: self.customer_owned_ipv4_pool,
carrier_ip: self.carrier_ip,
subnet_id: self.subnet_id,
service_managed: self.service_managed,
instance_id: self.instance_id,
public_ip: self.public_ip,
}
}
}