class Apcera::Resource
Attributes
cpu[RW]
disk[RW]
memory[RW]
netmax[RW]
network[RW]
Public Class Methods
attribute_map()
click to toggle source
attribute mapping from ruby-style variable name to JSON key
# File lib/apcera/models/resource.rb, line 6 def self.attribute_map { # Milliseconds of CPU time per second of physical time allocated to the job. May be greater than 1000ms/second in cases where time is across multiple cores. :'cpu' => :'cpu', # Amount of disk space allocated to the job, in MB. :'disk' => :'disk', # Memory allocated to job, in MB. :'memory' => :'memory', # Maximum amount of network throughput (ceiling) allowed, in Mbps. :'netmax' => :'netmax', # Amount of network throughput (floor) allocated to the job, in Mbps. :'network' => :'network' } end
new(attributes = {})
click to toggle source
# File lib/apcera/models/resource.rb, line 39 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[:'cpu'] self.cpu = attributes[:'cpu'] end if attributes[:'disk'] self.disk = attributes[:'disk'] end if attributes[:'memory'] self.memory = attributes[:'memory'] end if attributes[:'netmax'] self.netmax = attributes[:'netmax'] end if attributes[:'network'] self.network = attributes[:'network'] end end
swagger_types()
click to toggle source
attribute type
# File lib/apcera/models/resource.rb, line 28 def self.swagger_types { :'cpu' => :'Integer', :'disk' => :'Integer', :'memory' => :'Integer', :'netmax' => :'Integer', :'network' => :'Integer' } end