Class: Rafflesia::DatasetCatalogRecord

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

Constant Summary collapse

HASH_ATTRS =
{
  created_at: :created_at,
  dataset_id: :dataset_id,
  description: :description,
  kind: :kind,
  latest_snapshot_id: :latest_snapshot_id,
  latest_version: :latest_version,
  metadata: :metadata,
  name: :name,
  snapshot_count: :snapshot_count
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ DatasetCatalogRecord

Returns a new instance of DatasetCatalogRecord.



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

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @created_at = hash[:created_at]
  @dataset_id = hash[:dataset_id]
  @description = hash[:description]
  @kind = hash[:kind]
  @latest_snapshot_id = hash[:latest_snapshot_id]
  @latest_version = hash[:latest_version]
  @metadata = hash[:metadata] || {}
  @name = hash[:name]
  @snapshot_count = hash[:snapshot_count]
end

Instance Attribute Details

#created_atObject

Returns the value of attribute created_at.



20
21
22
# File 'lib/rafflesia/datasets/dataset_catalog_record.rb', line 20

def created_at
  @created_at
end

#dataset_idObject

Returns the value of attribute dataset_id.



20
21
22
# File 'lib/rafflesia/datasets/dataset_catalog_record.rb', line 20

def dataset_id
  @dataset_id
end

#descriptionObject

Returns the value of attribute description.



20
21
22
# File 'lib/rafflesia/datasets/dataset_catalog_record.rb', line 20

def description
  @description
end

#kindObject

Returns the value of attribute kind.



20
21
22
# File 'lib/rafflesia/datasets/dataset_catalog_record.rb', line 20

def kind
  @kind
end

#latest_snapshot_idObject

Returns the value of attribute latest_snapshot_id.



20
21
22
# File 'lib/rafflesia/datasets/dataset_catalog_record.rb', line 20

def latest_snapshot_id
  @latest_snapshot_id
end

#latest_versionObject

Returns the value of attribute latest_version.



20
21
22
# File 'lib/rafflesia/datasets/dataset_catalog_record.rb', line 20

def latest_version
  @latest_version
end

#metadataObject

Returns the value of attribute metadata.



20
21
22
# File 'lib/rafflesia/datasets/dataset_catalog_record.rb', line 20

def 
  @metadata
end

#nameObject

Returns the value of attribute name.



20
21
22
# File 'lib/rafflesia/datasets/dataset_catalog_record.rb', line 20

def name
  @name
end

#snapshot_countObject

Returns the value of attribute snapshot_count.



20
21
22
# File 'lib/rafflesia/datasets/dataset_catalog_record.rb', line 20

def snapshot_count
  @snapshot_count
end