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_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
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 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 156 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.
20 21 22 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 20 def active_edit_version @active_edit_version end |
#canonical_link ⇒ String
The canonical link.
24 25 26 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 24 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.
84 85 86 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 84 def categories @categories end |
#description ⇒ String
The lookup description.
28 29 30 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 28 def description @description end |
#edit_version ⇒ Integer
The edit version.
32 33 34 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 32 def edit_version @edit_version end |
#fields ⇒ Array<OCI::LogAnalytics::Models::LookupField>
The lookup fields.
36 37 38 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 36 def fields @fields end |
#is_built_in ⇒ Integer
A flag indicating if the lookup is custom (user-defined) or built in.
58 59 60 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 58 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.
64 65 66 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 64 def is_hidden @is_hidden end |
#lookup_display_name ⇒ String
The lookup display name.
68 69 70 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 68 def lookup_display_name @lookup_display_name end |
#lookup_reference ⇒ Integer
The lookup reference as an integer.
40 41 42 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 40 def lookup_reference @lookup_reference end |
#lookup_reference_string ⇒ String
The lookup reference as a string.
44 45 46 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 44 def lookup_reference_string @lookup_reference_string end |
#name ⇒ String
The lookup name.
52 53 54 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 52 def name @name end |
#referring_sources ⇒ OCI::LogAnalytics::Models::AutoLookups
71 72 73 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 71 def referring_sources @referring_sources end |
#status_summary ⇒ OCI::LogAnalytics::Models::StatusSummary
74 75 76 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 74 def status_summary @status_summary end |
#time_updated ⇒ DateTime
The last updated date.
78 79 80 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 78 def time_updated @time_updated end |
#type ⇒ String
The lookup type. Valid values are LOOKUP or DICTIONARY.
48 49 50 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 48 def type @type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 87 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.
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 111 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.
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 260 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
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 305 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
285 286 287 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 285 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
294 295 296 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 294 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
338 339 340 341 342 343 344 345 346 347 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 338 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
332 333 334 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 332 def to_s to_hash.to_s end |