Class: OvirtSDK4::NetworkLabel

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

- (NetworkLabel) initialize(opts = {})

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



7943
7944
7945
7946
7947
7948
7949
7950
7951
# File 'lib/ovirtsdk4/types.rb', line 7943

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)


7806
7807
7808
# File 'lib/ovirtsdk4/types.rb', line 7806

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


7815
7816
7817
# File 'lib/ovirtsdk4/types.rb', line 7815

def comment=(value)
  @comment = value
end

- (String) description

Returns the value of the description attribute.

Returns:

  • (String)


7824
7825
7826
# File 'lib/ovirtsdk4/types.rb', line 7824

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


7833
7834
7835
# File 'lib/ovirtsdk4/types.rb', line 7833

def description=(value)
  @description = value
end

- (HostNic) host_nic

Returns the value of the host_nic attribute.

Returns:



7842
7843
7844
# File 'lib/ovirtsdk4/types.rb', line 7842

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:



7855
7856
7857
7858
7859
7860
# File 'lib/ovirtsdk4/types.rb', line 7855

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)


7867
7868
7869
# File 'lib/ovirtsdk4/types.rb', line 7867

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


7876
7877
7878
# File 'lib/ovirtsdk4/types.rb', line 7876

def id=(value)
  @id = value
end

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


7885
7886
7887
# File 'lib/ovirtsdk4/types.rb', line 7885

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


7894
7895
7896
# File 'lib/ovirtsdk4/types.rb', line 7894

def name=(value)
  @name = value
end

- (Network) network

Returns the value of the network attribute.

Returns:



7903
7904
7905
# File 'lib/ovirtsdk4/types.rb', line 7903

def network
  return @network
end

- (Object) network=(value)

Sets the value of the network attribute.

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



7916
7917
7918
7919
7920
7921
# File 'lib/ovirtsdk4/types.rb', line 7916

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