Class: OCI::LogAnalytics::Models::AbstractParserTestResultLogLine
- Inherits:
-
Object
- Object
- OCI::LogAnalytics::Models::AbstractParserTestResultLogLine
- Defined in:
- lib/oci/log_analytics/models/abstract_parser_test_result_log_line.rb
Overview
AbstractParserTestResultLogLine
Instance Attribute Summary collapse
-
#find_end_index ⇒ Integer
The find end index.
-
#find_start_index ⇒ Integer
The find start index.
-
#grp_name_value_map ⇒ Hash<String, OCI::LogAnalytics::Models::NamedCaptureValue>
The group name value map.
-
#original_log_line ⇒ String
The original log line.
-
#pre_processed_log_line ⇒ String
The pre-processed log line.
-
#replace_end_index ⇒ Integer
The replace end index.
-
#replace_start_index ⇒ Integer
The replace start index.
-
#replace_string ⇒ String
The replacement string.
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 = {}) ⇒ AbstractParserTestResultLogLine
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 = {}) ⇒ AbstractParserTestResultLogLine
Initializes the object
89 90 91 92 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 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/oci/log_analytics/models/abstract_parser_test_result_log_line.rb', line 89 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.original_log_line = attributes[:'originalLogLine'] if attributes[:'originalLogLine'] raise 'You cannot provide both :originalLogLine and :original_log_line' if attributes.key?(:'originalLogLine') && attributes.key?(:'original_log_line') self.original_log_line = attributes[:'original_log_line'] if attributes[:'original_log_line'] self.pre_processed_log_line = attributes[:'preProcessedLogLine'] if attributes[:'preProcessedLogLine'] raise 'You cannot provide both :preProcessedLogLine and :pre_processed_log_line' if attributes.key?(:'preProcessedLogLine') && attributes.key?(:'pre_processed_log_line') self.pre_processed_log_line = attributes[:'pre_processed_log_line'] if attributes[:'pre_processed_log_line'] self.find_start_index = attributes[:'findStartIndex'] if attributes[:'findStartIndex'] raise 'You cannot provide both :findStartIndex and :find_start_index' if attributes.key?(:'findStartIndex') && attributes.key?(:'find_start_index') self.find_start_index = attributes[:'find_start_index'] if attributes[:'find_start_index'] self.find_end_index = attributes[:'findEndIndex'] if attributes[:'findEndIndex'] raise 'You cannot provide both :findEndIndex and :find_end_index' if attributes.key?(:'findEndIndex') && attributes.key?(:'find_end_index') self.find_end_index = attributes[:'find_end_index'] if attributes[:'find_end_index'] self.replace_string = attributes[:'replaceString'] if attributes[:'replaceString'] raise 'You cannot provide both :replaceString and :replace_string' if attributes.key?(:'replaceString') && attributes.key?(:'replace_string') self.replace_string = attributes[:'replace_string'] if attributes[:'replace_string'] self.replace_start_index = attributes[:'replaceStartIndex'] if attributes[:'replaceStartIndex'] raise 'You cannot provide both :replaceStartIndex and :replace_start_index' if attributes.key?(:'replaceStartIndex') && attributes.key?(:'replace_start_index') self.replace_start_index = attributes[:'replace_start_index'] if attributes[:'replace_start_index'] self.replace_end_index = attributes[:'replaceEndIndex'] if attributes[:'replaceEndIndex'] raise 'You cannot provide both :replaceEndIndex and :replace_end_index' if attributes.key?(:'replaceEndIndex') && attributes.key?(:'replace_end_index') self.replace_end_index = attributes[:'replace_end_index'] if attributes[:'replace_end_index'] self.grp_name_value_map = attributes[:'grpNameValueMap'] if attributes[:'grpNameValueMap'] raise 'You cannot provide both :grpNameValueMap and :grp_name_value_map' if attributes.key?(:'grpNameValueMap') && attributes.key?(:'grp_name_value_map') self.grp_name_value_map = attributes[:'grp_name_value_map'] if attributes[:'grp_name_value_map'] end |
Instance Attribute Details
#find_end_index ⇒ Integer
The find end index.
25 26 27 |
# File 'lib/oci/log_analytics/models/abstract_parser_test_result_log_line.rb', line 25 def find_end_index @find_end_index end |
#find_start_index ⇒ Integer
The find start index.
21 22 23 |
# File 'lib/oci/log_analytics/models/abstract_parser_test_result_log_line.rb', line 21 def find_start_index @find_start_index end |
#grp_name_value_map ⇒ Hash<String, OCI::LogAnalytics::Models::NamedCaptureValue>
The group name value map.
41 42 43 |
# File 'lib/oci/log_analytics/models/abstract_parser_test_result_log_line.rb', line 41 def grp_name_value_map @grp_name_value_map end |
#original_log_line ⇒ String
The original log line.
13 14 15 |
# File 'lib/oci/log_analytics/models/abstract_parser_test_result_log_line.rb', line 13 def original_log_line @original_log_line end |
#pre_processed_log_line ⇒ String
The pre-processed log line.
17 18 19 |
# File 'lib/oci/log_analytics/models/abstract_parser_test_result_log_line.rb', line 17 def pre_processed_log_line @pre_processed_log_line end |
#replace_end_index ⇒ Integer
The replace end index.
37 38 39 |
# File 'lib/oci/log_analytics/models/abstract_parser_test_result_log_line.rb', line 37 def replace_end_index @replace_end_index end |
#replace_start_index ⇒ Integer
The replace start index.
33 34 35 |
# File 'lib/oci/log_analytics/models/abstract_parser_test_result_log_line.rb', line 33 def replace_start_index @replace_start_index end |
#replace_string ⇒ String
The replacement string.
29 30 31 |
# File 'lib/oci/log_analytics/models/abstract_parser_test_result_log_line.rb', line 29 def replace_string @replace_string end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/oci/log_analytics/models/abstract_parser_test_result_log_line.rb', line 44 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'original_log_line': :'originalLogLine', 'pre_processed_log_line': :'preProcessedLogLine', 'find_start_index': :'findStartIndex', 'find_end_index': :'findEndIndex', 'replace_string': :'replaceString', 'replace_start_index': :'replaceStartIndex', 'replace_end_index': :'replaceEndIndex', 'grp_name_value_map': :'grpNameValueMap' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/oci/log_analytics/models/abstract_parser_test_result_log_line.rb', line 60 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'original_log_line': :'String', 'pre_processed_log_line': :'String', 'find_start_index': :'Integer', 'find_end_index': :'Integer', 'replace_string': :'String', 'replace_start_index': :'Integer', 'replace_end_index': :'Integer', 'grp_name_value_map': :'Hash<String, OCI::LogAnalytics::Models::NamedCaptureValue>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/oci/log_analytics/models/abstract_parser_test_result_log_line.rb', line 151 def ==(other) return true if equal?(other) self.class == other.class && original_log_line == other.original_log_line && pre_processed_log_line == other.pre_processed_log_line && find_start_index == other.find_start_index && find_end_index == other.find_end_index && replace_string == other.replace_string && replace_start_index == other.replace_start_index && replace_end_index == other.replace_end_index && grp_name_value_map == other.grp_name_value_map end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/oci/log_analytics/models/abstract_parser_test_result_log_line.rb', line 188 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
168 169 170 |
# File 'lib/oci/log_analytics/models/abstract_parser_test_result_log_line.rb', line 168 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
177 178 179 |
# File 'lib/oci/log_analytics/models/abstract_parser_test_result_log_line.rb', line 177 def hash [original_log_line, pre_processed_log_line, find_start_index, find_end_index, replace_string, replace_start_index, replace_end_index, grp_name_value_map].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
221 222 223 224 225 226 227 228 229 230 |
# File 'lib/oci/log_analytics/models/abstract_parser_test_result_log_line.rb', line 221 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
215 216 217 |
# File 'lib/oci/log_analytics/models/abstract_parser_test_result_log_line.rb', line 215 def to_s to_hash.to_s end |