#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Endpoint {
#[doc(hidden)]
pub endpoint_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub outposts_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub cidr_block: std::option::Option<std::string::String>,
#[doc(hidden)]
pub status: std::option::Option<crate::model::EndpointStatus>,
#[doc(hidden)]
pub creation_time: std::option::Option<aws_smithy_types::DateTime>,
#[doc(hidden)]
pub network_interfaces: std::option::Option<std::vec::Vec<crate::model::NetworkInterface>>,
#[doc(hidden)]
pub vpc_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub subnet_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub security_group_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub access_type: std::option::Option<crate::model::EndpointAccessType>,
#[doc(hidden)]
pub customer_owned_ipv4_pool: std::option::Option<std::string::String>,
}
impl Endpoint {
pub fn endpoint_arn(&self) -> std::option::Option<&str> {
self.endpoint_arn.as_deref()
}
pub fn outposts_id(&self) -> std::option::Option<&str> {
self.outposts_id.as_deref()
}
pub fn cidr_block(&self) -> std::option::Option<&str> {
self.cidr_block.as_deref()
}
pub fn status(&self) -> std::option::Option<&crate::model::EndpointStatus> {
self.status.as_ref()
}
pub fn creation_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.creation_time.as_ref()
}
pub fn network_interfaces(&self) -> std::option::Option<&[crate::model::NetworkInterface]> {
self.network_interfaces.as_deref()
}
pub fn vpc_id(&self) -> std::option::Option<&str> {
self.vpc_id.as_deref()
}
pub fn subnet_id(&self) -> std::option::Option<&str> {
self.subnet_id.as_deref()
}
pub fn security_group_id(&self) -> std::option::Option<&str> {
self.security_group_id.as_deref()
}
pub fn access_type(&self) -> std::option::Option<&crate::model::EndpointAccessType> {
self.access_type.as_ref()
}
pub fn customer_owned_ipv4_pool(&self) -> std::option::Option<&str> {
self.customer_owned_ipv4_pool.as_deref()
}
}
pub mod endpoint {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) endpoint_arn: std::option::Option<std::string::String>,
pub(crate) outposts_id: std::option::Option<std::string::String>,
pub(crate) cidr_block: std::option::Option<std::string::String>,
pub(crate) status: std::option::Option<crate::model::EndpointStatus>,
pub(crate) creation_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) network_interfaces:
std::option::Option<std::vec::Vec<crate::model::NetworkInterface>>,
pub(crate) vpc_id: std::option::Option<std::string::String>,
pub(crate) subnet_id: std::option::Option<std::string::String>,
pub(crate) security_group_id: std::option::Option<std::string::String>,
pub(crate) access_type: std::option::Option<crate::model::EndpointAccessType>,
pub(crate) customer_owned_ipv4_pool: std::option::Option<std::string::String>,
}
impl Builder {
pub fn endpoint_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.endpoint_arn = Some(input.into());
self
}
pub fn set_endpoint_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.endpoint_arn = input;
self
}
pub fn outposts_id(mut self, input: impl Into<std::string::String>) -> Self {
self.outposts_id = Some(input.into());
self
}
pub fn set_outposts_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.outposts_id = input;
self
}
pub fn cidr_block(mut self, input: impl Into<std::string::String>) -> Self {
self.cidr_block = Some(input.into());
self
}
pub fn set_cidr_block(mut self, input: std::option::Option<std::string::String>) -> Self {
self.cidr_block = input;
self
}
pub fn status(mut self, input: crate::model::EndpointStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::EndpointStatus>,
) -> Self {
self.status = input;
self
}
pub fn creation_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.creation_time = Some(input);
self
}
pub fn set_creation_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.creation_time = input;
self
}
pub fn network_interfaces(mut self, input: crate::model::NetworkInterface) -> Self {
let mut v = self.network_interfaces.unwrap_or_default();
v.push(input);
self.network_interfaces = Some(v);
self
}
pub fn set_network_interfaces(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::NetworkInterface>>,
) -> Self {
self.network_interfaces = input;
self
}
pub fn vpc_id(mut self, input: impl Into<std::string::String>) -> Self {
self.vpc_id = Some(input.into());
self
}
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.vpc_id = input;
self
}
pub fn subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
self.subnet_id = 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 security_group_id(mut self, input: impl Into<std::string::String>) -> Self {
self.security_group_id = Some(input.into());
self
}
pub fn set_security_group_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.security_group_id = input;
self
}
pub fn access_type(mut self, input: crate::model::EndpointAccessType) -> Self {
self.access_type = Some(input);
self
}
pub fn set_access_type(
mut self,
input: std::option::Option<crate::model::EndpointAccessType>,
) -> Self {
self.access_type = 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 build(self) -> crate::model::Endpoint {
crate::model::Endpoint {
endpoint_arn: self.endpoint_arn,
outposts_id: self.outposts_id,
cidr_block: self.cidr_block,
status: self.status,
creation_time: self.creation_time,
network_interfaces: self.network_interfaces,
vpc_id: self.vpc_id,
subnet_id: self.subnet_id,
security_group_id: self.security_group_id,
access_type: self.access_type,
customer_owned_ipv4_pool: self.customer_owned_ipv4_pool,
}
}
}
}
impl Endpoint {
pub fn builder() -> crate::model::endpoint::Builder {
crate::model::endpoint::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum EndpointAccessType {
#[allow(missing_docs)] CustomerOwnedIp,
#[allow(missing_docs)] Private,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for EndpointAccessType {
fn from(s: &str) -> Self {
match s {
"CustomerOwnedIp" => EndpointAccessType::CustomerOwnedIp,
"Private" => EndpointAccessType::Private,
other => {
EndpointAccessType::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
}
}
}
}
impl std::str::FromStr for EndpointAccessType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(EndpointAccessType::from(s))
}
}
impl EndpointAccessType {
pub fn as_str(&self) -> &str {
match self {
EndpointAccessType::CustomerOwnedIp => "CustomerOwnedIp",
EndpointAccessType::Private => "Private",
EndpointAccessType::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["CustomerOwnedIp", "Private"]
}
}
impl AsRef<str> for EndpointAccessType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NetworkInterface {
#[doc(hidden)]
pub network_interface_id: std::option::Option<std::string::String>,
}
impl NetworkInterface {
pub fn network_interface_id(&self) -> std::option::Option<&str> {
self.network_interface_id.as_deref()
}
}
pub mod network_interface {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) network_interface_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn network_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
self.network_interface_id = 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 build(self) -> crate::model::NetworkInterface {
crate::model::NetworkInterface {
network_interface_id: self.network_interface_id,
}
}
}
}
impl NetworkInterface {
pub fn builder() -> crate::model::network_interface::Builder {
crate::model::network_interface::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum EndpointStatus {
#[allow(missing_docs)] Available,
#[allow(missing_docs)] Deleting,
#[allow(missing_docs)] Pending,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for EndpointStatus {
fn from(s: &str) -> Self {
match s {
"Available" => EndpointStatus::Available,
"Deleting" => EndpointStatus::Deleting,
"Pending" => EndpointStatus::Pending,
other => EndpointStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for EndpointStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(EndpointStatus::from(s))
}
}
impl EndpointStatus {
pub fn as_str(&self) -> &str {
match self {
EndpointStatus::Available => "Available",
EndpointStatus::Deleting => "Deleting",
EndpointStatus::Pending => "Pending",
EndpointStatus::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["Available", "Deleting", "Pending"]
}
}
impl AsRef<str> for EndpointStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}