class OvirtSDK4::NetworkConfiguration
Public Class Methods
Creates a new instance of the {NetworkConfiguration} class.
@param opts [Hash] 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.
@option opts [Dns, Hash] :dns The value of attribute `dns`.
@option opts [Array<Nic>, Array<Hash>] :nics The values of attribute `nics`.
OvirtSDK4::Struct::new
# File lib/ovirtsdk4/types.rb, line 11319 def initialize(opts = {}) super(opts) self.dns = opts[:dns] self.nics = opts[:nics] end
Public Instance Methods
Returns `true` if `self` and `other` have the same attributes and values.
# File lib/ovirtsdk4/types.rb, line 11328 def ==(other) super && @dns == other.dns && @nics == other.nics end
Returns the value of the `dns` attribute.
@return [Dns]
# File lib/ovirtsdk4/types.rb, line 11261 def dns @dns end
Sets the value of the `dns` attribute.
@param value [Dns, Hash]
The `value` parameter can be an instance of {OvirtSDK4::Dns} 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.
# File lib/ovirtsdk4/types.rb, line 11274 def dns=(value) if value.is_a?(Hash) value = Dns.new(value) end @dns = value end
Generates a hash value for this object.
OvirtSDK4::Struct#hash
# File lib/ovirtsdk4/types.rb, line 11337 def hash super + @dns.hash + @nics.hash end
Returns the value of the `nics` attribute.
@return [Array<Nic>]
# File lib/ovirtsdk4/types.rb, line 11286 def nics @nics end
Sets the value of the `nics` attribute.
@param list [Array<Nic>]
# File lib/ovirtsdk4/types.rb, line 11295 def nics=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Nic.new(value) end end end @nics = list end