#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AllocateAddressOutput {
#[doc(hidden)]
pub public_ip: std::option::Option<std::string::String>,
#[doc(hidden)]
pub allocation_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub public_ipv4_pool: std::option::Option<std::string::String>,
#[doc(hidden)]
pub network_border_group: std::option::Option<std::string::String>,
#[doc(hidden)]
pub domain: std::option::Option<crate::types::DomainType>,
#[doc(hidden)]
pub customer_owned_ip: std::option::Option<std::string::String>,
#[doc(hidden)]
pub customer_owned_ipv4_pool: std::option::Option<std::string::String>,
#[doc(hidden)]
pub carrier_ip: std::option::Option<std::string::String>,
_request_id: Option<String>,
}
impl AllocateAddressOutput {
pub fn public_ip(&self) -> std::option::Option<&str> {
self.public_ip.as_deref()
}
pub fn allocation_id(&self) -> std::option::Option<&str> {
self.allocation_id.as_deref()
}
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 domain(&self) -> std::option::Option<&crate::types::DomainType> {
self.domain.as_ref()
}
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()
}
}
impl aws_http::request_id::RequestId for AllocateAddressOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl AllocateAddressOutput {
pub fn builder() -> crate::operation::allocate_address::builders::AllocateAddressOutputBuilder {
crate::operation::allocate_address::builders::AllocateAddressOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct AllocateAddressOutputBuilder {
pub(crate) public_ip: std::option::Option<std::string::String>,
pub(crate) allocation_id: std::option::Option<std::string::String>,
pub(crate) public_ipv4_pool: std::option::Option<std::string::String>,
pub(crate) network_border_group: std::option::Option<std::string::String>,
pub(crate) domain: std::option::Option<crate::types::DomainType>,
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>,
_request_id: Option<String>,
}
impl AllocateAddressOutputBuilder {
pub fn public_ip(mut self, input: impl Into<std::string::String>) -> Self {
self.public_ip = 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 allocation_id(mut self, input: impl Into<std::string::String>) -> Self {
self.allocation_id = 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 public_ipv4_pool(mut self, input: impl Into<std::string::String>) -> Self {
self.public_ipv4_pool = 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 network_border_group(mut self, input: impl Into<std::string::String>) -> Self {
self.network_border_group = 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 domain(mut self, input: crate::types::DomainType) -> Self {
self.domain = Some(input);
self
}
pub fn set_domain(mut self, input: std::option::Option<crate::types::DomainType>) -> Self {
self.domain = input;
self
}
pub fn customer_owned_ip(mut self, input: impl Into<std::string::String>) -> Self {
self.customer_owned_ip = 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 customer_owned_ipv4_pool(mut self, input: impl Into<std::string::String>) -> Self {
self.customer_owned_ipv4_pool = 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 carrier_ip(mut self, input: impl Into<std::string::String>) -> Self {
self.carrier_ip = 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(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(self) -> crate::operation::allocate_address::AllocateAddressOutput {
crate::operation::allocate_address::AllocateAddressOutput {
public_ip: self.public_ip,
allocation_id: self.allocation_id,
public_ipv4_pool: self.public_ipv4_pool,
network_border_group: self.network_border_group,
domain: self.domain,
customer_owned_ip: self.customer_owned_ip,
customer_owned_ipv4_pool: self.customer_owned_ipv4_pool,
carrier_ip: self.carrier_ip,
_request_id: self._request_id,
}
}
}