Class: Rafflesia::CorpuReleaseAuditData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/datasets/corpu_release_audit_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  audit_object: :audit_object,
  audit_payload: :audit_payload,
  backend: :backend,
  corpus: :corpus,
  history_entry: :history_entry,
  object_store_root: :object_store_root,
  ref: :ref,
  release_id: :release_id
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ CorpuReleaseAuditData

Returns a new instance of CorpuReleaseAuditData.



29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/rafflesia/datasets/corpu_release_audit_data.rb', line 29

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @audit_object = hash[:audit_object] ? Rafflesia::ObjectRef.new(hash[:audit_object]) : nil
  @audit_payload = hash[:audit_payload] || {}
  @backend = hash[:backend]
  @corpus = hash[:corpus]
  @history_entry = hash[:history_entry] ? Rafflesia::CorpuReleaseHistoryEntry.new(hash[:history_entry]) : nil
  @object_store_root = hash[:object_store_root]
  @ref = hash[:ref]
  @release_id = hash[:release_id]
end

Instance Attribute Details

#audit_objectObject

Returns the value of attribute audit_object.



19
20
21
# File 'lib/rafflesia/datasets/corpu_release_audit_data.rb', line 19

def audit_object
  @audit_object
end

#audit_payloadObject

Returns the value of attribute audit_payload.



19
20
21
# File 'lib/rafflesia/datasets/corpu_release_audit_data.rb', line 19

def audit_payload
  @audit_payload
end

#backendObject

Returns the value of attribute backend.



19
20
21
# File 'lib/rafflesia/datasets/corpu_release_audit_data.rb', line 19

def backend
  @backend
end

#corpusObject

Returns the value of attribute corpus.



19
20
21
# File 'lib/rafflesia/datasets/corpu_release_audit_data.rb', line 19

def corpus
  @corpus
end

#history_entryObject

Returns the value of attribute history_entry.



19
20
21
# File 'lib/rafflesia/datasets/corpu_release_audit_data.rb', line 19

def history_entry
  @history_entry
end

#object_store_rootObject

Returns the value of attribute object_store_root.



19
20
21
# File 'lib/rafflesia/datasets/corpu_release_audit_data.rb', line 19

def object_store_root
  @object_store_root
end

#refObject

Returns the value of attribute ref.



19
20
21
# File 'lib/rafflesia/datasets/corpu_release_audit_data.rb', line 19

def ref
  @ref
end

#release_idObject

Returns the value of attribute release_id.



19
20
21
# File 'lib/rafflesia/datasets/corpu_release_audit_data.rb', line 19

def release_id
  @release_id
end