class Apcera::PackageResource

Attributes

digest[RW]
length[RW]
sha1[RW]
uuid[RW]

Public Class Methods

attribute_map() click to toggle source

attribute mapping from ruby-style variable name to JSON key

# File lib/apcera/models/package_resource.rb, line 6
def self.attribute_map
  {
    
    # A hash of the binary resource prefixed by its algorithm (e.g. 'sha1:abcd...').
    :'digest' => :'digest',
    
    # The length of the binary resource in bytes.
    :'length' => :'length',
    
    # A hash of the binary resource.
    :'sha1' => :'sha1',
    
    # The package resource's unique identifier.
    :'uuid' => :'uuid'
    
  }
end
new(attributes = {}) click to toggle source
# File lib/apcera/models/package_resource.rb, line 35
def initialize(attributes = {})
  return if !attributes.is_a?(Hash) || attributes.empty?

  # convert string to symbol for hash key
  attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}

  
  if attributes[:'digest']
    self.digest = attributes[:'digest']
  end
  
  if attributes[:'length']
    self.length = attributes[:'length']
  end
  
  if attributes[:'sha1']
    self.sha1 = attributes[:'sha1']
  end
  
  if attributes[:'uuid']
    self.uuid = attributes[:'uuid']
  end
  
end
swagger_types() click to toggle source

attribute type

# File lib/apcera/models/package_resource.rb, line 25
def self.swagger_types
  {
    :'digest' => :'String',
    :'length' => :'Integer',
    :'sha1' => :'String',
    :'uuid' => :'String'
    
  }
end