![JAR search and dependency download from the Maven repository](/logo.png)
com.oracle.bmc.vnmonitoring.model.ServiceGateway 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;
/**
* Represents a router that lets your VCN privately access specific Oracle services such as Object
* Storage without exposing the VCN to the public internet. Traffic leaving the VCN and destined for
* a supported Oracle service (see {@link #listServices(ListServicesRequest) listServices}) is
* routed through the service gateway and does not traverse the internet. The instances in the VCN
* do not need to have public IP addresses nor be in a public subnet. The VCN does not need an
* internet gateway for this traffic. For more information, see [Access to Oracle Services: Service
* Gateway](https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/servicegateway.htm).
*
* To use any of the API operations, you must be authorized in an IAM policy. If you're not
* authorized, talk to an administrator. If you're an administrator who needs to write policies to
* give users access, see [Getting Started with
* Policies](https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm).
*
* 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 = ServiceGateway.Builder.class)
@com.fasterxml.jackson.annotation.JsonFilter(
com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME)
public final class ServiceGateway
extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel {
@Deprecated
@java.beans.ConstructorProperties({
"blockTraffic",
"compartmentId",
"definedTags",
"displayName",
"freeformTags",
"id",
"lifecycleState",
"routeTableId",
"services",
"timeCreated",
"vcnId"
})
public ServiceGateway(
Boolean blockTraffic,
String compartmentId,
java.util.Map> definedTags,
String displayName,
java.util.Map freeformTags,
String id,
LifecycleState lifecycleState,
String routeTableId,
java.util.List services,
java.util.Date timeCreated,
String vcnId) {
super();
this.blockTraffic = blockTraffic;
this.compartmentId = compartmentId;
this.definedTags = definedTags;
this.displayName = displayName;
this.freeformTags = freeformTags;
this.id = id;
this.lifecycleState = lifecycleState;
this.routeTableId = routeTableId;
this.services = services;
this.timeCreated = timeCreated;
this.vcnId = vcnId;
}
@com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "")
public static class Builder {
/**
* Whether the service gateway blocks all traffic through it. The default is {@code false}.
* When this is {@code true}, traffic is not routed to any services, regardless of route
* rules.
*
* Example: {@code true}
*/
@com.fasterxml.jackson.annotation.JsonProperty("blockTraffic")
private Boolean blockTraffic;
/**
* Whether the service gateway blocks all traffic through it. The default is {@code false}.
* When this is {@code true}, traffic is not routed to any services, regardless of route
* rules.
*
*
Example: {@code true}
*
* @param blockTraffic the value to set
* @return this builder
*/
public Builder blockTraffic(Boolean blockTraffic) {
this.blockTraffic = blockTraffic;
this.__explicitlySet__.add("blockTraffic");
return this;
}
/**
* The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)
* of the compartment that contains the service gateway.
*/
@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 that contains the service gateway.
*
* @param compartmentId the value to set
* @return this builder
*/
public Builder compartmentId(String compartmentId) {
this.compartmentId = compartmentId;
this.__explicitlySet__.add("compartmentId");
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 [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)
* of the service gateway.
*/
@com.fasterxml.jackson.annotation.JsonProperty("id")
private String id;
/**
* The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)
* of the service gateway.
*
* @param id the value to set
* @return this builder
*/
public Builder id(String id) {
this.id = id;
this.__explicitlySet__.add("id");
return this;
}
/** The service gateway's current state. */
@com.fasterxml.jackson.annotation.JsonProperty("lifecycleState")
private LifecycleState lifecycleState;
/**
* The service gateway'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 route table the service gateway is using. For information about why you would
* associate a route table with a service gateway, see [Transit Routing: Private Access to
* Oracle
* Services](https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/transitroutingoracleservices.htm).
*/
@com.fasterxml.jackson.annotation.JsonProperty("routeTableId")
private String routeTableId;
/**
* The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)
* of the route table the service gateway is using. For information about why you would
* associate a route table with a service gateway, see [Transit Routing: Private Access to
* Oracle
* Services](https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/transitroutingoracleservices.htm).
*
* @param routeTableId the value to set
* @return this builder
*/
public Builder routeTableId(String routeTableId) {
this.routeTableId = routeTableId;
this.__explicitlySet__.add("routeTableId");
return this;
}
/**
* List of the {@link Service} objects enabled for this service gateway. The list can be
* empty. You can enable a particular {@code Service} by using {@link
* #attachServiceId(AttachServiceIdRequest) attachServiceId} or {@link
* #updateServiceGateway(UpdateServiceGatewayRequest) updateServiceGateway}.
*/
@com.fasterxml.jackson.annotation.JsonProperty("services")
private java.util.List services;
/**
* List of the {@link Service} objects enabled for this service gateway. The list can be
* empty. You can enable a particular {@code Service} by using {@link
* #attachServiceId(AttachServiceIdRequest) attachServiceId} or {@link
* #updateServiceGateway(UpdateServiceGatewayRequest) updateServiceGateway}.
*
* @param services the value to set
* @return this builder
*/
public Builder services(java.util.List services) {
this.services = services;
this.__explicitlySet__.add("services");
return this;
}
/**
* The date and time the service gateway 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 service gateway 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 [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)
* of the VCN the service gateway belongs to.
*/
@com.fasterxml.jackson.annotation.JsonProperty("vcnId")
private String vcnId;
/**
* The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)
* of the VCN the service gateway belongs to.
*
* @param vcnId the value to set
* @return this builder
*/
public Builder vcnId(String vcnId) {
this.vcnId = vcnId;
this.__explicitlySet__.add("vcnId");
return this;
}
@com.fasterxml.jackson.annotation.JsonIgnore
private final java.util.Set __explicitlySet__ = new java.util.HashSet();
public ServiceGateway build() {
ServiceGateway model =
new ServiceGateway(
this.blockTraffic,
this.compartmentId,
this.definedTags,
this.displayName,
this.freeformTags,
this.id,
this.lifecycleState,
this.routeTableId,
this.services,
this.timeCreated,
this.vcnId);
for (String explicitlySetProperty : this.__explicitlySet__) {
model.markPropertyAsExplicitlySet(explicitlySetProperty);
}
return model;
}
@com.fasterxml.jackson.annotation.JsonIgnore
public Builder copy(ServiceGateway model) {
if (model.wasPropertyExplicitlySet("blockTraffic")) {
this.blockTraffic(model.getBlockTraffic());
}
if (model.wasPropertyExplicitlySet("compartmentId")) {
this.compartmentId(model.getCompartmentId());
}
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("id")) {
this.id(model.getId());
}
if (model.wasPropertyExplicitlySet("lifecycleState")) {
this.lifecycleState(model.getLifecycleState());
}
if (model.wasPropertyExplicitlySet("routeTableId")) {
this.routeTableId(model.getRouteTableId());
}
if (model.wasPropertyExplicitlySet("services")) {
this.services(model.getServices());
}
if (model.wasPropertyExplicitlySet("timeCreated")) {
this.timeCreated(model.getTimeCreated());
}
if (model.wasPropertyExplicitlySet("vcnId")) {
this.vcnId(model.getVcnId());
}
return this;
}
}
/** Create a new builder. */
public static Builder builder() {
return new Builder();
}
public Builder toBuilder() {
return new Builder().copy(this);
}
/**
* Whether the service gateway blocks all traffic through it. The default is {@code false}. When
* this is {@code true}, traffic is not routed to any services, regardless of route rules.
*
* Example: {@code true}
*/
@com.fasterxml.jackson.annotation.JsonProperty("blockTraffic")
private final Boolean blockTraffic;
/**
* Whether the service gateway blocks all traffic through it. The default is {@code false}. When
* this is {@code true}, traffic is not routed to any services, regardless of route rules.
*
*
Example: {@code true}
*
* @return the value
*/
public Boolean getBlockTraffic() {
return blockTraffic;
}
/**
* The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of
* the compartment that contains the service gateway.
*/
@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 that contains the service gateway.
*
* @return the value
*/
public String getCompartmentId() {
return compartmentId;
}
/**
* 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 [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of
* the service gateway.
*/
@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 service gateway.
*
* @return the value
*/
public String getId() {
return id;
}
/** The service gateway'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 service gateway's current state. */
@com.fasterxml.jackson.annotation.JsonProperty("lifecycleState")
private final LifecycleState lifecycleState;
/**
* The service gateway'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 route table the service gateway is using. For information about why you would associate a
* route table with a service gateway, see [Transit Routing: Private Access to Oracle
* Services](https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/transitroutingoracleservices.htm).
*/
@com.fasterxml.jackson.annotation.JsonProperty("routeTableId")
private final String routeTableId;
/**
* The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of
* the route table the service gateway is using. For information about why you would associate a
* route table with a service gateway, see [Transit Routing: Private Access to Oracle
* Services](https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/transitroutingoracleservices.htm).
*
* @return the value
*/
public String getRouteTableId() {
return routeTableId;
}
/**
* List of the {@link Service} objects enabled for this service gateway. The list can be empty.
* You can enable a particular {@code Service} by using {@link
* #attachServiceId(AttachServiceIdRequest) attachServiceId} or {@link
* #updateServiceGateway(UpdateServiceGatewayRequest) updateServiceGateway}.
*/
@com.fasterxml.jackson.annotation.JsonProperty("services")
private final java.util.List services;
/**
* List of the {@link Service} objects enabled for this service gateway. The list can be empty.
* You can enable a particular {@code Service} by using {@link
* #attachServiceId(AttachServiceIdRequest) attachServiceId} or {@link
* #updateServiceGateway(UpdateServiceGatewayRequest) updateServiceGateway}.
*
* @return the value
*/
public java.util.List getServices() {
return services;
}
/**
* The date and time the service gateway 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 service gateway 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 [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of
* the VCN the service gateway belongs to.
*/
@com.fasterxml.jackson.annotation.JsonProperty("vcnId")
private final String vcnId;
/**
* The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of
* the VCN the service gateway belongs to.
*
* @return the value
*/
public String getVcnId() {
return vcnId;
}
@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("ServiceGateway(");
sb.append("super=").append(super.toString());
sb.append("blockTraffic=").append(String.valueOf(this.blockTraffic));
sb.append(", compartmentId=").append(String.valueOf(this.compartmentId));
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(", id=").append(String.valueOf(this.id));
sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState));
sb.append(", routeTableId=").append(String.valueOf(this.routeTableId));
sb.append(", services=").append(String.valueOf(this.services));
sb.append(", timeCreated=").append(String.valueOf(this.timeCreated));
sb.append(", vcnId=").append(String.valueOf(this.vcnId));
sb.append(")");
return sb.toString();
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof ServiceGateway)) {
return false;
}
ServiceGateway other = (ServiceGateway) o;
return java.util.Objects.equals(this.blockTraffic, other.blockTraffic)
&& java.util.Objects.equals(this.compartmentId, other.compartmentId)
&& 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.id, other.id)
&& java.util.Objects.equals(this.lifecycleState, other.lifecycleState)
&& java.util.Objects.equals(this.routeTableId, other.routeTableId)
&& java.util.Objects.equals(this.services, other.services)
&& java.util.Objects.equals(this.timeCreated, other.timeCreated)
&& java.util.Objects.equals(this.vcnId, other.vcnId)
&& super.equals(other);
}
@Override
public int hashCode() {
final int PRIME = 59;
int result = 1;
result = (result * PRIME) + (this.blockTraffic == null ? 43 : this.blockTraffic.hashCode());
result =
(result * PRIME)
+ (this.compartmentId == null ? 43 : this.compartmentId.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.id == null ? 43 : this.id.hashCode());
result =
(result * PRIME)
+ (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode());
result = (result * PRIME) + (this.routeTableId == null ? 43 : this.routeTableId.hashCode());
result = (result * PRIME) + (this.services == null ? 43 : this.services.hashCode());
result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode());
result = (result * PRIME) + (this.vcnId == null ? 43 : this.vcnId.hashCode());
result = (result * PRIME) + super.hashCode();
return result;
}
}