#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Peering {
pub core_network_id: ::std::option::Option<::std::string::String>,
pub core_network_arn: ::std::option::Option<::std::string::String>,
pub peering_id: ::std::option::Option<::std::string::String>,
pub owner_account_id: ::std::option::Option<::std::string::String>,
pub peering_type: ::std::option::Option<crate::types::PeeringType>,
pub state: ::std::option::Option<crate::types::PeeringState>,
pub edge_location: ::std::option::Option<::std::string::String>,
pub resource_arn: ::std::option::Option<::std::string::String>,
pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl Peering {
pub fn core_network_id(&self) -> ::std::option::Option<&str> {
self.core_network_id.as_deref()
}
pub fn core_network_arn(&self) -> ::std::option::Option<&str> {
self.core_network_arn.as_deref()
}
pub fn peering_id(&self) -> ::std::option::Option<&str> {
self.peering_id.as_deref()
}
pub fn owner_account_id(&self) -> ::std::option::Option<&str> {
self.owner_account_id.as_deref()
}
pub fn peering_type(&self) -> ::std::option::Option<&crate::types::PeeringType> {
self.peering_type.as_ref()
}
pub fn state(&self) -> ::std::option::Option<&crate::types::PeeringState> {
self.state.as_ref()
}
pub fn edge_location(&self) -> ::std::option::Option<&str> {
self.edge_location.as_deref()
}
pub fn resource_arn(&self) -> ::std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn tags(&self) -> &[crate::types::Tag] {
self.tags.as_deref().unwrap_or_default()
}
pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
}
impl Peering {
pub fn builder() -> crate::types::builders::PeeringBuilder {
crate::types::builders::PeeringBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct PeeringBuilder {
pub(crate) core_network_id: ::std::option::Option<::std::string::String>,
pub(crate) core_network_arn: ::std::option::Option<::std::string::String>,
pub(crate) peering_id: ::std::option::Option<::std::string::String>,
pub(crate) owner_account_id: ::std::option::Option<::std::string::String>,
pub(crate) peering_type: ::std::option::Option<crate::types::PeeringType>,
pub(crate) state: ::std::option::Option<crate::types::PeeringState>,
pub(crate) edge_location: ::std::option::Option<::std::string::String>,
pub(crate) resource_arn: ::std::option::Option<::std::string::String>,
pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl PeeringBuilder {
pub fn core_network_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.core_network_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_core_network_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.core_network_id = input;
self
}
pub fn get_core_network_id(&self) -> &::std::option::Option<::std::string::String> {
&self.core_network_id
}
pub fn core_network_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.core_network_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_core_network_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.core_network_arn = input;
self
}
pub fn get_core_network_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.core_network_arn
}
pub fn peering_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.peering_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_peering_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.peering_id = input;
self
}
pub fn get_peering_id(&self) -> &::std::option::Option<::std::string::String> {
&self.peering_id
}
pub fn owner_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.owner_account_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_owner_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.owner_account_id = input;
self
}
pub fn get_owner_account_id(&self) -> &::std::option::Option<::std::string::String> {
&self.owner_account_id
}
pub fn peering_type(mut self, input: crate::types::PeeringType) -> Self {
self.peering_type = ::std::option::Option::Some(input);
self
}
pub fn set_peering_type(mut self, input: ::std::option::Option<crate::types::PeeringType>) -> Self {
self.peering_type = input;
self
}
pub fn get_peering_type(&self) -> &::std::option::Option<crate::types::PeeringType> {
&self.peering_type
}
pub fn state(mut self, input: crate::types::PeeringState) -> Self {
self.state = ::std::option::Option::Some(input);
self
}
pub fn set_state(mut self, input: ::std::option::Option<crate::types::PeeringState>) -> Self {
self.state = input;
self
}
pub fn get_state(&self) -> &::std::option::Option<crate::types::PeeringState> {
&self.state
}
pub fn edge_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.edge_location = ::std::option::Option::Some(input.into());
self
}
pub fn set_edge_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.edge_location = input;
self
}
pub fn get_edge_location(&self) -> &::std::option::Option<::std::string::String> {
&self.edge_location
}
pub fn resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.resource_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.resource_arn
}
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 created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_at = ::std::option::Option::Some(input);
self
}
pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_at = input;
self
}
pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_at
}
pub fn build(self) -> crate::types::Peering {
crate::types::Peering {
core_network_id: self.core_network_id,
core_network_arn: self.core_network_arn,
peering_id: self.peering_id,
owner_account_id: self.owner_account_id,
peering_type: self.peering_type,
state: self.state,
edge_location: self.edge_location,
resource_arn: self.resource_arn,
tags: self.tags,
created_at: self.created_at,
}
}
}