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.
-
#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
146 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 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 146 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'] end |
Instance Attribute Details
#active_edit_version ⇒ Integer
The active edit version.
19 20 21 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 19 def active_edit_version @active_edit_version end |
#canonical_link ⇒ String
The canonical link.
23 24 25 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 23 def canonical_link @canonical_link end |
#description ⇒ String
The lookup description.
27 28 29 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 27 def description @description end |
#edit_version ⇒ Integer
The edit version.
31 32 33 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 31 def edit_version @edit_version end |
#fields ⇒ Array<OCI::LogAnalytics::Models::LookupField>
The lookup fields.
35 36 37 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 35 def fields @fields end |
#is_built_in ⇒ Integer
A flag indicating if the lookup is custom (user-defined) or built in.
57 58 59 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 57 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.
63 64 65 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 63 def is_hidden @is_hidden end |
#lookup_display_name ⇒ String
The lookup display name.
67 68 69 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 67 def lookup_display_name @lookup_display_name end |
#lookup_reference ⇒ Integer
The lookup reference as an integer.
39 40 41 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 39 def lookup_reference @lookup_reference end |
#lookup_reference_string ⇒ String
The lookup reference as a string.
43 44 45 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 43 def lookup_reference_string @lookup_reference_string end |
#name ⇒ String
The lookup name.
51 52 53 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 51 def name @name end |
#referring_sources ⇒ OCI::LogAnalytics::Models::AutoLookups
70 71 72 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 70 def referring_sources @referring_sources end |
#status_summary ⇒ OCI::LogAnalytics::Models::StatusSummary
73 74 75 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 73 def status_summary @status_summary end |
#time_updated ⇒ DateTime
The last updated date.
77 78 79 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 77 def time_updated @time_updated end |
#type ⇒ String
The lookup type. Valid values are LOOKUP or DICTIONARY.
47 48 49 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 47 def type @type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 80 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' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
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_lookup.rb', line 103 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' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 248 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 end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 292 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
272 273 274 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 272 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
281 282 283 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 281 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].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
325 326 327 328 329 330 331 332 333 334 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 325 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
319 320 321 |
# File 'lib/oci/log_analytics/models/log_analytics_lookup.rb', line 319 def to_s to_hash.to_s end |