class OCI::LogAnalytics::Models::LogAnalyticsSourcePattern
Attributes
The source pattern alias. @return [String]
The converted text. @return [String]
The parser unique identifier. @return [Integer]
The date time columns. @return [String]
The date time field. @return [String]
The sequence column. @return [String]
The source pattern description. @return [String]
The source entity type. @return [Array<String>]
The parser field list. @return [Array<OCI::LogAnalytics::Models::LogAnalyticsParserField>]
A flag indicating whether or not agent warnings are suppressed for this source pattern.
@return [BOOLEAN]
A flag indicating if this is the default source pattern.
@return [BOOLEAN]
A flag inidcating whether or not the source pattern is enabled.
@return [BOOLEAN]
A flag indicating if this is source pattern is included.
@return [BOOLEAN]
The system flag. A value of false denotes a custom, or user defined object. A value of true denotes a built in object.
@return [BOOLEAN]
@return [OCI::LogAnalytics::Models::LogAnalyticsPatternFilter]
The source pattern unique identifier. @return [Integer]
The pattern text. @return [String]
The pattern type. @return [Integer]
The source unique identifier. @return [Integer]
Public Class Methods
Attribute mapping from ruby-style variable name to JSON key.
# 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
Initializes the object @param [Hash] attributes Model attributes in the form of hash @option attributes [String] :converted_text The value to assign to the {#converted_text} property @option attributes [Integer] :db_parser_id The value to assign to the {#db_parser_id} property @option attributes [String] :db_pattern_date_time_columns The value to assign to the {#db_pattern_date_time_columns} property @option attributes [String] :db_pattern_date_time_field The value to assign to the {#db_pattern_date_time_field} property @option attributes [String] :db_pattern_sequence_column The value to assign to the {#db_pattern_sequence_column} property @option attributes [Array<OCI::LogAnalytics::Models::LogAnalyticsParserField>] :fields The value to assign to the {#fields} property @option attributes [BOOLEAN] :is_include The value to assign to the {#is_include} property @option attributes [BOOLEAN] :is_default The value to assign to the {#is_default} property @option attributes [OCI::LogAnalytics::Models::LogAnalyticsPatternFilter] :pattern_filter The value to assign to the {#pattern_filter} property @option attributes [String] :_alias The value to assign to the {#_alias} property @option attributes [String] :description The value to assign to the {#description} property @option attributes [BOOLEAN] :is_enabled The value to assign to the {#is_enabled} property @option attributes [Integer] :pattern_id The value to assign to the {#pattern_id} property @option attributes [BOOLEAN] :is_system The value to assign to the {#is_system} property @option attributes [Integer] :source_id The value to assign to the {#source_id} property @option attributes [BOOLEAN] :is_agent_warning_suppressed The value to assign to the {#is_agent_warning_suppressed} property @option attributes [String] :pattern_text The value to assign to the {#pattern_text} property @option attributes [Integer] :pattern_type The value to assign to the {#pattern_type} property @option attributes [Array<String>] :entity_type The value to assign to the {#entity_type} property
# 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
Attribute type mapping.
# 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
Public Instance Methods
Checks equality by comparing each attribute. @param [Object] other the other object to be compared
# 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
Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself
# 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
@see the `==` method @param [Object] other the other object to be compared
# File lib/oci/log_analytics/models/log_analytics_source_pattern.rb, line 319 def eql?(other) self == other end
Calculates hash code according to all attributes. @return [Fixnum] Hash code
# 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
Returns the object in the form of hash @return [Hash] Returns the object in the form of hash
# 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
Returns the string representation of the object @return [String] String presentation of the object
# File lib/oci/log_analytics/models/log_analytics_source_pattern.rb, line 366 def to_s to_hash.to_s end
Private Instance Methods
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value @param [Object] value Any valid value @return [Hash] Returns the value in the form of hash
# File lib/oci/log_analytics/models/log_analytics_source_pattern.rb, line 389 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end