Creates a new instance of the {MemoryPolicy} class.
@param opts [Hash] A hash containing the attributes of the object. The keys of the hash
should be symbols corresponding to the names of the attributes. The values of the hash should be the values of the attributes.
@option opts [Boolean] :ballooning The value of attribute `ballooning`.
@option opts [Integer] :guaranteed The value of attribute `guaranteed`.
@option opts [MemoryOverCommit, Hash] :over_commit The value of attribute `over_commit`.
@option opts [TransparentHugePages, Hash] :transparent_huge_pages The value of attribute `transparent_huge_pages`.
# File lib/ovirtsdk4/types.rb, line 6493 def initialize(opts = {}) super(opts) self.ballooning = opts[:ballooning] self.guaranteed = opts[:guaranteed] self.over_commit = opts[:over_commit] self.transparent_huge_pages = opts[:transparent_huge_pages] end
Returns the value of the `ballooning` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 6396 def ballooning return @ballooning end
Sets the value of the `ballooning` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 6405 def ballooning=(value) @ballooning = value end
Returns the value of the `guaranteed` attribute.
@return [Integer]
# File lib/ovirtsdk4/types.rb, line 6414 def guaranteed return @guaranteed end
Sets the value of the `guaranteed` attribute.
@param value [Integer]
# File lib/ovirtsdk4/types.rb, line 6423 def guaranteed=(value) @guaranteed = value end
Returns the value of the `over_commit` attribute.
@return [MemoryOverCommit]
# File lib/ovirtsdk4/types.rb, line 6432 def over_commit return @over_commit end
Sets the value of the `over_commit` attribute.
@param value [MemoryOverCommit, Hash]
The `value` parameter can be an instance of {OvirtSDK4::MemoryOverCommit} or a hash. If it is a hash then a new instance will be created passing the hash as the `opts` parameter to the constructor.
# File lib/ovirtsdk4/types.rb, line 6445 def over_commit=(value) if value.is_a?(Hash) value = MemoryOverCommit.new(value) end @over_commit = value end
Returns the value of the `transparent_huge_pages` attribute.
@return [TransparentHugePages]
# File lib/ovirtsdk4/types.rb, line 6457 def transparent_huge_pages return @transparent_huge_pages end
Sets the value of the `transparent_huge_pages` attribute.
@param value [TransparentHugePages, Hash]
The `value` parameter can be an instance of {OvirtSDK4::TransparentHugePages} or a hash. If it is a hash then a new instance will be created passing the hash as the `opts` parameter to the constructor.
# File lib/ovirtsdk4/types.rb, line 6470 def transparent_huge_pages=(value) if value.is_a?(Hash) value = TransparentHugePages.new(value) end @transparent_huge_pages = value end