Class: OvirtSDK4::VcpuPin

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 = {}) ⇒ VcpuPin

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

Options Hash (opts):

  • :cpu_set (String)

    The value of attribute cpu_set.

  • :vcpu (Integer)

    The value of attribute vcpu.



25016
25017
25018
25019
25020
# File 'lib/ovirtsdk4/types.rb', line 25016

def initialize(opts = {})
  super(opts)
  self.cpu_set = opts[:cpu_set]
  self.vcpu = opts[:vcpu]
end

Instance Method Details

#==(other) ⇒ Object

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



25025
25026
25027
25028
25029
# File 'lib/ovirtsdk4/types.rb', line 25025

def ==(other)
  super &&
  @cpu_set == other.cpu_set &&
  @vcpu == other.vcpu
end

#cpu_setString

Returns the value of the cpu_set attribute.



24973
24974
24975
# File 'lib/ovirtsdk4/types.rb', line 24973

def cpu_set
  @cpu_set
end

#cpu_set=(value) ⇒ Object

Sets the value of the cpu_set attribute.



24982
24983
24984
# File 'lib/ovirtsdk4/types.rb', line 24982

def cpu_set=(value)
  @cpu_set = value
end

#hashObject

Generates a hash value for this object.



25034
25035
25036
25037
25038
# File 'lib/ovirtsdk4/types.rb', line 25034

def hash
  super +
  @cpu_set.hash +
  @vcpu.hash
end

#vcpuInteger

Returns the value of the vcpu attribute.



24991
24992
24993
# File 'lib/ovirtsdk4/types.rb', line 24991

def vcpu
  @vcpu
end

#vcpu=(value) ⇒ Object

Sets the value of the vcpu attribute.



25000
25001
25002
# File 'lib/ovirtsdk4/types.rb', line 25000

def vcpu=(value)
  @vcpu = value
end