Class: OCI::DataCatalog::Models::GlossaryTreeElement
- Inherits:
-
Object
- Object
- OCI::DataCatalog::Models::GlossaryTreeElement
- Defined in:
- lib/oci/data_catalog/models/glossary_tree_element.rb
Overview
Glossary tree element with child terms.
Instance Attribute Summary collapse
-
#associated_object_count ⇒ Integer
The number of objects tagged with this term.
-
#child_terms ⇒ Array<OCI::DataCatalog::Models::GlossaryTreeElement>
An array of child terms.
-
#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
State of the term.
-
#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).
-
#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 = {}) ⇒ GlossaryTreeElement
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 = {}) ⇒ GlossaryTreeElement
Initializes the object
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 187 188 189 190 191 192 193 194 195 196 |
# File 'lib/oci/data_catalog/models/glossary_tree_element.rb', line 127 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.child_terms = attributes[:'childTerms'] if attributes[:'childTerms'] raise 'You cannot provide both :childTerms and :child_terms' if attributes.key?(:'childTerms') && attributes.key?(:'child_terms') self.child_terms = attributes[:'child_terms'] if attributes[:'child_terms'] 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.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.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.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.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.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.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
#associated_object_count ⇒ Integer
The number of objects tagged with this term.
60 61 62 |
# File 'lib/oci/data_catalog/models/glossary_tree_element.rb', line 60 def associated_object_count @associated_object_count end |
#child_terms ⇒ Array<OCI::DataCatalog::Models::GlossaryTreeElement>
An array of child terms.
12 13 14 |
# File 'lib/oci/data_catalog/models/glossary_tree_element.rb', line 12 def child_terms @child_terms end |
#description ⇒ String
Detailed description of the term.
26 27 28 |
# File 'lib/oci/data_catalog/models/glossary_tree_element.rb', line 26 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.
22 23 24 |
# File 'lib/oci/data_catalog/models/glossary_tree_element.rb', line 22 def display_name @display_name end |
#glossary_key ⇒ String
Unique id of the parent glossary.
30 31 32 |
# File 'lib/oci/data_catalog/models/glossary_tree_element.rb', line 30 def glossary_key @glossary_key end |
#is_allowed_to_have_child_terms ⇒ BOOLEAN
Indicates whether a term may contain child terms.
42 43 44 |
# File 'lib/oci/data_catalog/models/glossary_tree_element.rb', line 42 def is_allowed_to_have_child_terms @is_allowed_to_have_child_terms end |
#key ⇒ String
[Required] Unique term key that is immutable.
16 17 18 |
# File 'lib/oci/data_catalog/models/glossary_tree_element.rb', line 16 def key @key end |
#lifecycle_state ⇒ String
State of the term.
64 65 66 |
# File 'lib/oci/data_catalog/models/glossary_tree_element.rb', line 64 def lifecycle_state @lifecycle_state end |
#parent_term_key ⇒ String
This terms parent term key. Will be null if the term has no parent term.
38 39 40 |
# File 'lib/oci/data_catalog/models/glossary_tree_element.rb', line 38 def parent_term_key @parent_term_key end |
#path ⇒ String
Absolute path of the term.
46 47 48 |
# File 'lib/oci/data_catalog/models/glossary_tree_element.rb', line 46 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`
52 53 54 |
# File 'lib/oci/data_catalog/models/glossary_tree_element.rb', line 52 def time_created @time_created end |
#uri ⇒ String
URI to the term instance in the API.
34 35 36 |
# File 'lib/oci/data_catalog/models/glossary_tree_element.rb', line 34 def uri @uri end |
#workflow_status ⇒ String
Status of the approval process workflow for this business term in the glossary.
56 57 58 |
# File 'lib/oci/data_catalog/models/glossary_tree_element.rb', line 56 def workflow_status @workflow_status end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/oci/data_catalog/models/glossary_tree_element.rb', line 67 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'child_terms': :'childTerms', 'key': :'key', 'display_name': :'displayName', 'description': :'description', 'glossary_key': :'glossaryKey', 'uri': :'uri', 'parent_term_key': :'parentTermKey', 'is_allowed_to_have_child_terms': :'isAllowedToHaveChildTerms', 'path': :'path', 'time_created': :'timeCreated', 'workflow_status': :'workflowStatus', 'associated_object_count': :'associatedObjectCount', 'lifecycle_state': :'lifecycleState' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/oci/data_catalog/models/glossary_tree_element.rb', line 88 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'child_terms': :'Array<OCI::DataCatalog::Models::GlossaryTreeElement>', 'key': :'String', 'display_name': :'String', 'description': :'String', 'glossary_key': :'String', 'uri': :'String', 'parent_term_key': :'String', 'is_allowed_to_have_child_terms': :'BOOLEAN', 'path': :'String', 'time_created': :'DateTime', 'workflow_status': :'String', 'associated_object_count': :'Integer', 'lifecycle_state': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 |
# File 'lib/oci/data_catalog/models/glossary_tree_element.rb', line 205 def ==(other) return true if equal?(other) self.class == other.class && child_terms == other.child_terms && key == other.key && display_name == other.display_name && description == other.description && glossary_key == other.glossary_key && uri == other.uri && parent_term_key == other.parent_term_key && is_allowed_to_have_child_terms == other.is_allowed_to_have_child_terms && path == other.path && time_created == other.time_created && workflow_status == other.workflow_status && associated_object_count == other.associated_object_count && lifecycle_state == other.lifecycle_state end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 |
# File 'lib/oci/data_catalog/models/glossary_tree_element.rb', line 247 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
227 228 229 |
# File 'lib/oci/data_catalog/models/glossary_tree_element.rb', line 227 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
236 237 238 |
# File 'lib/oci/data_catalog/models/glossary_tree_element.rb', line 236 def hash [child_terms, key, display_name, description, glossary_key, uri, parent_term_key, is_allowed_to_have_child_terms, path, time_created, workflow_status, associated_object_count, lifecycle_state].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
280 281 282 283 284 285 286 287 288 289 |
# File 'lib/oci/data_catalog/models/glossary_tree_element.rb', line 280 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
274 275 276 |
# File 'lib/oci/data_catalog/models/glossary_tree_element.rb', line 274 def to_s to_hash.to_s end |