Class SecurityRule
- java.lang.Object
- 
- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
- 
- com.oracle.bmc.networkfirewall.model.SecurityRule
 
 
- 
 @Generated(value="OracleSDKGenerator", comments="API Version: 20230501") public final class SecurityRule extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModelSecurity Rule used in the firewall policy rules.Security Rules determine whether to block or allow a session based on traffic attributes, such as the source and destination IP address, protocol/port, and the HTTP(S) target URL. 
 Note: Objects should always be created or deserialized using theSecurityRule.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 theSecurityRule.Builder, which maintain a set of all explicitly set fields calledSecurityRule.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 SummaryNested Classes Modifier and Type Class Description static classSecurityRule.Builder
 - 
Constructor SummaryConstructors Constructor Description SecurityRule(String name, SecurityRuleMatchCriteria condition, TrafficActionType action, TrafficInspectionType inspection, RulePosition position, String parentResourceId)Deprecated.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SecurityRule.Builderbuilder()Create a new builder.booleanequals(Object o)TrafficActionTypegetAction()Types of Action on the Traffic flow.SecurityRuleMatchCriteriagetCondition()TrafficInspectionTypegetInspection()Type of inspection to affect the Traffic flow.StringgetName()Name for the Security rule, must be unique within the policy.StringgetParentResourceId()OCID of the Network Firewall Policy this security rule belongs to.RulePositiongetPosition()inthashCode()SecurityRule.BuildertoBuilder()StringtoString()StringtoString(boolean includeByteArrayContents)Return a string representation of the object.
 
- 
- 
- 
Constructor Detail- 
SecurityRule@Deprecated @ConstructorProperties({"name","condition","action","inspection","position","parentResourceId"}) public SecurityRule(String name, SecurityRuleMatchCriteria condition, TrafficActionType action, TrafficInspectionType inspection, RulePosition position, String parentResourceId) Deprecated.
 
- 
 - 
Method Detail- 
builderpublic static SecurityRule.Builder builder() Create a new builder.
 - 
toBuilderpublic SecurityRule.Builder toBuilder() 
 - 
getNamepublic String getName() Name for the Security rule, must be unique within the policy.- Returns:
- the value
 
 - 
getConditionpublic SecurityRuleMatchCriteria getCondition() 
 - 
getActionpublic TrafficActionType getAction() Types of Action on the Traffic flow.ALLOW - Allows the traffic. * DROP - Silently drops the traffic, e.g. without sending a TCP reset. * REJECT - Rejects the traffic, sending a TCP reset to client and/or server as applicable. * INSPECT - Inspects traffic for vulnerability as specified in inspection, which may result in rejection. - Returns:
- the value
 
 - 
getInspectionpublic TrafficInspectionType getInspection() Type of inspection to affect the Traffic flow.This is only applicable if action is INSPECT. INTRUSION_DETECTION - Intrusion Detection. * INTRUSION_PREVENTION - Intrusion Detection and Prevention. Traffic classified as potentially malicious will be rejected as described in type. - Returns:
- the value
 
 - 
getPositionpublic RulePosition getPosition() 
 - 
getParentResourceIdpublic String getParentResourceId() OCID of the Network Firewall Policy this security rule belongs to.- Returns:
- the value
 
 - 
toStringpublic String toString() - Overrides:
- toStringin class- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
 
 - 
toStringpublic 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
 
 - 
equalspublic boolean equals(Object o) - Overrides:
- equalsin class- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
 
 
- 
 
-