target.apidocs.com.google.api.services.compute.model.RouterNatRule.html Maven / Gradle / Ivy
The newest version!
RouterNatRule (Compute Engine API v1-rev20250320-2.0.0)
com.google.api.services.compute.model
Class RouterNatRule
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.compute.model.RouterNatRule
-
public final class RouterNatRule
extends com.google.api.client.json.GenericJson
Model definition for RouterNatRule.
This is the Java data model class that specifies how to parse/serialize into the JSON that is
transmitted over HTTP when working with the Compute Engine API. For a detailed explanation see:
https://developers.google.com/api-client-library/java/google-http-java-client/json
- Author:
- Google, Inc.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Constructor and Description
RouterNatRule()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
RouterNatRule
clone()
RouterNatRuleAction
getAction()
The action to be enforced for traffic that matches this rule.
String
getDescription()
An optional description of this rule.
String
getMatch()
CEL expression that specifies the match condition that egress traffic from a VM is evaluated
against.
Long
getRuleNumber()
An integer uniquely identifying a rule in the list.
RouterNatRule
set(String fieldName,
Object value)
RouterNatRule
setAction(RouterNatRuleAction action)
The action to be enforced for traffic that matches this rule.
RouterNatRule
setDescription(String description)
An optional description of this rule.
RouterNatRule
setMatch(String match)
CEL expression that specifies the match condition that egress traffic from a VM is evaluated
against.
RouterNatRule
setRuleNumber(Long ruleNumber)
An integer uniquely identifying a rule in the list.
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
Method Detail
-
getAction
public RouterNatRuleAction getAction()
The action to be enforced for traffic that matches this rule.
- Returns:
- value or
null for none
-
setAction
public RouterNatRule setAction(RouterNatRuleAction action)
The action to be enforced for traffic that matches this rule.
- Parameters:
action - action or null for none
-
getDescription
public String getDescription()
An optional description of this rule.
- Returns:
- value or
null for none
-
setDescription
public RouterNatRule setDescription(String description)
An optional description of this rule.
- Parameters:
description - description or null for none
-
getMatch
public String getMatch()
CEL expression that specifies the match condition that egress traffic from a VM is evaluated
against. If it evaluates to true, the corresponding `action` is enforced. The following
examples are valid match expressions for public NAT: `inIpRange(destination.ip, '1.1.0.0/16')
|| inIpRange(destination.ip, '2.2.0.0/16')` `destination.ip == '1.1.0.1' || destination.ip ==
'8.8.8.8'` The following example is a valid match expression for private NAT: `nexthop.hub ==
'//networkconnectivity.googleapis.com/projects/my-project/locations/global/hubs/hub-1'`
- Returns:
- value or
null for none
-
setMatch
public RouterNatRule setMatch(String match)
CEL expression that specifies the match condition that egress traffic from a VM is evaluated
against. If it evaluates to true, the corresponding `action` is enforced. The following
examples are valid match expressions for public NAT: `inIpRange(destination.ip, '1.1.0.0/16')
|| inIpRange(destination.ip, '2.2.0.0/16')` `destination.ip == '1.1.0.1' || destination.ip ==
'8.8.8.8'` The following example is a valid match expression for private NAT: `nexthop.hub ==
'//networkconnectivity.googleapis.com/projects/my-project/locations/global/hubs/hub-1'`
- Parameters:
match - match or null for none
-
getRuleNumber
public Long getRuleNumber()
An integer uniquely identifying a rule in the list. The rule number must be a positive value
between 0 and 65000, and must be unique among rules within a NAT.
- Returns:
- value or
null for none
-
setRuleNumber
public RouterNatRule setRuleNumber(Long ruleNumber)
An integer uniquely identifying a rule in the list. The rule number must be a positive value
between 0 and 65000, and must be unique among rules within a NAT.
- Parameters:
ruleNumber - ruleNumber or null for none
-
set
public RouterNatRule set(String fieldName,
Object value)
- Overrides:
set in class com.google.api.client.json.GenericJson
-
clone
public RouterNatRule clone()
- Overrides:
clone in class com.google.api.client.json.GenericJson
Copyright © 2011–2025 Google. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy