require 'App42Response.rb' module App42 module AppTab # # An enum that contains 4 types of the BandwidthUnit either KB or MB or GB or # TB. # # class BandwidthUnit < App42Response unless (const_defined?(:KB)) KB = "KB" end unless (const_defined?(:MB)) MB = "MB" end unless (const_defined?(:GB)) GB = "GB" end unless (const_defined?(:TB)) TB = "TB" end # # Sets the value of the BandwidthUnit. KB or MB or GB or TB. # # @param string # - the string of BandwidthUnit either KB or MB or GB or TB. # # def enum(string) return BandwidthUnit.const_get(string) end # # Returns the value of the BandwidthUnit. KB or MB or GB or TB. # # @return the value of BandwidthUnit. # # def isAvailable(string) if(string == "KB") return "KB" elsif(string == "MB") return "MB"; elsif(string == "GB") return "GB"; elsif(string == "TB") return "TB"; else return nil end end end end end