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.



24273
24274
24275
24276
24277
# File 'lib/ovirtsdk4/types.rb', line 24273

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.



24282
24283
24284
24285
24286
# File 'lib/ovirtsdk4/types.rb', line 24282

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

#cpu_setString

Returns the value of the cpu_set attribute.

Returns:

  • (String)


24230
24231
24232
# File 'lib/ovirtsdk4/types.rb', line 24230

def cpu_set
  @cpu_set
end

#cpu_set=(value) ⇒ Object

Sets the value of the cpu_set attribute.

Parameters:

  • value (String)


24239
24240
24241
# File 'lib/ovirtsdk4/types.rb', line 24239

def cpu_set=(value)
  @cpu_set = value
end

#hashObject

Generates a hash value for this object.



24291
24292
24293
24294
24295
# File 'lib/ovirtsdk4/types.rb', line 24291

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

#vcpuInteger

Returns the value of the vcpu attribute.

Returns:

  • (Integer)


24248
24249
24250
# File 'lib/ovirtsdk4/types.rb', line 24248

def vcpu
  @vcpu
end

#vcpu=(value) ⇒ Object

Sets the value of the vcpu attribute.

Parameters:

  • value (Integer)


24257
24258
24259
# File 'lib/ovirtsdk4/types.rb', line 24257

def vcpu=(value)
  @vcpu = value
end