Class: Rafflesia::BlastPackSegmentRef

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

Constant Summary collapse

HASH_ATTRS =
{
  block_bytes: :block_bytes,
  block_count: :block_count,
  block_size_bytes: :block_size_bytes,
  content_sha256: :content_sha_256,
  manifest_object: :manifest_object,
  manifest_object_id: :manifest_object_id,
  role: :role,
  root_object: :root_object,
  segment_id: :segment_id
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ BlastPackSegmentRef

Returns a new instance of BlastPackSegmentRef.



31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/rafflesia/sequences/blast_pack_segment_ref.rb', line 31

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @block_bytes = hash[:block_bytes]
  @block_count = hash[:block_count]
  @block_size_bytes = hash[:block_size_bytes]
  @content_sha_256 = hash[:content_sha256]
  @manifest_object = hash[:manifest_object] ? Rafflesia::ObjectRef.new(hash[:manifest_object]) : nil
  @manifest_object_id = hash[:manifest_object_id]
  @role = hash[:role]
  @root_object = hash[:root_object] ? Rafflesia::ObjectRef.new(hash[:root_object]) : nil
  @segment_id = hash[:segment_id]
end

Instance Attribute Details

#block_bytesObject

Returns the value of attribute block_bytes.



20
21
22
# File 'lib/rafflesia/sequences/blast_pack_segment_ref.rb', line 20

def block_bytes
  @block_bytes
end

#block_countObject

Returns the value of attribute block_count.



20
21
22
# File 'lib/rafflesia/sequences/blast_pack_segment_ref.rb', line 20

def block_count
  @block_count
end

#block_size_bytesObject

Returns the value of attribute block_size_bytes.



20
21
22
# File 'lib/rafflesia/sequences/blast_pack_segment_ref.rb', line 20

def block_size_bytes
  @block_size_bytes
end

#content_sha_256Object

Returns the value of attribute content_sha_256.



20
21
22
# File 'lib/rafflesia/sequences/blast_pack_segment_ref.rb', line 20

def content_sha_256
  @content_sha_256
end

#manifest_objectObject

Returns the value of attribute manifest_object.



20
21
22
# File 'lib/rafflesia/sequences/blast_pack_segment_ref.rb', line 20

def manifest_object
  @manifest_object
end

#manifest_object_idObject

Returns the value of attribute manifest_object_id.



20
21
22
# File 'lib/rafflesia/sequences/blast_pack_segment_ref.rb', line 20

def manifest_object_id
  @manifest_object_id
end

#roleObject

Returns the value of attribute role.



20
21
22
# File 'lib/rafflesia/sequences/blast_pack_segment_ref.rb', line 20

def role
  @role
end

#root_objectObject

Returns the value of attribute root_object.



20
21
22
# File 'lib/rafflesia/sequences/blast_pack_segment_ref.rb', line 20

def root_object
  @root_object
end

#segment_idObject

Returns the value of attribute segment_id.



20
21
22
# File 'lib/rafflesia/sequences/blast_pack_segment_ref.rb', line 20

def segment_id
  @segment_id
end