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
The source pattern alias.
-
#converted_text ⇒ String
The converted text.
-
#db_parser_id ⇒ Integer
The parser unique identifier.
-
#db_pattern_date_time_columns ⇒ String
The date time columns.
-
#db_pattern_date_time_field ⇒ String
The date time field.
-
#db_pattern_sequence_column ⇒ String
The sequence column.
-
#description ⇒ String
The source pattern description.
-
#entity_type ⇒ Array<String>
The source entity type.
-
#fields ⇒ Array<OCI::LogAnalytics::Models::LogAnalyticsParserField>
The parser field list.
-
#is_agent_warning_suppressed ⇒ BOOLEAN
A flag indicating whether or not agent warnings are suppressed for this source pattern.
-
#is_default ⇒ BOOLEAN
A flag indicating if this is the default source pattern.
-
#is_enabled ⇒ BOOLEAN
A flag inidcating whether or not the source pattern is enabled.
-
#is_include ⇒ BOOLEAN
A flag indicating if this is source pattern is included.
-
#is_system ⇒ BOOLEAN
The system flag.
- #pattern_filter ⇒ OCI::LogAnalytics::Models::LogAnalyticsPatternFilter
-
#pattern_id ⇒ Integer
The source pattern unique identifier.
-
#pattern_properties ⇒ Array<OCI::LogAnalytics::Models::LogAnalyticsProperty>
A list of pattern properties.
-
#pattern_text ⇒ String
The pattern text.
-
#pattern_type ⇒ Integer
The pattern type.
-
#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 = {}) ⇒ 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
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 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 179 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'] self.pattern_properties = attributes[:'patternProperties'] if attributes[:'patternProperties'] raise 'You cannot provide both :patternProperties and :pattern_properties' if attributes.key?(:'patternProperties') && attributes.key?(:'pattern_properties') self.pattern_properties = attributes[:'pattern_properties'] if attributes[:'pattern_properties'] end |
Instance Attribute Details
#_alias ⇒ String
The source pattern alias.
50 51 52 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 50 def _alias @_alias end |
#converted_text ⇒ String
The converted text.
13 14 15 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 13 def converted_text @converted_text end |
#db_parser_id ⇒ Integer
The parser unique identifier.
17 18 19 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 17 def db_parser_id @db_parser_id end |
#db_pattern_date_time_columns ⇒ String
The date time columns.
21 22 23 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 21 def db_pattern_date_time_columns @db_pattern_date_time_columns end |
#db_pattern_date_time_field ⇒ String
The date time field.
25 26 27 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 25 def db_pattern_date_time_field @db_pattern_date_time_field end |
#db_pattern_sequence_column ⇒ String
The sequence column.
29 30 31 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 29 def db_pattern_sequence_column @db_pattern_sequence_column end |
#description ⇒ String
The source pattern description.
54 55 56 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 54 def description @description end |
#entity_type ⇒ Array<String>
The source entity type.
91 92 93 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 91 def entity_type @entity_type end |
#fields ⇒ Array<OCI::LogAnalytics::Models::LogAnalyticsParserField>
The parser field list.
33 34 35 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 33 def fields @fields end |
#is_agent_warning_suppressed ⇒ BOOLEAN
A flag indicating whether or not agent warnings are suppressed for this source pattern.
79 80 81 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 79 def is_agent_warning_suppressed @is_agent_warning_suppressed end |
#is_default ⇒ BOOLEAN
A flag indicating if this is the default source pattern.
43 44 45 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 43 def is_default @is_default end |
#is_enabled ⇒ BOOLEAN
A flag inidcating whether or not the source pattern is enabled.
59 60 61 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 59 def is_enabled @is_enabled end |
#is_include ⇒ BOOLEAN
A flag indicating if this is source pattern is included.
38 39 40 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 38 def is_include @is_include 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.
69 70 71 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 69 def is_system @is_system end |
#pattern_filter ⇒ OCI::LogAnalytics::Models::LogAnalyticsPatternFilter
46 47 48 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 46 def pattern_filter @pattern_filter end |
#pattern_id ⇒ Integer
The source pattern unique identifier.
63 64 65 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 63 def pattern_id @pattern_id end |
#pattern_properties ⇒ Array<OCI::LogAnalytics::Models::LogAnalyticsProperty>
A list of pattern properties.
95 96 97 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 95 def pattern_properties @pattern_properties end |
#pattern_text ⇒ String
The pattern text.
83 84 85 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 83 def pattern_text @pattern_text end |
#pattern_type ⇒ Integer
The pattern type.
87 88 89 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 87 def pattern_type @pattern_type end |
#source_id ⇒ Integer
The source unique identifier.
73 74 75 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.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.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 98 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', 'pattern_properties': :'patternProperties' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 126 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>', 'pattern_properties': :'Array<OCI::LogAnalytics::Models::LogAnalyticsProperty>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 305 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 && pattern_properties == other.pattern_properties end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 354 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
334 335 336 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 334 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
343 344 345 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 343 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, pattern_properties].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
387 388 389 390 391 392 393 394 395 396 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 387 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
381 382 383 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 381 def to_s to_hash.to_s end |