Class: Rafflesia::DiamondDbRegistryRecord

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/sequences/diamond_db_registry_record.rb

Constant Summary collapse

HASH_ATTRS =
{
  artifact_count: :artifact_count,
  db_prefix: :db_prefix,
  engine: :engine,
  engine_version: :engine_version,
  manifest_id: :manifest_id,
  manifest_object: :manifest_object,
  manifest_object_id: :manifest_object_id,
  manifest_path: :manifest_path,
  name: :name,
  published_at: :published_at,
  ref: :ref,
  source_object_id: :source_object_id,
  total_size_bytes: :total_size_bytes,
  version: :version
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ DiamondDbRegistryRecord

Returns a new instance of DiamondDbRegistryRecord.



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/rafflesia/sequences/diamond_db_registry_record.rb', line 41

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @artifact_count = hash[:artifact_count]
  @db_prefix = hash[:db_prefix]
  @engine = hash[:engine]
  @engine_version = hash[:engine_version]
  @manifest_id = hash[:manifest_id]
  @manifest_object = hash[:manifest_object] ? Rafflesia::ObjectRef.new(hash[:manifest_object]) : nil
  @manifest_object_id = hash[:manifest_object_id]
  @manifest_path = hash[:manifest_path]
  @name = hash[:name]
  @published_at = hash[:published_at]
  @ref = hash[:ref]
  @source_object_id = hash[:source_object_id]
  @total_size_bytes = hash[:total_size_bytes]
  @version = hash[:version]
end

Instance Attribute Details

#artifact_countObject

Returns the value of attribute artifact_count.



25
26
27
# File 'lib/rafflesia/sequences/diamond_db_registry_record.rb', line 25

def artifact_count
  @artifact_count
end

#db_prefixObject

Returns the value of attribute db_prefix.



25
26
27
# File 'lib/rafflesia/sequences/diamond_db_registry_record.rb', line 25

def db_prefix
  @db_prefix
end

#engineObject

Returns the value of attribute engine.



25
26
27
# File 'lib/rafflesia/sequences/diamond_db_registry_record.rb', line 25

def engine
  @engine
end

#engine_versionObject

Returns the value of attribute engine_version.



25
26
27
# File 'lib/rafflesia/sequences/diamond_db_registry_record.rb', line 25

def engine_version
  @engine_version
end

#manifest_idObject

Returns the value of attribute manifest_id.



25
26
27
# File 'lib/rafflesia/sequences/diamond_db_registry_record.rb', line 25

def manifest_id
  @manifest_id
end

#manifest_objectObject

Returns the value of attribute manifest_object.



25
26
27
# File 'lib/rafflesia/sequences/diamond_db_registry_record.rb', line 25

def manifest_object
  @manifest_object
end

#manifest_object_idObject

Returns the value of attribute manifest_object_id.



25
26
27
# File 'lib/rafflesia/sequences/diamond_db_registry_record.rb', line 25

def manifest_object_id
  @manifest_object_id
end

#manifest_pathObject

Returns the value of attribute manifest_path.



25
26
27
# File 'lib/rafflesia/sequences/diamond_db_registry_record.rb', line 25

def manifest_path
  @manifest_path
end

#nameObject

Returns the value of attribute name.



25
26
27
# File 'lib/rafflesia/sequences/diamond_db_registry_record.rb', line 25

def name
  @name
end

#published_atObject

Returns the value of attribute published_at.



25
26
27
# File 'lib/rafflesia/sequences/diamond_db_registry_record.rb', line 25

def published_at
  @published_at
end

#refObject

Returns the value of attribute ref.



25
26
27
# File 'lib/rafflesia/sequences/diamond_db_registry_record.rb', line 25

def ref
  @ref
end

#source_object_idObject

Returns the value of attribute source_object_id.



25
26
27
# File 'lib/rafflesia/sequences/diamond_db_registry_record.rb', line 25

def source_object_id
  @source_object_id
end

#total_size_bytesObject

Returns the value of attribute total_size_bytes.



25
26
27
# File 'lib/rafflesia/sequences/diamond_db_registry_record.rb', line 25

def total_size_bytes
  @total_size_bytes
end

#versionObject

Returns the value of attribute version.



25
26
27
# File 'lib/rafflesia/sequences/diamond_db_registry_record.rb', line 25

def version
  @version
end