![JAR search and dependency download from the Maven repository](/logo.png)
com.oracle.bmc.vnmonitoring.model.DrgRouteTable Maven / Gradle / Ivy
Show all versions of oci-java-sdk-shaded-full Show documentation
/**
* Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
*/
package com.oracle.bmc.vnmonitoring.model;
/**
* All routing inside the DRG is driven by the contents of DRG route tables. DRG route tables
* contain rules which route packets to a particular network destination, represented as a DRG
* attachment. The routing decision for a packet entering a DRG is determined by the rules in the
* DRG route table assigned to the attachment-of-entry.
*
* Each DRG attachment can inject routes in any DRG route table, provided there is a statement
* corresponding to the attachment in the route table's {@code importDrgRouteDistribution}. You can
* also insert static routes into the DRG route tables.
*
*
The DRG route table is always in the same compartment as the DRG. There must always be a
* default DRG route table for each attachment type.
* Note: Objects should always be created or deserialized using the {@link Builder}. This model
* distinguishes fields that are {@code null} because they are unset from fields that are explicitly
* set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a
* set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link
* #hashCode()} and {@link #equals(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 {@code null} from unset {@code
* null}).
*/
@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918")
@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = DrgRouteTable.Builder.class)
@com.fasterxml.jackson.annotation.JsonFilter(
com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME)
public final class DrgRouteTable extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel {
@Deprecated
@java.beans.ConstructorProperties({
"id",
"compartmentId",
"drgId",
"definedTags",
"displayName",
"freeformTags",
"timeCreated",
"lifecycleState",
"importDrgRouteDistributionId",
"isEcmpEnabled"
})
public DrgRouteTable(
String id,
String compartmentId,
String drgId,
java.util.Map> definedTags,
String displayName,
java.util.Map freeformTags,
java.util.Date timeCreated,
LifecycleState lifecycleState,
String importDrgRouteDistributionId,
Boolean isEcmpEnabled) {
super();
this.id = id;
this.compartmentId = compartmentId;
this.drgId = drgId;
this.definedTags = definedTags;
this.displayName = displayName;
this.freeformTags = freeformTags;
this.timeCreated = timeCreated;
this.lifecycleState = lifecycleState;
this.importDrgRouteDistributionId = importDrgRouteDistributionId;
this.isEcmpEnabled = isEcmpEnabled;
}
@com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "")
public static class Builder {
/**
* The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)
* of the DRG route table.
*/
@com.fasterxml.jackson.annotation.JsonProperty("id")
private String id;
/**
* The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)
* of the DRG route table.
*
* @param id the value to set
* @return this builder
*/
public Builder id(String id) {
this.id = id;
this.__explicitlySet__.add("id");
return this;
}
/**
* The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)
* of the compartment the DRG is in. The DRG route table is always in the same compartment
* as the DRG.
*/
@com.fasterxml.jackson.annotation.JsonProperty("compartmentId")
private String compartmentId;
/**
* The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)
* of the compartment the DRG is in. The DRG route table is always in the same compartment
* as the DRG.
*
* @param compartmentId the value to set
* @return this builder
*/
public Builder compartmentId(String compartmentId) {
this.compartmentId = compartmentId;
this.__explicitlySet__.add("compartmentId");
return this;
}
/**
* The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)
* of the DRG the DRG that contains this route table.
*/
@com.fasterxml.jackson.annotation.JsonProperty("drgId")
private String drgId;
/**
* The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)
* of the DRG the DRG that contains this route table.
*
* @param drgId the value to set
* @return this builder
*/
public Builder drgId(String drgId) {
this.drgId = drgId;
this.__explicitlySet__.add("drgId");
return this;
}
/**
* Defined tags for this resource. Each key is predefined and scoped to a namespace.
* Example: {@code {"foo-namespace": {"bar-key": "value"}}}
*/
@com.fasterxml.jackson.annotation.JsonProperty("definedTags")
private java.util.Map> definedTags;
/**
* Defined tags for this resource. Each key is predefined and scoped to a namespace.
* Example: {@code {"foo-namespace": {"bar-key": "value"}}}
*
* @param definedTags the value to set
* @return this builder
*/
public Builder definedTags(
java.util.Map> definedTags) {
this.definedTags = definedTags;
this.__explicitlySet__.add("definedTags");
return this;
}
/**
* A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering
* confidential information.
*/
@com.fasterxml.jackson.annotation.JsonProperty("displayName")
private String displayName;
/**
* A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering
* confidential information.
*
* @param displayName the value to set
* @return this builder
*/
public Builder displayName(String displayName) {
this.displayName = displayName;
this.__explicitlySet__.add("displayName");
return this;
}
/**
* Simple key-value pair that is applied without any predefined name, type or scope. Exists
* for cross-compatibility only. Example: {@code {"bar-key": "value"}}
*/
@com.fasterxml.jackson.annotation.JsonProperty("freeformTags")
private java.util.Map freeformTags;
/**
* Simple key-value pair that is applied without any predefined name, type or scope. Exists
* for cross-compatibility only. Example: {@code {"bar-key": "value"}}
*
* @param freeformTags the value to set
* @return this builder
*/
public Builder freeformTags(java.util.Map freeformTags) {
this.freeformTags = freeformTags;
this.__explicitlySet__.add("freeformTags");
return this;
}
/**
* The date and time the DRG route table was created, in the format defined by
* [RFC3339](https://tools.ietf.org/html/rfc3339).
*
* Example: {@code 2016-08-25T21:10:29.600Z}
*/
@com.fasterxml.jackson.annotation.JsonProperty("timeCreated")
private java.util.Date timeCreated;
/**
* The date and time the DRG route table was created, in the format defined by
* [RFC3339](https://tools.ietf.org/html/rfc3339).
*
*
Example: {@code 2016-08-25T21:10:29.600Z}
*
* @param timeCreated the value to set
* @return this builder
*/
public Builder timeCreated(java.util.Date timeCreated) {
this.timeCreated = timeCreated;
this.__explicitlySet__.add("timeCreated");
return this;
}
/** The DRG route table's current state. */
@com.fasterxml.jackson.annotation.JsonProperty("lifecycleState")
private LifecycleState lifecycleState;
/**
* The DRG route table's current state.
*
* @param lifecycleState the value to set
* @return this builder
*/
public Builder lifecycleState(LifecycleState lifecycleState) {
this.lifecycleState = lifecycleState;
this.__explicitlySet__.add("lifecycleState");
return this;
}
/**
* The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)
* of the import route distribution used to specify how incoming route advertisements from
* referenced attachments are inserted into the DRG route table.
*/
@com.fasterxml.jackson.annotation.JsonProperty("importDrgRouteDistributionId")
private String importDrgRouteDistributionId;
/**
* The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)
* of the import route distribution used to specify how incoming route advertisements from
* referenced attachments are inserted into the DRG route table.
*
* @param importDrgRouteDistributionId the value to set
* @return this builder
*/
public Builder importDrgRouteDistributionId(String importDrgRouteDistributionId) {
this.importDrgRouteDistributionId = importDrgRouteDistributionId;
this.__explicitlySet__.add("importDrgRouteDistributionId");
return this;
}
/**
* If you want traffic to be routed using ECMP across your virtual circuits or IPSec tunnels
* to your on-premises network, enable ECMP on the DRG route table to which these
* attachments import routes.
*/
@com.fasterxml.jackson.annotation.JsonProperty("isEcmpEnabled")
private Boolean isEcmpEnabled;
/**
* If you want traffic to be routed using ECMP across your virtual circuits or IPSec tunnels
* to your on-premises network, enable ECMP on the DRG route table to which these
* attachments import routes.
*
* @param isEcmpEnabled the value to set
* @return this builder
*/
public Builder isEcmpEnabled(Boolean isEcmpEnabled) {
this.isEcmpEnabled = isEcmpEnabled;
this.__explicitlySet__.add("isEcmpEnabled");
return this;
}
@com.fasterxml.jackson.annotation.JsonIgnore
private final java.util.Set __explicitlySet__ = new java.util.HashSet();
public DrgRouteTable build() {
DrgRouteTable model =
new DrgRouteTable(
this.id,
this.compartmentId,
this.drgId,
this.definedTags,
this.displayName,
this.freeformTags,
this.timeCreated,
this.lifecycleState,
this.importDrgRouteDistributionId,
this.isEcmpEnabled);
for (String explicitlySetProperty : this.__explicitlySet__) {
model.markPropertyAsExplicitlySet(explicitlySetProperty);
}
return model;
}
@com.fasterxml.jackson.annotation.JsonIgnore
public Builder copy(DrgRouteTable model) {
if (model.wasPropertyExplicitlySet("id")) {
this.id(model.getId());
}
if (model.wasPropertyExplicitlySet("compartmentId")) {
this.compartmentId(model.getCompartmentId());
}
if (model.wasPropertyExplicitlySet("drgId")) {
this.drgId(model.getDrgId());
}
if (model.wasPropertyExplicitlySet("definedTags")) {
this.definedTags(model.getDefinedTags());
}
if (model.wasPropertyExplicitlySet("displayName")) {
this.displayName(model.getDisplayName());
}
if (model.wasPropertyExplicitlySet("freeformTags")) {
this.freeformTags(model.getFreeformTags());
}
if (model.wasPropertyExplicitlySet("timeCreated")) {
this.timeCreated(model.getTimeCreated());
}
if (model.wasPropertyExplicitlySet("lifecycleState")) {
this.lifecycleState(model.getLifecycleState());
}
if (model.wasPropertyExplicitlySet("importDrgRouteDistributionId")) {
this.importDrgRouteDistributionId(model.getImportDrgRouteDistributionId());
}
if (model.wasPropertyExplicitlySet("isEcmpEnabled")) {
this.isEcmpEnabled(model.getIsEcmpEnabled());
}
return this;
}
}
/** Create a new builder. */
public static Builder builder() {
return new Builder();
}
public Builder toBuilder() {
return new Builder().copy(this);
}
/**
* The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of
* the DRG route table.
*/
@com.fasterxml.jackson.annotation.JsonProperty("id")
private final String id;
/**
* The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of
* the DRG route table.
*
* @return the value
*/
public String getId() {
return id;
}
/**
* The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of
* the compartment the DRG is in. The DRG route table is always in the same compartment as the
* DRG.
*/
@com.fasterxml.jackson.annotation.JsonProperty("compartmentId")
private final String compartmentId;
/**
* The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of
* the compartment the DRG is in. The DRG route table is always in the same compartment as the
* DRG.
*
* @return the value
*/
public String getCompartmentId() {
return compartmentId;
}
/**
* The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of
* the DRG the DRG that contains this route table.
*/
@com.fasterxml.jackson.annotation.JsonProperty("drgId")
private final String drgId;
/**
* The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of
* the DRG the DRG that contains this route table.
*
* @return the value
*/
public String getDrgId() {
return drgId;
}
/**
* Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
* {@code {"foo-namespace": {"bar-key": "value"}}}
*/
@com.fasterxml.jackson.annotation.JsonProperty("definedTags")
private final java.util.Map> definedTags;
/**
* Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
* {@code {"foo-namespace": {"bar-key": "value"}}}
*
* @return the value
*/
public java.util.Map> getDefinedTags() {
return definedTags;
}
/**
* A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering
* confidential information.
*/
@com.fasterxml.jackson.annotation.JsonProperty("displayName")
private final String displayName;
/**
* A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering
* confidential information.
*
* @return the value
*/
public String getDisplayName() {
return displayName;
}
/**
* Simple key-value pair that is applied without any predefined name, type or scope. Exists for
* cross-compatibility only. Example: {@code {"bar-key": "value"}}
*/
@com.fasterxml.jackson.annotation.JsonProperty("freeformTags")
private final java.util.Map freeformTags;
/**
* Simple key-value pair that is applied without any predefined name, type or scope. Exists for
* cross-compatibility only. Example: {@code {"bar-key": "value"}}
*
* @return the value
*/
public java.util.Map getFreeformTags() {
return freeformTags;
}
/**
* The date and time the DRG route table was created, in the format defined by
* [RFC3339](https://tools.ietf.org/html/rfc3339).
*
* Example: {@code 2016-08-25T21:10:29.600Z}
*/
@com.fasterxml.jackson.annotation.JsonProperty("timeCreated")
private final java.util.Date timeCreated;
/**
* The date and time the DRG route table was created, in the format defined by
* [RFC3339](https://tools.ietf.org/html/rfc3339).
*
*
Example: {@code 2016-08-25T21:10:29.600Z}
*
* @return the value
*/
public java.util.Date getTimeCreated() {
return timeCreated;
}
/** The DRG route table's current state. */
public enum LifecycleState implements com.oracle.bmc.http.internal.BmcEnum {
Provisioning("PROVISIONING"),
Available("AVAILABLE"),
Terminating("TERMINATING"),
Terminated("TERMINATED"),
;
private final String value;
private static java.util.Map map;
static {
map = new java.util.HashMap<>();
for (LifecycleState v : LifecycleState.values()) {
map.put(v.getValue(), v);
}
}
LifecycleState(String value) {
this.value = value;
}
@com.fasterxml.jackson.annotation.JsonValue
public String getValue() {
return value;
}
@com.fasterxml.jackson.annotation.JsonCreator
public static LifecycleState create(String key) {
if (map.containsKey(key)) {
return map.get(key);
}
throw new IllegalArgumentException("Invalid LifecycleState: " + key);
}
};
/** The DRG route table's current state. */
@com.fasterxml.jackson.annotation.JsonProperty("lifecycleState")
private final LifecycleState lifecycleState;
/**
* The DRG route table's current state.
*
* @return the value
*/
public LifecycleState getLifecycleState() {
return lifecycleState;
}
/**
* The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of
* the import route distribution used to specify how incoming route advertisements from
* referenced attachments are inserted into the DRG route table.
*/
@com.fasterxml.jackson.annotation.JsonProperty("importDrgRouteDistributionId")
private final String importDrgRouteDistributionId;
/**
* The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of
* the import route distribution used to specify how incoming route advertisements from
* referenced attachments are inserted into the DRG route table.
*
* @return the value
*/
public String getImportDrgRouteDistributionId() {
return importDrgRouteDistributionId;
}
/**
* If you want traffic to be routed using ECMP across your virtual circuits or IPSec tunnels to
* your on-premises network, enable ECMP on the DRG route table to which these attachments
* import routes.
*/
@com.fasterxml.jackson.annotation.JsonProperty("isEcmpEnabled")
private final Boolean isEcmpEnabled;
/**
* If you want traffic to be routed using ECMP across your virtual circuits or IPSec tunnels to
* your on-premises network, enable ECMP on the DRG route table to which these attachments
* import routes.
*
* @return the value
*/
public Boolean getIsEcmpEnabled() {
return isEcmpEnabled;
}
@Override
public String toString() {
return this.toString(true);
}
/**
* Return a string representation of the object.
*
* @param includeByteArrayContents true to include the full contents of byte arrays
* @return string representation
*/
public String toString(boolean includeByteArrayContents) {
java.lang.StringBuilder sb = new java.lang.StringBuilder();
sb.append("DrgRouteTable(");
sb.append("super=").append(super.toString());
sb.append("id=").append(String.valueOf(this.id));
sb.append(", compartmentId=").append(String.valueOf(this.compartmentId));
sb.append(", drgId=").append(String.valueOf(this.drgId));
sb.append(", definedTags=").append(String.valueOf(this.definedTags));
sb.append(", displayName=").append(String.valueOf(this.displayName));
sb.append(", freeformTags=").append(String.valueOf(this.freeformTags));
sb.append(", timeCreated=").append(String.valueOf(this.timeCreated));
sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState));
sb.append(", importDrgRouteDistributionId=")
.append(String.valueOf(this.importDrgRouteDistributionId));
sb.append(", isEcmpEnabled=").append(String.valueOf(this.isEcmpEnabled));
sb.append(")");
return sb.toString();
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof DrgRouteTable)) {
return false;
}
DrgRouteTable other = (DrgRouteTable) o;
return java.util.Objects.equals(this.id, other.id)
&& java.util.Objects.equals(this.compartmentId, other.compartmentId)
&& java.util.Objects.equals(this.drgId, other.drgId)
&& java.util.Objects.equals(this.definedTags, other.definedTags)
&& java.util.Objects.equals(this.displayName, other.displayName)
&& java.util.Objects.equals(this.freeformTags, other.freeformTags)
&& java.util.Objects.equals(this.timeCreated, other.timeCreated)
&& java.util.Objects.equals(this.lifecycleState, other.lifecycleState)
&& java.util.Objects.equals(
this.importDrgRouteDistributionId, other.importDrgRouteDistributionId)
&& java.util.Objects.equals(this.isEcmpEnabled, other.isEcmpEnabled)
&& super.equals(other);
}
@Override
public int hashCode() {
final int PRIME = 59;
int result = 1;
result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode());
result =
(result * PRIME)
+ (this.compartmentId == null ? 43 : this.compartmentId.hashCode());
result = (result * PRIME) + (this.drgId == null ? 43 : this.drgId.hashCode());
result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode());
result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode());
result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode());
result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode());
result =
(result * PRIME)
+ (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode());
result =
(result * PRIME)
+ (this.importDrgRouteDistributionId == null
? 43
: this.importDrgRouteDistributionId.hashCode());
result =
(result * PRIME)
+ (this.isEcmpEnabled == null ? 43 : this.isEcmpEnabled.hashCode());
result = (result * PRIME) + super.hashCode();
return result;
}
}