Class: OvirtSDK4::UnmanagedNetwork

Inherits:
Identified 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 = {}) ⇒ UnmanagedNetwork

Creates a new instance of the OvirtSDK4::UnmanagedNetwork 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 (Host, Hash)

    The value of attribute host.

  • :host_nic (HostNic, Hash)

    The value of attribute host_nic.

  • :id (String)

    The value of attribute id.

  • :name (String)

    The value of attribute name.



23038
23039
23040
23041
23042
# File 'lib/ovirtsdk4/types.rb', line 23038

def initialize(opts = {})
  super(opts)
  self.host = opts[:host]
  self.host_nic = opts[:host_nic]
end

Instance Method Details

#==(other) ⇒ Object

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



23047
23048
23049
23050
23051
# File 'lib/ovirtsdk4/types.rb', line 23047

def ==(other)
  super &&
  @host == other.host &&
  @host_nic == other.host_nic
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


22901
22902
22903
# File 'lib/ovirtsdk4/types.rb', line 22901

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


22910
22911
22912
# File 'lib/ovirtsdk4/types.rb', line 22910

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


22919
22920
22921
# File 'lib/ovirtsdk4/types.rb', line 22919

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


22928
22929
22930
# File 'lib/ovirtsdk4/types.rb', line 22928

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



23056
23057
23058
23059
23060
# File 'lib/ovirtsdk4/types.rb', line 23056

def hash
  super +
  @host.hash +
  @host_nic.hash
end

#hostHost

Returns the value of the host attribute.

Returns:



22937
22938
22939
# File 'lib/ovirtsdk4/types.rb', line 22937

def host
  @host
end

#host=(value) ⇒ Object

Sets the value of the host attribute.

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

  • value (Host, Hash)


22950
22951
22952
22953
22954
22955
# File 'lib/ovirtsdk4/types.rb', line 22950

def host=(value)
  if value.is_a?(Hash)
    value = Host.new(value)
  end
  @host = value
end

#host_nicHostNic

Returns the value of the host_nic attribute.

Returns:



22962
22963
22964
# File 'lib/ovirtsdk4/types.rb', line 22962

def host_nic
  @host_nic
end

#host_nic=(value) ⇒ Object

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:



22975
22976
22977
22978
22979
22980
# File 'lib/ovirtsdk4/types.rb', line 22975

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

#idString

Returns the value of the id attribute.

Returns:

  • (String)


22987
22988
22989
# File 'lib/ovirtsdk4/types.rb', line 22987

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


22996
22997
22998
# File 'lib/ovirtsdk4/types.rb', line 22996

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


23005
23006
23007
# File 'lib/ovirtsdk4/types.rb', line 23005

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


23014
23015
23016
# File 'lib/ovirtsdk4/types.rb', line 23014

def name=(value)
  @name = value
end