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.

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.



24061
24062
24063
24064
24065
# File 'lib/ovirtsdk4/types.rb', line 24061

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.



24070
24071
24072
24073
24074
# File 'lib/ovirtsdk4/types.rb', line 24070

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

#commentString

Returns the value of the comment attribute.



23924
23925
23926
# File 'lib/ovirtsdk4/types.rb', line 23924

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.



23933
23934
23935
# File 'lib/ovirtsdk4/types.rb', line 23933

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.



23942
23943
23944
# File 'lib/ovirtsdk4/types.rb', line 23942

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.



23951
23952
23953
# File 'lib/ovirtsdk4/types.rb', line 23951

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



24079
24080
24081
24082
24083
# File 'lib/ovirtsdk4/types.rb', line 24079

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

#hostHost

Returns the value of the host attribute.



23960
23961
23962
# File 'lib/ovirtsdk4/types.rb', line 23960

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.



23973
23974
23975
23976
23977
23978
# File 'lib/ovirtsdk4/types.rb', line 23973

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.



23985
23986
23987
# File 'lib/ovirtsdk4/types.rb', line 23985

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.



23998
23999
24000
24001
24002
24003
# File 'lib/ovirtsdk4/types.rb', line 23998

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.



24010
24011
24012
# File 'lib/ovirtsdk4/types.rb', line 24010

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.



24019
24020
24021
# File 'lib/ovirtsdk4/types.rb', line 24019

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.



24028
24029
24030
# File 'lib/ovirtsdk4/types.rb', line 24028

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.



24037
24038
24039
# File 'lib/ovirtsdk4/types.rb', line 24037

def name=(value)
  @name = value
end