Class: Rafflesia::ObjectArtifactManifestContract

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/object_artifacts/object_artifact_manifest_contract.rb

Constant Summary collapse

HASH_ATTRS =
{
  artifact_identity: :artifact_identity,
  collection_identity: :collection_identity,
  deterministic_hash: :deterministic_hash,
  layout_semantics: :layout_semantics,
  manifest_kind: :manifest_kind,
  required_fields: :required_fields,
  schema_version: :schema_version,
  shard_identity: :shard_identity,
  supported_object_store: :supported_object_store
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ ObjectArtifactManifestContract

Returns a new instance of ObjectArtifactManifestContract.



31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/rafflesia/object_artifacts/object_artifact_manifest_contract.rb', line 31

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @artifact_identity = (hash[:artifact_identity] || [])
  @collection_identity = (hash[:collection_identity] || [])
  @deterministic_hash = hash[:deterministic_hash]
  @layout_semantics = hash[:layout_semantics]
  @manifest_kind = hash[:manifest_kind]
  @required_fields = (hash[:required_fields] || [])
  @schema_version = hash[:schema_version]
  @shard_identity = (hash[:shard_identity] || [])
  @supported_object_store = (hash[:supported_object_store] || [])
end

Instance Attribute Details

#artifact_identityObject

Returns the value of attribute artifact_identity.



20
21
22
# File 'lib/rafflesia/object_artifacts/object_artifact_manifest_contract.rb', line 20

def artifact_identity
  @artifact_identity
end

#collection_identityObject

Returns the value of attribute collection_identity.



20
21
22
# File 'lib/rafflesia/object_artifacts/object_artifact_manifest_contract.rb', line 20

def collection_identity
  @collection_identity
end

#deterministic_hashObject

Returns the value of attribute deterministic_hash.



20
21
22
# File 'lib/rafflesia/object_artifacts/object_artifact_manifest_contract.rb', line 20

def deterministic_hash
  @deterministic_hash
end

#layout_semanticsObject

Returns the value of attribute layout_semantics.



20
21
22
# File 'lib/rafflesia/object_artifacts/object_artifact_manifest_contract.rb', line 20

def layout_semantics
  @layout_semantics
end

#manifest_kindObject

Returns the value of attribute manifest_kind.



20
21
22
# File 'lib/rafflesia/object_artifacts/object_artifact_manifest_contract.rb', line 20

def manifest_kind
  @manifest_kind
end

#required_fieldsObject

Returns the value of attribute required_fields.



20
21
22
# File 'lib/rafflesia/object_artifacts/object_artifact_manifest_contract.rb', line 20

def required_fields
  @required_fields
end

#schema_versionObject

Returns the value of attribute schema_version.



20
21
22
# File 'lib/rafflesia/object_artifacts/object_artifact_manifest_contract.rb', line 20

def schema_version
  @schema_version
end

#shard_identityObject

Returns the value of attribute shard_identity.



20
21
22
# File 'lib/rafflesia/object_artifacts/object_artifact_manifest_contract.rb', line 20

def shard_identity
  @shard_identity
end

#supported_object_storeObject

Returns the value of attribute supported_object_store.



20
21
22
# File 'lib/rafflesia/object_artifacts/object_artifact_manifest_contract.rb', line 20

def supported_object_store
  @supported_object_store
end