Class: OCI::LogAnalytics::Models::LogAnalyticsSourceLabelCondition
- Inherits:
-
Object
- Object
- OCI::LogAnalytics::Models::LogAnalyticsSourceLabelCondition
- Defined in:
- lib/oci/log_analytics/models/log_analytics_source_label_condition.rb
Overview
LogAnalyticsSourceLabelCondition
Instance Attribute Summary collapse
-
#block_condition_field ⇒ String
The block condition field.
-
#block_condition_operator ⇒ String
The block condition operator.
-
#block_condition_value ⇒ String
The block condition value.
-
#content_example ⇒ String
The content example.
-
#field_name ⇒ String
The internal field name.
-
#is_enabled ⇒ BOOLEAN
A flag inidcating whether or not the condition is enabled.
-
#is_inline_label_existing_in_database ⇒ BOOLEAN
A flag indicating whether or not the inline label exists in the database.
-
#is_system ⇒ BOOLEAN
The system flag.
-
#is_visible ⇒ BOOLEAN
A flag indicating whether or not the label condition is visible.
-
#label_condition_id ⇒ Integer
The unique identifier of the condition.
-
#label_condition_operator ⇒ String
The condition operator.
-
#label_condition_value ⇒ String
The condition value.
-
#label_condition_values ⇒ Array<String>
A list of condition values.
-
#label_display_name ⇒ String
The label display name.
-
#label_name ⇒ String
The label name.
-
#message ⇒ String
The message.
-
#source_id ⇒ Integer
The unique identifier of the source.
-
#storage_field ⇒ String
The label storage field.
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 = {}) ⇒ LogAnalyticsSourceLabelCondition
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 = {}) ⇒ LogAnalyticsSourceLabelCondition
Initializes the object
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 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
# File 'lib/oci/log_analytics/models/log_analytics_source_label_condition.rb', line 163 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. = attributes[:'message'] if attributes[:'message'] self.is_visible = attributes[:'isVisible'] unless attributes[:'isVisible'].nil? raise 'You cannot provide both :isVisible and :is_visible' if attributes.key?(:'isVisible') && attributes.key?(:'is_visible') self.is_visible = attributes[:'is_visible'] unless attributes[:'is_visible'].nil? self.block_condition_field = attributes[:'blockConditionField'] if attributes[:'blockConditionField'] raise 'You cannot provide both :blockConditionField and :block_condition_field' if attributes.key?(:'blockConditionField') && attributes.key?(:'block_condition_field') self.block_condition_field = attributes[:'block_condition_field'] if attributes[:'block_condition_field'] self.block_condition_operator = attributes[:'blockConditionOperator'] if attributes[:'blockConditionOperator'] raise 'You cannot provide both :blockConditionOperator and :block_condition_operator' if attributes.key?(:'blockConditionOperator') && attributes.key?(:'block_condition_operator') self.block_condition_operator = attributes[:'block_condition_operator'] if attributes[:'block_condition_operator'] self.block_condition_value = attributes[:'blockConditionValue'] if attributes[:'blockConditionValue'] raise 'You cannot provide both :blockConditionValue and :block_condition_value' if attributes.key?(:'blockConditionValue') && attributes.key?(:'block_condition_value') self.block_condition_value = attributes[:'block_condition_value'] if attributes[:'block_condition_value'] self.label_condition_value = attributes[:'labelConditionValue'] if attributes[:'labelConditionValue'] raise 'You cannot provide both :labelConditionValue and :label_condition_value' if attributes.key?(:'labelConditionValue') && attributes.key?(:'label_condition_value') self.label_condition_value = attributes[:'label_condition_value'] if attributes[:'label_condition_value'] self.label_condition_values = attributes[:'labelConditionValues'] if attributes[:'labelConditionValues'] raise 'You cannot provide both :labelConditionValues and :label_condition_values' if attributes.key?(:'labelConditionValues') && attributes.key?(:'label_condition_values') self.label_condition_values = attributes[:'label_condition_values'] if attributes[:'label_condition_values'] self.content_example = attributes[:'contentExample'] if attributes[:'contentExample'] raise 'You cannot provide both :contentExample and :content_example' if attributes.key?(:'contentExample') && attributes.key?(:'content_example') self.content_example = attributes[:'content_example'] if attributes[:'content_example'] 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.field_name = attributes[:'fieldName'] if attributes[:'fieldName'] raise 'You cannot provide both :fieldName and :field_name' if attributes.key?(:'fieldName') && attributes.key?(:'field_name') self.field_name = attributes[:'field_name'] if attributes[:'field_name'] self.label_condition_id = attributes[:'labelConditionId'] if attributes[:'labelConditionId'] raise 'You cannot provide both :labelConditionId and :label_condition_id' if attributes.key?(:'labelConditionId') && attributes.key?(:'label_condition_id') self.label_condition_id = attributes[:'label_condition_id'] if attributes[:'label_condition_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.label_condition_operator = attributes[:'labelConditionOperator'] if attributes[:'labelConditionOperator'] raise 'You cannot provide both :labelConditionOperator and :label_condition_operator' if attributes.key?(:'labelConditionOperator') && attributes.key?(:'label_condition_operator') self.label_condition_operator = attributes[:'label_condition_operator'] if attributes[:'label_condition_operator'] 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.label_display_name = attributes[:'labelDisplayName'] if attributes[:'labelDisplayName'] raise 'You cannot provide both :labelDisplayName and :label_display_name' if attributes.key?(:'labelDisplayName') && attributes.key?(:'label_display_name') self.label_display_name = attributes[:'label_display_name'] if attributes[:'label_display_name'] self.storage_field = attributes[:'storageField'] if attributes[:'storageField'] raise 'You cannot provide both :storageField and :storage_field' if attributes.key?(:'storageField') && attributes.key?(:'storage_field') self.storage_field = attributes[:'storage_field'] if attributes[:'storage_field'] self.label_name = attributes[:'labelName'] if attributes[:'labelName'] raise 'You cannot provide both :labelName and :label_name' if attributes.key?(:'labelName') && attributes.key?(:'label_name') self.label_name = attributes[:'label_name'] if attributes[:'label_name'] self.is_inline_label_existing_in_database = attributes[:'isInlineLabelExistingInDatabase'] unless attributes[:'isInlineLabelExistingInDatabase'].nil? raise 'You cannot provide both :isInlineLabelExistingInDatabase and :is_inline_label_existing_in_database' if attributes.key?(:'isInlineLabelExistingInDatabase') && attributes.key?(:'is_inline_label_existing_in_database') self.is_inline_label_existing_in_database = attributes[:'is_inline_label_existing_in_database'] unless attributes[:'is_inline_label_existing_in_database'].nil? end |
Instance Attribute Details
#block_condition_field ⇒ String
The block condition field.
21 22 23 |
# File 'lib/oci/log_analytics/models/log_analytics_source_label_condition.rb', line 21 def block_condition_field @block_condition_field end |
#block_condition_operator ⇒ String
The block condition operator.
25 26 27 |
# File 'lib/oci/log_analytics/models/log_analytics_source_label_condition.rb', line 25 def block_condition_operator @block_condition_operator end |
#block_condition_value ⇒ String
The block condition value.
29 30 31 |
# File 'lib/oci/log_analytics/models/log_analytics_source_label_condition.rb', line 29 def block_condition_value @block_condition_value end |
#content_example ⇒ String
The content example.
41 42 43 |
# File 'lib/oci/log_analytics/models/log_analytics_source_label_condition.rb', line 41 def content_example @content_example end |
#field_name ⇒ String
The internal field name.
50 51 52 |
# File 'lib/oci/log_analytics/models/log_analytics_source_label_condition.rb', line 50 def field_name @field_name end |
#is_enabled ⇒ BOOLEAN
A flag inidcating whether or not the condition is enabled.
46 47 48 |
# File 'lib/oci/log_analytics/models/log_analytics_source_label_condition.rb', line 46 def is_enabled @is_enabled end |
#is_inline_label_existing_in_database ⇒ BOOLEAN
A flag indicating whether or not the inline label exists in the database.
85 86 87 |
# File 'lib/oci/log_analytics/models/log_analytics_source_label_condition.rb', line 85 def is_inline_label_existing_in_database @is_inline_label_existing_in_database 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.
60 61 62 |
# File 'lib/oci/log_analytics/models/log_analytics_source_label_condition.rb', line 60 def is_system @is_system end |
#is_visible ⇒ BOOLEAN
A flag indicating whether or not the label condition is visible.
17 18 19 |
# File 'lib/oci/log_analytics/models/log_analytics_source_label_condition.rb', line 17 def is_visible @is_visible end |
#label_condition_id ⇒ Integer
The unique identifier of the condition.
54 55 56 |
# File 'lib/oci/log_analytics/models/log_analytics_source_label_condition.rb', line 54 def label_condition_id @label_condition_id end |
#label_condition_operator ⇒ String
The condition operator.
64 65 66 |
# File 'lib/oci/log_analytics/models/log_analytics_source_label_condition.rb', line 64 def label_condition_operator @label_condition_operator end |
#label_condition_value ⇒ String
The condition value.
33 34 35 |
# File 'lib/oci/log_analytics/models/log_analytics_source_label_condition.rb', line 33 def label_condition_value @label_condition_value end |
#label_condition_values ⇒ Array<String>
A list of condition values.
37 38 39 |
# File 'lib/oci/log_analytics/models/log_analytics_source_label_condition.rb', line 37 def label_condition_values @label_condition_values end |
#label_display_name ⇒ String
The label display name.
72 73 74 |
# File 'lib/oci/log_analytics/models/log_analytics_source_label_condition.rb', line 72 def label_display_name @label_display_name end |
#label_name ⇒ String
The label name.
80 81 82 |
# File 'lib/oci/log_analytics/models/log_analytics_source_label_condition.rb', line 80 def label_name @label_name end |
#message ⇒ String
The message.
12 13 14 |
# File 'lib/oci/log_analytics/models/log_analytics_source_label_condition.rb', line 12 def end |
#source_id ⇒ Integer
The unique identifier of the source.
68 69 70 |
# File 'lib/oci/log_analytics/models/log_analytics_source_label_condition.rb', line 68 def source_id @source_id end |
#storage_field ⇒ String
The label storage field.
76 77 78 |
# File 'lib/oci/log_analytics/models/log_analytics_source_label_condition.rb', line 76 def storage_field @storage_field end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/oci/log_analytics/models/log_analytics_source_label_condition.rb', line 88 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'message': :'message', 'is_visible': :'isVisible', 'block_condition_field': :'blockConditionField', 'block_condition_operator': :'blockConditionOperator', 'block_condition_value': :'blockConditionValue', 'label_condition_value': :'labelConditionValue', 'label_condition_values': :'labelConditionValues', 'content_example': :'contentExample', 'is_enabled': :'isEnabled', 'field_name': :'fieldName', 'label_condition_id': :'labelConditionId', 'is_system': :'isSystem', 'label_condition_operator': :'labelConditionOperator', 'source_id': :'sourceId', 'label_display_name': :'labelDisplayName', 'storage_field': :'storageField', 'label_name': :'labelName', 'is_inline_label_existing_in_database': :'isInlineLabelExistingInDatabase' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/oci/log_analytics/models/log_analytics_source_label_condition.rb', line 114 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'message': :'String', 'is_visible': :'BOOLEAN', 'block_condition_field': :'String', 'block_condition_operator': :'String', 'block_condition_value': :'String', 'label_condition_value': :'String', 'label_condition_values': :'Array<String>', 'content_example': :'String', 'is_enabled': :'BOOLEAN', 'field_name': :'String', 'label_condition_id': :'Integer', 'is_system': :'BOOLEAN', 'label_condition_operator': :'String', 'source_id': :'Integer', 'label_display_name': :'String', 'storage_field': :'String', 'label_name': :'String', 'is_inline_label_existing_in_database': :'BOOLEAN' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 |
# File 'lib/oci/log_analytics/models/log_analytics_source_label_condition.rb', line 281 def ==(other) return true if equal?(other) self.class == other.class && == other. && is_visible == other.is_visible && block_condition_field == other.block_condition_field && block_condition_operator == other.block_condition_operator && block_condition_value == other.block_condition_value && label_condition_value == other.label_condition_value && label_condition_values == other.label_condition_values && content_example == other.content_example && is_enabled == other.is_enabled && field_name == other.field_name && label_condition_id == other.label_condition_id && is_system == other.is_system && label_condition_operator == other.label_condition_operator && source_id == other.source_id && label_display_name == other.label_display_name && storage_field == other.storage_field && label_name == other.label_name && is_inline_label_existing_in_database == other.is_inline_label_existing_in_database end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 |
# File 'lib/oci/log_analytics/models/log_analytics_source_label_condition.rb', line 328 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
308 309 310 |
# File 'lib/oci/log_analytics/models/log_analytics_source_label_condition.rb', line 308 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
317 318 319 |
# File 'lib/oci/log_analytics/models/log_analytics_source_label_condition.rb', line 317 def hash [, is_visible, block_condition_field, block_condition_operator, block_condition_value, label_condition_value, label_condition_values, content_example, is_enabled, field_name, label_condition_id, is_system, label_condition_operator, source_id, label_display_name, storage_field, label_name, is_inline_label_existing_in_database].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
361 362 363 364 365 366 367 368 369 370 |
# File 'lib/oci/log_analytics/models/log_analytics_source_label_condition.rb', line 361 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
355 356 357 |
# File 'lib/oci/log_analytics/models/log_analytics_source_label_condition.rb', line 355 def to_s to_hash.to_s end |