Class: OCI::Core::Models::VtapCaptureFilterRuleDetails
- Inherits:
-
Object
- Object
- OCI::Core::Models::VtapCaptureFilterRuleDetails
- Defined in:
- lib/oci/core/models/vtap_capture_filter_rule_details.rb
Overview
This resource contains the rules governing what traffic a VTAP mirrors.
Constant Summary collapse
- TRAFFIC_DIRECTION_ENUM =
[ TRAFFIC_DIRECTION_INGRESS = 'INGRESS'.freeze, TRAFFIC_DIRECTION_EGRESS = 'EGRESS'.freeze, TRAFFIC_DIRECTION_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 sent to this CIDR block through the VTAP source will be mirrored to the VTAP target.
- #icmp_options ⇒ OCI::Core::Models::IcmpOptions
-
#protocol ⇒ String
The transport protocol used in the filter.
-
#rule_action ⇒ String
Include or exclude packets meeting this definition from mirrored traffic.
-
#source_cidr ⇒ String
Traffic from this CIDR block to the VTAP source will be mirrored to the VTAP target.
- #tcp_options ⇒ OCI::Core::Models::TcpOptions
-
#traffic_direction ⇒ String
[Required] The traffic direction the VTAP is configured to mirror.
- #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 = {}) ⇒ VtapCaptureFilterRuleDetails
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 = {}) ⇒ VtapCaptureFilterRuleDetails
Initializes the object
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 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 |
# File 'lib/oci/core/models/vtap_capture_filter_rule_details.rb', line 109 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.traffic_direction = attributes[:'trafficDirection'] if attributes[:'trafficDirection'] raise 'You cannot provide both :trafficDirection and :traffic_direction' if attributes.key?(:'trafficDirection') && attributes.key?(:'traffic_direction') self.traffic_direction = attributes[:'traffic_direction'] if attributes[:'traffic_direction'] 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'] 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'] end |
Instance Attribute Details
#destination_cidr ⇒ String
Traffic sent to this CIDR block through the VTAP source will be mirrored to the VTAP target.
43 44 45 |
# File 'lib/oci/core/models/vtap_capture_filter_rule_details.rb', line 43 def destination_cidr @destination_cidr end |
#icmp_options ⇒ OCI::Core::Models::IcmpOptions
55 56 57 |
# File 'lib/oci/core/models/vtap_capture_filter_rule_details.rb', line 55 def @icmp_options end |
#protocol ⇒ String
The transport protocol used in the filter. If do not choose a protocol, all protocols will be used in the filter. Supported options are: * 1 = ICMP * 6 = TCP * 17 = UDP
52 53 54 |
# File 'lib/oci/core/models/vtap_capture_filter_rule_details.rb', line 52 def protocol @protocol end |
#rule_action ⇒ String
Include or exclude packets meeting this definition from mirrored traffic.
33 34 35 |
# File 'lib/oci/core/models/vtap_capture_filter_rule_details.rb', line 33 def rule_action @rule_action end |
#source_cidr ⇒ String
Traffic from this CIDR block to the VTAP source will be mirrored to the VTAP target.
38 39 40 |
# File 'lib/oci/core/models/vtap_capture_filter_rule_details.rb', line 38 def source_cidr @source_cidr end |
#tcp_options ⇒ OCI::Core::Models::TcpOptions
58 59 60 |
# File 'lib/oci/core/models/vtap_capture_filter_rule_details.rb', line 58 def @tcp_options end |
#traffic_direction ⇒ String
[Required] The traffic direction the VTAP is configured to mirror.
28 29 30 |
# File 'lib/oci/core/models/vtap_capture_filter_rule_details.rb', line 28 def traffic_direction @traffic_direction end |
#udp_options ⇒ OCI::Core::Models::UdpOptions
61 62 63 |
# File 'lib/oci/core/models/vtap_capture_filter_rule_details.rb', line 61 def @udp_options end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/oci/core/models/vtap_capture_filter_rule_details.rb', line 64 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'traffic_direction': :'trafficDirection', 'rule_action': :'ruleAction', 'source_cidr': :'sourceCidr', 'destination_cidr': :'destinationCidr', 'protocol': :'protocol', 'icmp_options': :'icmpOptions', 'tcp_options': :'tcpOptions', 'udp_options': :'udpOptions' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/oci/core/models/vtap_capture_filter_rule_details.rb', line 80 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'traffic_direction': :'String', 'rule_action': :'String', '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' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
193 194 195 196 197 198 199 200 201 202 203 204 205 |
# File 'lib/oci/core/models/vtap_capture_filter_rule_details.rb', line 193 def ==(other) return true if equal?(other) self.class == other.class && traffic_direction == other.traffic_direction && rule_action == other.rule_action && source_cidr == other.source_cidr && destination_cidr == other.destination_cidr && protocol == other.protocol && == other. && == other. && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
# File 'lib/oci/core/models/vtap_capture_filter_rule_details.rb', line 230 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
210 211 212 |
# File 'lib/oci/core/models/vtap_capture_filter_rule_details.rb', line 210 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
219 220 221 |
# File 'lib/oci/core/models/vtap_capture_filter_rule_details.rb', line 219 def hash [traffic_direction, rule_action, source_cidr, destination_cidr, protocol, , , ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
263 264 265 266 267 268 269 270 271 272 |
# File 'lib/oci/core/models/vtap_capture_filter_rule_details.rb', line 263 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
257 258 259 |
# File 'lib/oci/core/models/vtap_capture_filter_rule_details.rb', line 257 def to_s to_hash.to_s end |