Class: OCI::LogAnalytics::Models::LogAnalyticsSourcePattern
- Inherits:
-
Object
- Object
- OCI::LogAnalytics::Models::LogAnalyticsSourcePattern
- Defined in:
- lib/oci/log_analytics/models/log_analytics_source_pattern.rb
Overview
LogAnalyticsSourcePattern
Instance Attribute Summary collapse
-
#_alias ⇒ String
alias.
-
#converted_text ⇒ String
converted text.
-
#db_parser_id ⇒ Integer
parser Id.
-
#db_pattern_date_time_columns ⇒ String
date time columns.
-
#db_pattern_date_time_field ⇒ String
date time field.
-
#db_pattern_sequence_column ⇒ String
sequence column.
-
#description ⇒ String
description.
-
#entity_type ⇒ Array<String>
source entity types.
-
#fields ⇒ Array<OCI::LogAnalytics::Models::LogAnalyticsParserField>
field list.
-
#is_agent_warning_suppressed ⇒ BOOLEAN
suppress agent warning.
-
#is_default ⇒ BOOLEAN
is default flag.
-
#is_enabled ⇒ BOOLEAN
is enabled flag.
-
#is_include ⇒ BOOLEAN
is include flag.
-
#is_system ⇒ BOOLEAN
is system flag.
- #pattern_filter ⇒ OCI::LogAnalytics::Models::LogAnalyticsPatternFilter
-
#pattern_id ⇒ Integer
pattern Id.
-
#pattern_text ⇒ String
pattern text.
-
#pattern_type ⇒ Integer
pattern type.
-
#source_id ⇒ Integer
source Id.
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 = {}) ⇒ LogAnalyticsSourcePattern
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 = {}) ⇒ LogAnalyticsSourcePattern
Initializes the object
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 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 164 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.converted_text = attributes[:'convertedText'] if attributes[:'convertedText'] raise 'You cannot provide both :convertedText and :converted_text' if attributes.key?(:'convertedText') && attributes.key?(:'converted_text') self.converted_text = attributes[:'converted_text'] if attributes[:'converted_text'] self.db_parser_id = attributes[:'dbParserId'] if attributes[:'dbParserId'] raise 'You cannot provide both :dbParserId and :db_parser_id' if attributes.key?(:'dbParserId') && attributes.key?(:'db_parser_id') self.db_parser_id = attributes[:'db_parser_id'] if attributes[:'db_parser_id'] self.db_pattern_date_time_columns = attributes[:'dbPatternDateTimeColumns'] if attributes[:'dbPatternDateTimeColumns'] raise 'You cannot provide both :dbPatternDateTimeColumns and :db_pattern_date_time_columns' if attributes.key?(:'dbPatternDateTimeColumns') && attributes.key?(:'db_pattern_date_time_columns') self.db_pattern_date_time_columns = attributes[:'db_pattern_date_time_columns'] if attributes[:'db_pattern_date_time_columns'] self.db_pattern_date_time_field = attributes[:'dbPatternDateTimeField'] if attributes[:'dbPatternDateTimeField'] raise 'You cannot provide both :dbPatternDateTimeField and :db_pattern_date_time_field' if attributes.key?(:'dbPatternDateTimeField') && attributes.key?(:'db_pattern_date_time_field') self.db_pattern_date_time_field = attributes[:'db_pattern_date_time_field'] if attributes[:'db_pattern_date_time_field'] self.db_pattern_sequence_column = attributes[:'dbPatternSequenceColumn'] if attributes[:'dbPatternSequenceColumn'] raise 'You cannot provide both :dbPatternSequenceColumn and :db_pattern_sequence_column' if attributes.key?(:'dbPatternSequenceColumn') && attributes.key?(:'db_pattern_sequence_column') self.db_pattern_sequence_column = attributes[:'db_pattern_sequence_column'] if attributes[:'db_pattern_sequence_column'] self.fields = attributes[:'fields'] if attributes[:'fields'] self.is_include = attributes[:'isInclude'] unless attributes[:'isInclude'].nil? raise 'You cannot provide both :isInclude and :is_include' if attributes.key?(:'isInclude') && attributes.key?(:'is_include') self.is_include = attributes[:'is_include'] unless attributes[:'is_include'].nil? self.is_default = attributes[:'isDefault'] unless attributes[:'isDefault'].nil? raise 'You cannot provide both :isDefault and :is_default' if attributes.key?(:'isDefault') && attributes.key?(:'is_default') self.is_default = attributes[:'is_default'] unless attributes[:'is_default'].nil? self.pattern_filter = attributes[:'patternFilter'] if attributes[:'patternFilter'] raise 'You cannot provide both :patternFilter and :pattern_filter' if attributes.key?(:'patternFilter') && attributes.key?(:'pattern_filter') self.pattern_filter = attributes[:'pattern_filter'] if attributes[:'pattern_filter'] self._alias = attributes[:'alias'] if attributes[:'alias'] raise 'You cannot provide both :alias and :_alias' if attributes.key?(:'alias') && attributes.key?(:'_alias') self._alias = attributes[:'_alias'] if attributes[:'_alias'] self.description = attributes[:'description'] if attributes[:'description'] 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.pattern_id = attributes[:'patternId'] if attributes[:'patternId'] raise 'You cannot provide both :patternId and :pattern_id' if attributes.key?(:'patternId') && attributes.key?(:'pattern_id') self.pattern_id = attributes[:'pattern_id'] if attributes[:'pattern_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.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.is_agent_warning_suppressed = attributes[:'isAgentWarningSuppressed'] unless attributes[:'isAgentWarningSuppressed'].nil? raise 'You cannot provide both :isAgentWarningSuppressed and :is_agent_warning_suppressed' if attributes.key?(:'isAgentWarningSuppressed') && attributes.key?(:'is_agent_warning_suppressed') self.is_agent_warning_suppressed = attributes[:'is_agent_warning_suppressed'] unless attributes[:'is_agent_warning_suppressed'].nil? self.pattern_text = attributes[:'patternText'] if attributes[:'patternText'] raise 'You cannot provide both :patternText and :pattern_text' if attributes.key?(:'patternText') && attributes.key?(:'pattern_text') self.pattern_text = attributes[:'pattern_text'] if attributes[:'pattern_text'] self.pattern_type = attributes[:'patternType'] if attributes[:'patternType'] raise 'You cannot provide both :patternType and :pattern_type' if attributes.key?(:'patternType') && attributes.key?(:'pattern_type') self.pattern_type = attributes[:'pattern_type'] if attributes[:'pattern_type'] self.entity_type = attributes[:'entityType'] if attributes[:'entityType'] raise 'You cannot provide both :entityType and :entity_type' if attributes.key?(:'entityType') && attributes.key?(:'entity_type') self.entity_type = attributes[:'entity_type'] if attributes[:'entity_type'] end |
Instance Attribute Details
#_alias ⇒ String
alias
47 48 49 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 47 def _alias @_alias end |
#converted_text ⇒ String
converted text
12 13 14 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 12 def converted_text @converted_text end |
#db_parser_id ⇒ Integer
parser Id
16 17 18 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 16 def db_parser_id @db_parser_id end |
#db_pattern_date_time_columns ⇒ String
date time columns
20 21 22 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 20 def db_pattern_date_time_columns @db_pattern_date_time_columns end |
#db_pattern_date_time_field ⇒ String
date time field
24 25 26 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 24 def db_pattern_date_time_field @db_pattern_date_time_field end |
#db_pattern_sequence_column ⇒ String
sequence column
28 29 30 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 28 def db_pattern_sequence_column @db_pattern_sequence_column end |
#description ⇒ String
description
51 52 53 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 51 def description @description end |
#entity_type ⇒ Array<String>
source entity types
83 84 85 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 83 def entity_type @entity_type end |
#fields ⇒ Array<OCI::LogAnalytics::Models::LogAnalyticsParserField>
field list
32 33 34 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 32 def fields @fields end |
#is_agent_warning_suppressed ⇒ BOOLEAN
suppress agent warning
71 72 73 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 71 def is_agent_warning_suppressed @is_agent_warning_suppressed end |
#is_default ⇒ BOOLEAN
is default flag
40 41 42 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 40 def is_default @is_default end |
#is_enabled ⇒ BOOLEAN
is enabled flag
55 56 57 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 55 def is_enabled @is_enabled end |
#is_include ⇒ BOOLEAN
is include flag
36 37 38 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 36 def is_include @is_include end |
#is_system ⇒ BOOLEAN
is system flag
63 64 65 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 63 def is_system @is_system end |
#pattern_filter ⇒ OCI::LogAnalytics::Models::LogAnalyticsPatternFilter
43 44 45 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 43 def pattern_filter @pattern_filter end |
#pattern_id ⇒ Integer
pattern Id
59 60 61 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 59 def pattern_id @pattern_id end |
#pattern_text ⇒ String
pattern text
75 76 77 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 75 def pattern_text @pattern_text end |
#pattern_type ⇒ Integer
pattern type
79 80 81 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 79 def pattern_type @pattern_type end |
#source_id ⇒ Integer
source Id
67 68 69 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 67 def source_id @source_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 86 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'converted_text': :'convertedText', 'db_parser_id': :'dbParserId', 'db_pattern_date_time_columns': :'dbPatternDateTimeColumns', 'db_pattern_date_time_field': :'dbPatternDateTimeField', 'db_pattern_sequence_column': :'dbPatternSequenceColumn', 'fields': :'fields', 'is_include': :'isInclude', 'is_default': :'isDefault', 'pattern_filter': :'patternFilter', '_alias': :'alias', 'description': :'description', 'is_enabled': :'isEnabled', 'pattern_id': :'patternId', 'is_system': :'isSystem', 'source_id': :'sourceId', 'is_agent_warning_suppressed': :'isAgentWarningSuppressed', 'pattern_text': :'patternText', 'pattern_type': :'patternType', 'entity_type': :'entityType' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 113 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'converted_text': :'String', 'db_parser_id': :'Integer', 'db_pattern_date_time_columns': :'String', 'db_pattern_date_time_field': :'String', 'db_pattern_sequence_column': :'String', 'fields': :'Array<OCI::LogAnalytics::Models::LogAnalyticsParserField>', 'is_include': :'BOOLEAN', 'is_default': :'BOOLEAN', 'pattern_filter': :'OCI::LogAnalytics::Models::LogAnalyticsPatternFilter', '_alias': :'String', 'description': :'String', 'is_enabled': :'BOOLEAN', 'pattern_id': :'Integer', 'is_system': :'BOOLEAN', 'source_id': :'Integer', 'is_agent_warning_suppressed': :'BOOLEAN', 'pattern_text': :'String', 'pattern_type': :'Integer', 'entity_type': :'Array<String>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 284 def ==(other) return true if equal?(other) self.class == other.class && converted_text == other.converted_text && db_parser_id == other.db_parser_id && db_pattern_date_time_columns == other.db_pattern_date_time_columns && db_pattern_date_time_field == other.db_pattern_date_time_field && db_pattern_sequence_column == other.db_pattern_sequence_column && fields == other.fields && is_include == other.is_include && is_default == other.is_default && pattern_filter == other.pattern_filter && _alias == other._alias && description == other.description && is_enabled == other.is_enabled && pattern_id == other.pattern_id && is_system == other.is_system && source_id == other.source_id && is_agent_warning_suppressed == other.is_agent_warning_suppressed && pattern_text == other.pattern_text && pattern_type == other.pattern_type && entity_type == other.entity_type end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 332 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
312 313 314 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 312 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
321 322 323 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 321 def hash [converted_text, db_parser_id, db_pattern_date_time_columns, db_pattern_date_time_field, db_pattern_sequence_column, fields, is_include, is_default, pattern_filter, _alias, description, is_enabled, pattern_id, is_system, source_id, is_agent_warning_suppressed, pattern_text, pattern_type, entity_type].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
365 366 367 368 369 370 371 372 373 374 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 365 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
359 360 361 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 359 def to_s to_hash.to_s end |