Class: DataCatalog::Models::Term
- Inherits:
-
Object
- Object
- DataCatalog::Models::Term
- Defined in:
- lib/oci/data_catalog/models/term.rb
Overview
Full term definition. A defined business term in a business glossary. As well as a term definition, simple format rules for attributes mapping to the term (for example, the expected data type and length restrictions) may be stated at the term level. Nesting of terms to support a hierarchy is supported by default.
Constant Summary collapse
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_CREATING = 'CREATING'.freeze, LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze, LIFECYCLE_STATE_INACTIVE = 'INACTIVE'.freeze, LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze, LIFECYCLE_STATE_DELETING = 'DELETING'.freeze, LIFECYCLE_STATE_DELETED = 'DELETED'.freeze, LIFECYCLE_STATE_FAILED = 'FAILED'.freeze, LIFECYCLE_STATE_MOVING = 'MOVING'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- WORKFLOW_STATUS_ENUM =
[ WORKFLOW_STATUS_NEW = 'NEW'.freeze, WORKFLOW_STATUS_APPROVED = 'APPROVED'.freeze, WORKFLOW_STATUS_UNDER_REVIEW = 'UNDER_REVIEW'.freeze, WORKFLOW_STATUS_ESCALATED = 'ESCALATED'.freeze, WORKFLOW_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#associated_object_count ⇒ Integer
The number of objects tagged with this term.
-
#associated_objects ⇒ Array<OCI::DataCatalog::Models::TermAssociatedObject>
Array of objects associated to a term.
-
#created_by_id ⇒ String
OCID of the user who created the term.
-
#custom_property_members ⇒ Array<OCI::DataCatalog::Models::CustomPropertyGetUsage>
The list of customized properties along with the values for this object.
-
#description ⇒ String
Detailed description of the term.
-
#display_name ⇒ String
A user-friendly display name.
-
#glossary_key ⇒ String
Unique id of the parent glossary.
-
#is_allowed_to_have_child_terms ⇒ BOOLEAN
Indicates whether a term may contain child terms.
-
#key ⇒ String
**[Required]** Unique term key that is immutable.
-
#lifecycle_state ⇒ String
The current state of the term.
-
#owner ⇒ String
OCID of the user who is the owner of this business terminology.
-
#parent_term_key ⇒ String
This terms parent term key.
-
#path ⇒ String
Absolute path of the term.
-
#time_created ⇒ DateTime
The date and time the term was created, in the format defined by [RFC3339](tools.ietf.org/html/rfc3339).
-
#time_updated ⇒ DateTime
The last time that any change was made to the term.
-
#updated_by_id ⇒ String
OCID of the user who modified the term.
-
#uri ⇒ String
URI to the term instance in the API.
-
#workflow_status ⇒ String
Status of the approval process workflow for this business term in the glossary.
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 = {}) ⇒ Term
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 = {}) ⇒ Term
Initializes the object
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 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 |
# File 'lib/oci/data_catalog/models/term.rb', line 187 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.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.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.is_allowed_to_have_child_terms = attributes[:'isAllowedToHaveChildTerms'] unless attributes[:'isAllowedToHaveChildTerms'].nil? self.is_allowed_to_have_child_terms = true if is_allowed_to_have_child_terms.nil? && !attributes.key?(:'isAllowedToHaveChildTerms') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isAllowedToHaveChildTerms and :is_allowed_to_have_child_terms' if attributes.key?(:'isAllowedToHaveChildTerms') && attributes.key?(:'is_allowed_to_have_child_terms') self.is_allowed_to_have_child_terms = attributes[:'is_allowed_to_have_child_terms'] unless attributes[:'is_allowed_to_have_child_terms'].nil? self.is_allowed_to_have_child_terms = true if is_allowed_to_have_child_terms.nil? && !attributes.key?(:'isAllowedToHaveChildTerms') && !attributes.key?(:'is_allowed_to_have_child_terms') # rubocop:disable Style/StringLiterals self.path = attributes[:'path'] if attributes[:'path'] 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'] 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.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.owner = attributes[:'owner'] if attributes[:'owner'] self.workflow_status = attributes[:'workflowStatus'] if attributes[:'workflowStatus'] raise 'You cannot provide both :workflowStatus and :workflow_status' if attributes.key?(:'workflowStatus') && attributes.key?(:'workflow_status') self.workflow_status = attributes[:'workflow_status'] if attributes[:'workflow_status'] self.uri = attributes[:'uri'] if attributes[:'uri'] self.associated_object_count = attributes[:'associatedObjectCount'] if attributes[:'associatedObjectCount'] raise 'You cannot provide both :associatedObjectCount and :associated_object_count' if attributes.key?(:'associatedObjectCount') && attributes.key?(:'associated_object_count') self.associated_object_count = attributes[:'associated_object_count'] if attributes[:'associated_object_count'] self.associated_objects = attributes[:'associatedObjects'] if attributes[:'associatedObjects'] raise 'You cannot provide both :associatedObjects and :associated_objects' if attributes.key?(:'associatedObjects') && attributes.key?(:'associated_objects') self.associated_objects = attributes[:'associated_objects'] if attributes[:'associated_objects'] self.custom_property_members = attributes[:'customPropertyMembers'] if attributes[:'customPropertyMembers'] raise 'You cannot provide both :customPropertyMembers and :custom_property_members' if attributes.key?(:'customPropertyMembers') && attributes.key?(:'custom_property_members') self.custom_property_members = attributes[:'custom_property_members'] if attributes[:'custom_property_members'] end |
Instance Attribute Details
#associated_object_count ⇒ Integer
The number of objects tagged with this term
101 102 103 |
# File 'lib/oci/data_catalog/models/term.rb', line 101 def associated_object_count @associated_object_count end |
#associated_objects ⇒ Array<OCI::DataCatalog::Models::TermAssociatedObject>
Array of objects associated to a term.
105 106 107 |
# File 'lib/oci/data_catalog/models/term.rb', line 105 def associated_objects @associated_objects end |
#created_by_id ⇒ String
OCID of the user who created the term.
81 82 83 |
# File 'lib/oci/data_catalog/models/term.rb', line 81 def created_by_id @created_by_id end |
#custom_property_members ⇒ Array<OCI::DataCatalog::Models::CustomPropertyGetUsage>
The list of customized properties along with the values for this object
109 110 111 |
# File 'lib/oci/data_catalog/models/term.rb', line 109 def custom_property_members @custom_property_members end |
#description ⇒ String
Detailed description of the term.
46 47 48 |
# File 'lib/oci/data_catalog/models/term.rb', line 46 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.
42 43 44 |
# File 'lib/oci/data_catalog/models/term.rb', line 42 def display_name @display_name end |
#glossary_key ⇒ String
Unique id of the parent glossary.
50 51 52 |
# File 'lib/oci/data_catalog/models/term.rb', line 50 def glossary_key @glossary_key end |
#is_allowed_to_have_child_terms ⇒ BOOLEAN
Indicates whether a term may contain child terms.
58 59 60 |
# File 'lib/oci/data_catalog/models/term.rb', line 58 def is_allowed_to_have_child_terms @is_allowed_to_have_child_terms end |
#key ⇒ String
**[Required]** Unique term key that is immutable.
36 37 38 |
# File 'lib/oci/data_catalog/models/term.rb', line 36 def key @key end |
#lifecycle_state ⇒ String
The current state of the term.
66 67 68 |
# File 'lib/oci/data_catalog/models/term.rb', line 66 def lifecycle_state @lifecycle_state end |
#owner ⇒ String
OCID of the user who is the owner of this business terminology.
89 90 91 |
# File 'lib/oci/data_catalog/models/term.rb', line 89 def owner @owner end |
#parent_term_key ⇒ String
This terms parent term key. Will be null if the term has no parent term.
54 55 56 |
# File 'lib/oci/data_catalog/models/term.rb', line 54 def parent_term_key @parent_term_key end |
#path ⇒ String
Absolute path of the term.
62 63 64 |
# File 'lib/oci/data_catalog/models/term.rb', line 62 def path @path end |
#time_created ⇒ DateTime
The date and time the term was created, in the format defined by [RFC3339](tools.ietf.org/html/rfc3339). Example: `2019-03-25T21:10:29.600Z`
72 73 74 |
# File 'lib/oci/data_catalog/models/term.rb', line 72 def time_created @time_created end |
#time_updated ⇒ DateTime
The last time that any change was made to the term. An [RFC3339](tools.ietf.org/html/rfc3339) formatted datetime string.
77 78 79 |
# File 'lib/oci/data_catalog/models/term.rb', line 77 def time_updated @time_updated end |
#updated_by_id ⇒ String
OCID of the user who modified the term.
85 86 87 |
# File 'lib/oci/data_catalog/models/term.rb', line 85 def updated_by_id @updated_by_id end |
#uri ⇒ String
URI to the term instance in the API.
97 98 99 |
# File 'lib/oci/data_catalog/models/term.rb', line 97 def uri @uri end |
#workflow_status ⇒ String
Status of the approval process workflow for this business term in the glossary.
93 94 95 |
# File 'lib/oci/data_catalog/models/term.rb', line 93 def workflow_status @workflow_status end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/oci/data_catalog/models/term.rb', line 112 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'key': :'key', 'display_name': :'displayName', 'description': :'description', 'glossary_key': :'glossaryKey', 'parent_term_key': :'parentTermKey', 'is_allowed_to_have_child_terms': :'isAllowedToHaveChildTerms', 'path': :'path', 'lifecycle_state': :'lifecycleState', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'created_by_id': :'createdById', 'updated_by_id': :'updatedById', 'owner': :'owner', 'workflow_status': :'workflowStatus', 'uri': :'uri', 'associated_object_count': :'associatedObjectCount', 'associated_objects': :'associatedObjects', 'custom_property_members': :'customPropertyMembers' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/oci/data_catalog/models/term.rb', line 138 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'key': :'String', 'display_name': :'String', 'description': :'String', 'glossary_key': :'String', 'parent_term_key': :'String', 'is_allowed_to_have_child_terms': :'BOOLEAN', 'path': :'String', 'lifecycle_state': :'String', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'created_by_id': :'String', 'updated_by_id': :'String', 'owner': :'String', 'workflow_status': :'String', 'uri': :'String', 'associated_object_count': :'Integer', 'associated_objects': :'Array<OCI::DataCatalog::Models::TermAssociatedObject>', 'custom_property_members': :'Array<OCI::DataCatalog::Models::CustomPropertyGetUsage>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 |
# File 'lib/oci/data_catalog/models/term.rb', line 317 def ==(other) return true if equal?(other) self.class == other.class && key == other.key && display_name == other.display_name && description == other.description && glossary_key == other.glossary_key && parent_term_key == other.parent_term_key && is_allowed_to_have_child_terms == other.is_allowed_to_have_child_terms && path == other.path && lifecycle_state == other.lifecycle_state && time_created == other.time_created && time_updated == other.time_updated && created_by_id == other.created_by_id && updated_by_id == other.updated_by_id && owner == other.owner && workflow_status == other.workflow_status && uri == other.uri && associated_object_count == other.associated_object_count && associated_objects == other.associated_objects && custom_property_members == other.custom_property_members end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 |
# File 'lib/oci/data_catalog/models/term.rb', line 364 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
344 345 346 |
# File 'lib/oci/data_catalog/models/term.rb', line 344 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
353 354 355 |
# File 'lib/oci/data_catalog/models/term.rb', line 353 def hash [key, display_name, description, glossary_key, parent_term_key, is_allowed_to_have_child_terms, path, lifecycle_state, time_created, time_updated, created_by_id, updated_by_id, owner, workflow_status, uri, associated_object_count, associated_objects, custom_property_members].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
397 398 399 400 401 402 403 404 405 406 |
# File 'lib/oci/data_catalog/models/term.rb', line 397 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
391 392 393 |
# File 'lib/oci/data_catalog/models/term.rb', line 391 def to_s to_hash.to_s end |