#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct TransitGatewayPeering {
pub peering: ::std::option::Option<crate::types::Peering>,
pub transit_gateway_arn: ::std::option::Option<::std::string::String>,
pub transit_gateway_peering_attachment_id: ::std::option::Option<::std::string::String>,
}
impl TransitGatewayPeering {
pub fn peering(&self) -> ::std::option::Option<&crate::types::Peering> {
self.peering.as_ref()
}
pub fn transit_gateway_arn(&self) -> ::std::option::Option<&str> {
self.transit_gateway_arn.as_deref()
}
pub fn transit_gateway_peering_attachment_id(&self) -> ::std::option::Option<&str> {
self.transit_gateway_peering_attachment_id.as_deref()
}
}
impl TransitGatewayPeering {
pub fn builder() -> crate::types::builders::TransitGatewayPeeringBuilder {
crate::types::builders::TransitGatewayPeeringBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct TransitGatewayPeeringBuilder {
pub(crate) peering: ::std::option::Option<crate::types::Peering>,
pub(crate) transit_gateway_arn: ::std::option::Option<::std::string::String>,
pub(crate) transit_gateway_peering_attachment_id: ::std::option::Option<::std::string::String>,
}
impl TransitGatewayPeeringBuilder {
pub fn peering(mut self, input: crate::types::Peering) -> Self {
self.peering = ::std::option::Option::Some(input);
self
}
pub fn set_peering(mut self, input: ::std::option::Option<crate::types::Peering>) -> Self {
self.peering = input;
self
}
pub fn get_peering(&self) -> &::std::option::Option<crate::types::Peering> {
&self.peering
}
pub fn transit_gateway_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.transit_gateway_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_transit_gateway_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.transit_gateway_arn = input;
self
}
pub fn get_transit_gateway_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.transit_gateway_arn
}
pub fn transit_gateway_peering_attachment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.transit_gateway_peering_attachment_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_transit_gateway_peering_attachment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.transit_gateway_peering_attachment_id = input;
self
}
pub fn get_transit_gateway_peering_attachment_id(&self) -> &::std::option::Option<::std::string::String> {
&self.transit_gateway_peering_attachment_id
}
pub fn build(self) -> crate::types::TransitGatewayPeering {
crate::types::TransitGatewayPeering {
peering: self.peering,
transit_gateway_arn: self.transit_gateway_arn,
transit_gateway_peering_attachment_id: self.transit_gateway_peering_attachment_id,
}
}
}