Class: OvirtSDK4::Label

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

- (Label) initialize(opts = {})

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

  • :host_nic (HostNic, Hash)

    The value of attribute host_nic.

  • :id (String)

    The value of attribute id.

  • :name (String)

    The value of attribute name.

  • :network (Network, Hash)

    The value of attribute network.



5797
5798
5799
5800
5801
5802
5803
5804
5805
# File 'lib/ovirtsdk4/types.rb', line 5797

def initialize(opts = {})
  super(opts)
  self.comment = opts[:comment]
  self.description = opts[:description]
  self.host_nic = opts[:host_nic]
  self.id = opts[:id]
  self.name = opts[:name]
  self.network = opts[:network]
end

Instance Method Details

- (String) comment

Returns the value of the comment attribute.

Returns:

  • (String)


5660
5661
5662
# File 'lib/ovirtsdk4/types.rb', line 5660

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


5669
5670
5671
# File 'lib/ovirtsdk4/types.rb', line 5669

def comment=(value)
  @comment = value
end

- (String) description

Returns the value of the description attribute.

Returns:

  • (String)


5678
5679
5680
# File 'lib/ovirtsdk4/types.rb', line 5678

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


5687
5688
5689
# File 'lib/ovirtsdk4/types.rb', line 5687

def description=(value)
  @description = value
end

- (HostNic) host_nic

Returns the value of the host_nic attribute.

Returns:



5696
5697
5698
# File 'lib/ovirtsdk4/types.rb', line 5696

def host_nic
  return @host_nic
end

- (Object) host_nic=(value)

Sets the value of the host_nic attribute.

The value parameter can be an instance of HostNic 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:



5709
5710
5711
5712
5713
5714
# File 'lib/ovirtsdk4/types.rb', line 5709

def host_nic=(value)
  if value.is_a?(Hash)
    value = HostNic.new(value)
  end
  @host_nic = value
end

- (String) id

Returns the value of the id attribute.

Returns:

  • (String)


5721
5722
5723
# File 'lib/ovirtsdk4/types.rb', line 5721

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


5730
5731
5732
# File 'lib/ovirtsdk4/types.rb', line 5730

def id=(value)
  @id = value
end

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


5739
5740
5741
# File 'lib/ovirtsdk4/types.rb', line 5739

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


5748
5749
5750
# File 'lib/ovirtsdk4/types.rb', line 5748

def name=(value)
  @name = value
end

- (Network) network

Returns the value of the network attribute.

Returns:



5757
5758
5759
# File 'lib/ovirtsdk4/types.rb', line 5757

def network
  return @network
end

- (Object) network=(value)

Sets the value of the network attribute.

The value parameter can be an instance of Network 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:



5770
5771
5772
5773
5774
5775
# File 'lib/ovirtsdk4/types.rb', line 5770

def network=(value)
  if value.is_a?(Hash)
    value = Network.new(value)
  end
  @network = value
end