Class: Rafflesia::FoldIndexSegmentShard

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

Constant Summary collapse

HASH_ATTRS =
{
  artifact_roles: :artifact_roles,
  db_base: :db_base,
  file_count: :file_count,
  shard_id: :shard_id,
  shard_index: :shard_index,
  total_size_bytes: :total_size_bytes
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ FoldIndexSegmentShard

Returns a new instance of FoldIndexSegmentShard.



25
26
27
28
29
30
31
32
33
34
# File 'lib/rafflesia/proteins/fold_index_segment_shard.rb', line 25

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @artifact_roles = (hash[:artifact_roles] || [])
  @db_base = hash[:db_base]
  @file_count = hash[:file_count]
  @shard_id = hash[:shard_id]
  @shard_index = hash[:shard_index]
  @total_size_bytes = hash[:total_size_bytes]
end

Instance Attribute Details

#artifact_rolesObject

Returns the value of attribute artifact_roles.



17
18
19
# File 'lib/rafflesia/proteins/fold_index_segment_shard.rb', line 17

def artifact_roles
  @artifact_roles
end

#db_baseObject

Returns the value of attribute db_base.



17
18
19
# File 'lib/rafflesia/proteins/fold_index_segment_shard.rb', line 17

def db_base
  @db_base
end

#file_countObject

Returns the value of attribute file_count.



17
18
19
# File 'lib/rafflesia/proteins/fold_index_segment_shard.rb', line 17

def file_count
  @file_count
end

#shard_idObject

Returns the value of attribute shard_id.



17
18
19
# File 'lib/rafflesia/proteins/fold_index_segment_shard.rb', line 17

def shard_id
  @shard_id
end

#shard_indexObject

Returns the value of attribute shard_index.



17
18
19
# File 'lib/rafflesia/proteins/fold_index_segment_shard.rb', line 17

def shard_index
  @shard_index
end

#total_size_bytesObject

Returns the value of attribute total_size_bytes.



17
18
19
# File 'lib/rafflesia/proteins/fold_index_segment_shard.rb', line 17

def total_size_bytes
  @total_size_bytes
end