Class: OvirtSDK4::CpuType

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

Creates a new instance of the OvirtSDK4::CpuType 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):

  • :architecture (Architecture)

    The value of attribute architecture.

  • :level (Integer)

    The value of attribute level.

  • :name (String)

    The value of attribute name.



2689
2690
2691
2692
2693
2694
# File 'lib/ovirtsdk4/types.rb', line 2689

def initialize(opts = {})
  super(opts)
  self.architecture = opts[:architecture]
  self.level = opts[:level]
  self.name = opts[:name]
end

Instance Method Details

#==(other) ⇒ Object

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



2699
2700
2701
2702
2703
2704
# File 'lib/ovirtsdk4/types.rb', line 2699

def ==(other)
  super &&
  @architecture == other.architecture &&
  @level == other.level &&
  @name == other.name
end

#architectureArchitecture

Returns the value of the architecture attribute.

Returns:



2626
2627
2628
# File 'lib/ovirtsdk4/types.rb', line 2626

def architecture
  @architecture
end

#architecture=(value) ⇒ Object

Sets the value of the architecture attribute.

Parameters:



2635
2636
2637
# File 'lib/ovirtsdk4/types.rb', line 2635

def architecture=(value)
  @architecture = value
end

#hashObject

Generates a hash value for this object.



2709
2710
2711
2712
2713
2714
# File 'lib/ovirtsdk4/types.rb', line 2709

def hash
  super +
  @architecture.hash +
  @level.hash +
  @name.hash
end

#levelInteger

Returns the value of the level attribute.

Returns:

  • (Integer)


2644
2645
2646
# File 'lib/ovirtsdk4/types.rb', line 2644

def level
  @level
end

#level=(value) ⇒ Object

Sets the value of the level attribute.

Parameters:

  • value (Integer)


2653
2654
2655
# File 'lib/ovirtsdk4/types.rb', line 2653

def level=(value)
  @level = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


2662
2663
2664
# File 'lib/ovirtsdk4/types.rb', line 2662

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


2671
2672
2673
# File 'lib/ovirtsdk4/types.rb', line 2671

def name=(value)
  @name = value
end