Class RouteRule
- java.lang.Object
-
- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
- com.oracle.bmc.vnmonitoring.model.RouteRule
-
@Generated(value="OracleSDKGenerator", comments="API Version: 20160918") public final class RouteRule extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModelA mapping between a destination IP address range and a virtual device to route matching packets to (a target).
Note: Objects should always be created or deserialized using theRouteRule.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 theRouteRule.Builder, which maintain a set of all explicitly set fields calledRouteRule.Builder.__explicitlySet__. ThehashCode()andequals(Object)methods are implemented to take the explicitly set fields into account. The constructor, on the other hand, does not take the explicitly set fields into account (since the constructor cannot distinguish explicit null from unset null).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRouteRule.Builderstatic classRouteRule.DestinationTypeType of destination for the rule.static classRouteRule.RouteTypeA route rule can be STATIC if manually added to the route table, LOCAL if added by OCI to the route table.
-
Constructor Summary
Constructors Constructor Description RouteRule(String cidrBlock, String destination, RouteRule.DestinationType destinationType, String networkEntityId, String description, RouteRule.RouteType routeType)Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RouteRule.Builderbuilder()Create a new builder.booleanequals(Object o)StringgetCidrBlock()Deprecated.StringgetDescription()An optional description of your choice for the rule.StringgetDestination()Conceptually, this is the range of IP addresses used for matching when routing traffic.RouteRule.DestinationTypegetDestinationType()Type of destination for the rule.StringgetNetworkEntityId()The OCID for the route rule’s target.RouteRule.RouteTypegetRouteType()A route rule can be STATIC if manually added to the route table, LOCAL if added by OCI to the route table.inthashCode()RouteRule.BuildertoBuilder()StringtoString()StringtoString(boolean includeByteArrayContents)Return a string representation of the object.
-
-
-
Constructor Detail
-
RouteRule
@Deprecated @ConstructorProperties({"cidrBlock","destination","destinationType","networkEntityId","description","routeType"}) public RouteRule(String cidrBlock, String destination, RouteRule.DestinationType destinationType, String networkEntityId, String description, RouteRule.RouteType routeType)
Deprecated.
-
-
Method Detail
-
builder
public static RouteRule.Builder builder()
Create a new builder.
-
toBuilder
public RouteRule.Builder toBuilder()
-
getCidrBlock
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
- Returns:
- the value
-
getDestination
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.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.- Returns:
- the value
-
getDestinationType
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).- Returns:
- the value
-
getNetworkEntityId
public String getNetworkEntityId()
The OCID for the route rule’s target.For information about the type of targets you can specify, see Route Tables.
- Returns:
- the value
-
getDescription
public String getDescription()
An optional description of your choice for the rule.- Returns:
- the value
-
getRouteType
public RouteRule.RouteType getRouteType()
A route rule can be STATIC if manually added to the route table, LOCAL if added by OCI to the route table.- Returns:
- the value
-
toString
public String toString()
- Overrides:
toStringin classcom.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
toString
public String toString(boolean includeByteArrayContents)
Return a string representation of the object.- Parameters:
includeByteArrayContents- true to include the full contents of byte arrays- Returns:
- string representation
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classcom.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
hashCode
public int hashCode()
- Overrides:
hashCodein classcom.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
-