Class: OCI::Core::Models::FlowLogCaptureFilterRuleDetails
- Inherits:
-
Object
- Object
- OCI::Core::Models::FlowLogCaptureFilterRuleDetails
- Defined in:
- lib/oci/core/models/flow_log_capture_filter_rule_details.rb
Overview
The set of rules governing what traffic the VCN flow log collects.
Constant Summary collapse
- FLOW_LOG_TYPE_ENUM =
[ FLOW_LOG_TYPE_ALL = 'ALL'.freeze, FLOW_LOG_TYPE_REJECT = 'REJECT'.freeze, FLOW_LOG_TYPE_ACCEPT = 'ACCEPT'.freeze, FLOW_LOG_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- RULE_ACTION_ENUM =
[ RULE_ACTION_INCLUDE = 'INCLUDE'.freeze, RULE_ACTION_EXCLUDE = 'EXCLUDE'.freeze, RULE_ACTION_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#destination_cidr ⇒ String
Traffic to this CIDR will be captured in the VCN flow log.
-
#flow_log_type ⇒ String
Type or types of VCN flow logs to store.
- #icmp_options ⇒ OCI::Core::Models::IcmpOptions
-
#is_enabled ⇒ BOOLEAN
Indicates whether a VCN flow log capture filter rule is enabled.
-
#priority ⇒ Integer
A lower number indicates a higher priority, range 0-9.
-
#protocol ⇒ String
The transport protocol the filter uses.
-
#rule_action ⇒ String
Include or exclude a
ruleAction
object. -
#sampling_rate ⇒ Integer
Sampling interval as
1
ofX
, whereX
is an integer not greater than100000
. -
#source_cidr ⇒ String
Traffic from this CIDR will be captured in the VCN flow log.
- #tcp_options ⇒ OCI::Core::Models::TcpOptions
- #udp_options ⇒ OCI::Core::Models::UdpOptions
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 = {}) ⇒ FlowLogCaptureFilterRuleDetails
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 = {}) ⇒ FlowLogCaptureFilterRuleDetails
Initializes the object
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 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/oci/core/models/flow_log_capture_filter_rule_details.rb', line 131 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.is_enabled = attributes[:'isEnabled'] unless attributes[:'isEnabled'].nil? raise 'You cannot provide both :isEnabled and :is_enabled' if attributes.key?(:'isEnabled') && attributes.key?(:'is_enabled') self.is_enabled = attributes[:'is_enabled'] unless attributes[:'is_enabled'].nil? self.priority = attributes[:'priority'] if attributes[:'priority'] self.sampling_rate = attributes[:'samplingRate'] if attributes[:'samplingRate'] raise 'You cannot provide both :samplingRate and :sampling_rate' if attributes.key?(:'samplingRate') && attributes.key?(:'sampling_rate') self.sampling_rate = attributes[:'sampling_rate'] if attributes[:'sampling_rate'] self.source_cidr = attributes[:'sourceCidr'] if attributes[:'sourceCidr'] raise 'You cannot provide both :sourceCidr and :source_cidr' if attributes.key?(:'sourceCidr') && attributes.key?(:'source_cidr') self.source_cidr = attributes[:'source_cidr'] if attributes[:'source_cidr'] self.destination_cidr = attributes[:'destinationCidr'] if attributes[:'destinationCidr'] raise 'You cannot provide both :destinationCidr and :destination_cidr' if attributes.key?(:'destinationCidr') && attributes.key?(:'destination_cidr') self.destination_cidr = attributes[:'destination_cidr'] if attributes[:'destination_cidr'] self.protocol = attributes[:'protocol'] if attributes[:'protocol'] self. = attributes[:'icmpOptions'] if attributes[:'icmpOptions'] raise 'You cannot provide both :icmpOptions and :icmp_options' if attributes.key?(:'icmpOptions') && attributes.key?(:'icmp_options') self. = attributes[:'icmp_options'] if attributes[:'icmp_options'] self. = attributes[:'tcpOptions'] if attributes[:'tcpOptions'] raise 'You cannot provide both :tcpOptions and :tcp_options' if attributes.key?(:'tcpOptions') && attributes.key?(:'tcp_options') self. = attributes[:'tcp_options'] if attributes[:'tcp_options'] self. = attributes[:'udpOptions'] if attributes[:'udpOptions'] raise 'You cannot provide both :udpOptions and :udp_options' if attributes.key?(:'udpOptions') && attributes.key?(:'udp_options') self. = attributes[:'udp_options'] if attributes[:'udp_options'] self.flow_log_type = attributes[:'flowLogType'] if attributes[:'flowLogType'] raise 'You cannot provide both :flowLogType and :flow_log_type' if attributes.key?(:'flowLogType') && attributes.key?(:'flow_log_type') self.flow_log_type = attributes[:'flow_log_type'] if attributes[:'flow_log_type'] self.rule_action = attributes[:'ruleAction'] if attributes[:'ruleAction'] raise 'You cannot provide both :ruleAction and :rule_action' if attributes.key?(:'ruleAction') && attributes.key?(:'rule_action') self.rule_action = attributes[:'rule_action'] if attributes[:'rule_action'] end |
Instance Attribute Details
#destination_cidr ⇒ String
Traffic to this CIDR will be captured in the VCN flow log.
49 50 51 |
# File 'lib/oci/core/models/flow_log_capture_filter_rule_details.rb', line 49 def destination_cidr @destination_cidr end |
#flow_log_type ⇒ String
Type or types of VCN flow logs to store. ALL
includes records for both accepted traffic and rejected traffic.
69 70 71 |
# File 'lib/oci/core/models/flow_log_capture_filter_rule_details.rb', line 69 def flow_log_type @flow_log_type end |
#icmp_options ⇒ OCI::Core::Models::IcmpOptions
57 58 59 |
# File 'lib/oci/core/models/flow_log_capture_filter_rule_details.rb', line 57 def @icmp_options end |
#is_enabled ⇒ BOOLEAN
Indicates whether a VCN flow log capture filter rule is enabled.
29 30 31 |
# File 'lib/oci/core/models/flow_log_capture_filter_rule_details.rb', line 29 def is_enabled @is_enabled end |
#priority ⇒ Integer
A lower number indicates a higher priority, range 0-9. Each rule must have a distinct priority.
34 35 36 |
# File 'lib/oci/core/models/flow_log_capture_filter_rule_details.rb', line 34 def priority @priority end |
#protocol ⇒ String
The transport protocol the filter uses.
54 55 56 |
# File 'lib/oci/core/models/flow_log_capture_filter_rule_details.rb', line 54 def protocol @protocol end |
#rule_action ⇒ String
Include or exclude a ruleAction
object.
74 75 76 |
# File 'lib/oci/core/models/flow_log_capture_filter_rule_details.rb', line 74 def rule_action @rule_action end |
#sampling_rate ⇒ Integer
Sampling interval as 1
of X
, where X
is an integer not greater than 100000
.
39 40 41 |
# File 'lib/oci/core/models/flow_log_capture_filter_rule_details.rb', line 39 def sampling_rate @sampling_rate end |
#source_cidr ⇒ String
Traffic from this CIDR will be captured in the VCN flow log.
44 45 46 |
# File 'lib/oci/core/models/flow_log_capture_filter_rule_details.rb', line 44 def source_cidr @source_cidr end |
#tcp_options ⇒ OCI::Core::Models::TcpOptions
60 61 62 |
# File 'lib/oci/core/models/flow_log_capture_filter_rule_details.rb', line 60 def @tcp_options end |
#udp_options ⇒ OCI::Core::Models::UdpOptions
63 64 65 |
# File 'lib/oci/core/models/flow_log_capture_filter_rule_details.rb', line 63 def @udp_options 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 92 93 |
# File 'lib/oci/core/models/flow_log_capture_filter_rule_details.rb', line 77 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'is_enabled': :'isEnabled', 'priority': :'priority', 'sampling_rate': :'samplingRate', 'source_cidr': :'sourceCidr', 'destination_cidr': :'destinationCidr', 'protocol': :'protocol', 'icmp_options': :'icmpOptions', 'tcp_options': :'tcpOptions', 'udp_options': :'udpOptions', 'flow_log_type': :'flowLogType', 'rule_action': :'ruleAction' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/oci/core/models/flow_log_capture_filter_rule_details.rb', line 96 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'is_enabled': :'BOOLEAN', 'priority': :'Integer', 'sampling_rate': :'Integer', 'source_cidr': :'String', 'destination_cidr': :'String', 'protocol': :'String', 'icmp_options': :'OCI::Core::Models::IcmpOptions', 'tcp_options': :'OCI::Core::Models::TcpOptions', 'udp_options': :'OCI::Core::Models::UdpOptions', 'flow_log_type': :'String', 'rule_action': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 |
# File 'lib/oci/core/models/flow_log_capture_filter_rule_details.rb', line 229 def ==(other) return true if equal?(other) self.class == other.class && is_enabled == other.is_enabled && priority == other.priority && sampling_rate == other.sampling_rate && source_cidr == other.source_cidr && destination_cidr == other.destination_cidr && protocol == other.protocol && == other. && == other. && == other. && flow_log_type == other.flow_log_type && rule_action == other.rule_action end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 |
# File 'lib/oci/core/models/flow_log_capture_filter_rule_details.rb', line 269 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
249 250 251 |
# File 'lib/oci/core/models/flow_log_capture_filter_rule_details.rb', line 249 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
258 259 260 |
# File 'lib/oci/core/models/flow_log_capture_filter_rule_details.rb', line 258 def hash [is_enabled, priority, sampling_rate, source_cidr, destination_cidr, protocol, , , , flow_log_type, rule_action].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
302 303 304 305 306 307 308 309 310 311 |
# File 'lib/oci/core/models/flow_log_capture_filter_rule_details.rb', line 302 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
296 297 298 |
# File 'lib/oci/core/models/flow_log_capture_filter_rule_details.rb', line 296 def to_s to_hash.to_s end |