Class: OCI::LogAnalytics::Models::LogAnalyticsLookup
- Inherits:
-
Object
- Object
- OCI::LogAnalytics::Models::LogAnalyticsLookup
- Defined in:
- lib/oci/log_analytics/models/log_analytics_lookup.rb
Overview
LogAnalyticsLookup
Constant Summary collapse
- TYPE_ENUM =
[ TYPE_LOOKUP = 'Lookup'.freeze, TYPE_DICTIONARY = 'Dictionary'.freeze, TYPE_MODULE = 'Module'.freeze, TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#active_edit_version ⇒ Integer
The active edit version.
-
#canonical_link ⇒ String
The canonical link.
-
#categories ⇒ Array<OCI::LogAnalytics::Models::LogAnalyticsCategory>
An array of categories assigned to this lookup.
-
#compartment_id ⇒ String
Compartment Identifier [OCID] (docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#description ⇒ String
The lookup description.
-
#edit_version ⇒ Integer
The edit version.
-
#fields ⇒ Array<OCI::LogAnalytics::Models::LookupField>
The lookup fields.
-
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope.
-
#id ⇒ String
The log analytics entity OCID.
-
#is_built_in ⇒ Integer
A flag indicating if the lookup is custom (user-defined) or built in.
-
#is_hidden ⇒ BOOLEAN
A flag indicating if the lookup is hidden or not.
-
#lookup_display_name ⇒ String
The lookup display name.
-
#lookup_reference ⇒ Integer
The lookup reference as an integer.
-
#lookup_reference_string ⇒ String
The lookup reference as a string.
-
#name ⇒ String
The lookup name.
- #referring_sources ⇒ OCI::LogAnalytics::Models::AutoLookups
- #status_summary ⇒ OCI::LogAnalytics::Models::StatusSummary
-
#time_updated ⇒ DateTime
The last updated date.
-
#type ⇒ String
The lookup type.
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 = {}) ⇒ LogAnalyticsLookup
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 = {}) ⇒ LogAnalyticsLookup
Initializes the object
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 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 191 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.active_edit_version = attributes[:'activeEditVersion'] if attributes[:'activeEditVersion'] raise 'You cannot provide both :activeEditVersion and :active_edit_version' if attributes.key?(:'activeEditVersion') && attributes.key?(:'active_edit_version') self.active_edit_version = attributes[:'active_edit_version'] if attributes[:'active_edit_version'] self.canonical_link = attributes[:'canonicalLink'] if attributes[:'canonicalLink'] raise 'You cannot provide both :canonicalLink and :canonical_link' if attributes.key?(:'canonicalLink') && attributes.key?(:'canonical_link') self.canonical_link = attributes[:'canonical_link'] if attributes[:'canonical_link'] self.description = attributes[:'description'] if attributes[:'description'] self.edit_version = attributes[:'editVersion'] if attributes[:'editVersion'] raise 'You cannot provide both :editVersion and :edit_version' if attributes.key?(:'editVersion') && attributes.key?(:'edit_version') self.edit_version = attributes[:'edit_version'] if attributes[:'edit_version'] self.fields = attributes[:'fields'] if attributes[:'fields'] self.lookup_reference = attributes[:'lookupReference'] if attributes[:'lookupReference'] raise 'You cannot provide both :lookupReference and :lookup_reference' if attributes.key?(:'lookupReference') && attributes.key?(:'lookup_reference') self.lookup_reference = attributes[:'lookup_reference'] if attributes[:'lookup_reference'] self.lookup_reference_string = attributes[:'lookupReferenceString'] if attributes[:'lookupReferenceString'] raise 'You cannot provide both :lookupReferenceString and :lookup_reference_string' if attributes.key?(:'lookupReferenceString') && attributes.key?(:'lookup_reference_string') self.lookup_reference_string = attributes[:'lookup_reference_string'] if attributes[:'lookup_reference_string'] self.type = attributes[:'type'] if attributes[:'type'] self.type = "Lookup" if type.nil? && !attributes.key?(:'type') # rubocop:disable Style/StringLiterals self.name = attributes[:'name'] if attributes[:'name'] self.is_built_in = attributes[:'isBuiltIn'] if attributes[:'isBuiltIn'] raise 'You cannot provide both :isBuiltIn and :is_built_in' if attributes.key?(:'isBuiltIn') && attributes.key?(:'is_built_in') self.is_built_in = attributes[:'is_built_in'] if attributes[:'is_built_in'] self.is_hidden = attributes[:'isHidden'] unless attributes[:'isHidden'].nil? raise 'You cannot provide both :isHidden and :is_hidden' if attributes.key?(:'isHidden') && attributes.key?(:'is_hidden') self.is_hidden = attributes[:'is_hidden'] unless attributes[:'is_hidden'].nil? self.lookup_display_name = attributes[:'lookupDisplayName'] if attributes[:'lookupDisplayName'] raise 'You cannot provide both :lookupDisplayName and :lookup_display_name' if attributes.key?(:'lookupDisplayName') && attributes.key?(:'lookup_display_name') self.lookup_display_name = attributes[:'lookup_display_name'] if attributes[:'lookup_display_name'] self.referring_sources = attributes[:'referringSources'] if attributes[:'referringSources'] raise 'You cannot provide both :referringSources and :referring_sources' if attributes.key?(:'referringSources') && attributes.key?(:'referring_sources') self.referring_sources = attributes[:'referring_sources'] if attributes[:'referring_sources'] self.status_summary = attributes[:'statusSummary'] if attributes[:'statusSummary'] raise 'You cannot provide both :statusSummary and :status_summary' if attributes.key?(:'statusSummary') && attributes.key?(:'status_summary') self.status_summary = attributes[:'status_summary'] if attributes[:'status_summary'] 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'] self.categories = attributes[:'categories'] if attributes[:'categories'] self.id = attributes[:'id'] if attributes[:'id'] self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId'] raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id') self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id'] self. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] self. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = attributes[:'defined_tags'] if attributes[:'defined_tags'] end |
Instance Attribute Details
#active_edit_version ⇒ Integer
The active edit version.
21 22 23 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 21 def active_edit_version @active_edit_version end |
#canonical_link ⇒ String
The canonical link.
25 26 27 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 25 def canonical_link @canonical_link end |
#categories ⇒ Array<OCI::LogAnalytics::Models::LogAnalyticsCategory>
An array of categories assigned to this lookup. The isSystem flag denotes if each category assignment is user-created or Oracle-defined.
85 86 87 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 85 def categories @categories end |
#compartment_id ⇒ String
Compartment Identifier [OCID] (docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
95 96 97 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 95 def compartment_id @compartment_id end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {\"foo-namespace\": {\"bar-key\": \"value\"}}
107 108 109 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 107 def @defined_tags end |
#description ⇒ String
The lookup description.
29 30 31 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 29 def description @description end |
#edit_version ⇒ Integer
The edit version.
33 34 35 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 33 def edit_version @edit_version end |
#fields ⇒ Array<OCI::LogAnalytics::Models::LookupField>
The lookup fields.
37 38 39 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 37 def fields @fields end |
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {\"bar-key\": \"value\"}
101 102 103 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 101 def @freeform_tags end |
#id ⇒ String
The log analytics entity OCID. This ID is a reference used by log analytics features and it represents a resource that is provisioned and managed by the customer on their premises or on the cloud.
91 92 93 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 91 def id @id end |
#is_built_in ⇒ Integer
A flag indicating if the lookup is custom (user-defined) or built in.
59 60 61 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 59 def is_built_in @is_built_in end |
#is_hidden ⇒ BOOLEAN
A flag indicating if the lookup is hidden or not. A hidden lookup will not be returned in list operations by default.
65 66 67 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 65 def is_hidden @is_hidden end |
#lookup_display_name ⇒ String
The lookup display name.
69 70 71 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 69 def lookup_display_name @lookup_display_name end |
#lookup_reference ⇒ Integer
The lookup reference as an integer.
41 42 43 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 41 def lookup_reference @lookup_reference end |
#lookup_reference_string ⇒ String
The lookup reference as a string.
45 46 47 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 45 def lookup_reference_string @lookup_reference_string end |
#name ⇒ String
The lookup name.
53 54 55 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 53 def name @name end |
#referring_sources ⇒ OCI::LogAnalytics::Models::AutoLookups
72 73 74 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 72 def referring_sources @referring_sources end |
#status_summary ⇒ OCI::LogAnalytics::Models::StatusSummary
75 76 77 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 75 def status_summary @status_summary end |
#time_updated ⇒ DateTime
The last updated date.
79 80 81 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 79 def time_updated @time_updated end |
#type ⇒ String
The lookup type. Valid values are Lookup, Dictionary or Module.
49 50 51 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 49 def type @type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 110 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'active_edit_version': :'activeEditVersion', 'canonical_link': :'canonicalLink', 'description': :'description', 'edit_version': :'editVersion', 'fields': :'fields', 'lookup_reference': :'lookupReference', 'lookup_reference_string': :'lookupReferenceString', 'type': :'type', 'name': :'name', 'is_built_in': :'isBuiltIn', 'is_hidden': :'isHidden', 'lookup_display_name': :'lookupDisplayName', 'referring_sources': :'referringSources', 'status_summary': :'statusSummary', 'time_updated': :'timeUpdated', 'categories': :'categories', 'id': :'id', 'compartment_id': :'compartmentId', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 138 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'active_edit_version': :'Integer', 'canonical_link': :'String', 'description': :'String', 'edit_version': :'Integer', 'fields': :'Array<OCI::LogAnalytics::Models::LookupField>', 'lookup_reference': :'Integer', 'lookup_reference_string': :'String', 'type': :'String', 'name': :'String', 'is_built_in': :'Integer', 'is_hidden': :'BOOLEAN', 'lookup_display_name': :'String', 'referring_sources': :'OCI::LogAnalytics::Models::AutoLookups', 'status_summary': :'OCI::LogAnalytics::Models::StatusSummary', 'time_updated': :'DateTime', 'categories': :'Array<OCI::LogAnalytics::Models::LogAnalyticsCategory>', 'id': :'String', 'compartment_id': :'String', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 315 def ==(other) return true if equal?(other) self.class == other.class && active_edit_version == other.active_edit_version && canonical_link == other.canonical_link && description == other.description && edit_version == other.edit_version && fields == other.fields && lookup_reference == other.lookup_reference && lookup_reference_string == other.lookup_reference_string && type == other.type && name == other.name && is_built_in == other.is_built_in && is_hidden == other.is_hidden && lookup_display_name == other.lookup_display_name && referring_sources == other.referring_sources && status_summary == other.status_summary && time_updated == other.time_updated && categories == other.categories && id == other.id && compartment_id == other.compartment_id && == other. && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 364 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
344 345 346 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 344 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
353 354 355 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 353 def hash [active_edit_version, canonical_link, description, edit_version, fields, lookup_reference, lookup_reference_string, type, name, is_built_in, is_hidden, lookup_display_name, referring_sources, status_summary, time_updated, categories, id, compartment_id, , ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
397 398 399 400 401 402 403 404 405 406 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 397 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
391 392 393 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 391 def to_s to_hash.to_s end |