@Generated(value="OracleSDKGenerator", comments="API Version: 20160918") public final class RouteRule extends ExplicitlySetBmcModel
A mapping between a destination IP address range and a virtual device to route matching packets to (a target).
RouteRule.Builder
. This model distinguishes fields
that are null
because they are unset from fields that are explicitly set to null
. This is done in
the setter methods of the RouteRule.Builder
, which maintain a set of all explicitly set fields called
ExplicitlySetBmcModel.__explicitlySet__
. The hashCode()
and equals(Object)
methods are implemented to take
ExplicitlySetBmcModel.__explicitlySet__
into account. The constructor, on the other hand, does not set ExplicitlySetBmcModel.__explicitlySet__
(since the constructor cannot distinguish explicit null
from unset null
).Modifier and Type | Class and Description |
---|---|
static class |
RouteRule.Builder |
static class |
RouteRule.DestinationType
Type of destination for the rule.
|
Constructor and Description |
---|
RouteRule(String cidrBlock,
String destination,
RouteRule.DestinationType destinationType,
String networkEntityId)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static RouteRule.Builder |
builder()
Create a new builder.
|
boolean |
equals(Object o) |
String |
getCidrBlock()
Deprecated.
|
String |
getDestination()
Conceptually, this is the range of IP addresses used for matching when routing
traffic.
|
RouteRule.DestinationType |
getDestinationType()
Type of destination for the rule.
|
String |
getNetworkEntityId()
The OCID for the route rule’s target.
|
int |
hashCode() |
RouteRule.Builder |
toBuilder() |
String |
toString() |
String |
toString(boolean includeByteArrayContents)
Return a string representation of the object.
|
markPropertyAsExplicitlySet, wasPropertyExplicitlySet
@Deprecated @ConstructorProperties(value={"cidrBlock","destination","destinationType","networkEntityId"}) public RouteRule(String cidrBlock, String destination, RouteRule.DestinationType destinationType, String networkEntityId)
public static RouteRule.Builder builder()
Create a new builder.
public RouteRule.Builder toBuilder()
public String getCidrBlock()
Deprecated. Instead use destination
and destinationType
. Requests that include both
cidrBlock
and destination
will be rejected.
A destination IP address range in CIDR notation. Matching packets will be routed to the indicated network entity (the target).
Cannot be an IPv6 CIDR.
Example: 0.0.0.0/0
public String getDestination()
Conceptually, this is the range of IP addresses used for matching when routing
traffic. Required if you provide a destinationType
.
Allowed values:
IP address range in CIDR notation. Can be an IPv4 or IPv6 CIDR. For example: 192.168.1.0/24
or 2001:0db8:0123:45::/56
. If you set this to an IPv6 CIDR, the route rule's target
can only be a DRG or internet gateway.
IPv6 addressing is supported for all commercial and government regions.
See [IPv6 Addresses](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/ipv6.htm).
The cidrBlock
value for a Service
, if you're
setting up a route rule for traffic destined for a particular Service
through
a service gateway. For example: oci-phx-objectstorage
.
public RouteRule.DestinationType getDestinationType()
Type of destination for the rule. Required if you provide a destination
.
CIDR_BLOCK
: If the rule's destination
is an IP address range in CIDR notation.
SERVICE_CIDR_BLOCK
: If the rule's destination
is the cidrBlock
value for a
Service
(the rule is for traffic destined for a
particular Service
through a service gateway).
public String getNetworkEntityId()
The OCID for the route rule’s target. For information about the type of targets you can specify, see Route Tables.
public String toString()
toString
in class ExplicitlySetBmcModel
public String toString(boolean includeByteArrayContents)
Return a string representation of the object.
includeByteArrayContents
- true to include the full contents of byte arrayspublic boolean equals(Object o)
equals
in class ExplicitlySetBmcModel
public int hashCode()
hashCode
in class ExplicitlySetBmcModel
Copyright © 2016–2023. All rights reserved.