Class: OvirtSDK4::NumaNodePin

Inherits:
Struct
  • Object
show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Instance Method Summary collapse

Methods included from Type

#dig, #href, #href=

Constructor Details

#initialize(opts = {}) ⇒ NumaNodePin

Creates a new instance of the OvirtSDK4::NumaNodePin class.

Parameters:

  • opts (Hash) (defaults to: {})

    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.

Options Hash (opts):

  • :host_numa_node (NumaNode, Hash)

    The value of attribute host_numa_node.

  • :index (Integer)

    The value of attribute index.

  • :pinned (Boolean)

    The value of attribute pinned.



11642
11643
11644
11645
11646
11647
# File 'lib/ovirtsdk4/types.rb', line 11642

def initialize(opts = {})
  super(opts)
  self.host_numa_node = opts[:host_numa_node]
  self.index = opts[:index]
  self.pinned = opts[:pinned]
end

Instance Method Details

#==(other) ⇒ Object

Returns true if self and other have the same attributes and values.



11652
11653
11654
11655
11656
11657
# File 'lib/ovirtsdk4/types.rb', line 11652

def ==(other)
  super &&
  @host_numa_node == other.host_numa_node &&
  @index == other.index &&
  @pinned == other.pinned
end

#hashObject

Generates a hash value for this object.



11662
11663
11664
11665
11666
11667
# File 'lib/ovirtsdk4/types.rb', line 11662

def hash
  super +
  @host_numa_node.hash +
  @index.hash +
  @pinned.hash
end

#host_numa_nodeNumaNode

Returns the value of the host_numa_node attribute.

Returns:



11572
11573
11574
# File 'lib/ovirtsdk4/types.rb', line 11572

def host_numa_node
  @host_numa_node
end

#host_numa_node=(value) ⇒ Object

Sets the value of the host_numa_node attribute.

The value parameter can be an instance of OvirtSDK4::NumaNode 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.

Parameters:



11585
11586
11587
11588
11589
11590
# File 'lib/ovirtsdk4/types.rb', line 11585

def host_numa_node=(value)
  if value.is_a?(Hash)
    value = NumaNode.new(value)
  end
  @host_numa_node = value
end

#indexInteger

Returns the value of the index attribute.

Returns:

  • (Integer)


11597
11598
11599
# File 'lib/ovirtsdk4/types.rb', line 11597

def index
  @index
end

#index=(value) ⇒ Object

Sets the value of the index attribute.

Parameters:

  • value (Integer)


11606
11607
11608
# File 'lib/ovirtsdk4/types.rb', line 11606

def index=(value)
  @index = value
end

#pinnedBoolean

Returns the value of the pinned attribute.

Returns:

  • (Boolean)


11615
11616
11617
# File 'lib/ovirtsdk4/types.rb', line 11615

def pinned
  @pinned
end

#pinned=(value) ⇒ Object

Sets the value of the pinned attribute.

Parameters:

  • value (Boolean)


11624
11625
11626
# File 'lib/ovirtsdk4/types.rb', line 11624

def pinned=(value)
  @pinned = value
end