Class: Rafflesia::DatasetSourceSnapshotFetchData

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

Constant Summary collapse

HASH_ATTRS =
{
  artifact_kind: :artifact_kind,
  consumer_object_field: :consumer_object_field,
  consumer_primitive: :consumer_primitive,
  expected_etag: :expected_etag,
  expected_md5: :expected_md_5,
  expected_sha256: :expected_sha_256,
  expected_size_bytes: :expected_size_bytes,
  fetch_id: :fetch_id,
  http_etag: :http_etag,
  http_last_modified: :http_last_modified,
  object: :object,
  observed_md5: :observed_md_5,
  observed_sha256: :observed_sha_256,
  observed_size_bytes: :observed_size_bytes,
  parser: :parser,
  profile: :profile,
  requested_url: :requested_url,
  resolved_url: :resolved_url,
  source: :source,
  upstream_release: :upstream_release,
  version: :version
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ DatasetSourceSnapshotFetchData

Returns a new instance of DatasetSourceSnapshotFetchData.



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/rafflesia/datasets/dataset_source_snapshot_fetch_data.rb', line 55

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @artifact_kind = hash[:artifact_kind]
  @consumer_object_field = hash[:consumer_object_field]
  @consumer_primitive = hash[:consumer_primitive]
  @expected_etag = hash[:expected_etag]
  @expected_md_5 = hash[:expected_md5]
  @expected_sha_256 = hash[:expected_sha256]
  @expected_size_bytes = hash[:expected_size_bytes]
  @fetch_id = hash[:fetch_id]
  @http_etag = hash[:http_etag]
  @http_last_modified = hash[:http_last_modified]
  @object = hash[:object] ? Rafflesia::ObjectRef.new(hash[:object]) : nil
  @observed_md_5 = hash[:observed_md5]
  @observed_sha_256 = hash[:observed_sha256]
  @observed_size_bytes = hash[:observed_size_bytes]
  @parser = hash[:parser]
  @profile = hash[:profile] ? Rafflesia::DatasetSourceSnapshotArtifactProfile.new(hash[:profile]) : nil
  @requested_url = hash[:requested_url]
  @resolved_url = hash[:resolved_url]
  @source = hash[:source]
  @upstream_release = hash[:upstream_release]
  @version = hash[:version]
end

Instance Attribute Details

#artifact_kindObject

Returns the value of attribute artifact_kind.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_fetch_data.rb', line 32

def artifact_kind
  @artifact_kind
end

#consumer_object_fieldObject

Returns the value of attribute consumer_object_field.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_fetch_data.rb', line 32

def consumer_object_field
  @consumer_object_field
end

#consumer_primitiveObject

Returns the value of attribute consumer_primitive.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_fetch_data.rb', line 32

def consumer_primitive
  @consumer_primitive
end

#expected_etagObject

Returns the value of attribute expected_etag.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_fetch_data.rb', line 32

def expected_etag
  @expected_etag
end

#expected_md_5Object

Returns the value of attribute expected_md_5.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_fetch_data.rb', line 32

def expected_md_5
  @expected_md_5
end

#expected_sha_256Object

Returns the value of attribute expected_sha_256.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_fetch_data.rb', line 32

def expected_sha_256
  @expected_sha_256
end

#expected_size_bytesObject

Returns the value of attribute expected_size_bytes.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_fetch_data.rb', line 32

def expected_size_bytes
  @expected_size_bytes
end

#fetch_idObject

Returns the value of attribute fetch_id.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_fetch_data.rb', line 32

def fetch_id
  @fetch_id
end

#http_etagObject

Returns the value of attribute http_etag.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_fetch_data.rb', line 32

def http_etag
  @http_etag
end

#http_last_modifiedObject

Returns the value of attribute http_last_modified.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_fetch_data.rb', line 32

def http_last_modified
  @http_last_modified
end

#objectObject

Returns the value of attribute object.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_fetch_data.rb', line 32

def object
  @object
end

#observed_md_5Object

Returns the value of attribute observed_md_5.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_fetch_data.rb', line 32

def observed_md_5
  @observed_md_5
end

#observed_sha_256Object

Returns the value of attribute observed_sha_256.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_fetch_data.rb', line 32

def observed_sha_256
  @observed_sha_256
end

#observed_size_bytesObject

Returns the value of attribute observed_size_bytes.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_fetch_data.rb', line 32

def observed_size_bytes
  @observed_size_bytes
end

#parserObject

Returns the value of attribute parser.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_fetch_data.rb', line 32

def parser
  @parser
end

#profileObject

Returns the value of attribute profile.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_fetch_data.rb', line 32

def profile
  @profile
end

#requested_urlObject

Returns the value of attribute requested_url.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_fetch_data.rb', line 32

def requested_url
  @requested_url
end

#resolved_urlObject

Returns the value of attribute resolved_url.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_fetch_data.rb', line 32

def resolved_url
  @resolved_url
end

#sourceObject

Returns the value of attribute source.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_fetch_data.rb', line 32

def source
  @source
end

#upstream_releaseObject

Returns the value of attribute upstream_release.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_fetch_data.rb', line 32

def upstream_release
  @upstream_release
end

#versionObject

Returns the value of attribute version.



32
33
34
# File 'lib/rafflesia/datasets/dataset_source_snapshot_fetch_data.rb', line 32

def version
  @version
end