Class: OCI::Waf::Models::ProtectionCapabilitySummary
- Inherits:
-
Object
- Object
- OCI::Waf::Models::ProtectionCapabilitySummary
- Defined in:
- lib/oci/waf/models/protection_capability_summary.rb
Overview
A summary of available OCI-managed protection capabilities in WebAppFirewallPolicy. Protection capabilies checks HTTP requests/responses if they are malicious.
Constant Summary collapse
- TYPE_ENUM =
[ TYPE_REQUEST_PROTECTION_CAPABILITY = 'REQUEST_PROTECTION_CAPABILITY'.freeze, TYPE_RESPONSE_PROTECTION_CAPABILITY = 'RESPONSE_PROTECTION_CAPABILITY'.freeze, TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#collaborative_action_threshold ⇒ Integer
The default collaborative action threshold for OCI-managed collaborative protection capability.
-
#collaborative_weights ⇒ Array<OCI::Waf::Models::CollaborativeCapabilityWeight>
The weights of contributing capabilities.
-
#description ⇒ String
[Required] The description of protection capability.
-
#display_name ⇒ String
[Required] The display name of protection capability.
-
#group_tags ⇒ Array<String>
The list of unique names protection capability group tags that are associated with this capability.
-
#is_latest_version ⇒ BOOLEAN
[Required] The field that shows if this is the latest version of protection capability.
-
#key ⇒ String
[Required] Unique key of protection capability.
-
#type ⇒ String
[Required] The type of protection capability.
-
#version ⇒ Integer
[Required] The version of protection capability.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ProtectionCapabilitySummary
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ ProtectionCapabilitySummary
Initializes the object
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/oci/waf/models/protection_capability_summary.rb', line 125 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.key = attributes[:'key'] if attributes[:'key'] self.display_name = attributes[:'displayName'] if attributes[:'displayName'] raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name') self.display_name = attributes[:'display_name'] if attributes[:'display_name'] self.description = attributes[:'description'] if attributes[:'description'] self.version = attributes[:'version'] if attributes[:'version'] self.is_latest_version = attributes[:'isLatestVersion'] unless attributes[:'isLatestVersion'].nil? raise 'You cannot provide both :isLatestVersion and :is_latest_version' if attributes.key?(:'isLatestVersion') && attributes.key?(:'is_latest_version') self.is_latest_version = attributes[:'is_latest_version'] unless attributes[:'is_latest_version'].nil? self. = attributes[:'groupTags'] if attributes[:'groupTags'] raise 'You cannot provide both :groupTags and :group_tags' if attributes.key?(:'groupTags') && attributes.key?(:'group_tags') self. = attributes[:'group_tags'] if attributes[:'group_tags'] self.type = attributes[:'type'] if attributes[:'type'] self.collaborative_action_threshold = attributes[:'collaborativeActionThreshold'] if attributes[:'collaborativeActionThreshold'] raise 'You cannot provide both :collaborativeActionThreshold and :collaborative_action_threshold' if attributes.key?(:'collaborativeActionThreshold') && attributes.key?(:'collaborative_action_threshold') self.collaborative_action_threshold = attributes[:'collaborative_action_threshold'] if attributes[:'collaborative_action_threshold'] self.collaborative_weights = attributes[:'collaborativeWeights'] if attributes[:'collaborativeWeights'] raise 'You cannot provide both :collaborativeWeights and :collaborative_weights' if attributes.key?(:'collaborativeWeights') && attributes.key?(:'collaborative_weights') self.collaborative_weights = attributes[:'collaborative_weights'] if attributes[:'collaborative_weights'] end |
Instance Attribute Details
#collaborative_action_threshold ⇒ Integer
The default collaborative action threshold for OCI-managed collaborative protection capability. Collaborative protection capabilities are made of several simple, non-collaborative protection capabilities (referred to as contributing capabilities
later on) which have weights assigned to them. These weights can be found in the collaborativeWeights
array. For incoming/outgoing HTTP messages, all contributing capabilities are executed and the sum of all triggered contributing capabilities weights is calculated. Only if this sum is greater than or equal to collaborativeActionThreshold
is the incoming/outgoing HTTP message marked as malicious.
This field is ignored for non-collaborative capabilities.
66 67 68 |
# File 'lib/oci/waf/models/protection_capability_summary.rb', line 66 def collaborative_action_threshold @collaborative_action_threshold end |
#collaborative_weights ⇒ Array<OCI::Waf::Models::CollaborativeCapabilityWeight>
The weights of contributing capabilities. Defines how much each contributing capability contributes towards the action threshold of a collaborative protection capability.
This field is ignored for non-collaborative capabilities.
74 75 76 |
# File 'lib/oci/waf/models/protection_capability_summary.rb', line 74 def collaborative_weights @collaborative_weights end |
#description ⇒ String
[Required] The description of protection capability.
30 31 32 |
# File 'lib/oci/waf/models/protection_capability_summary.rb', line 30 def description @description end |
#display_name ⇒ String
[Required] The display name of protection capability.
26 27 28 |
# File 'lib/oci/waf/models/protection_capability_summary.rb', line 26 def display_name @display_name end |
#group_tags ⇒ Array<String>
The list of unique names protection capability group tags that are associated with this capability. Example: ["PCI", "Recommended"]
44 45 46 |
# File 'lib/oci/waf/models/protection_capability_summary.rb', line 44 def @group_tags end |
#is_latest_version ⇒ BOOLEAN
[Required] The field that shows if this is the latest version of protection capability.
38 39 40 |
# File 'lib/oci/waf/models/protection_capability_summary.rb', line 38 def is_latest_version @is_latest_version end |
#key ⇒ String
[Required] Unique key of protection capability.
22 23 24 |
# File 'lib/oci/waf/models/protection_capability_summary.rb', line 22 def key @key end |
#type ⇒ String
[Required] The type of protection capability.
-
REQUEST_PROTECTION_CAPABILITY can only be used in
requestProtection
module of WebAppFirewallPolicy. -
RESPONSE_PROTECTION_CAPABILITY can only be used in
responseProtection
module of WebAppFirewallPolicy.
53 54 55 |
# File 'lib/oci/waf/models/protection_capability_summary.rb', line 53 def type @type end |
#version ⇒ Integer
[Required] The version of protection capability.
34 35 36 |
# File 'lib/oci/waf/models/protection_capability_summary.rb', line 34 def version @version end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/oci/waf/models/protection_capability_summary.rb', line 77 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'key': :'key', 'display_name': :'displayName', 'description': :'description', 'version': :'version', 'is_latest_version': :'isLatestVersion', 'group_tags': :'groupTags', 'type': :'type', 'collaborative_action_threshold': :'collaborativeActionThreshold', 'collaborative_weights': :'collaborativeWeights' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/oci/waf/models/protection_capability_summary.rb', line 94 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'key': :'String', 'display_name': :'String', 'description': :'String', 'version': :'Integer', 'is_latest_version': :'BOOLEAN', 'group_tags': :'Array<String>', 'type': :'String', 'collaborative_action_threshold': :'Integer', 'collaborative_weights': :'Array<OCI::Waf::Models::CollaborativeCapabilityWeight>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/oci/waf/models/protection_capability_summary.rb', line 190 def ==(other) return true if equal?(other) self.class == other.class && key == other.key && display_name == other.display_name && description == other.description && version == other.version && is_latest_version == other.is_latest_version && == other. && type == other.type && collaborative_action_threshold == other.collaborative_action_threshold && collaborative_weights == other.collaborative_weights end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 |
# File 'lib/oci/waf/models/protection_capability_summary.rb', line 228 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
208 209 210 |
# File 'lib/oci/waf/models/protection_capability_summary.rb', line 208 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
217 218 219 |
# File 'lib/oci/waf/models/protection_capability_summary.rb', line 217 def hash [key, display_name, description, version, is_latest_version, , type, collaborative_action_threshold, collaborative_weights].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
261 262 263 264 265 266 267 268 269 270 |
# File 'lib/oci/waf/models/protection_capability_summary.rb', line 261 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
255 256 257 |
# File 'lib/oci/waf/models/protection_capability_summary.rb', line 255 def to_s to_hash.to_s end |