Class: OvirtSDK4::AffinityLabel

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

- (AffinityLabel) initialize(opts = {})

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

  • :hosts (Array<Host>, Array<Hash>)

    The values of attribute hosts.

  • :id (String)

    The value of attribute id.

  • :name (String)

    The value of attribute name.

  • :read_only (Boolean)

    The value of attribute read_only.

  • :vms (Array<Vm>, Array<Hash>)

    The values of attribute vms.



22731
22732
22733
22734
22735
22736
22737
22738
22739
22740
# File 'lib/ovirtsdk4/types.rb', line 22731

def initialize(opts = {})
  super(opts)
  self.comment = opts[:comment]
  self.description = opts[:description]
  self.hosts = opts[:hosts]
  self.id = opts[:id]
  self.name = opts[:name]
  self.read_only = opts[:read_only]
  self.vms = opts[:vms]
end

Instance Method Details

- (String) comment

Returns the value of the comment attribute.

Returns:

  • (String)


22574
22575
22576
# File 'lib/ovirtsdk4/types.rb', line 22574

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


22583
22584
22585
# File 'lib/ovirtsdk4/types.rb', line 22583

def comment=(value)
  @comment = value
end

- (String) description

Returns the value of the description attribute.

Returns:

  • (String)


22592
22593
22594
# File 'lib/ovirtsdk4/types.rb', line 22592

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


22601
22602
22603
# File 'lib/ovirtsdk4/types.rb', line 22601

def description=(value)
  @description = value
end

- (Array<Host>) hosts

Returns the value of the hosts attribute.

Returns:



22610
22611
22612
# File 'lib/ovirtsdk4/types.rb', line 22610

def hosts
  return @hosts
end

- (Object) hosts=(list)

Sets the value of the hosts attribute.

Parameters:

  • list (Array<Host>)


22618
22619
22620
22621
22622
22623
22624
22625
22626
22627
22628
# File 'lib/ovirtsdk4/types.rb', line 22618

def hosts=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Host.new(value)
      end
    end
  end
  @hosts = list
end

- (String) id

Returns the value of the id attribute.

Returns:

  • (String)


22635
22636
22637
# File 'lib/ovirtsdk4/types.rb', line 22635

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


22644
22645
22646
# File 'lib/ovirtsdk4/types.rb', line 22644

def id=(value)
  @id = value
end

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


22653
22654
22655
# File 'lib/ovirtsdk4/types.rb', line 22653

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


22662
22663
22664
# File 'lib/ovirtsdk4/types.rb', line 22662

def name=(value)
  @name = value
end

- (Boolean) read_only

Returns the value of the read_only attribute.

Returns:

  • (Boolean)


22671
22672
22673
# File 'lib/ovirtsdk4/types.rb', line 22671

def read_only
  return @read_only
end

- (Object) read_only=(value)

Sets the value of the read_only attribute.

Parameters:

  • value (Boolean)


22680
22681
22682
# File 'lib/ovirtsdk4/types.rb', line 22680

def read_only=(value)
  @read_only = value
end

- (Array<Vm>) vms

Returns the value of the vms attribute.

Returns:

  • (Array<Vm>)


22689
22690
22691
# File 'lib/ovirtsdk4/types.rb', line 22689

def vms
  return @vms
end

- (Object) vms=(list)

Sets the value of the vms attribute.

Parameters:

  • list (Array<Vm>)


22697
22698
22699
22700
22701
22702
22703
22704
22705
22706
22707
# File 'lib/ovirtsdk4/types.rb', line 22697

def vms=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Vm.new(value)
      end
    end
  end
  @vms = list
end