Class: OCI::DataCatalog::Models::TermRelationshipSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/data_catalog/models/term_relationship_summary.rb

Overview

Summary of a term relationship. Business term relationship between two terms in a business glossary.

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ TermRelationshipSummary

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):



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
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
# File 'lib/oci/data_catalog/models/term_relationship_summary.rb', line 163

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.related_term_key = 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.related_term_key = attributes[:'related_term_key'] if attributes[:'related_term_key']

  self.related_term_display_name = 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.related_term_display_name = attributes[:'related_term_display_name'] if attributes[:'related_term_display_name']

  self.related_term_description = 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.related_term_description = attributes[:'related_term_description'] if attributes[:'related_term_description']

  self.related_term_path = attributes[:'relatedTermPath'] if attributes[:'relatedTermPath']

  raise 'You cannot provide both :relatedTermPath and :related_term_path' if attributes.key?(:'relatedTermPath') && attributes.key?(:'related_term_path')

  self.related_term_path = attributes[:'related_term_path'] if attributes[:'related_term_path']

  self.related_term_glossary_key = attributes[:'relatedTermGlossaryKey'] if attributes[:'relatedTermGlossaryKey']

  raise 'You cannot provide both :relatedTermGlossaryKey and :related_term_glossary_key' if attributes.key?(:'relatedTermGlossaryKey') && attributes.key?(:'related_term_glossary_key')

  self.related_term_glossary_key = attributes[:'related_term_glossary_key'] if attributes[:'related_term_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.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.parent_term_path = attributes[:'parentTermPath'] if attributes[:'parentTermPath']

  raise 'You cannot provide both :parentTermPath and :parent_term_path' if attributes.key?(:'parentTermPath') && attributes.key?(:'parent_term_path')

  self.parent_term_path = attributes[:'parent_term_path'] if attributes[:'parent_term_path']

  self.parent_term_glossary_key = attributes[:'parentTermGlossaryKey'] if attributes[:'parentTermGlossaryKey']

  raise 'You cannot provide both :parentTermGlossaryKey and :parent_term_glossary_key' if attributes.key?(:'parentTermGlossaryKey') && attributes.key?(:'parent_term_glossary_key')

  self.parent_term_glossary_key = attributes[:'parent_term_glossary_key'] if attributes[:'parent_term_glossary_key']

  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

#descriptionString

Detailed description of the term relationship usually defined at the time of creation.

Returns:

  • (String)


37
38
39
# File 'lib/oci/data_catalog/models/term_relationship_summary.rb', line 37

def description
  @description
end

#display_nameString

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

Returns:

  • (String)


33
34
35
# File 'lib/oci/data_catalog/models/term_relationship_summary.rb', line 33

def display_name
  @display_name
end

#keyString

[Required] Unique term relationship key that is immutable.

Returns:

  • (String)


27
28
29
# File 'lib/oci/data_catalog/models/term_relationship_summary.rb', line 27

def key
  @key
end

#lifecycle_stateString

State of the term relationship.

Returns:

  • (String)


91
92
93
# File 'lib/oci/data_catalog/models/term_relationship_summary.rb', line 91

def lifecycle_state
  @lifecycle_state
end

#parent_term_descriptionString

Description of the parent term.

Returns:

  • (String)


73
74
75
# File 'lib/oci/data_catalog/models/term_relationship_summary.rb', line 73

def parent_term_description
  @parent_term_description
end

#parent_term_display_nameString

Name of the parent term.

Returns:

  • (String)


69
70
71
# File 'lib/oci/data_catalog/models/term_relationship_summary.rb', line 69

def parent_term_display_name
  @parent_term_display_name
end

#parent_term_glossary_keyString

Glossary key of the parent term.

Returns:

  • (String)


81
82
83
# File 'lib/oci/data_catalog/models/term_relationship_summary.rb', line 81

def parent_term_glossary_key
  @parent_term_glossary_key
end

#parent_term_keyString

This relationships parent term key.

Returns:

  • (String)


65
66
67
# File 'lib/oci/data_catalog/models/term_relationship_summary.rb', line 65

def parent_term_key
  @parent_term_key
end

#parent_term_pathString

Full path of the parent term.

Returns:

  • (String)


77
78
79
# File 'lib/oci/data_catalog/models/term_relationship_summary.rb', line 77

def parent_term_path
  @parent_term_path
end

Description of the related term.

Returns:

  • (String)


49
50
51
# File 'lib/oci/data_catalog/models/term_relationship_summary.rb', line 49

def related_term_description
  @related_term_description
end

Name of the related term.

Returns:

  • (String)


45
46
47
# File 'lib/oci/data_catalog/models/term_relationship_summary.rb', line 45

def related_term_display_name
  @related_term_display_name
end

Glossary key of the related term.

Returns:

  • (String)


57
58
59
# File 'lib/oci/data_catalog/models/term_relationship_summary.rb', line 57

def related_term_glossary_key
  @related_term_glossary_key
end

Unique id of the related term.

Returns:

  • (String)


41
42
43
# File 'lib/oci/data_catalog/models/term_relationship_summary.rb', line 41

def related_term_key
  @related_term_key
end

Full path of the related term.

Returns:

  • (String)


53
54
55
# File 'lib/oci/data_catalog/models/term_relationship_summary.rb', line 53

def related_term_path
  @related_term_path
end

#time_createdDateTime

The date and time the term relationship was created, in the format defined by RFC3339. Example: 2019-03-25T21:10:29.600Z

Returns:

  • (DateTime)


87
88
89
# File 'lib/oci/data_catalog/models/term_relationship_summary.rb', line 87

def time_created
  @time_created
end

#uriString

URI to the term relationship instance in the API.

Returns:

  • (String)


61
62
63
# File 'lib/oci/data_catalog/models/term_relationship_summary.rb', line 61

def uri
  @uri
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# File 'lib/oci/data_catalog/models/term_relationship_summary.rb', line 94

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',
    'related_term_path': :'relatedTermPath',
    'related_term_glossary_key': :'relatedTermGlossaryKey',
    'uri': :'uri',
    'parent_term_key': :'parentTermKey',
    'parent_term_display_name': :'parentTermDisplayName',
    'parent_term_description': :'parentTermDescription',
    'parent_term_path': :'parentTermPath',
    'parent_term_glossary_key': :'parentTermGlossaryKey',
    'time_created': :'timeCreated',
    'lifecycle_state': :'lifecycleState'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# File 'lib/oci/data_catalog/models/term_relationship_summary.rb', line 118

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',
    'related_term_path': :'String',
    'related_term_glossary_key': :'String',
    'uri': :'String',
    'parent_term_key': :'String',
    'parent_term_display_name': :'String',
    'parent_term_description': :'String',
    'parent_term_path': :'String',
    'parent_term_glossary_key': :'String',
    'time_created': :'DateTime',
    'lifecycle_state': :'String'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
# File 'lib/oci/data_catalog/models/term_relationship_summary.rb', line 274

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    key == other.key &&
    display_name == other.display_name &&
    description == other.description &&
    related_term_key == other.related_term_key &&
    related_term_display_name == other.related_term_display_name &&
    related_term_description == other.related_term_description &&
    related_term_path == other.related_term_path &&
    related_term_glossary_key == other.related_term_glossary_key &&
    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 &&
    parent_term_path == other.parent_term_path &&
    parent_term_glossary_key == other.parent_term_glossary_key &&
    time_created == other.time_created &&
    lifecycle_state == other.lifecycle_state
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
# File 'lib/oci/data_catalog/models/term_relationship_summary.rb', line 319

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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


299
300
301
# File 'lib/oci/data_catalog/models/term_relationship_summary.rb', line 299

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



308
309
310
# File 'lib/oci/data_catalog/models/term_relationship_summary.rb', line 308

def hash
  [key, display_name, description, related_term_key, related_term_display_name, related_term_description, related_term_path, related_term_glossary_key, uri, parent_term_key, parent_term_display_name, parent_term_description, parent_term_path, parent_term_glossary_key, time_created, lifecycle_state].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



352
353
354
355
356
357
358
359
360
361
# File 'lib/oci/data_catalog/models/term_relationship_summary.rb', line 352

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



346
347
348
# File 'lib/oci/data_catalog/models/term_relationship_summary.rb', line 346

def to_s
  to_hash.to_s
end