Class: Rafflesia::ArchiveArtifactRecord

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/artifacts/archive_artifact_record.rb

Constant Summary collapse

HASH_ATTRS =
{
  archive_path: :archive_path,
  artifact_kind: :artifact_kind,
  association_id: :association_id,
  extension: :extension,
  group_key: :group_key,
  map_id: :map_id,
  message: :message,
  name: :name,
  object: :object,
  sha256: :sha_256,
  size_bytes: :size_bytes,
  status: :status,
  structure_id: :structure_id
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ ArchiveArtifactRecord

Returns a new instance of ArchiveArtifactRecord.



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/rafflesia/artifacts/archive_artifact_record.rb', line 39

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @archive_path = hash[:archive_path]
  @artifact_kind = hash[:artifact_kind]
  @association_id = hash[:association_id]
  @extension = hash[:extension]
  @group_key = hash[:group_key]
  @map_id = hash[:map_id]
  @message = hash[:message]
  @name = hash[:name]
  @object = hash[:object] ? Rafflesia::ObjectRef.new(hash[:object]) : nil
  @sha_256 = hash[:sha256]
  @size_bytes = hash[:size_bytes]
  @status = hash[:status]
  @structure_id = hash[:structure_id]
end

Instance Attribute Details

#archive_pathObject

Returns the value of attribute archive_path.



24
25
26
# File 'lib/rafflesia/artifacts/archive_artifact_record.rb', line 24

def archive_path
  @archive_path
end

#artifact_kindObject

Returns the value of attribute artifact_kind.



24
25
26
# File 'lib/rafflesia/artifacts/archive_artifact_record.rb', line 24

def artifact_kind
  @artifact_kind
end

#association_idObject

Returns the value of attribute association_id.



24
25
26
# File 'lib/rafflesia/artifacts/archive_artifact_record.rb', line 24

def association_id
  @association_id
end

#extensionObject

Returns the value of attribute extension.



24
25
26
# File 'lib/rafflesia/artifacts/archive_artifact_record.rb', line 24

def extension
  @extension
end

#group_keyObject

Returns the value of attribute group_key.



24
25
26
# File 'lib/rafflesia/artifacts/archive_artifact_record.rb', line 24

def group_key
  @group_key
end

#map_idObject

Returns the value of attribute map_id.



24
25
26
# File 'lib/rafflesia/artifacts/archive_artifact_record.rb', line 24

def map_id
  @map_id
end

#messageObject

Returns the value of attribute message.



24
25
26
# File 'lib/rafflesia/artifacts/archive_artifact_record.rb', line 24

def message
  @message
end

#nameObject

Returns the value of attribute name.



24
25
26
# File 'lib/rafflesia/artifacts/archive_artifact_record.rb', line 24

def name
  @name
end

#objectObject

Returns the value of attribute object.



24
25
26
# File 'lib/rafflesia/artifacts/archive_artifact_record.rb', line 24

def object
  @object
end

#sha_256Object

Returns the value of attribute sha_256.



24
25
26
# File 'lib/rafflesia/artifacts/archive_artifact_record.rb', line 24

def sha_256
  @sha_256
end

#size_bytesObject

Returns the value of attribute size_bytes.



24
25
26
# File 'lib/rafflesia/artifacts/archive_artifact_record.rb', line 24

def size_bytes
  @size_bytes
end

#statusObject

Returns the value of attribute status.



24
25
26
# File 'lib/rafflesia/artifacts/archive_artifact_record.rb', line 24

def status
  @status
end

#structure_idObject

Returns the value of attribute structure_id.



24
25
26
# File 'lib/rafflesia/artifacts/archive_artifact_record.rb', line 24

def structure_id
  @structure_id
end