class OCI::DataCatalog::Models::Glossary

Full glossary details. A glossary of business terms, such as 'Customer', 'Account', 'Contact' , 'Address', or 'Product', with definitions, used to provide common meaning across disparate data assets. Business glossaries may be hierarchical where some terms may contain child terms to allow them to be used as 'taxonomies'. By linking data assets, data entities, and attributes to glossaries and glossary terms, the glossary can act as a way of organizing data catalog objects in a hierarchy to make a large number of objects more navigable and easier to consume. Objects in the data aatalog, such as data assets or data entities, may be linked to any level in the glossary, so that the glossary can be used to browse the available data according to the business model of the organization.

Constants

LIFECYCLE_STATE_ENUM
WORKFLOW_STATUS_ENUM

Attributes

catalog_id[RW]

The data catalog's OCID. @return [String]

created_by_id[RW]

OCID of the user who created this metadata element. @return [String]

custom_property_members[RW]

The list of customized properties along with the values for this object @return [Array<OCI::DataCatalog::Models::CustomPropertyGetUsage>]

description[RW]

Detailed description of the glossary. @return [String]

display_name[RW]

A user-friendly display name. Does not have to be unique, and it's changeable. Avoid entering confidential information.

@return [String]

import_job_definition_key[RW]

The unique key of the job definition resource that was used in the Glossary import. @return [String]

import_job_key[RW]

The unique key of the job policy for Glossary import. @return [String]

key[RW]

[Required] Unique glossary key that is immutable. @return [String]

latest_import_job_execution_key[RW]

The unique key of the parent job execution for which the log resource was created. @return [String]

latest_import_job_execution_status[RW]

Status of the latest glossary import job execution, such as running, paused, or completed. This may include additional information like time import started , import file size and % of completion

@return [String]

lifecycle_state[R]

The current state of the glossary. @return [String]

owner[RW]

OCID of the user who is the owner of the glossary. @return [String]

time_created[RW]

The date and time the glossary was created, in the format defined by [RFC3339](tools.ietf.org/html/rfc3339). Example: `2019-03-25T21:10:29.600Z`

@return [DateTime]

time_updated[RW]

The last time that any change was made to the glossary. An [RFC3339](tools.ietf.org/html/rfc3339) formatted datetime string.

@return [DateTime]

updated_by_id[RW]

OCID of the user who updated this metadata element. @return [String]

uri[RW]

URI to the tag instance in the API. @return [String]

workflow_status[R]

Status of the approval process workflow for this business glossary. @return [String]

Public Class Methods

attribute_map() click to toggle source

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

# File lib/oci/data_catalog/models/glossary.rb, line 115
def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'key',
    'display_name': :'displayName',
    'description': :'description',
    'catalog_id': :'catalogId',
    'lifecycle_state': :'lifecycleState',
    'time_created': :'timeCreated',
    'time_updated': :'timeUpdated',
    'created_by_id': :'createdById',
    'updated_by_id': :'updatedById',
    'owner': :'owner',
    'workflow_status': :'workflowStatus',
    'custom_property_members': :'customPropertyMembers',
    'import_job_definition_key': :'importJobDefinitionKey',
    'import_job_key': :'importJobKey',
    'latest_import_job_execution_key': :'latestImportJobExecutionKey',
    'latest_import_job_execution_status': :'latestImportJobExecutionStatus',
    'uri': :'uri'
    # rubocop:enable Style/SymbolLiteral
  }
end
new(attributes = {}) click to toggle source

Initializes the object @param [Hash] attributes Model attributes in the form of hash @option attributes [String] :key The value to assign to the {#key} property @option attributes [String] :display_name The value to assign to the {#display_name} property @option attributes [String] :description The value to assign to the {#description} property @option attributes [String] :catalog_id The value to assign to the {#catalog_id} property @option attributes [String] :lifecycle_state The value to assign to the {#lifecycle_state} property @option attributes [DateTime] :time_created The value to assign to the {#time_created} property @option attributes [DateTime] :time_updated The value to assign to the {#time_updated} property @option attributes [String] :created_by_id The value to assign to the {#created_by_id} property @option attributes [String] :updated_by_id The value to assign to the {#updated_by_id} property @option attributes [String] :owner The value to assign to the {#owner} property @option attributes [String] :workflow_status The value to assign to the {#workflow_status} property @option attributes [Array<OCI::DataCatalog::Models::CustomPropertyGetUsage>] :custom_property_members The value to assign to the {#custom_property_members} property @option attributes [String] :import_job_definition_key The value to assign to the {#import_job_definition_key} property @option attributes [String] :import_job_key The value to assign to the {#import_job_key} property @option attributes [String] :latest_import_job_execution_key The value to assign to the {#latest_import_job_execution_key} property @option attributes [String] :latest_import_job_execution_status The value to assign to the {#latest_import_job_execution_status} property @option attributes [String] :uri The value to assign to the {#uri} property

# File lib/oci/data_catalog/models/glossary.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.catalog_id = attributes[:'catalogId'] if attributes[:'catalogId']

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

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

  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.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']

  self.import_job_definition_key = attributes[:'importJobDefinitionKey'] if attributes[:'importJobDefinitionKey']

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

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

  self.import_job_key = attributes[:'importJobKey'] if attributes[:'importJobKey']

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

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

  self.latest_import_job_execution_key = attributes[:'latestImportJobExecutionKey'] if attributes[:'latestImportJobExecutionKey']

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

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

  self.latest_import_job_execution_status = attributes[:'latestImportJobExecutionStatus'] if attributes[:'latestImportJobExecutionStatus']

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

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

  self.uri = attributes[:'uri'] if attributes[:'uri']
end
swagger_types() click to toggle source

Attribute type mapping.

# File lib/oci/data_catalog/models/glossary.rb, line 140
def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'String',
    'display_name': :'String',
    'description': :'String',
    'catalog_id': :'String',
    'lifecycle_state': :'String',
    'time_created': :'DateTime',
    'time_updated': :'DateTime',
    'created_by_id': :'String',
    'updated_by_id': :'String',
    'owner': :'String',
    'workflow_status': :'String',
    'custom_property_members': :'Array<OCI::DataCatalog::Models::CustomPropertyGetUsage>',
    'import_job_definition_key': :'String',
    'import_job_key': :'String',
    'latest_import_job_execution_key': :'String',
    'latest_import_job_execution_status': :'String',
    'uri': :'String'
    # rubocop:enable Style/SymbolLiteral
  }
end

Public Instance Methods

==(other) click to toggle source

Checks equality by comparing each attribute. @param [Object] other the other object to be compared

# File lib/oci/data_catalog/models/glossary.rb, line 313
def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    key == other.key &&
    display_name == other.display_name &&
    description == other.description &&
    catalog_id == other.catalog_id &&
    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 &&
    custom_property_members == other.custom_property_members &&
    import_job_definition_key == other.import_job_definition_key &&
    import_job_key == other.import_job_key &&
    latest_import_job_execution_key == other.latest_import_job_execution_key &&
    latest_import_job_execution_status == other.latest_import_job_execution_status &&
    uri == other.uri
end
build_from_hash(attributes) click to toggle source

Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself

# File lib/oci/data_catalog/models/glossary.rb, line 359
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) click to toggle source

@see the `==` method @param [Object] other the other object to be compared

# File lib/oci/data_catalog/models/glossary.rb, line 339
def eql?(other)
  self == other
end
hash() click to toggle source

Calculates hash code according to all attributes. @return [Fixnum] Hash code

# File lib/oci/data_catalog/models/glossary.rb, line 348
def hash
  [key, display_name, description, catalog_id, lifecycle_state, time_created, time_updated, created_by_id, updated_by_id, owner, workflow_status, custom_property_members, import_job_definition_key, import_job_key, latest_import_job_execution_key, latest_import_job_execution_status, uri].hash
end
lifecycle_state=(lifecycle_state) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] lifecycle_state Object to be assigned

# File lib/oci/data_catalog/models/glossary.rb, line 284
def lifecycle_state=(lifecycle_state)
  # rubocop:disable Style/ConditionalAssignment
  if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
    OCI.logger.debug("Unknown value for 'lifecycle_state' [" + lifecycle_state + "]. Mapping to 'LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE'") if OCI.logger
    @lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
  else
    @lifecycle_state = lifecycle_state
  end
  # rubocop:enable Style/ConditionalAssignment
end
to_hash() click to toggle source

Returns the object in the form of hash @return [Hash] Returns the object in the form of hash

# File lib/oci/data_catalog/models/glossary.rb, line 392
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() click to toggle source

Returns the string representation of the object @return [String] String presentation of the object

# File lib/oci/data_catalog/models/glossary.rb, line 386
def to_s
  to_hash.to_s
end
workflow_status=(workflow_status) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] workflow_status Object to be assigned

# File lib/oci/data_catalog/models/glossary.rb, line 297
def workflow_status=(workflow_status)
  # rubocop:disable Style/ConditionalAssignment
  if workflow_status && !WORKFLOW_STATUS_ENUM.include?(workflow_status)
    OCI.logger.debug("Unknown value for 'workflow_status' [" + workflow_status + "]. Mapping to 'WORKFLOW_STATUS_UNKNOWN_ENUM_VALUE'") if OCI.logger
    @workflow_status = WORKFLOW_STATUS_UNKNOWN_ENUM_VALUE
  else
    @workflow_status = workflow_status
  end
  # rubocop:enable Style/ConditionalAssignment
end

Private Instance Methods

_to_hash(value) click to toggle source

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value @param [Object] value Any valid value @return [Hash] Returns the value in the form of hash

# File lib/oci/data_catalog/models/glossary.rb, line 409
def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end