Class: OCI::LogAnalytics::Models::EfdRegexResult
- Inherits:
-
Object
- Object
- OCI::LogAnalytics::Models::EfdRegexResult
- Defined in:
- lib/oci/log_analytics/models/efd_regex_result.rb
Overview
EfdRegexResult
Instance Attribute Summary collapse
-
#base_field_name ⇒ String
The base field name.
-
#id ⇒ Integer
the unique identifier.
-
#is_valid_regex_syntax ⇒ BOOLEAN
A flag indicating whether or not the regular expression is valid.
- #match_result ⇒ OCI::LogAnalytics::Models::RegexMatchResult
-
#parsed_field_count ⇒ Integer
The parsed field count.
-
#parsed_fields ⇒ Hash<String, String>
The parsed fields.
-
#regex ⇒ String
The regular expression.
-
#status ⇒ String
The status.
-
#status_description ⇒ String
The Status description.
-
#violations ⇒ Array<OCI::LogAnalytics::Models::Violation>
The list of violations (if any).
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 = {}) ⇒ EfdRegexResult
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 = {}) ⇒ EfdRegexResult
Initializes the object
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 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 103 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.base_field_name = attributes[:'baseFieldName'] if attributes[:'baseFieldName'] raise 'You cannot provide both :baseFieldName and :base_field_name' if attributes.key?(:'baseFieldName') && attributes.key?(:'base_field_name') self.base_field_name = attributes[:'base_field_name'] if attributes[:'base_field_name'] self.id = attributes[:'id'] if attributes[:'id'] self.match_result = attributes[:'matchResult'] if attributes[:'matchResult'] raise 'You cannot provide both :matchResult and :match_result' if attributes.key?(:'matchResult') && attributes.key?(:'match_result') self.match_result = attributes[:'match_result'] if attributes[:'match_result'] self.parsed_field_count = attributes[:'parsedFieldCount'] if attributes[:'parsedFieldCount'] raise 'You cannot provide both :parsedFieldCount and :parsed_field_count' if attributes.key?(:'parsedFieldCount') && attributes.key?(:'parsed_field_count') self.parsed_field_count = attributes[:'parsed_field_count'] if attributes[:'parsed_field_count'] self.parsed_fields = attributes[:'parsedFields'] if attributes[:'parsedFields'] raise 'You cannot provide both :parsedFields and :parsed_fields' if attributes.key?(:'parsedFields') && attributes.key?(:'parsed_fields') self.parsed_fields = attributes[:'parsed_fields'] if attributes[:'parsed_fields'] self.regex = attributes[:'regex'] if attributes[:'regex'] self.status = attributes[:'status'] if attributes[:'status'] self.status_description = attributes[:'statusDescription'] if attributes[:'statusDescription'] raise 'You cannot provide both :statusDescription and :status_description' if attributes.key?(:'statusDescription') && attributes.key?(:'status_description') self.status_description = attributes[:'status_description'] if attributes[:'status_description'] self.is_valid_regex_syntax = attributes[:'isValidRegexSyntax'] unless attributes[:'isValidRegexSyntax'].nil? raise 'You cannot provide both :isValidRegexSyntax and :is_valid_regex_syntax' if attributes.key?(:'isValidRegexSyntax') && attributes.key?(:'is_valid_regex_syntax') self.is_valid_regex_syntax = attributes[:'is_valid_regex_syntax'] unless attributes[:'is_valid_regex_syntax'].nil? self.violations = attributes[:'violations'] if attributes[:'violations'] end |
Instance Attribute Details
#base_field_name ⇒ String
The base field name.
13 14 15 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 13 def base_field_name @base_field_name end |
#id ⇒ Integer
the unique identifier.
17 18 19 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 17 def id @id end |
#is_valid_regex_syntax ⇒ BOOLEAN
A flag indicating whether or not the regular expression is valid.
45 46 47 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 45 def is_valid_regex_syntax @is_valid_regex_syntax end |
#match_result ⇒ OCI::LogAnalytics::Models::RegexMatchResult
20 21 22 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 20 def match_result @match_result end |
#parsed_field_count ⇒ Integer
The parsed field count.
24 25 26 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 24 def parsed_field_count @parsed_field_count end |
#parsed_fields ⇒ Hash<String, String>
The parsed fields.
28 29 30 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 28 def parsed_fields @parsed_fields end |
#regex ⇒ String
The regular expression.
32 33 34 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 32 def regex @regex end |
#status ⇒ String
The status.
36 37 38 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 36 def status @status end |
#status_description ⇒ String
The Status description.
40 41 42 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 40 def status_description @status_description end |
#violations ⇒ Array<OCI::LogAnalytics::Models::Violation>
The list of violations (if any).
49 50 51 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 49 def violations @violations end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 52 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'base_field_name': :'baseFieldName', 'id': :'id', 'match_result': :'matchResult', 'parsed_field_count': :'parsedFieldCount', 'parsed_fields': :'parsedFields', 'regex': :'regex', 'status': :'status', 'status_description': :'statusDescription', 'is_valid_regex_syntax': :'isValidRegexSyntax', 'violations': :'violations' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 70 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'base_field_name': :'String', 'id': :'Integer', 'match_result': :'OCI::LogAnalytics::Models::RegexMatchResult', 'parsed_field_count': :'Integer', 'parsed_fields': :'Hash<String, String>', 'regex': :'String', 'status': :'String', 'status_description': :'String', 'is_valid_regex_syntax': :'BOOLEAN', 'violations': :'Array<OCI::LogAnalytics::Models::Violation>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 161 def ==(other) return true if equal?(other) self.class == other.class && base_field_name == other.base_field_name && id == other.id && match_result == other.match_result && parsed_field_count == other.parsed_field_count && parsed_fields == other.parsed_fields && regex == other.regex && status == other.status && status_description == other.status_description && is_valid_regex_syntax == other.is_valid_regex_syntax && violations == other.violations end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 200 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
180 181 182 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 180 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
189 190 191 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 189 def hash [base_field_name, id, match_result, parsed_field_count, parsed_fields, regex, status, status_description, is_valid_regex_syntax, violations].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
233 234 235 236 237 238 239 240 241 242 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 233 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
227 228 229 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 227 def to_s to_hash.to_s end |