class OvirtSDK4::MemoryPolicy

Public Class Methods

new(opts = {}) click to toggle source

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`.

Calls superclass method OvirtSDK4::Struct.new
# 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

Public Instance Methods

ballooning() click to toggle source

Returns the value of the `ballooning` attribute.

@return [Boolean]

# File lib/ovirtsdk4/types.rb, line 6396
def ballooning
  return @ballooning
end
ballooning=(value) click to toggle source

Sets the value of the `ballooning` attribute.

@param value [Boolean]

# File lib/ovirtsdk4/types.rb, line 6405
def ballooning=(value)
  @ballooning = value
end
guaranteed() click to toggle source

Returns the value of the `guaranteed` attribute.

@return [Integer]

# File lib/ovirtsdk4/types.rb, line 6414
def guaranteed
  return @guaranteed
end
guaranteed=(value) click to toggle source

Sets the value of the `guaranteed` attribute.

@param value [Integer]

# File lib/ovirtsdk4/types.rb, line 6423
def guaranteed=(value)
  @guaranteed = value
end
over_commit() click to toggle source

Returns the value of the `over_commit` attribute.

@return [MemoryOverCommit]

# File lib/ovirtsdk4/types.rb, line 6432
def over_commit
  return @over_commit
end
over_commit=(value) click to toggle source

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
transparent_huge_pages() click to toggle source

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
transparent_huge_pages=(value) click to toggle source

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