Class: Retab::MaterializedDocument

Inherits:
Types::BaseModel show all
Defined in:
lib/retab/workflow_test_run_results/materialized_document.rb

Constant Summary collapse

HASH_ATTRS =
{
  original_id: :original_id,
  filename: :filename,
  mime_type: :mime_type,
  gcs_uri: :gcs_uri,
  size_bytes: :size_bytes,
  content_fingerprint: :content_fingerprint
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

#inspect, normalize, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ MaterializedDocument

Returns a new instance of MaterializedDocument.



25
26
27
28
29
30
31
32
33
# File 'lib/retab/workflow_test_run_results/materialized_document.rb', line 25

def initialize(json)
  hash = self.class.normalize(json)
  @original_id = hash[:original_id]
  @filename = hash[:filename]
  @mime_type = hash[:mime_type]
  @gcs_uri = hash[:gcs_uri]
  @size_bytes = hash[:size_bytes]
  @content_fingerprint = hash[:content_fingerprint]
end

Instance Attribute Details

#content_fingerprintObject

Returns the value of attribute content_fingerprint.



17
18
19
# File 'lib/retab/workflow_test_run_results/materialized_document.rb', line 17

def content_fingerprint
  @content_fingerprint
end

#filenameObject

Returns the value of attribute filename.



17
18
19
# File 'lib/retab/workflow_test_run_results/materialized_document.rb', line 17

def filename
  @filename
end

#gcs_uriObject

Returns the value of attribute gcs_uri.



17
18
19
# File 'lib/retab/workflow_test_run_results/materialized_document.rb', line 17

def gcs_uri
  @gcs_uri
end

#mime_typeObject

Returns the value of attribute mime_type.



17
18
19
# File 'lib/retab/workflow_test_run_results/materialized_document.rb', line 17

def mime_type
  @mime_type
end

#original_idObject

Returns the value of attribute original_id.



17
18
19
# File 'lib/retab/workflow_test_run_results/materialized_document.rb', line 17

def original_id
  @original_id
end

#size_bytesObject

Returns the value of attribute size_bytes.



17
18
19
# File 'lib/retab/workflow_test_run_results/materialized_document.rb', line 17

def size_bytes
  @size_bytes
end