Method: Megam::Backups#from_hash

Defined in:
lib/megam/core/backups.rb

#from_hash(o) ⇒ Object



203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
# File 'lib/megam/core/backups.rb', line 203

def from_hash(o)
    @id       = o[:id] if o.has_key?(:id)
    @account_id       = o[:account_id] if o.has_key?(:account_id)
    @asm_id        = o[:asm_id] if o.has_key?(:asm_id)
    @org_id        = o[:org_id] if o.has_key?(:org_id)
    @tosca_type        = o[:tosca_type] if o.key?(:tosca_type)
    @inputs            = o[:inputs] if o.key?(:inputs)
    @outputs           = o[:outputs] if o.key?(:outputs)
    @name            = o[:name] if o.has_key?(:name)
    @status            = o[:status] if o.has_key?(:status)
    @image_id          = o[:image_id] if o.has_key?(:image_id)
    @created_at        = o[:created_at] if o.has_key?(:created_at)
    @labels            = o[:labels] if o.key?(:labels)
    self
end