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_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
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 276 277 278 279 280 281 282 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 171 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
The source pattern alias.
49 50 51 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 49 def _alias @_alias end |
#converted_text ⇒ String
The 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
The parser unique identifier.
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
The 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
The 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
The 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
The source pattern description.
53 54 55 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 53 def description @description end |
#entity_type ⇒ Array<String>
The source entity type.
90 91 92 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 90 def entity_type @entity_type end |
#fields ⇒ Array<OCI::LogAnalytics::Models::LogAnalyticsParserField>
The parser 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
A flag indicating whether or not agent warnings are suppressed for this source pattern.
78 79 80 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 78 def is_agent_warning_suppressed @is_agent_warning_suppressed end |
#is_default ⇒ BOOLEAN
A flag indicating if this is the default source pattern.
42 43 44 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 42 def is_default @is_default end |
#is_enabled ⇒ BOOLEAN
A flag inidcating whether or not the source pattern is enabled.
58 59 60 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 58 def is_enabled @is_enabled end |
#is_include ⇒ BOOLEAN
A flag indicating if this is source pattern is included.
37 38 39 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 37 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.
68 69 70 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 68 def is_system @is_system end |
#pattern_filter ⇒ OCI::LogAnalytics::Models::LogAnalyticsPatternFilter
45 46 47 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 45 def pattern_filter @pattern_filter end |
#pattern_id ⇒ Integer
The source pattern unique identifier.
62 63 64 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 62 def pattern_id @pattern_id end |
#pattern_text ⇒ String
The pattern text.
82 83 84 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 82 def pattern_text @pattern_text end |
#pattern_type ⇒ Integer
The pattern type.
86 87 88 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 86 def pattern_type @pattern_type end |
#source_id ⇒ Integer
The source unique identifier.
72 73 74 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 72 def source_id @source_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 93 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.
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 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 120 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.
291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 291 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
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 339 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
319 320 321 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 319 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
328 329 330 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 328 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
372 373 374 375 376 377 378 379 380 381 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 372 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
366 367 368 |
# File 'lib/oci/log_analytics/models/log_analytics_source_pattern.rb', line 366 def to_s to_hash.to_s end |