Class: OCI::LogAnalytics::Models::LogAnalyticsSourceDataFilter
- Inherits:
-
Object
- Object
- OCI::LogAnalytics::Models::LogAnalyticsSourceDataFilter
- Defined in:
- lib/oci/log_analytics/models/log_analytics_source_data_filter.rb
Overview
LogAnalyticsSourceDataFilter
Constant Summary collapse
- FILTER_TYPE_ENUM =
[ FILTER_TYPE_MASK = 'MASK'.freeze, FILTER_TYPE_HASH_MASK = 'HASH_MASK'.freeze, FILTER_TYPE_DROP_LOG_ENTRY = 'DROP_LOG_ENTRY'.freeze, FILTER_TYPE_DROP_STRING = 'DROP_STRING'.freeze, FILTER_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#data_filter_id ⇒ Integer
The filter unique identifier.
-
#description ⇒ String
The filter description.
-
#display_name ⇒ String
The filter display name.
-
#edit_version ⇒ Integer
The filter edit version.
-
#field_name ⇒ String
The field internal name.
-
#filter_type ⇒ String
The filter type.
-
#hash_type ⇒ Integer
The hash type.
-
#is_enabled ⇒ BOOLEAN
A flag inidcating whether or not the filter is enabled.
-
#is_system ⇒ BOOLEAN
The system flag.
-
#match_regular_expression ⇒ String
The regular expression for matching.
-
#order ⇒ Integer
The filter order.
-
#path ⇒ String
The filter path.
-
#replacement_string ⇒ String
The replacement string.
-
#source_id ⇒ Integer
The source unique identifier.
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 = {}) ⇒ LogAnalyticsSourceDataFilter
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 = {}) ⇒ LogAnalyticsSourceDataFilter
Initializes the object
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 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 |
# File 'lib/oci/log_analytics/models/log_analytics_source_data_filter.rb', line 143 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.description = attributes[:'description'] if attributes[:'description'] 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.edit_version = attributes[:'editVersion'] if attributes[:'editVersion'] raise 'You cannot provide both :editVersion and :edit_version' if attributes.key?(:'editVersion') && attributes.key?(:'edit_version') self.edit_version = attributes[:'edit_version'] if attributes[:'edit_version'] 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.field_name = attributes[:'fieldName'] if attributes[:'fieldName'] raise 'You cannot provide both :fieldName and :field_name' if attributes.key?(:'fieldName') && attributes.key?(:'field_name') self.field_name = attributes[:'field_name'] if attributes[:'field_name'] self.hash_type = attributes[:'hashType'] if attributes[:'hashType'] raise 'You cannot provide both :hashType and :hash_type' if attributes.key?(:'hashType') && attributes.key?(:'hash_type') self.hash_type = attributes[:'hash_type'] if attributes[:'hash_type'] self.data_filter_id = attributes[:'dataFilterId'] if attributes[:'dataFilterId'] raise 'You cannot provide both :dataFilterId and :data_filter_id' if attributes.key?(:'dataFilterId') && attributes.key?(:'data_filter_id') self.data_filter_id = attributes[:'data_filter_id'] if attributes[:'data_filter_id'] self.is_system = attributes[:'isSystem'] unless attributes[:'isSystem'].nil? raise 'You cannot provide both :isSystem and :is_system' if attributes.key?(:'isSystem') && attributes.key?(:'is_system') self.is_system = attributes[:'is_system'] unless attributes[:'is_system'].nil? self.match_regular_expression = attributes[:'matchRegularExpression'] if attributes[:'matchRegularExpression'] raise 'You cannot provide both :matchRegularExpression and :match_regular_expression' if attributes.key?(:'matchRegularExpression') && attributes.key?(:'match_regular_expression') self.match_regular_expression = attributes[:'match_regular_expression'] if attributes[:'match_regular_expression'] self.order = attributes[:'order'] if attributes[:'order'] self.path = attributes[:'path'] if attributes[:'path'] self.replacement_string = attributes[:'replacementString'] if attributes[:'replacementString'] raise 'You cannot provide both :replacementString and :replacement_string' if attributes.key?(:'replacementString') && attributes.key?(:'replacement_string') self.replacement_string = attributes[:'replacement_string'] if attributes[:'replacement_string'] self.source_id = attributes[:'sourceId'] if attributes[:'sourceId'] raise 'You cannot provide both :sourceId and :source_id' if attributes.key?(:'sourceId') && attributes.key?(:'source_id') self.source_id = attributes[:'source_id'] if attributes[:'source_id'] self.filter_type = attributes[:'filterType'] if attributes[:'filterType'] self.filter_type = "MASK" if filter_type.nil? && !attributes.key?(:'filterType') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :filterType and :filter_type' if attributes.key?(:'filterType') && attributes.key?(:'filter_type') self.filter_type = attributes[:'filter_type'] if attributes[:'filter_type'] self.filter_type = "MASK" if filter_type.nil? && !attributes.key?(:'filterType') && !attributes.key?(:'filter_type') # rubocop:disable Style/StringLiterals end |
Instance Attribute Details
#data_filter_id ⇒ Integer
The filter unique identifier.
47 48 49 |
# File 'lib/oci/log_analytics/models/log_analytics_source_data_filter.rb', line 47 def data_filter_id @data_filter_id end |
#description ⇒ String
The filter description.
22 23 24 |
# File 'lib/oci/log_analytics/models/log_analytics_source_data_filter.rb', line 22 def description @description end |
#display_name ⇒ String
The filter display name.
26 27 28 |
# File 'lib/oci/log_analytics/models/log_analytics_source_data_filter.rb', line 26 def display_name @display_name end |
#edit_version ⇒ Integer
The filter edit version.
30 31 32 |
# File 'lib/oci/log_analytics/models/log_analytics_source_data_filter.rb', line 30 def edit_version @edit_version end |
#field_name ⇒ String
The field internal name.
39 40 41 |
# File 'lib/oci/log_analytics/models/log_analytics_source_data_filter.rb', line 39 def field_name @field_name end |
#filter_type ⇒ String
The filter type.
77 78 79 |
# File 'lib/oci/log_analytics/models/log_analytics_source_data_filter.rb', line 77 def filter_type @filter_type end |
#hash_type ⇒ Integer
The hash type.
43 44 45 |
# File 'lib/oci/log_analytics/models/log_analytics_source_data_filter.rb', line 43 def hash_type @hash_type end |
#is_enabled ⇒ BOOLEAN
A flag inidcating whether or not the filter is enabled.
35 36 37 |
# File 'lib/oci/log_analytics/models/log_analytics_source_data_filter.rb', line 35 def is_enabled @is_enabled end |
#is_system ⇒ BOOLEAN
The system flag. A value of false denotes a custom, or user defined object. A value of true denotes a built in object.
53 54 55 |
# File 'lib/oci/log_analytics/models/log_analytics_source_data_filter.rb', line 53 def is_system @is_system end |
#match_regular_expression ⇒ String
The regular expression for matching.
57 58 59 |
# File 'lib/oci/log_analytics/models/log_analytics_source_data_filter.rb', line 57 def match_regular_expression @match_regular_expression end |
#order ⇒ Integer
The filter order.
61 62 63 |
# File 'lib/oci/log_analytics/models/log_analytics_source_data_filter.rb', line 61 def order @order end |
#path ⇒ String
The filter path.
65 66 67 |
# File 'lib/oci/log_analytics/models/log_analytics_source_data_filter.rb', line 65 def path @path end |
#replacement_string ⇒ String
The replacement string.
69 70 71 |
# File 'lib/oci/log_analytics/models/log_analytics_source_data_filter.rb', line 69 def replacement_string @replacement_string end |
#source_id ⇒ Integer
The source unique identifier.
73 74 75 |
# File 'lib/oci/log_analytics/models/log_analytics_source_data_filter.rb', line 73 def source_id @source_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/oci/log_analytics/models/log_analytics_source_data_filter.rb', line 80 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'description': :'description', 'display_name': :'displayName', 'edit_version': :'editVersion', 'is_enabled': :'isEnabled', 'field_name': :'fieldName', 'hash_type': :'hashType', 'data_filter_id': :'dataFilterId', 'is_system': :'isSystem', 'match_regular_expression': :'matchRegularExpression', 'order': :'order', 'path': :'path', 'replacement_string': :'replacementString', 'source_id': :'sourceId', 'filter_type': :'filterType' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/oci/log_analytics/models/log_analytics_source_data_filter.rb', line 102 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'description': :'String', 'display_name': :'String', 'edit_version': :'Integer', 'is_enabled': :'BOOLEAN', 'field_name': :'String', 'hash_type': :'Integer', 'data_filter_id': :'Integer', 'is_system': :'BOOLEAN', 'match_regular_expression': :'String', 'order': :'Integer', 'path': :'String', 'replacement_string': :'String', 'source_id': :'Integer', 'filter_type': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 |
# File 'lib/oci/log_analytics/models/log_analytics_source_data_filter.rb', line 244 def ==(other) return true if equal?(other) self.class == other.class && description == other.description && display_name == other.display_name && edit_version == other.edit_version && is_enabled == other.is_enabled && field_name == other.field_name && hash_type == other.hash_type && data_filter_id == other.data_filter_id && is_system == other.is_system && match_regular_expression == other.match_regular_expression && order == other.order && path == other.path && replacement_string == other.replacement_string && source_id == other.source_id && filter_type == other.filter_type end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 |
# File 'lib/oci/log_analytics/models/log_analytics_source_data_filter.rb', line 287 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
267 268 269 |
# File 'lib/oci/log_analytics/models/log_analytics_source_data_filter.rb', line 267 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
276 277 278 |
# File 'lib/oci/log_analytics/models/log_analytics_source_data_filter.rb', line 276 def hash [description, display_name, edit_version, is_enabled, field_name, hash_type, data_filter_id, is_system, match_regular_expression, order, path, replacement_string, source_id, filter_type].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
320 321 322 323 324 325 326 327 328 329 |
# File 'lib/oci/log_analytics/models/log_analytics_source_data_filter.rb', line 320 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
314 315 316 |
# File 'lib/oci/log_analytics/models/log_analytics_source_data_filter.rb', line 314 def to_s to_hash.to_s end |