Class: OvirtSDK4::Weight

Inherits:
Identified show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Instance Method Summary (collapse)

Methods included from Type

#href, #href=

Constructor Details

- (Weight) initialize(opts = {})

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

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :factor (Integer)

    The value of attribute factor.

  • :id (String)

    The value of attribute id.

  • :name (String)

    The value of attribute name.

  • :scheduling_policy (SchedulingPolicy, Hash)

    The value of attribute scheduling_policy.

  • :scheduling_policy_unit (SchedulingPolicyUnit, Hash)

    The value of attribute scheduling_policy_unit.



20780
20781
20782
20783
20784
20785
20786
20787
20788
20789
# File 'lib/ovirtsdk4/types.rb', line 20780

def initialize(opts = {})
  super(opts)
  self.comment = opts[:comment]
  self.description = opts[:description]
  self.factor = opts[:factor]
  self.id = opts[:id]
  self.name = opts[:name]
  self.scheduling_policy = opts[:scheduling_policy]
  self.scheduling_policy_unit = opts[:scheduling_policy_unit]
end

Instance Method Details

- (String) comment

Returns the value of the comment attribute.

Returns:

  • (String)


20623
20624
20625
# File 'lib/ovirtsdk4/types.rb', line 20623

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


20632
20633
20634
# File 'lib/ovirtsdk4/types.rb', line 20632

def comment=(value)
  @comment = value
end

- (String) description

Returns the value of the description attribute.

Returns:

  • (String)


20641
20642
20643
# File 'lib/ovirtsdk4/types.rb', line 20641

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


20650
20651
20652
# File 'lib/ovirtsdk4/types.rb', line 20650

def description=(value)
  @description = value
end

- (Integer) factor

Returns the value of the factor attribute.

Returns:

  • (Integer)


20659
20660
20661
# File 'lib/ovirtsdk4/types.rb', line 20659

def factor
  return @factor
end

- (Object) factor=(value)

Sets the value of the factor attribute.

Parameters:

  • value (Integer)


20668
20669
20670
# File 'lib/ovirtsdk4/types.rb', line 20668

def factor=(value)
  @factor = value
end

- (String) id

Returns the value of the id attribute.

Returns:

  • (String)


20677
20678
20679
# File 'lib/ovirtsdk4/types.rb', line 20677

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


20686
20687
20688
# File 'lib/ovirtsdk4/types.rb', line 20686

def id=(value)
  @id = value
end

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


20695
20696
20697
# File 'lib/ovirtsdk4/types.rb', line 20695

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


20704
20705
20706
# File 'lib/ovirtsdk4/types.rb', line 20704

def name=(value)
  @name = value
end

- (SchedulingPolicy) scheduling_policy

Returns the value of the scheduling_policy attribute.

Returns:



20713
20714
20715
# File 'lib/ovirtsdk4/types.rb', line 20713

def scheduling_policy
  return @scheduling_policy
end

- (Object) scheduling_policy=(value)

Sets the value of the scheduling_policy attribute.

The value parameter can be an instance of SchedulingPolicy or a hash. If it is a hash then a new instance will be created passing the hash as the opts parameter to the constructor.

Parameters:



20726
20727
20728
20729
20730
20731
# File 'lib/ovirtsdk4/types.rb', line 20726

def scheduling_policy=(value)
  if value.is_a?(Hash)
    value = SchedulingPolicy.new(value)
  end
  @scheduling_policy = value
end

- (SchedulingPolicyUnit) scheduling_policy_unit

Returns the value of the scheduling_policy_unit attribute.



20738
20739
20740
# File 'lib/ovirtsdk4/types.rb', line 20738

def scheduling_policy_unit
  return @scheduling_policy_unit
end

- (Object) scheduling_policy_unit=(value)

Sets the value of the scheduling_policy_unit attribute.

The value parameter can be an instance of SchedulingPolicyUnit or a hash. If it is a hash then a new instance will be created passing the hash as the opts parameter to the constructor.

Parameters:



20751
20752
20753
20754
20755
20756
# File 'lib/ovirtsdk4/types.rb', line 20751

def scheduling_policy_unit=(value)
  if value.is_a?(Hash)
    value = SchedulingPolicyUnit.new(value)
  end
  @scheduling_policy_unit = value
end