Class: OCI::LogAnalytics::Models::LogAnalyticsSourceExtendedFieldDefinition
- Inherits:
-
Object
- Object
- OCI::LogAnalytics::Models::LogAnalyticsSourceExtendedFieldDefinition
- Defined in:
- lib/oci/log_analytics/models/log_analytics_source_extended_field_definition.rb
Overview
LogAnalyticsSourceExtendedFieldDefinition
Instance Attribute Summary collapse
-
#base_field_log_text ⇒ String
The base field log text.
-
#base_field_name ⇒ String
The base field internal name.
-
#condition_data_type ⇒ String
The conditional data type.
-
#condition_field ⇒ String
The onditional field.
-
#condition_operator ⇒ String
The conditional operator.
-
#condition_value ⇒ String
The conditional value.
-
#converted_regular_expression ⇒ String
The converted regular expression.
-
#display_regular_expression ⇒ String
The regular expression.
-
#extended_field_definition_id ⇒ Integer
The extended field definition unique identifier.
-
#extended_fields ⇒ Array<OCI::LogAnalytics::Models::LogAnalyticsExtendedField>
An array of extended fields.
- #field ⇒ OCI::LogAnalytics::Models::LogAnalyticsField
-
#is_enabled ⇒ BOOLEAN
A flag inidcating whether or not the extended definition is enabled.
-
#is_system ⇒ BOOLEAN
The system flag.
-
#regular_expression ⇒ String
The regular expression.
-
#source_id ⇒ Integer
The source unique identifier.
-
#time_updated ⇒ DateTime
The last updated date.
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 = {}) ⇒ LogAnalyticsSourceExtendedFieldDefinition
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 = {}) ⇒ LogAnalyticsSourceExtendedFieldDefinition
Initializes the object
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 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 |
# File 'lib/oci/log_analytics/models/log_analytics_source_extended_field_definition.rb', line 147 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.field = attributes[:'field'] if attributes[:'field'] self.display_regular_expression = attributes[:'displayRegularExpression'] if attributes[:'displayRegularExpression'] raise 'You cannot provide both :displayRegularExpression and :display_regular_expression' if attributes.key?(:'displayRegularExpression') && attributes.key?(:'display_regular_expression') self.display_regular_expression = attributes[:'display_regular_expression'] if attributes[:'display_regular_expression'] self.extended_fields = attributes[:'extendedFields'] if attributes[:'extendedFields'] raise 'You cannot provide both :extendedFields and :extended_fields' if attributes.key?(:'extendedFields') && attributes.key?(:'extended_fields') self.extended_fields = attributes[:'extended_fields'] if attributes[:'extended_fields'] 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.base_field_log_text = attributes[:'baseFieldLogText'] if attributes[:'baseFieldLogText'] raise 'You cannot provide both :baseFieldLogText and :base_field_log_text' if attributes.key?(:'baseFieldLogText') && attributes.key?(:'base_field_log_text') self.base_field_log_text = attributes[:'base_field_log_text'] if attributes[:'base_field_log_text'] self.condition_data_type = attributes[:'conditionDataType'] if attributes[:'conditionDataType'] raise 'You cannot provide both :conditionDataType and :condition_data_type' if attributes.key?(:'conditionDataType') && attributes.key?(:'condition_data_type') self.condition_data_type = attributes[:'condition_data_type'] if attributes[:'condition_data_type'] self.condition_field = attributes[:'conditionField'] if attributes[:'conditionField'] raise 'You cannot provide both :conditionField and :condition_field' if attributes.key?(:'conditionField') && attributes.key?(:'condition_field') self.condition_field = attributes[:'condition_field'] if attributes[:'condition_field'] self.condition_operator = attributes[:'conditionOperator'] if attributes[:'conditionOperator'] raise 'You cannot provide both :conditionOperator and :condition_operator' if attributes.key?(:'conditionOperator') && attributes.key?(:'condition_operator') self.condition_operator = attributes[:'condition_operator'] if attributes[:'condition_operator'] self.condition_value = attributes[:'conditionValue'] if attributes[:'conditionValue'] raise 'You cannot provide both :conditionValue and :condition_value' if attributes.key?(:'conditionValue') && attributes.key?(:'condition_value') self.condition_value = attributes[:'condition_value'] if attributes[:'condition_value'] self.converted_regular_expression = attributes[:'convertedRegularExpression'] if attributes[:'convertedRegularExpression'] raise 'You cannot provide both :convertedRegularExpression and :converted_regular_expression' if attributes.key?(:'convertedRegularExpression') && attributes.key?(:'converted_regular_expression') self.converted_regular_expression = attributes[:'converted_regular_expression'] if attributes[:'converted_regular_expression'] 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.extended_field_definition_id = attributes[:'extendedFieldDefinitionId'] if attributes[:'extendedFieldDefinitionId'] raise 'You cannot provide both :extendedFieldDefinitionId and :extended_field_definition_id' if attributes.key?(:'extendedFieldDefinitionId') && attributes.key?(:'extended_field_definition_id') self.extended_field_definition_id = attributes[:'extended_field_definition_id'] if attributes[:'extended_field_definition_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.regular_expression = attributes[:'regularExpression'] if attributes[:'regularExpression'] raise 'You cannot provide both :regularExpression and :regular_expression' if attributes.key?(:'regularExpression') && attributes.key?(:'regular_expression') self.regular_expression = attributes[:'regular_expression'] if attributes[:'regular_expression'] 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.time_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated'] raise 'You cannot provide both :timeUpdated and :time_updated' if attributes.key?(:'timeUpdated') && attributes.key?(:'time_updated') self.time_updated = attributes[:'time_updated'] if attributes[:'time_updated'] end |
Instance Attribute Details
#base_field_log_text ⇒ String
The base field log text.
28 29 30 |
# File 'lib/oci/log_analytics/models/log_analytics_source_extended_field_definition.rb', line 28 def base_field_log_text @base_field_log_text end |
#base_field_name ⇒ String
The base field internal name.
24 25 26 |
# File 'lib/oci/log_analytics/models/log_analytics_source_extended_field_definition.rb', line 24 def base_field_name @base_field_name end |
#condition_data_type ⇒ String
The conditional data type.
32 33 34 |
# File 'lib/oci/log_analytics/models/log_analytics_source_extended_field_definition.rb', line 32 def condition_data_type @condition_data_type end |
#condition_field ⇒ String
The onditional field.
36 37 38 |
# File 'lib/oci/log_analytics/models/log_analytics_source_extended_field_definition.rb', line 36 def condition_field @condition_field end |
#condition_operator ⇒ String
The conditional operator.
40 41 42 |
# File 'lib/oci/log_analytics/models/log_analytics_source_extended_field_definition.rb', line 40 def condition_operator @condition_operator end |
#condition_value ⇒ String
The conditional value.
44 45 46 |
# File 'lib/oci/log_analytics/models/log_analytics_source_extended_field_definition.rb', line 44 def condition_value @condition_value end |
#converted_regular_expression ⇒ String
The converted regular expression.
48 49 50 |
# File 'lib/oci/log_analytics/models/log_analytics_source_extended_field_definition.rb', line 48 def converted_regular_expression @converted_regular_expression end |
#display_regular_expression ⇒ String
The regular expression.
16 17 18 |
# File 'lib/oci/log_analytics/models/log_analytics_source_extended_field_definition.rb', line 16 def display_regular_expression @display_regular_expression end |
#extended_field_definition_id ⇒ Integer
The extended field definition unique identifier.
57 58 59 |
# File 'lib/oci/log_analytics/models/log_analytics_source_extended_field_definition.rb', line 57 def extended_field_definition_id @extended_field_definition_id end |
#extended_fields ⇒ Array<OCI::LogAnalytics::Models::LogAnalyticsExtendedField>
An array of extended fields.
20 21 22 |
# File 'lib/oci/log_analytics/models/log_analytics_source_extended_field_definition.rb', line 20 def extended_fields @extended_fields end |
#field ⇒ OCI::LogAnalytics::Models::LogAnalyticsField
12 13 14 |
# File 'lib/oci/log_analytics/models/log_analytics_source_extended_field_definition.rb', line 12 def field @field end |
#is_enabled ⇒ BOOLEAN
A flag inidcating whether or not the extended definition is enabled.
53 54 55 |
# File 'lib/oci/log_analytics/models/log_analytics_source_extended_field_definition.rb', line 53 def is_enabled @is_enabled 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.
63 64 65 |
# File 'lib/oci/log_analytics/models/log_analytics_source_extended_field_definition.rb', line 63 def is_system @is_system end |
#regular_expression ⇒ String
The regular expression.
67 68 69 |
# File 'lib/oci/log_analytics/models/log_analytics_source_extended_field_definition.rb', line 67 def regular_expression @regular_expression end |
#source_id ⇒ Integer
The source unique identifier.
71 72 73 |
# File 'lib/oci/log_analytics/models/log_analytics_source_extended_field_definition.rb', line 71 def source_id @source_id end |
#time_updated ⇒ DateTime
The last updated date.
75 76 77 |
# File 'lib/oci/log_analytics/models/log_analytics_source_extended_field_definition.rb', line 75 def time_updated @time_updated end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/oci/log_analytics/models/log_analytics_source_extended_field_definition.rb', line 78 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'field': :'field', 'display_regular_expression': :'displayRegularExpression', 'extended_fields': :'extendedFields', 'base_field_name': :'baseFieldName', 'base_field_log_text': :'baseFieldLogText', 'condition_data_type': :'conditionDataType', 'condition_field': :'conditionField', 'condition_operator': :'conditionOperator', 'condition_value': :'conditionValue', 'converted_regular_expression': :'convertedRegularExpression', 'is_enabled': :'isEnabled', 'extended_field_definition_id': :'extendedFieldDefinitionId', 'is_system': :'isSystem', 'regular_expression': :'regularExpression', 'source_id': :'sourceId', 'time_updated': :'timeUpdated' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/oci/log_analytics/models/log_analytics_source_extended_field_definition.rb', line 102 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'field': :'OCI::LogAnalytics::Models::LogAnalyticsField', 'display_regular_expression': :'String', 'extended_fields': :'Array<OCI::LogAnalytics::Models::LogAnalyticsExtendedField>', 'base_field_name': :'String', 'base_field_log_text': :'String', 'condition_data_type': :'String', 'condition_field': :'String', 'condition_operator': :'String', 'condition_value': :'String', 'converted_regular_expression': :'String', 'is_enabled': :'BOOLEAN', 'extended_field_definition_id': :'Integer', 'is_system': :'BOOLEAN', 'regular_expression': :'String', 'source_id': :'Integer', 'time_updated': :'DateTime' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
# File 'lib/oci/log_analytics/models/log_analytics_source_extended_field_definition.rb', line 253 def ==(other) return true if equal?(other) self.class == other.class && field == other.field && display_regular_expression == other.display_regular_expression && extended_fields == other.extended_fields && base_field_name == other.base_field_name && base_field_log_text == other.base_field_log_text && condition_data_type == other.condition_data_type && condition_field == other.condition_field && condition_operator == other.condition_operator && condition_value == other.condition_value && converted_regular_expression == other.converted_regular_expression && is_enabled == other.is_enabled && extended_field_definition_id == other.extended_field_definition_id && is_system == other.is_system && regular_expression == other.regular_expression && source_id == other.source_id && time_updated == other.time_updated end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 |
# File 'lib/oci/log_analytics/models/log_analytics_source_extended_field_definition.rb', line 298 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
278 279 280 |
# File 'lib/oci/log_analytics/models/log_analytics_source_extended_field_definition.rb', line 278 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
287 288 289 |
# File 'lib/oci/log_analytics/models/log_analytics_source_extended_field_definition.rb', line 287 def hash [field, display_regular_expression, extended_fields, base_field_name, base_field_log_text, condition_data_type, condition_field, condition_operator, condition_value, converted_regular_expression, is_enabled, extended_field_definition_id, is_system, regular_expression, source_id, time_updated].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
331 332 333 334 335 336 337 338 339 340 |
# File 'lib/oci/log_analytics/models/log_analytics_source_extended_field_definition.rb', line 331 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
325 326 327 |
# File 'lib/oci/log_analytics/models/log_analytics_source_extended_field_definition.rb', line 325 def to_s to_hash.to_s end |