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.
-
#description ⇒ String
The lookup description.
-
#edit_version ⇒ Integer
The edit version.
-
#fields ⇒ Array<OCI::LogAnalytics::Models::LookupField>
The lookup fields.
-
#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
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 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 157 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'] 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 |
#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 |
#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.
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 88 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' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 112 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>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 261 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 end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 306 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
286 287 288 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 286 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
295 296 297 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 295 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].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
339 340 341 342 343 344 345 346 347 348 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 339 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
333 334 335 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 333 def to_s to_hash.to_s end |