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.



23768
23769
23770
23771
23772
# File 'lib/ovirtsdk4/types.rb', line 23768

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.



23777
23778
23779
23780
23781
# File 'lib/ovirtsdk4/types.rb', line 23777

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

#cpu_setString

Returns the value of the cpu_set attribute.

Returns:

  • (String)


23725
23726
23727
# File 'lib/ovirtsdk4/types.rb', line 23725

def cpu_set
  @cpu_set
end

#cpu_set=(value) ⇒ Object

Sets the value of the cpu_set attribute.

Parameters:

  • value (String)


23734
23735
23736
# File 'lib/ovirtsdk4/types.rb', line 23734

def cpu_set=(value)
  @cpu_set = value
end

#hashObject

Generates a hash value for this object.



23786
23787
23788
23789
23790
# File 'lib/ovirtsdk4/types.rb', line 23786

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

#vcpuInteger

Returns the value of the vcpu attribute.

Returns:

  • (Integer)


23743
23744
23745
# File 'lib/ovirtsdk4/types.rb', line 23743

def vcpu
  @vcpu
end

#vcpu=(value) ⇒ Object

Sets the value of the vcpu attribute.

Parameters:

  • value (Integer)


23752
23753
23754
# File 'lib/ovirtsdk4/types.rb', line 23752

def vcpu=(value)
  @vcpu = value
end