Class: OCI::DataCatalog::Models::RecommendationDetails
- Inherits:
-
Object
- Object
- OCI::DataCatalog::Models::RecommendationDetails
- Defined in:
- lib/oci/data_catalog/models/recommendation_details.rb
Overview
Details of a recommendation.
Constant Summary collapse
- RECOMMENDATION_TYPE_ENUM =
[ RECOMMENDATION_TYPE_LINK_GLOSSARY_TERM = 'LINK_GLOSSARY_TERM'.freeze, RECOMMENDATION_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- RECOMMENDATION_STATUS_ENUM =
[ RECOMMENDATION_STATUS_ACCEPTED = 'ACCEPTED'.freeze, RECOMMENDATION_STATUS_REJECTED = 'REJECTED'.freeze, RECOMMENDATION_STATUS_INFERRED = 'INFERRED'.freeze, RECOMMENDATION_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- SOURCE_OBJECT_TYPE_ENUM =
[ SOURCE_OBJECT_TYPE_DATA_ENTITY = 'DATA_ENTITY'.freeze, SOURCE_OBJECT_TYPE_ATTRIBUTE = 'ATTRIBUTE'.freeze, SOURCE_OBJECT_TYPE_TERM = 'TERM'.freeze, SOURCE_OBJECT_TYPE_CATEGORY = 'CATEGORY'.freeze, SOURCE_OBJECT_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- TARGET_OBJECT_TYPE_ENUM =
[ TARGET_OBJECT_TYPE_DATA_ENTITY = 'DATA_ENTITY'.freeze, TARGET_OBJECT_TYPE_ATTRIBUTE = 'ATTRIBUTE'.freeze, TARGET_OBJECT_TYPE_TERM = 'TERM'.freeze, TARGET_OBJECT_TYPE_CATEGORY = 'CATEGORY'.freeze, TARGET_OBJECT_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#confidence_score ⇒ Float
Level of confidence, on a scale between 0 and 1, that the recommendation is applicable.
-
#properties ⇒ Hash<String, Hash<String, String>>
A map of maps that contains additional properties which are specific to the associated objects.
-
#recommendation_key ⇒ String
[Required] Unique identifier of the recommendation.
-
#recommendation_status ⇒ String
[Required] Status of a recommendation.
-
#recommendation_type ⇒ String
[Required] Type of recommendation.
-
#source_object_key ⇒ String
Unique identifier of the source object; the one for which a recommendation is made.
-
#source_object_name ⇒ String
Name of the source object; the one for which a recommendation is made.
-
#source_object_type ⇒ String
Type of the source object; the one for which a recommendation is made.
-
#target_object_key ⇒ String
Unique identifier of the target object; the one which has been recommended.
-
#target_object_name ⇒ String
Name of the target object; the one which has been recommended.
-
#target_object_type ⇒ String
Type of the target object; the one which has been recommended.
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 = {}) ⇒ RecommendationDetails
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 = {}) ⇒ RecommendationDetails
Initializes the object
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 |
# File 'lib/oci/data_catalog/models/recommendation_details.rb', line 150 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.recommendation_key = attributes[:'recommendationKey'] if attributes[:'recommendationKey'] raise 'You cannot provide both :recommendationKey and :recommendation_key' if attributes.key?(:'recommendationKey') && attributes.key?(:'recommendation_key') self.recommendation_key = attributes[:'recommendation_key'] if attributes[:'recommendation_key'] self.recommendation_type = attributes[:'recommendationType'] if attributes[:'recommendationType'] raise 'You cannot provide both :recommendationType and :recommendation_type' if attributes.key?(:'recommendationType') && attributes.key?(:'recommendation_type') self.recommendation_type = attributes[:'recommendation_type'] if attributes[:'recommendation_type'] self.recommendation_status = attributes[:'recommendationStatus'] if attributes[:'recommendationStatus'] raise 'You cannot provide both :recommendationStatus and :recommendation_status' if attributes.key?(:'recommendationStatus') && attributes.key?(:'recommendation_status') self.recommendation_status = attributes[:'recommendation_status'] if attributes[:'recommendation_status'] self.confidence_score = attributes[:'confidenceScore'] if attributes[:'confidenceScore'] raise 'You cannot provide both :confidenceScore and :confidence_score' if attributes.key?(:'confidenceScore') && attributes.key?(:'confidence_score') self.confidence_score = attributes[:'confidence_score'] if attributes[:'confidence_score'] self.source_object_key = attributes[:'sourceObjectKey'] if attributes[:'sourceObjectKey'] raise 'You cannot provide both :sourceObjectKey and :source_object_key' if attributes.key?(:'sourceObjectKey') && attributes.key?(:'source_object_key') self.source_object_key = attributes[:'source_object_key'] if attributes[:'source_object_key'] self.source_object_name = attributes[:'sourceObjectName'] if attributes[:'sourceObjectName'] raise 'You cannot provide both :sourceObjectName and :source_object_name' if attributes.key?(:'sourceObjectName') && attributes.key?(:'source_object_name') self.source_object_name = attributes[:'source_object_name'] if attributes[:'source_object_name'] self.source_object_type = attributes[:'sourceObjectType'] if attributes[:'sourceObjectType'] raise 'You cannot provide both :sourceObjectType and :source_object_type' if attributes.key?(:'sourceObjectType') && attributes.key?(:'source_object_type') self.source_object_type = attributes[:'source_object_type'] if attributes[:'source_object_type'] self.target_object_key = attributes[:'targetObjectKey'] if attributes[:'targetObjectKey'] raise 'You cannot provide both :targetObjectKey and :target_object_key' if attributes.key?(:'targetObjectKey') && attributes.key?(:'target_object_key') self.target_object_key = attributes[:'target_object_key'] if attributes[:'target_object_key'] self.target_object_name = attributes[:'targetObjectName'] if attributes[:'targetObjectName'] raise 'You cannot provide both :targetObjectName and :target_object_name' if attributes.key?(:'targetObjectName') && attributes.key?(:'target_object_name') self.target_object_name = attributes[:'target_object_name'] if attributes[:'target_object_name'] self.target_object_type = attributes[:'targetObjectType'] if attributes[:'targetObjectType'] raise 'You cannot provide both :targetObjectType and :target_object_type' if attributes.key?(:'targetObjectType') && attributes.key?(:'target_object_type') self.target_object_type = attributes[:'target_object_type'] if attributes[:'target_object_type'] self.properties = attributes[:'properties'] if attributes[:'properties'] end |
Instance Attribute Details
#confidence_score ⇒ Float
Level of confidence, on a scale between 0 and 1, that the recommendation is applicable.
55 56 57 |
# File 'lib/oci/data_catalog/models/recommendation_details.rb', line 55 def confidence_score @confidence_score end |
#properties ⇒ Hash<String, Hash<String, String>>
A map of maps that contains additional properties which are specific to the associated objects. Each associated object defines it's set of required and optional properties. Example: { \"DataEntity\": { \"parentId\": \"entityId\" }, \"Term\": { \"parentId\": \"glossaryId\" } }
93 94 95 |
# File 'lib/oci/data_catalog/models/recommendation_details.rb', line 93 def properties @properties end |
#recommendation_key ⇒ String
[Required] Unique identifier of the recommendation.
43 44 45 |
# File 'lib/oci/data_catalog/models/recommendation_details.rb', line 43 def recommendation_key @recommendation_key end |
#recommendation_status ⇒ String
[Required] Status of a recommendation.
51 52 53 |
# File 'lib/oci/data_catalog/models/recommendation_details.rb', line 51 def recommendation_status @recommendation_status end |
#recommendation_type ⇒ String
[Required] Type of recommendation.
47 48 49 |
# File 'lib/oci/data_catalog/models/recommendation_details.rb', line 47 def recommendation_type @recommendation_type end |
#source_object_key ⇒ String
Unique identifier of the source object; the one for which a recommendation is made.
59 60 61 |
# File 'lib/oci/data_catalog/models/recommendation_details.rb', line 59 def source_object_key @source_object_key end |
#source_object_name ⇒ String
Name of the source object; the one for which a recommendation is made.
63 64 65 |
# File 'lib/oci/data_catalog/models/recommendation_details.rb', line 63 def source_object_name @source_object_name end |
#source_object_type ⇒ String
Type of the source object; the one for which a recommendation is made.
67 68 69 |
# File 'lib/oci/data_catalog/models/recommendation_details.rb', line 67 def source_object_type @source_object_type end |
#target_object_key ⇒ String
Unique identifier of the target object; the one which has been recommended.
71 72 73 |
# File 'lib/oci/data_catalog/models/recommendation_details.rb', line 71 def target_object_key @target_object_key end |
#target_object_name ⇒ String
Name of the target object; the one which has been recommended.
75 76 77 |
# File 'lib/oci/data_catalog/models/recommendation_details.rb', line 75 def target_object_name @target_object_name end |
#target_object_type ⇒ String
Type of the target object; the one which has been recommended.
79 80 81 |
# File 'lib/oci/data_catalog/models/recommendation_details.rb', line 79 def target_object_type @target_object_type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/oci/data_catalog/models/recommendation_details.rb', line 96 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'recommendation_key': :'recommendationKey', 'recommendation_type': :'recommendationType', 'recommendation_status': :'recommendationStatus', 'confidence_score': :'confidenceScore', 'source_object_key': :'sourceObjectKey', 'source_object_name': :'sourceObjectName', 'source_object_type': :'sourceObjectType', 'target_object_key': :'targetObjectKey', 'target_object_name': :'targetObjectName', 'target_object_type': :'targetObjectType', 'properties': :'properties' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/oci/data_catalog/models/recommendation_details.rb', line 115 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'recommendation_key': :'String', 'recommendation_type': :'String', 'recommendation_status': :'String', 'confidence_score': :'Float', 'source_object_key': :'String', 'source_object_name': :'String', 'source_object_type': :'String', 'target_object_key': :'String', 'target_object_name': :'String', 'target_object_type': :'String', 'properties': :'Hash<String, Hash<String, String>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 |
# File 'lib/oci/data_catalog/models/recommendation_details.rb', line 278 def ==(other) return true if equal?(other) self.class == other.class && recommendation_key == other.recommendation_key && recommendation_type == other.recommendation_type && recommendation_status == other.recommendation_status && confidence_score == other.confidence_score && source_object_key == other.source_object_key && source_object_name == other.source_object_name && source_object_type == other.source_object_type && target_object_key == other.target_object_key && target_object_name == other.target_object_name && target_object_type == other.target_object_type && properties == other.properties end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 |
# File 'lib/oci/data_catalog/models/recommendation_details.rb', line 318 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
298 299 300 |
# File 'lib/oci/data_catalog/models/recommendation_details.rb', line 298 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
307 308 309 |
# File 'lib/oci/data_catalog/models/recommendation_details.rb', line 307 def hash [recommendation_key, recommendation_type, recommendation_status, confidence_score, source_object_key, source_object_name, source_object_type, target_object_key, target_object_name, target_object_type, properties].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
351 352 353 354 355 356 357 358 359 360 |
# File 'lib/oci/data_catalog/models/recommendation_details.rb', line 351 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
345 346 347 |
# File 'lib/oci/data_catalog/models/recommendation_details.rb', line 345 def to_s to_hash.to_s end |