Class: Rafflesia::FoldIndexBuildData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/proteins/fold_index_build_data.rb

Constant Summary collapse

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ FoldIndexBuildData

Returns a new instance of FoldIndexBuildData.



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/rafflesia/proteins/fold_index_build_data.rb', line 37

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @artifact_count = hash[:artifact_count]
  @backend = hash[:backend]
  @dry_run = hash[:dry_run]
  @manifest = hash[:manifest] ? Rafflesia::FoldIndexManifest.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::FoldIndexPublishData.new(hash[:published]) : nil
  @ref = hash[:ref]
  @shard_count = hash[:shard_count]
  @total_size_bytes = hash[:total_size_bytes]
  @version = hash[:version]
end

Instance Attribute Details

#artifact_countObject

Returns the value of attribute artifact_count.



23
24
25
# File 'lib/rafflesia/proteins/fold_index_build_data.rb', line 23

def artifact_count
  @artifact_count
end

#backendObject

Returns the value of attribute backend.



23
24
25
# File 'lib/rafflesia/proteins/fold_index_build_data.rb', line 23

def backend
  @backend
end

#dry_runObject

Returns the value of attribute dry_run.



23
24
25
# File 'lib/rafflesia/proteins/fold_index_build_data.rb', line 23

def dry_run
  @dry_run
end

#manifestObject

Returns the value of attribute manifest.



23
24
25
# File 'lib/rafflesia/proteins/fold_index_build_data.rb', line 23

def manifest
  @manifest
end

#manifest_objectObject

Returns the value of attribute manifest_object.



23
24
25
# File 'lib/rafflesia/proteins/fold_index_build_data.rb', line 23

def manifest_object
  @manifest_object
end

#manifest_pathObject

Returns the value of attribute manifest_path.



23
24
25
# File 'lib/rafflesia/proteins/fold_index_build_data.rb', line 23

def manifest_path
  @manifest_path
end

#nameObject

Returns the value of attribute name.



23
24
25
# File 'lib/rafflesia/proteins/fold_index_build_data.rb', line 23

def name
  @name
end

#publishedObject

Returns the value of attribute published.



23
24
25
# File 'lib/rafflesia/proteins/fold_index_build_data.rb', line 23

def published
  @published
end

#refObject

Returns the value of attribute ref.



23
24
25
# File 'lib/rafflesia/proteins/fold_index_build_data.rb', line 23

def ref
  @ref
end

#shard_countObject

Returns the value of attribute shard_count.



23
24
25
# File 'lib/rafflesia/proteins/fold_index_build_data.rb', line 23

def shard_count
  @shard_count
end

#total_size_bytesObject

Returns the value of attribute total_size_bytes.



23
24
25
# File 'lib/rafflesia/proteins/fold_index_build_data.rb', line 23

def total_size_bytes
  @total_size_bytes
end

#versionObject

Returns the value of attribute version.



23
24
25
# File 'lib/rafflesia/proteins/fold_index_build_data.rb', line 23

def version
  @version
end