Class: Rafflesia::DiamondDbBuildData

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

Constant Summary collapse

HASH_ATTRS =
{
  artifact_count: :artifact_count,
  command: :command,
  dry_run: :dry_run,
  manifest: :manifest,
  manifest_object: :manifest_object,
  manifest_path: :manifest_path,
  name: :name,
  published: :published,
  ref: :ref,
  total_size_bytes: :total_size_bytes,
  version: :version
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ DiamondDbBuildData

Returns a new instance of DiamondDbBuildData.



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/rafflesia/sequences/diamond_db_build_data.rb', line 35

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @artifact_count = hash[:artifact_count]
  @command = (hash[:command] || [])
  @dry_run = hash[:dry_run]
  @manifest = hash[:manifest] ? Rafflesia::DiamondDbManifest.new(hash[:manifest]) : nil
  @manifest_object = hash[:manifest_object] ? Rafflesia::ObjectRef.new(hash[:manifest_object]) : nil
  @manifest_path = hash[:manifest_path]
  @name = hash[:name]
  @published = hash[:published] ? Rafflesia::DiamondDbPublishData.new(hash[:published]) : nil
  @ref = hash[:ref]
  @total_size_bytes = hash[:total_size_bytes]
  @version = hash[:version]
end

Instance Attribute Details

#artifact_countObject

Returns the value of attribute artifact_count.



22
23
24
# File 'lib/rafflesia/sequences/diamond_db_build_data.rb', line 22

def artifact_count
  @artifact_count
end

#commandObject

Returns the value of attribute command.



22
23
24
# File 'lib/rafflesia/sequences/diamond_db_build_data.rb', line 22

def command
  @command
end

#dry_runObject

Returns the value of attribute dry_run.



22
23
24
# File 'lib/rafflesia/sequences/diamond_db_build_data.rb', line 22

def dry_run
  @dry_run
end

#manifestObject

Returns the value of attribute manifest.



22
23
24
# File 'lib/rafflesia/sequences/diamond_db_build_data.rb', line 22

def manifest
  @manifest
end

#manifest_objectObject

Returns the value of attribute manifest_object.



22
23
24
# File 'lib/rafflesia/sequences/diamond_db_build_data.rb', line 22

def manifest_object
  @manifest_object
end

#manifest_pathObject

Returns the value of attribute manifest_path.



22
23
24
# File 'lib/rafflesia/sequences/diamond_db_build_data.rb', line 22

def manifest_path
  @manifest_path
end

#nameObject

Returns the value of attribute name.



22
23
24
# File 'lib/rafflesia/sequences/diamond_db_build_data.rb', line 22

def name
  @name
end

#publishedObject

Returns the value of attribute published.



22
23
24
# File 'lib/rafflesia/sequences/diamond_db_build_data.rb', line 22

def published
  @published
end

#refObject

Returns the value of attribute ref.



22
23
24
# File 'lib/rafflesia/sequences/diamond_db_build_data.rb', line 22

def ref
  @ref
end

#total_size_bytesObject

Returns the value of attribute total_size_bytes.



22
23
24
# File 'lib/rafflesia/sequences/diamond_db_build_data.rb', line 22

def total_size_bytes
  @total_size_bytes
end

#versionObject

Returns the value of attribute version.



22
23
24
# File 'lib/rafflesia/sequences/diamond_db_build_data.rb', line 22

def version
  @version
end