Class: Rafflesia::PartnerArtifact

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/registry/partner_artifact.rb

Constant Summary collapse

HASH_ATTRS =
{
  artifact_id: :artifact_id,
  binding_id: :binding_id,
  database: :database,
  filename: :filename,
  format: :format,
  id: :id,
  object: :object,
  object_ref: :object_ref,
  observed_columns: :observed_columns,
  organization_id: :organization_id,
  published_at: :published_at,
  relation: :relation,
  relation_digest: :relation_digest,
  release: :release,
  release_digest: :release_digest,
  resource_group_id: :resource_group_id,
  row_count: :row_count,
  schema_version: :schema_version,
  sha256: :sha_256,
  size_bytes: :size_bytes
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ PartnerArtifact

Returns a new instance of PartnerArtifact.



53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/rafflesia/registry/partner_artifact.rb', line 53

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @artifact_id = hash[:artifact_id]
  @binding_id = hash[:binding_id]
  @database = hash[:database]
  @filename = hash[:filename]
  @format = hash[:format]
  @id = hash[:id]
  @object = hash[:object]
  @object_ref = hash[:object_ref] ? Rafflesia::ObjectRef.new(hash[:object_ref]) : nil
  @observed_columns = (hash[:observed_columns] || [])
  @organization_id = hash[:organization_id]
  @published_at = hash[:published_at]
  @relation = hash[:relation]
  @relation_digest = hash[:relation_digest]
  @release = hash[:release]
  @release_digest = hash[:release_digest]
  @resource_group_id = hash[:resource_group_id]
  @row_count = hash[:row_count]
  @schema_version = hash[:schema_version]
  @sha_256 = hash[:sha256]
  @size_bytes = hash[:size_bytes]
end

Instance Attribute Details

#artifact_idObject

Returns the value of attribute artifact_id.



31
32
33
# File 'lib/rafflesia/registry/partner_artifact.rb', line 31

def artifact_id
  @artifact_id
end

#binding_idObject

Returns the value of attribute binding_id.



31
32
33
# File 'lib/rafflesia/registry/partner_artifact.rb', line 31

def binding_id
  @binding_id
end

#databaseObject

Returns the value of attribute database.



31
32
33
# File 'lib/rafflesia/registry/partner_artifact.rb', line 31

def database
  @database
end

#filenameObject

Returns the value of attribute filename.



31
32
33
# File 'lib/rafflesia/registry/partner_artifact.rb', line 31

def filename
  @filename
end

#formatObject

Returns the value of attribute format.



31
32
33
# File 'lib/rafflesia/registry/partner_artifact.rb', line 31

def format
  @format
end

#idObject

Returns the value of attribute id.



31
32
33
# File 'lib/rafflesia/registry/partner_artifact.rb', line 31

def id
  @id
end

#objectObject

Returns the value of attribute object.



31
32
33
# File 'lib/rafflesia/registry/partner_artifact.rb', line 31

def object
  @object
end

#object_refObject

Returns the value of attribute object_ref.



31
32
33
# File 'lib/rafflesia/registry/partner_artifact.rb', line 31

def object_ref
  @object_ref
end

#observed_columnsObject

Returns the value of attribute observed_columns.



31
32
33
# File 'lib/rafflesia/registry/partner_artifact.rb', line 31

def observed_columns
  @observed_columns
end

#organization_idObject

Returns the value of attribute organization_id.



31
32
33
# File 'lib/rafflesia/registry/partner_artifact.rb', line 31

def organization_id
  @organization_id
end

#published_atObject

Returns the value of attribute published_at.



31
32
33
# File 'lib/rafflesia/registry/partner_artifact.rb', line 31

def published_at
  @published_at
end

#relationObject

Returns the value of attribute relation.



31
32
33
# File 'lib/rafflesia/registry/partner_artifact.rb', line 31

def relation
  @relation
end

#relation_digestObject

Returns the value of attribute relation_digest.



31
32
33
# File 'lib/rafflesia/registry/partner_artifact.rb', line 31

def relation_digest
  @relation_digest
end

#releaseObject

Returns the value of attribute release.



31
32
33
# File 'lib/rafflesia/registry/partner_artifact.rb', line 31

def release
  @release
end

#release_digestObject

Returns the value of attribute release_digest.



31
32
33
# File 'lib/rafflesia/registry/partner_artifact.rb', line 31

def release_digest
  @release_digest
end

#resource_group_idObject

Returns the value of attribute resource_group_id.



31
32
33
# File 'lib/rafflesia/registry/partner_artifact.rb', line 31

def resource_group_id
  @resource_group_id
end

#row_countObject

Returns the value of attribute row_count.



31
32
33
# File 'lib/rafflesia/registry/partner_artifact.rb', line 31

def row_count
  @row_count
end

#schema_versionObject

Returns the value of attribute schema_version.



31
32
33
# File 'lib/rafflesia/registry/partner_artifact.rb', line 31

def schema_version
  @schema_version
end

#sha_256Object

Returns the value of attribute sha_256.



31
32
33
# File 'lib/rafflesia/registry/partner_artifact.rb', line 31

def sha_256
  @sha_256
end

#size_bytesObject

Returns the value of attribute size_bytes.



31
32
33
# File 'lib/rafflesia/registry/partner_artifact.rb', line 31

def size_bytes
  @size_bytes
end