Class: Rafflesia::StructureStatusData

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

Constant Summary collapse

HASH_ATTRS =
{
  attempted_refs: :attempted_refs,
  cache_status: :cache_status,
  checked_at: :checked_at,
  format: :format,
  is_object_readable: :is_object_readable,
  is_parsed_cached: :is_parsed_cached,
  is_record_present: :is_record_present,
  last_parse_elapsed_ms: :last_parse_elapsed_ms,
  model_version: :model_version,
  object: :object,
  pae_object: :pae_object,
  parse_cost_class: :parse_cost_class,
  parser_backend: :parser_backend,
  schema_version: :schema_version,
  size_bytes: :size_bytes,
  source: :source,
  source_metadata: :source_metadata,
  source_url: :source_url,
  structure_id: :structure_id,
  target_id: :target_id
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ StructureStatusData

Returns a new instance of StructureStatusData.



53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/rafflesia/proteins/structure_status_data.rb', line 53

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @attempted_refs = (hash[:attempted_refs] || [])
  @cache_status = hash[:cache_status]
  @checked_at = hash[:checked_at]
  @format = hash[:format]
  @is_object_readable = hash[:is_object_readable]
  @is_parsed_cached = hash[:is_parsed_cached]
  @is_record_present = hash[:is_record_present]
  @last_parse_elapsed_ms = hash[:last_parse_elapsed_ms]
  @model_version = hash[:model_version]
  @object = hash[:object] ? Rafflesia::ObjectRef.new(hash[:object]) : nil
  @pae_object = hash[:pae_object] ? Rafflesia::ObjectRef.new(hash[:pae_object]) : nil
  @parse_cost_class = hash[:parse_cost_class]
  @parser_backend = hash[:parser_backend]
  @schema_version = hash[:schema_version]
  @size_bytes = hash[:size_bytes]
  @source = hash[:source]
  @source_metadata = hash[:source_metadata] || {}
  @source_url = hash[:source_url]
  @structure_id = hash[:structure_id]
  @target_id = hash[:target_id]
end

Instance Attribute Details

#attempted_refsObject

Returns the value of attribute attempted_refs.



31
32
33
# File 'lib/rafflesia/proteins/structure_status_data.rb', line 31

def attempted_refs
  @attempted_refs
end

#cache_statusObject

Returns the value of attribute cache_status.



31
32
33
# File 'lib/rafflesia/proteins/structure_status_data.rb', line 31

def cache_status
  @cache_status
end

#checked_atObject

Returns the value of attribute checked_at.



31
32
33
# File 'lib/rafflesia/proteins/structure_status_data.rb', line 31

def checked_at
  @checked_at
end

#formatObject

Returns the value of attribute format.



31
32
33
# File 'lib/rafflesia/proteins/structure_status_data.rb', line 31

def format
  @format
end

#is_object_readableObject

Returns the value of attribute is_object_readable.



31
32
33
# File 'lib/rafflesia/proteins/structure_status_data.rb', line 31

def is_object_readable
  @is_object_readable
end

#is_parsed_cachedObject

Returns the value of attribute is_parsed_cached.



31
32
33
# File 'lib/rafflesia/proteins/structure_status_data.rb', line 31

def is_parsed_cached
  @is_parsed_cached
end

#is_record_presentObject

Returns the value of attribute is_record_present.



31
32
33
# File 'lib/rafflesia/proteins/structure_status_data.rb', line 31

def is_record_present
  @is_record_present
end

#last_parse_elapsed_msObject

Returns the value of attribute last_parse_elapsed_ms.



31
32
33
# File 'lib/rafflesia/proteins/structure_status_data.rb', line 31

def last_parse_elapsed_ms
  @last_parse_elapsed_ms
end

#model_versionObject

Returns the value of attribute model_version.



31
32
33
# File 'lib/rafflesia/proteins/structure_status_data.rb', line 31

def model_version
  @model_version
end

#objectObject

Returns the value of attribute object.



31
32
33
# File 'lib/rafflesia/proteins/structure_status_data.rb', line 31

def object
  @object
end

#pae_objectObject

Returns the value of attribute pae_object.



31
32
33
# File 'lib/rafflesia/proteins/structure_status_data.rb', line 31

def pae_object
  @pae_object
end

#parse_cost_classObject

Returns the value of attribute parse_cost_class.



31
32
33
# File 'lib/rafflesia/proteins/structure_status_data.rb', line 31

def parse_cost_class
  @parse_cost_class
end

#parser_backendObject

Returns the value of attribute parser_backend.



31
32
33
# File 'lib/rafflesia/proteins/structure_status_data.rb', line 31

def parser_backend
  @parser_backend
end

#schema_versionObject

Returns the value of attribute schema_version.



31
32
33
# File 'lib/rafflesia/proteins/structure_status_data.rb', line 31

def schema_version
  @schema_version
end

#size_bytesObject

Returns the value of attribute size_bytes.



31
32
33
# File 'lib/rafflesia/proteins/structure_status_data.rb', line 31

def size_bytes
  @size_bytes
end

#sourceObject

Returns the value of attribute source.



31
32
33
# File 'lib/rafflesia/proteins/structure_status_data.rb', line 31

def source
  @source
end

#source_metadataObject

Returns the value of attribute source_metadata.



31
32
33
# File 'lib/rafflesia/proteins/structure_status_data.rb', line 31

def 
  @source_metadata
end

#source_urlObject

Returns the value of attribute source_url.



31
32
33
# File 'lib/rafflesia/proteins/structure_status_data.rb', line 31

def source_url
  @source_url
end

#structure_idObject

Returns the value of attribute structure_id.



31
32
33
# File 'lib/rafflesia/proteins/structure_status_data.rb', line 31

def structure_id
  @structure_id
end

#target_idObject

Returns the value of attribute target_id.



31
32
33
# File 'lib/rafflesia/proteins/structure_status_data.rb', line 31

def target_id
  @target_id
end