Class: OCI::DataCatalog::Models::SearchResult
- Inherits:
-
Object
- Object
- OCI::DataCatalog::Models::SearchResult
- Defined in:
- lib/oci/data_catalog/models/search_result.rb
Overview
The search result object is the definition of an element that is returned as part of search. It contains basic information about the object such as key, name and description. The search result also contains the list of tags for each object along with other contextual information like the data asset root, folder, or entity parents.
Instance Attribute Summary collapse
-
#created_by_id ⇒ String
OCID of the user who created the resource.
-
#data_asset_key ⇒ String
Unique key of the data asset that is the root parent of this object.
-
#data_asset_name ⇒ String
Name of the data asset that is the root parent of this object.
-
#data_asset_type ⇒ String
Type name of the data asset.
-
#description ⇒ String
Detailed description of the object.
-
#entity_name ⇒ String
Name of the parent entity object if this object is an attribute.
-
#entity_type ⇒ String
Type name of the entity.
-
#entitykey ⇒ String
Unique key of the entity object if this object is an attribute.
-
#external_data_type ⇒ String
Data type of the object if the object is an attribute.
-
#external_type_name ⇒ String
Name of the external object type in the host data asset.
-
#folder_key ⇒ String
Unique key of the folder object if this object is a sub folder, entity, or attribute.
-
#folder_name ⇒ String
Name of the parent folder object if this object is a sub folder, entity, or attribute.
-
#folder_type ⇒ String
Type name of the folder.
-
#glossary_key ⇒ String
Unique id of the parent glossary.
-
#glossary_name ⇒ String
Name of the parent glossary if this object is a term.
-
#key ⇒ String
Unique key of the object returned as part of the search result.
-
#name ⇒ String
Name of the object.
-
#parent_term_key ⇒ String
This terms parent term key.
-
#parent_term_name ⇒ String
Name of the parent term.
-
#path ⇒ String
Absolute path of this resource, which could be a term, folder, entity etc, usually resolvable to this resource through a namespace hierarchy.
-
#tag_summary ⇒ Array<OCI::DataCatalog::Models::SearchTagSummary>
Array of the tags associated with this object.
-
#term_summary ⇒ Array<OCI::DataCatalog::Models::SearchTermSummary>
Array of the terms associated with this object.
-
#time_created ⇒ DateTime
The date and time the result object was created, in the format defined by [RFC3339](tools.ietf.org/html/rfc3339).
-
#time_updated ⇒ DateTime
The date and time the result object was updated, in the format defined by [RFC3339](tools.ietf.org/html/rfc3339).
-
#type_name ⇒ String
Name of the object type.
-
#updated_by_id ⇒ String
OCID of the user who updated the resource.
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 = {}) ⇒ SearchResult
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 = {}) ⇒ SearchResult
Initializes the object
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 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 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 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 221 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.key = attributes[:'key'] if attributes[:'key'] self.name = attributes[:'name'] if attributes[:'name'] self.description = attributes[:'description'] if attributes[:'description'] self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated'] raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created') self.time_created = attributes[:'time_created'] if attributes[:'time_created'] 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.tag_summary = attributes[:'tagSummary'] if attributes[:'tagSummary'] raise 'You cannot provide both :tagSummary and :tag_summary' if attributes.key?(:'tagSummary') && attributes.key?(:'tag_summary') self.tag_summary = attributes[:'tag_summary'] if attributes[:'tag_summary'] self.term_summary = attributes[:'termSummary'] if attributes[:'termSummary'] raise 'You cannot provide both :termSummary and :term_summary' if attributes.key?(:'termSummary') && attributes.key?(:'term_summary') self.term_summary = attributes[:'term_summary'] if attributes[:'term_summary'] self.type_name = attributes[:'typeName'] if attributes[:'typeName'] raise 'You cannot provide both :typeName and :type_name' if attributes.key?(:'typeName') && attributes.key?(:'type_name') self.type_name = attributes[:'type_name'] if attributes[:'type_name'] self.external_type_name = attributes[:'externalTypeName'] if attributes[:'externalTypeName'] raise 'You cannot provide both :externalTypeName and :external_type_name' if attributes.key?(:'externalTypeName') && attributes.key?(:'external_type_name') self.external_type_name = attributes[:'external_type_name'] if attributes[:'external_type_name'] self.external_data_type = attributes[:'externalDataType'] if attributes[:'externalDataType'] raise 'You cannot provide both :externalDataType and :external_data_type' if attributes.key?(:'externalDataType') && attributes.key?(:'external_data_type') self.external_data_type = attributes[:'external_data_type'] if attributes[:'external_data_type'] self.data_asset_key = attributes[:'dataAssetKey'] if attributes[:'dataAssetKey'] raise 'You cannot provide both :dataAssetKey and :data_asset_key' if attributes.key?(:'dataAssetKey') && attributes.key?(:'data_asset_key') self.data_asset_key = attributes[:'data_asset_key'] if attributes[:'data_asset_key'] self.data_asset_type = attributes[:'dataAssetType'] if attributes[:'dataAssetType'] raise 'You cannot provide both :dataAssetType and :data_asset_type' if attributes.key?(:'dataAssetType') && attributes.key?(:'data_asset_type') self.data_asset_type = attributes[:'data_asset_type'] if attributes[:'data_asset_type'] self.data_asset_name = attributes[:'dataAssetName'] if attributes[:'dataAssetName'] raise 'You cannot provide both :dataAssetName and :data_asset_name' if attributes.key?(:'dataAssetName') && attributes.key?(:'data_asset_name') self.data_asset_name = attributes[:'data_asset_name'] if attributes[:'data_asset_name'] self.folder_key = attributes[:'folderKey'] if attributes[:'folderKey'] raise 'You cannot provide both :folderKey and :folder_key' if attributes.key?(:'folderKey') && attributes.key?(:'folder_key') self.folder_key = attributes[:'folder_key'] if attributes[:'folder_key'] self.folder_type = attributes[:'folderType'] if attributes[:'folderType'] raise 'You cannot provide both :folderType and :folder_type' if attributes.key?(:'folderType') && attributes.key?(:'folder_type') self.folder_type = attributes[:'folder_type'] if attributes[:'folder_type'] self.folder_name = attributes[:'folderName'] if attributes[:'folderName'] raise 'You cannot provide both :folderName and :folder_name' if attributes.key?(:'folderName') && attributes.key?(:'folder_name') self.folder_name = attributes[:'folder_name'] if attributes[:'folder_name'] self.entitykey = attributes[:'entitykey'] if attributes[:'entitykey'] self.entity_type = attributes[:'entityType'] if attributes[:'entityType'] raise 'You cannot provide both :entityType and :entity_type' if attributes.key?(:'entityType') && attributes.key?(:'entity_type') self.entity_type = attributes[:'entity_type'] if attributes[:'entity_type'] self.entity_name = attributes[:'entityName'] if attributes[:'entityName'] raise 'You cannot provide both :entityName and :entity_name' if attributes.key?(:'entityName') && attributes.key?(:'entity_name') self.entity_name = attributes[:'entity_name'] if attributes[:'entity_name'] self.glossary_key = attributes[:'glossaryKey'] if attributes[:'glossaryKey'] raise 'You cannot provide both :glossaryKey and :glossary_key' if attributes.key?(:'glossaryKey') && attributes.key?(:'glossary_key') self.glossary_key = attributes[:'glossary_key'] if attributes[:'glossary_key'] self.glossary_name = attributes[:'glossaryName'] if attributes[:'glossaryName'] raise 'You cannot provide both :glossaryName and :glossary_name' if attributes.key?(:'glossaryName') && attributes.key?(:'glossary_name') self.glossary_name = attributes[:'glossary_name'] if attributes[:'glossary_name'] self.parent_term_key = attributes[:'parentTermKey'] if attributes[:'parentTermKey'] raise 'You cannot provide both :parentTermKey and :parent_term_key' if attributes.key?(:'parentTermKey') && attributes.key?(:'parent_term_key') self.parent_term_key = attributes[:'parent_term_key'] if attributes[:'parent_term_key'] self.parent_term_name = attributes[:'parentTermName'] if attributes[:'parentTermName'] raise 'You cannot provide both :parentTermName and :parent_term_name' if attributes.key?(:'parentTermName') && attributes.key?(:'parent_term_name') self.parent_term_name = attributes[:'parent_term_name'] if attributes[:'parent_term_name'] self.created_by_id = attributes[:'createdById'] if attributes[:'createdById'] raise 'You cannot provide both :createdById and :created_by_id' if attributes.key?(:'createdById') && attributes.key?(:'created_by_id') self.created_by_id = attributes[:'created_by_id'] if attributes[:'created_by_id'] self.updated_by_id = attributes[:'updatedById'] if attributes[:'updatedById'] raise 'You cannot provide both :updatedById and :updated_by_id' if attributes.key?(:'updatedById') && attributes.key?(:'updated_by_id') self.updated_by_id = attributes[:'updated_by_id'] if attributes[:'updated_by_id'] self.path = attributes[:'path'] if attributes[:'path'] end |
Instance Attribute Details
#created_by_id ⇒ String
OCID of the user who created the resource.
111 112 113 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 111 def created_by_id @created_by_id end |
#data_asset_key ⇒ String
Unique key of the data asset that is the root parent of this object.
59 60 61 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 59 def data_asset_key @data_asset_key end |
#data_asset_name ⇒ String
Name of the data asset that is the root parent of this object.
67 68 69 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 67 def data_asset_name @data_asset_name end |
#data_asset_type ⇒ String
Type name of the data asset. For example, Oracle, MySQL or Oracle Object Storage.
63 64 65 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 63 def data_asset_type @data_asset_type end |
#description ⇒ String
Detailed description of the object.
23 24 25 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 23 def description @description end |
#entity_name ⇒ String
Name of the parent entity object if this object is an attribute.
91 92 93 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 91 def entity_name @entity_name end |
#entity_type ⇒ String
Type name of the entity. For example, table, view, external table, file, or object.
87 88 89 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 87 def entity_type @entity_type end |
#entitykey ⇒ String
Unique key of the entity object if this object is an attribute.
83 84 85 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 83 def entitykey @entitykey end |
#external_data_type ⇒ String
Data type of the object if the object is an attribute. Null otherwise.
55 56 57 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 55 def external_data_type @external_data_type end |
#external_type_name ⇒ String
Name of the external object type in the host data asset. For example, column, field, table, view, or file.
51 52 53 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 51 def external_type_name @external_type_name end |
#folder_key ⇒ String
Unique key of the folder object if this object is a sub folder, entity, or attribute.
71 72 73 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 71 def folder_key @folder_key end |
#folder_name ⇒ String
Name of the parent folder object if this object is a sub folder, entity, or attribute.
79 80 81 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 79 def folder_name @folder_name end |
#folder_type ⇒ String
Type name of the folder. For example, schema, directory, or topic.
75 76 77 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 75 def folder_type @folder_type end |
#glossary_key ⇒ String
Unique id of the parent glossary.
95 96 97 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 95 def glossary_key @glossary_key end |
#glossary_name ⇒ String
Name of the parent glossary if this object is a term.
99 100 101 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 99 def glossary_name @glossary_name end |
#key ⇒ String
Unique key of the object returned as part of the search result.
15 16 17 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 15 def key @key end |
#name ⇒ String
Name of the object.
19 20 21 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 19 def name @name end |
#parent_term_key ⇒ String
This terms parent term key. Will be null if the term has no parent term.
103 104 105 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 103 def parent_term_key @parent_term_key end |
#parent_term_name ⇒ String
Name of the parent term. Will be null if the term has no parent term.
107 108 109 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 107 def parent_term_name @parent_term_name end |
#path ⇒ String
Absolute path of this resource, which could be a term, folder, entity etc, usually resolvable to this resource through a namespace hierarchy.
119 120 121 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 119 def path @path end |
#tag_summary ⇒ Array<OCI::DataCatalog::Models::SearchTagSummary>
Array of the tags associated with this object.
39 40 41 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 39 def tag_summary @tag_summary end |
#term_summary ⇒ Array<OCI::DataCatalog::Models::SearchTermSummary>
Array of the terms associated with this object.
43 44 45 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 43 def term_summary @term_summary end |
#time_created ⇒ DateTime
The date and time the result object was created, in the format defined by [RFC3339](tools.ietf.org/html/rfc3339). Example: ‘2019-03-25T21:10:29.600Z`
29 30 31 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 29 def time_created @time_created end |
#time_updated ⇒ DateTime
The date and time the result object was updated, in the format defined by [RFC3339](tools.ietf.org/html/rfc3339). Example: ‘2019-03-25T21:10:29.600Z`
35 36 37 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 35 def time_updated @time_updated end |
#type_name ⇒ String
Name of the object type.
47 48 49 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 47 def type_name @type_name end |
#updated_by_id ⇒ String
OCID of the user who updated the resource.
115 116 117 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 115 def updated_by_id @updated_by_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 122 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'key': :'key', 'name': :'name', 'description': :'description', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'tag_summary': :'tagSummary', 'term_summary': :'termSummary', 'type_name': :'typeName', 'external_type_name': :'externalTypeName', 'external_data_type': :'externalDataType', 'data_asset_key': :'dataAssetKey', 'data_asset_type': :'dataAssetType', 'data_asset_name': :'dataAssetName', 'folder_key': :'folderKey', 'folder_type': :'folderType', 'folder_name': :'folderName', 'entitykey': :'entitykey', 'entity_type': :'entityType', 'entity_name': :'entityName', 'glossary_key': :'glossaryKey', 'glossary_name': :'glossaryName', 'parent_term_key': :'parentTermKey', 'parent_term_name': :'parentTermName', 'created_by_id': :'createdById', 'updated_by_id': :'updatedById', 'path': :'path' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 156 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'key': :'String', 'name': :'String', 'description': :'String', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'tag_summary': :'Array<OCI::DataCatalog::Models::SearchTagSummary>', 'term_summary': :'Array<OCI::DataCatalog::Models::SearchTermSummary>', 'type_name': :'String', 'external_type_name': :'String', 'external_data_type': :'String', 'data_asset_key': :'String', 'data_asset_type': :'String', 'data_asset_name': :'String', 'folder_key': :'String', 'folder_type': :'String', 'folder_name': :'String', 'entitykey': :'String', 'entity_type': :'String', 'entity_name': :'String', 'glossary_key': :'String', 'glossary_name': :'String', 'parent_term_key': :'String', 'parent_term_name': :'String', 'created_by_id': :'String', 'updated_by_id': :'String', 'path': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 371 def ==(other) return true if equal?(other) self.class == other.class && key == other.key && name == other.name && description == other.description && time_created == other.time_created && time_updated == other.time_updated && tag_summary == other.tag_summary && term_summary == other.term_summary && type_name == other.type_name && external_type_name == other.external_type_name && external_data_type == other.external_data_type && data_asset_key == other.data_asset_key && data_asset_type == other.data_asset_type && data_asset_name == other.data_asset_name && folder_key == other.folder_key && folder_type == other.folder_type && folder_name == other.folder_name && entitykey == other.entitykey && entity_type == other.entity_type && entity_name == other.entity_name && glossary_key == other.glossary_key && glossary_name == other.glossary_name && parent_term_key == other.parent_term_key && parent_term_name == other.parent_term_name && created_by_id == other.created_by_id && updated_by_id == other.updated_by_id && path == other.path end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 426 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
406 407 408 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 406 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
415 416 417 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 415 def hash [key, name, description, time_created, time_updated, tag_summary, term_summary, type_name, external_type_name, external_data_type, data_asset_key, data_asset_type, data_asset_name, folder_key, folder_type, folder_name, entitykey, entity_type, entity_name, glossary_key, glossary_name, parent_term_key, parent_term_name, created_by_id, updated_by_id, path].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
459 460 461 462 463 464 465 466 467 468 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 459 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
453 454 455 |
# File 'lib/oci/data_catalog/models/search_result.rb', line 453 def to_s to_hash.to_s end |