Class: OCI::DataCatalog::Models::TermRelationship
- Inherits:
-
Object
- Object
- OCI::DataCatalog::Models::TermRelationship
- Defined in:
- lib/oci/data_catalog/models/term_relationship.rb
Overview
Full term relationship definition. Business term relationship between two terms in a business glossary.
Instance Attribute Summary collapse
-
#description ⇒ String
Detailed description of the term relationship usually defined at the time of creation.
-
#display_name ⇒ String
A user-friendly display name.
-
#key ⇒ String
[Required] Unique term relationship key that is immutable.
-
#lifecycle_state ⇒ String
State of the term relationship.
-
#parent_term_description ⇒ String
Description of the parent term.
-
#parent_term_display_name ⇒ String
Name of the parent term.
-
#parent_term_key ⇒ String
This relationships parent term key.
-
#related_term_description ⇒ String
Description of the related term.
-
#related_term_display_name ⇒ String
Name of the related term.
-
#related_term_key ⇒ String
Unique id of the related term.
-
#time_created ⇒ DateTime
The date and time the term relationship was created, in the format defined by RFC3339.
-
#uri ⇒ String
URI to the term relationship instance in the API.
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 = {}) ⇒ TermRelationship
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 = {}) ⇒ TermRelationship
Initializes the object
121 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 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 |
# File 'lib/oci/data_catalog/models/term_relationship.rb', line 121 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.display_name = attributes[:'displayName'] if attributes[:'displayName'] raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name') self.display_name = attributes[:'display_name'] if attributes[:'display_name'] self.description = attributes[:'description'] if attributes[:'description'] self. = attributes[:'relatedTermKey'] if attributes[:'relatedTermKey'] raise 'You cannot provide both :relatedTermKey and :related_term_key' if attributes.key?(:'relatedTermKey') && attributes.key?(:'related_term_key') self. = attributes[:'related_term_key'] if attributes[:'related_term_key'] self. = attributes[:'relatedTermDisplayName'] if attributes[:'relatedTermDisplayName'] raise 'You cannot provide both :relatedTermDisplayName and :related_term_display_name' if attributes.key?(:'relatedTermDisplayName') && attributes.key?(:'related_term_display_name') self. = attributes[:'related_term_display_name'] if attributes[:'related_term_display_name'] self. = attributes[:'relatedTermDescription'] if attributes[:'relatedTermDescription'] raise 'You cannot provide both :relatedTermDescription and :related_term_description' if attributes.key?(:'relatedTermDescription') && attributes.key?(:'related_term_description') self. = attributes[:'related_term_description'] if attributes[:'related_term_description'] self.uri = attributes[:'uri'] if attributes[:'uri'] 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_display_name = attributes[:'parentTermDisplayName'] if attributes[:'parentTermDisplayName'] raise 'You cannot provide both :parentTermDisplayName and :parent_term_display_name' if attributes.key?(:'parentTermDisplayName') && attributes.key?(:'parent_term_display_name') self.parent_term_display_name = attributes[:'parent_term_display_name'] if attributes[:'parent_term_display_name'] self.parent_term_description = attributes[:'parentTermDescription'] if attributes[:'parentTermDescription'] raise 'You cannot provide both :parentTermDescription and :parent_term_description' if attributes.key?(:'parentTermDescription') && attributes.key?(:'parent_term_description') self.parent_term_description = attributes[:'parent_term_description'] if attributes[:'parent_term_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.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState'] raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state') self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state'] end |
Instance Attribute Details
#description ⇒ String
Detailed description of the term relationship usually defined at the time of creation.
23 24 25 |
# File 'lib/oci/data_catalog/models/term_relationship.rb', line 23 def description @description end |
#display_name ⇒ String
A user-friendly display name. Does not have to be unique, and it's changeable. Avoid entering confidential information.This is the same as relationshipType for termRelationship
19 20 21 |
# File 'lib/oci/data_catalog/models/term_relationship.rb', line 19 def display_name @display_name end |
#key ⇒ String
[Required] Unique term relationship key that is immutable.
13 14 15 |
# File 'lib/oci/data_catalog/models/term_relationship.rb', line 13 def key @key end |
#lifecycle_state ⇒ String
State of the term relationship.
61 62 63 |
# File 'lib/oci/data_catalog/models/term_relationship.rb', line 61 def lifecycle_state @lifecycle_state end |
#parent_term_description ⇒ String
Description of the parent term.
51 52 53 |
# File 'lib/oci/data_catalog/models/term_relationship.rb', line 51 def parent_term_description @parent_term_description end |
#parent_term_display_name ⇒ String
Name of the parent term.
47 48 49 |
# File 'lib/oci/data_catalog/models/term_relationship.rb', line 47 def parent_term_display_name @parent_term_display_name end |
#parent_term_key ⇒ String
This relationships parent term key.
43 44 45 |
# File 'lib/oci/data_catalog/models/term_relationship.rb', line 43 def parent_term_key @parent_term_key end |
#related_term_description ⇒ String
Description of the related term.
35 36 37 |
# File 'lib/oci/data_catalog/models/term_relationship.rb', line 35 def @related_term_description end |
#related_term_display_name ⇒ String
Name of the related term.
31 32 33 |
# File 'lib/oci/data_catalog/models/term_relationship.rb', line 31 def @related_term_display_name end |
#related_term_key ⇒ String
Unique id of the related term.
27 28 29 |
# File 'lib/oci/data_catalog/models/term_relationship.rb', line 27 def @related_term_key end |
#time_created ⇒ DateTime
The date and time the term relationship was created, in the format defined by RFC3339. Example: 2019-03-25T21:10:29.600Z
57 58 59 |
# File 'lib/oci/data_catalog/models/term_relationship.rb', line 57 def time_created @time_created end |
#uri ⇒ String
URI to the term relationship instance in the API.
39 40 41 |
# File 'lib/oci/data_catalog/models/term_relationship.rb', line 39 def uri @uri end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/oci/data_catalog/models/term_relationship.rb', line 64 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'key': :'key', 'display_name': :'displayName', 'description': :'description', 'related_term_key': :'relatedTermKey', 'related_term_display_name': :'relatedTermDisplayName', 'related_term_description': :'relatedTermDescription', 'uri': :'uri', 'parent_term_key': :'parentTermKey', 'parent_term_display_name': :'parentTermDisplayName', 'parent_term_description': :'parentTermDescription', 'time_created': :'timeCreated', 'lifecycle_state': :'lifecycleState' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/oci/data_catalog/models/term_relationship.rb', line 84 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'key': :'String', 'display_name': :'String', 'description': :'String', 'related_term_key': :'String', 'related_term_display_name': :'String', 'related_term_description': :'String', 'uri': :'String', 'parent_term_key': :'String', 'parent_term_display_name': :'String', 'parent_term_description': :'String', 'time_created': :'DateTime', 'lifecycle_state': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
# File 'lib/oci/data_catalog/models/term_relationship.rb', line 195 def ==(other) return true if equal?(other) self.class == other.class && key == other.key && display_name == other.display_name && description == other.description && == other. && == other. && == other. && uri == other.uri && parent_term_key == other.parent_term_key && parent_term_display_name == other.parent_term_display_name && parent_term_description == other.parent_term_description && time_created == other.time_created && lifecycle_state == other.lifecycle_state end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 |
# File 'lib/oci/data_catalog/models/term_relationship.rb', line 236 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
216 217 218 |
# File 'lib/oci/data_catalog/models/term_relationship.rb', line 216 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
225 226 227 |
# File 'lib/oci/data_catalog/models/term_relationship.rb', line 225 def hash [key, display_name, description, , , , uri, parent_term_key, parent_term_display_name, parent_term_description, time_created, lifecycle_state].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
269 270 271 272 273 274 275 276 277 278 |
# File 'lib/oci/data_catalog/models/term_relationship.rb', line 269 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
263 264 265 |
# File 'lib/oci/data_catalog/models/term_relationship.rb', line 263 def to_s to_hash.to_s end |