Class: Rafflesia::FoldIndexManifest

Inherits:
Types::BaseModel
  • Object
show all
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

Instance Method Summary collapse

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_countObject

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

#backendObject

Returns the value of attribute backend.



27
28
29
# File 'lib/rafflesia/proteins/fold_index_manifest.rb', line 27

def backend
  @backend
end

#created_atObject

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_versionObject

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_idObject

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_idObject

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_versionObject

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

#nameObject

Returns the value of attribute name.



27
28
29
# File 'lib/rafflesia/proteins/fold_index_manifest.rb', line 27

def name
  @name
end

#parametersObject

Returns the value of attribute parameters.



27
28
29
# File 'lib/rafflesia/proteins/fold_index_manifest.rb', line 27

def parameters
  @parameters
end

#routingObject

Returns the value of attribute routing.



27
28
29
# File 'lib/rafflesia/proteins/fold_index_manifest.rb', line 27

def routing
  @routing
end

#segmentsObject

Returns the value of attribute segments.



27
28
29
# File 'lib/rafflesia/proteins/fold_index_manifest.rb', line 27

def segments
  @segments
end

#shard_countObject

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

#shardsObject

Returns the value of attribute shards.



27
28
29
# File 'lib/rafflesia/proteins/fold_index_manifest.rb', line 27

def shards
  @shards
end

#source_countObject

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_bytesObject

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

#versionObject

Returns the value of attribute version.



27
28
29
# File 'lib/rafflesia/proteins/fold_index_manifest.rb', line 27

def version
  @version
end