class Apcera::PackageInfo
Attributes
source[RW]
state[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_info.rb, line 6 def self.attribute_map { # The source of the package, whether it was provided by the user or calculated by the Package Manager. :'source' => :'source', # Represents the availability of the package. :'state' => :'state', # UUID of the package. :'uuid' => :'uuid' } end
new(attributes = {})
click to toggle source
# File lib/apcera/models/package_info.rb, line 31 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[:'source'] self.source = attributes[:'source'] end if attributes[:'state'] self.state = attributes[:'state'] end if attributes[:'uuid'] self.uuid = attributes[:'uuid'] end end
swagger_types()
click to toggle source
attribute type
# File lib/apcera/models/package_info.rb, line 22 def self.swagger_types { :'source' => :'String', :'state' => :'String', :'uuid' => :'String' } end
Public Instance Methods
source=(source)
click to toggle source
# File lib/apcera/models/package_info.rb, line 52 def source=(source) allowed_values = ["user", "system"] if source && !allowed_values.include?(source) fail "invalid value for 'source', must be one of #{allowed_values}" end @source = source end
state=(state)
click to toggle source
# File lib/apcera/models/package_info.rb, line 60 def state=(state) allowed_values = ["unknown", "uploading", "staging", "failed", "ready", "deleted"] if state && !allowed_values.include?(state) fail "invalid value for 'state', must be one of #{allowed_values}" end @state = state end