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.

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):

  • :cpu_set (String)

    The value of attribute cpu_set.

  • :vcpu (Integer)

    The value of attribute vcpu.


23950
23951
23952
23953
23954
# File 'lib/ovirtsdk4/types.rb', line 23950

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.


23959
23960
23961
23962
23963
# File 'lib/ovirtsdk4/types.rb', line 23959

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

#cpu_setString

Returns the value of the cpu_set attribute.

Returns:

  • (String)

23907
23908
23909
# File 'lib/ovirtsdk4/types.rb', line 23907

def cpu_set
  @cpu_set
end

#cpu_set=(value) ⇒ Object

Sets the value of the cpu_set attribute.

Parameters:

  • value (String)

23916
23917
23918
# File 'lib/ovirtsdk4/types.rb', line 23916

def cpu_set=(value)
  @cpu_set = value
end

#hashObject

Generates a hash value for this object.


23968
23969
23970
23971
23972
# File 'lib/ovirtsdk4/types.rb', line 23968

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

#vcpuInteger

Returns the value of the vcpu attribute.

Returns:

  • (Integer)

23925
23926
23927
# File 'lib/ovirtsdk4/types.rb', line 23925

def vcpu
  @vcpu
end

#vcpu=(value) ⇒ Object

Sets the value of the vcpu attribute.

Parameters:

  • value (Integer)

23934
23935
23936
# File 'lib/ovirtsdk4/types.rb', line 23934

def vcpu=(value)
  @vcpu = value
end