Class: Rafflesia::ArchiveMemberFindResult

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

Constant Summary collapse

HASH_ATTRS =
{
  archive_object_id: :archive_object_id,
  extension: :extension,
  inferred_kind: :inferred_kind,
  inventory_manifest_id: :inventory_manifest_id,
  match_type: :match_type,
  member: :member,
  member_path: :member_path,
  message: :message,
  name: :name,
  object: :object,
  query: :query,
  query_type: :query_type,
  sha256: :sha_256,
  size_bytes: :size_bytes,
  status: :status
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ ArchiveMemberFindResult

Returns a new instance of ArchiveMemberFindResult.



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/rafflesia/artifacts/archive_member_find_result.rb', line 43

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @archive_object_id = hash[:archive_object_id]
  @extension = hash[:extension]
  @inferred_kind = hash[:inferred_kind]
  @inventory_manifest_id = hash[:inventory_manifest_id]
  @match_type = hash[:match_type]
  @member = hash[:member] ? Rafflesia::ArchiveMemberRecord.new(hash[:member]) : nil
  @member_path = hash[:member_path]
  @message = hash[:message]
  @name = hash[:name]
  @object = hash[:object] ? Rafflesia::ObjectRef.new(hash[:object]) : nil
  @query = hash[:query]
  @query_type = hash[:query_type]
  @sha_256 = hash[:sha256]
  @size_bytes = hash[:size_bytes]
  @status = hash[:status]
end

Instance Attribute Details

#archive_object_idObject

Returns the value of attribute archive_object_id.



26
27
28
# File 'lib/rafflesia/artifacts/archive_member_find_result.rb', line 26

def archive_object_id
  @archive_object_id
end

#extensionObject

Returns the value of attribute extension.



26
27
28
# File 'lib/rafflesia/artifacts/archive_member_find_result.rb', line 26

def extension
  @extension
end

#inferred_kindObject

Returns the value of attribute inferred_kind.



26
27
28
# File 'lib/rafflesia/artifacts/archive_member_find_result.rb', line 26

def inferred_kind
  @inferred_kind
end

#inventory_manifest_idObject

Returns the value of attribute inventory_manifest_id.



26
27
28
# File 'lib/rafflesia/artifacts/archive_member_find_result.rb', line 26

def inventory_manifest_id
  @inventory_manifest_id
end

#match_typeObject

Returns the value of attribute match_type.



26
27
28
# File 'lib/rafflesia/artifacts/archive_member_find_result.rb', line 26

def match_type
  @match_type
end

#memberObject

Returns the value of attribute member.



26
27
28
# File 'lib/rafflesia/artifacts/archive_member_find_result.rb', line 26

def member
  @member
end

#member_pathObject

Returns the value of attribute member_path.



26
27
28
# File 'lib/rafflesia/artifacts/archive_member_find_result.rb', line 26

def member_path
  @member_path
end

#messageObject

Returns the value of attribute message.



26
27
28
# File 'lib/rafflesia/artifacts/archive_member_find_result.rb', line 26

def message
  @message
end

#nameObject

Returns the value of attribute name.



26
27
28
# File 'lib/rafflesia/artifacts/archive_member_find_result.rb', line 26

def name
  @name
end

#objectObject

Returns the value of attribute object.



26
27
28
# File 'lib/rafflesia/artifacts/archive_member_find_result.rb', line 26

def object
  @object
end

#queryObject

Returns the value of attribute query.



26
27
28
# File 'lib/rafflesia/artifacts/archive_member_find_result.rb', line 26

def query
  @query
end

#query_typeObject

Returns the value of attribute query_type.



26
27
28
# File 'lib/rafflesia/artifacts/archive_member_find_result.rb', line 26

def query_type
  @query_type
end

#sha_256Object

Returns the value of attribute sha_256.



26
27
28
# File 'lib/rafflesia/artifacts/archive_member_find_result.rb', line 26

def sha_256
  @sha_256
end

#size_bytesObject

Returns the value of attribute size_bytes.



26
27
28
# File 'lib/rafflesia/artifacts/archive_member_find_result.rb', line 26

def size_bytes
  @size_bytes
end

#statusObject

Returns the value of attribute status.



26
27
28
# File 'lib/rafflesia/artifacts/archive_member_find_result.rb', line 26

def status
  @status
end