Class: Rafflesia::FoldIndexManifest
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::FoldIndexManifest
- Defined in:
- lib/rafflesia/proteins/fold_index_manifest.rb
Constant Summary collapse
- HASH_ATTRS =
{ artifact_count: :artifact_count, backend: :backend, created_at: :created_at, engine_version: :engine_version, index_id: :index_id, manifest_id: :manifest_id, manifest_version: :manifest_version, name: :name, parameters: :parameters, routing: :routing, segments: :segments, shard_count: :shard_count, shards: :shards, source_count: :source_count, total_size_bytes: :total_size_bytes, version: :version }.freeze
Instance Attribute Summary collapse
-
#artifact_count ⇒ Object
Returns the value of attribute artifact_count.
-
#backend ⇒ Object
Returns the value of attribute backend.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#engine_version ⇒ Object
Returns the value of attribute engine_version.
-
#index_id ⇒ Object
Returns the value of attribute index_id.
-
#manifest_id ⇒ Object
Returns the value of attribute manifest_id.
-
#manifest_version ⇒ Object
Returns the value of attribute manifest_version.
-
#name ⇒ Object
Returns the value of attribute name.
-
#parameters ⇒ Object
Returns the value of attribute parameters.
-
#routing ⇒ Object
Returns the value of attribute routing.
-
#segments ⇒ Object
Returns the value of attribute segments.
-
#shard_count ⇒ Object
Returns the value of attribute shard_count.
-
#shards ⇒ Object
Returns the value of attribute shards.
-
#source_count ⇒ Object
Returns the value of attribute source_count.
-
#total_size_bytes ⇒ Object
Returns the value of attribute total_size_bytes.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(json) ⇒ FoldIndexManifest
constructor
A new instance of FoldIndexManifest.
Constructor Details
#initialize(json) ⇒ FoldIndexManifest
Returns a new instance of FoldIndexManifest.
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/rafflesia/proteins/fold_index_manifest.rb', line 45 def initialize(json) super() hash = self.class.normalize(json) @artifact_count = hash[:artifact_count] @backend = hash[:backend] @created_at = hash[:created_at] @engine_version = hash[:engine_version] @index_id = hash[:index_id] @manifest_id = hash[:manifest_id] @manifest_version = hash[:manifest_version] @name = hash[:name] @parameters = hash[:parameters] || {} @routing = hash[:routing] ? Rafflesia::FoldIndexRoutingManifest.new(hash[:routing]) : nil @segments = (hash[:segments] || []).map { |item| item ? Rafflesia::FoldIndexSegmentManifest.new(item) : nil } @shard_count = hash[:shard_count] @shards = (hash[:shards] || []).map { |item| item ? Rafflesia::FoldIndexShardManifest.new(item) : nil } @source_count = hash[:source_count] @total_size_bytes = hash[:total_size_bytes] @version = hash[:version] end |
Instance Attribute Details
#artifact_count ⇒ Object
Returns the value of attribute artifact_count.
27 28 29 |
# File 'lib/rafflesia/proteins/fold_index_manifest.rb', line 27 def artifact_count @artifact_count end |
#backend ⇒ Object
Returns the value of attribute backend.
27 28 29 |
# File 'lib/rafflesia/proteins/fold_index_manifest.rb', line 27 def backend @backend end |
#created_at ⇒ Object
Returns the value of attribute created_at.
27 28 29 |
# File 'lib/rafflesia/proteins/fold_index_manifest.rb', line 27 def created_at @created_at end |
#engine_version ⇒ Object
Returns the value of attribute engine_version.
27 28 29 |
# File 'lib/rafflesia/proteins/fold_index_manifest.rb', line 27 def engine_version @engine_version end |
#index_id ⇒ Object
Returns the value of attribute index_id.
27 28 29 |
# File 'lib/rafflesia/proteins/fold_index_manifest.rb', line 27 def index_id @index_id end |
#manifest_id ⇒ Object
Returns the value of attribute manifest_id.
27 28 29 |
# File 'lib/rafflesia/proteins/fold_index_manifest.rb', line 27 def manifest_id @manifest_id end |
#manifest_version ⇒ Object
Returns the value of attribute manifest_version.
27 28 29 |
# File 'lib/rafflesia/proteins/fold_index_manifest.rb', line 27 def manifest_version @manifest_version end |
#name ⇒ Object
Returns the value of attribute name.
27 28 29 |
# File 'lib/rafflesia/proteins/fold_index_manifest.rb', line 27 def name @name end |
#parameters ⇒ Object
Returns the value of attribute parameters.
27 28 29 |
# File 'lib/rafflesia/proteins/fold_index_manifest.rb', line 27 def parameters @parameters end |
#routing ⇒ Object
Returns the value of attribute routing.
27 28 29 |
# File 'lib/rafflesia/proteins/fold_index_manifest.rb', line 27 def routing @routing end |
#segments ⇒ Object
Returns the value of attribute segments.
27 28 29 |
# File 'lib/rafflesia/proteins/fold_index_manifest.rb', line 27 def segments @segments end |
#shard_count ⇒ Object
Returns the value of attribute shard_count.
27 28 29 |
# File 'lib/rafflesia/proteins/fold_index_manifest.rb', line 27 def shard_count @shard_count end |
#shards ⇒ Object
Returns the value of attribute shards.
27 28 29 |
# File 'lib/rafflesia/proteins/fold_index_manifest.rb', line 27 def shards @shards end |
#source_count ⇒ Object
Returns the value of attribute source_count.
27 28 29 |
# File 'lib/rafflesia/proteins/fold_index_manifest.rb', line 27 def source_count @source_count end |
#total_size_bytes ⇒ Object
Returns the value of attribute total_size_bytes.
27 28 29 |
# File 'lib/rafflesia/proteins/fold_index_manifest.rb', line 27 def total_size_bytes @total_size_bytes end |
#version ⇒ Object
Returns the value of attribute version.
27 28 29 |
# File 'lib/rafflesia/proteins/fold_index_manifest.rb', line 27 def version @version end |