#[non_exhaustive]pub struct NatInfo {Show 14 fields
pub type: Type,
pub protocol: String,
pub network_uri: String,
pub old_source_ip: String,
pub new_source_ip: String,
pub old_destination_ip: String,
pub new_destination_ip: String,
pub old_source_port: i32,
pub new_source_port: i32,
pub old_destination_port: i32,
pub new_destination_port: i32,
pub router_uri: String,
pub nat_gateway_name: String,
pub cloud_nat_gateway_type: CloudNatGatewayType,
/* private fields */
}Expand description
For display only. Metadata associated with NAT.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.type: TypeType of NAT.
protocol: StringIP protocol in string format, for example: “TCP”, “UDP”, “ICMP”.
network_uri: StringURI of the network where NAT translation takes place.
old_source_ip: StringSource IP address before NAT translation.
new_source_ip: StringSource IP address after NAT translation.
old_destination_ip: StringDestination IP address before NAT translation.
new_destination_ip: StringDestination IP address after NAT translation.
old_source_port: i32Source port before NAT translation. Only valid when protocol is TCP or UDP.
new_source_port: i32Source port after NAT translation. Only valid when protocol is TCP or UDP.
old_destination_port: i32Destination port before NAT translation. Only valid when protocol is TCP or UDP.
new_destination_port: i32Destination port after NAT translation. Only valid when protocol is TCP or UDP.
router_uri: StringUri of the Cloud Router. Only valid when type is CLOUD_NAT.
nat_gateway_name: StringThe name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT.
cloud_nat_gateway_type: CloudNatGatewayTypeType of Cloud NAT gateway. Only valid when type is CLOUD_NAT.
Implementations§
Source§impl NatInfo
impl NatInfo
Sourcepub fn set_protocol<T: Into<String>>(self, v: T) -> Self
pub fn set_protocol<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_network_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_network_uri<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_old_source_ip<T: Into<String>>(self, v: T) -> Self
pub fn set_old_source_ip<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_new_source_ip<T: Into<String>>(self, v: T) -> Self
pub fn set_new_source_ip<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_old_destination_ip<T: Into<String>>(self, v: T) -> Self
pub fn set_old_destination_ip<T: Into<String>>(self, v: T) -> Self
Sets the value of old_destination_ip.
§Example
let x = NatInfo::new().set_old_destination_ip("example");Sourcepub fn set_new_destination_ip<T: Into<String>>(self, v: T) -> Self
pub fn set_new_destination_ip<T: Into<String>>(self, v: T) -> Self
Sets the value of new_destination_ip.
§Example
let x = NatInfo::new().set_new_destination_ip("example");Sourcepub fn set_old_source_port<T: Into<i32>>(self, v: T) -> Self
pub fn set_old_source_port<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_new_source_port<T: Into<i32>>(self, v: T) -> Self
pub fn set_new_source_port<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_old_destination_port<T: Into<i32>>(self, v: T) -> Self
pub fn set_old_destination_port<T: Into<i32>>(self, v: T) -> Self
Sets the value of old_destination_port.
§Example
let x = NatInfo::new().set_old_destination_port(42);Sourcepub fn set_new_destination_port<T: Into<i32>>(self, v: T) -> Self
pub fn set_new_destination_port<T: Into<i32>>(self, v: T) -> Self
Sets the value of new_destination_port.
§Example
let x = NatInfo::new().set_new_destination_port(42);Sourcepub fn set_router_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_router_uri<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_nat_gateway_name<T: Into<String>>(self, v: T) -> Self
pub fn set_nat_gateway_name<T: Into<String>>(self, v: T) -> Self
Sets the value of nat_gateway_name.
§Example
let x = NatInfo::new().set_nat_gateway_name("example");Sourcepub fn set_cloud_nat_gateway_type<T: Into<CloudNatGatewayType>>(
self,
v: T,
) -> Self
pub fn set_cloud_nat_gateway_type<T: Into<CloudNatGatewayType>>( self, v: T, ) -> Self
Sets the value of cloud_nat_gateway_type.
§Example
use google_cloud_networkmanagement_v1::model::nat_info::CloudNatGatewayType;
let x0 = NatInfo::new().set_cloud_nat_gateway_type(CloudNatGatewayType::PublicNat44);
let x1 = NatInfo::new().set_cloud_nat_gateway_type(CloudNatGatewayType::PublicNat64);
let x2 = NatInfo::new().set_cloud_nat_gateway_type(CloudNatGatewayType::PrivateNatNcc);