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
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 143 144 145 146 147 148 149 150 151 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 102 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.
12 13 14 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 12 def base_field_name @base_field_name end |
#id ⇒ Integer
the unique identifier.
16 17 18 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 16 def id @id end |
#is_valid_regex_syntax ⇒ BOOLEAN
A flag indicating whether or not the regular expression is valid.
44 45 46 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 44 def is_valid_regex_syntax @is_valid_regex_syntax end |
#match_result ⇒ OCI::LogAnalytics::Models::RegexMatchResult
19 20 21 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 19 def match_result @match_result end |
#parsed_field_count ⇒ Integer
The parsed field count.
23 24 25 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 23 def parsed_field_count @parsed_field_count end |
#parsed_fields ⇒ Hash<String, String>
The parsed fields.
27 28 29 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 27 def parsed_fields @parsed_fields end |
#regex ⇒ String
The regular expression.
31 32 33 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 31 def regex @regex end |
#status ⇒ String
The status.
35 36 37 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 35 def status @status end |
#status_description ⇒ String
The Status description.
39 40 41 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 39 def status_description @status_description end |
#violations ⇒ Array<OCI::LogAnalytics::Models::Violation>
The list of violations (if any).
48 49 50 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 48 def violations @violations end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 51 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.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 69 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.
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 160 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
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 199 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
179 180 181 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 179 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
188 189 190 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 188 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
232 233 234 235 236 237 238 239 240 241 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 232 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
226 227 228 |
# File 'lib/oci/log_analytics/models/efd_regex_result.rb', line 226 def to_s to_hash.to_s end |