Class: Rafflesia::FoldCollectionPublishData

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

Constant Summary collapse

HASH_ATTRS =
{
  benchmark: :benchmark,
  benchmark_object_id: :benchmark_object_id,
  benchmark_passed: :benchmark_passed,
  block_bytes: :block_bytes,
  block_count: :block_count,
  calibration_object: :calibration_object,
  calibration_object_id: :calibration_object_id,
  calibration_profile: :calibration_profile,
  collection_id: :collection_id,
  compaction_generation: :compaction_generation,
  generation: :generation,
  name: :name,
  previous_published_at: :previous_published_at,
  previous_ref: :previous_ref,
  previous_snapshot_ref: :previous_snapshot_ref,
  published_at: :published_at,
  record_count: :record_count,
  ref: :ref,
  routing_directory: :routing_directory,
  routing_directory_object: :routing_directory_object,
  routing_directory_object_id: :routing_directory_object_id,
  segment_count: :segment_count,
  segment_refs: :segment_refs,
  segments: :segments,
  snapshot_object: :snapshot_object,
  snapshot_object_id: :snapshot_object_id,
  snapshot_ref: :snapshot_ref,
  version: :version
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ FoldCollectionPublishData

Returns a new instance of FoldCollectionPublishData.



69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# File 'lib/rafflesia/proteins/fold_collection_publish_data.rb', line 69

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @benchmark = hash[:benchmark] ? Rafflesia::FoldCollectionBenchmarkSummary.new(hash[:benchmark]) : nil
  @benchmark_object_id = hash[:benchmark_object_id]
  @benchmark_passed = hash[:benchmark_passed]
  @block_bytes = hash[:block_bytes]
  @block_count = hash[:block_count]
  @calibration_object = hash[:calibration_object] ? Rafflesia::ObjectRef.new(hash[:calibration_object]) : nil
  @calibration_object_id = hash[:calibration_object_id]
  @calibration_profile = hash[:calibration_profile] ? Rafflesia::FoldCollectionCalibrationProfile.new(hash[:calibration_profile]) : nil
  @collection_id = hash[:collection_id]
  @compaction_generation = hash[:compaction_generation]
  @generation = hash[:generation]
  @name = hash[:name]
  @previous_published_at = hash[:previous_published_at]
  @previous_ref = hash[:previous_ref]
  @previous_snapshot_ref = hash[:previous_snapshot_ref]
  @published_at = hash[:published_at]
  @record_count = hash[:record_count]
  @ref = hash[:ref]
  @routing_directory = hash[:routing_directory] ? Rafflesia::FoldCollectionRoutingDirectorySummary.new(hash[:routing_directory]) : nil
  @routing_directory_object = hash[:routing_directory_object] ? Rafflesia::ObjectRef.new(hash[:routing_directory_object]) : nil
  @routing_directory_object_id = hash[:routing_directory_object_id]
  @segment_count = hash[:segment_count]
  @segment_refs = (hash[:segment_refs] || [])
  @segments = (hash[:segments] || []).map { |item| item ? Rafflesia::FoldSegmentPublishData.new(item) : nil }
  @snapshot_object = hash[:snapshot_object] ? Rafflesia::ObjectRef.new(hash[:snapshot_object]) : nil
  @snapshot_object_id = hash[:snapshot_object_id]
  @snapshot_ref = hash[:snapshot_ref]
  @version = hash[:version]
end

Instance Attribute Details

#benchmarkObject

Returns the value of attribute benchmark.



39
40
41
# File 'lib/rafflesia/proteins/fold_collection_publish_data.rb', line 39

def benchmark
  @benchmark
end

#benchmark_object_idObject

Returns the value of attribute benchmark_object_id.



39
40
41
# File 'lib/rafflesia/proteins/fold_collection_publish_data.rb', line 39

def benchmark_object_id
  @benchmark_object_id
end

#benchmark_passedObject

Returns the value of attribute benchmark_passed.



39
40
41
# File 'lib/rafflesia/proteins/fold_collection_publish_data.rb', line 39

def benchmark_passed
  @benchmark_passed
end

#block_bytesObject

Returns the value of attribute block_bytes.



39
40
41
# File 'lib/rafflesia/proteins/fold_collection_publish_data.rb', line 39

def block_bytes
  @block_bytes
end

#block_countObject

Returns the value of attribute block_count.



39
40
41
# File 'lib/rafflesia/proteins/fold_collection_publish_data.rb', line 39

def block_count
  @block_count
end

#calibration_objectObject

Returns the value of attribute calibration_object.



39
40
41
# File 'lib/rafflesia/proteins/fold_collection_publish_data.rb', line 39

def calibration_object
  @calibration_object
end

#calibration_object_idObject

Returns the value of attribute calibration_object_id.



39
40
41
# File 'lib/rafflesia/proteins/fold_collection_publish_data.rb', line 39

def calibration_object_id
  @calibration_object_id
end

#calibration_profileObject

Returns the value of attribute calibration_profile.



39
40
41
# File 'lib/rafflesia/proteins/fold_collection_publish_data.rb', line 39

def calibration_profile
  @calibration_profile
end

#collection_idObject

Returns the value of attribute collection_id.



39
40
41
# File 'lib/rafflesia/proteins/fold_collection_publish_data.rb', line 39

def collection_id
  @collection_id
end

#compaction_generationObject

Returns the value of attribute compaction_generation.



39
40
41
# File 'lib/rafflesia/proteins/fold_collection_publish_data.rb', line 39

def compaction_generation
  @compaction_generation
end

#generationObject

Returns the value of attribute generation.



39
40
41
# File 'lib/rafflesia/proteins/fold_collection_publish_data.rb', line 39

def generation
  @generation
end

#nameObject

Returns the value of attribute name.



39
40
41
# File 'lib/rafflesia/proteins/fold_collection_publish_data.rb', line 39

def name
  @name
end

#previous_published_atObject

Returns the value of attribute previous_published_at.



39
40
41
# File 'lib/rafflesia/proteins/fold_collection_publish_data.rb', line 39

def previous_published_at
  @previous_published_at
end

#previous_refObject

Returns the value of attribute previous_ref.



39
40
41
# File 'lib/rafflesia/proteins/fold_collection_publish_data.rb', line 39

def previous_ref
  @previous_ref
end

#previous_snapshot_refObject

Returns the value of attribute previous_snapshot_ref.



39
40
41
# File 'lib/rafflesia/proteins/fold_collection_publish_data.rb', line 39

def previous_snapshot_ref
  @previous_snapshot_ref
end

#published_atObject

Returns the value of attribute published_at.



39
40
41
# File 'lib/rafflesia/proteins/fold_collection_publish_data.rb', line 39

def published_at
  @published_at
end

#record_countObject

Returns the value of attribute record_count.



39
40
41
# File 'lib/rafflesia/proteins/fold_collection_publish_data.rb', line 39

def record_count
  @record_count
end

#refObject

Returns the value of attribute ref.



39
40
41
# File 'lib/rafflesia/proteins/fold_collection_publish_data.rb', line 39

def ref
  @ref
end

#routing_directoryObject

Returns the value of attribute routing_directory.



39
40
41
# File 'lib/rafflesia/proteins/fold_collection_publish_data.rb', line 39

def routing_directory
  @routing_directory
end

#routing_directory_objectObject

Returns the value of attribute routing_directory_object.



39
40
41
# File 'lib/rafflesia/proteins/fold_collection_publish_data.rb', line 39

def routing_directory_object
  @routing_directory_object
end

#routing_directory_object_idObject

Returns the value of attribute routing_directory_object_id.



39
40
41
# File 'lib/rafflesia/proteins/fold_collection_publish_data.rb', line 39

def routing_directory_object_id
  @routing_directory_object_id
end

#segment_countObject

Returns the value of attribute segment_count.



39
40
41
# File 'lib/rafflesia/proteins/fold_collection_publish_data.rb', line 39

def segment_count
  @segment_count
end

#segment_refsObject

Returns the value of attribute segment_refs.



39
40
41
# File 'lib/rafflesia/proteins/fold_collection_publish_data.rb', line 39

def segment_refs
  @segment_refs
end

#segmentsObject

Returns the value of attribute segments.



39
40
41
# File 'lib/rafflesia/proteins/fold_collection_publish_data.rb', line 39

def segments
  @segments
end

#snapshot_objectObject

Returns the value of attribute snapshot_object.



39
40
41
# File 'lib/rafflesia/proteins/fold_collection_publish_data.rb', line 39

def snapshot_object
  @snapshot_object
end

#snapshot_object_idObject

Returns the value of attribute snapshot_object_id.



39
40
41
# File 'lib/rafflesia/proteins/fold_collection_publish_data.rb', line 39

def snapshot_object_id
  @snapshot_object_id
end

#snapshot_refObject

Returns the value of attribute snapshot_ref.



39
40
41
# File 'lib/rafflesia/proteins/fold_collection_publish_data.rb', line 39

def snapshot_ref
  @snapshot_ref
end

#versionObject

Returns the value of attribute version.



39
40
41
# File 'lib/rafflesia/proteins/fold_collection_publish_data.rb', line 39

def version
  @version
end