Class: Rafflesia::FoldIndexSegmentManifest
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::FoldIndexSegmentManifest
- Defined in:
- lib/rafflesia/proteins/fold_index_segment_manifest.rb
Constant Summary collapse
- HASH_ATTRS =
{ artifact_roles: :artifact_roles, file_count: :file_count, parameters: :parameters, role: :role, scope: :scope, segment_id: :segment_id, segment_type: :segment_type, shard_count: :shard_count, shards: :shards, total_size_bytes: :total_size_bytes }.freeze
Instance Attribute Summary collapse
-
#artifact_roles ⇒ Object
Returns the value of attribute artifact_roles.
-
#file_count ⇒ Object
Returns the value of attribute file_count.
-
#parameters ⇒ Object
Returns the value of attribute parameters.
-
#role ⇒ Object
Returns the value of attribute role.
-
#scope ⇒ Object
Returns the value of attribute scope.
-
#segment_id ⇒ Object
Returns the value of attribute segment_id.
-
#segment_type ⇒ Object
Returns the value of attribute segment_type.
-
#shard_count ⇒ Object
Returns the value of attribute shard_count.
-
#shards ⇒ Object
Returns the value of attribute shards.
-
#total_size_bytes ⇒ Object
Returns the value of attribute total_size_bytes.
Instance Method Summary collapse
-
#initialize(json) ⇒ FoldIndexSegmentManifest
constructor
A new instance of FoldIndexSegmentManifest.
Constructor Details
#initialize(json) ⇒ FoldIndexSegmentManifest
Returns a new instance of FoldIndexSegmentManifest.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/rafflesia/proteins/fold_index_segment_manifest.rb', line 33 def initialize(json) super() hash = self.class.normalize(json) @artifact_roles = (hash[:artifact_roles] || []) @file_count = hash[:file_count] @parameters = hash[:parameters] || {} @role = hash[:role] @scope = hash[:scope] @segment_id = hash[:segment_id] @segment_type = hash[:segment_type] @shard_count = hash[:shard_count] @shards = (hash[:shards] || []).map { |item| item ? Rafflesia::FoldIndexSegmentShard.new(item) : nil } @total_size_bytes = hash[:total_size_bytes] end |
Instance Attribute Details
#artifact_roles ⇒ Object
Returns the value of attribute artifact_roles.
21 22 23 |
# File 'lib/rafflesia/proteins/fold_index_segment_manifest.rb', line 21 def artifact_roles @artifact_roles end |
#file_count ⇒ Object
Returns the value of attribute file_count.
21 22 23 |
# File 'lib/rafflesia/proteins/fold_index_segment_manifest.rb', line 21 def file_count @file_count end |
#parameters ⇒ Object
Returns the value of attribute parameters.
21 22 23 |
# File 'lib/rafflesia/proteins/fold_index_segment_manifest.rb', line 21 def parameters @parameters end |
#role ⇒ Object
Returns the value of attribute role.
21 22 23 |
# File 'lib/rafflesia/proteins/fold_index_segment_manifest.rb', line 21 def role @role end |
#scope ⇒ Object
Returns the value of attribute scope.
21 22 23 |
# File 'lib/rafflesia/proteins/fold_index_segment_manifest.rb', line 21 def scope @scope end |
#segment_id ⇒ Object
Returns the value of attribute segment_id.
21 22 23 |
# File 'lib/rafflesia/proteins/fold_index_segment_manifest.rb', line 21 def segment_id @segment_id end |
#segment_type ⇒ Object
Returns the value of attribute segment_type.
21 22 23 |
# File 'lib/rafflesia/proteins/fold_index_segment_manifest.rb', line 21 def segment_type @segment_type end |
#shard_count ⇒ Object
Returns the value of attribute shard_count.
21 22 23 |
# File 'lib/rafflesia/proteins/fold_index_segment_manifest.rb', line 21 def shard_count @shard_count end |
#shards ⇒ Object
Returns the value of attribute shards.
21 22 23 |
# File 'lib/rafflesia/proteins/fold_index_segment_manifest.rb', line 21 def shards @shards end |
#total_size_bytes ⇒ Object
Returns the value of attribute total_size_bytes.
21 22 23 |
# File 'lib/rafflesia/proteins/fold_index_segment_manifest.rb', line 21 def total_size_bytes @total_size_bytes end |