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`.
# File lib/ovirtsdk4/types.rb, line 9960 def initialize(opts = {}) super(opts) self.dns = opts[:dns] self.nics = opts[:nics] end
Returns `true` if `self` and `other` have the same attributes and values.
# File lib/ovirtsdk4/types.rb, line 9969 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 9902 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 9915 def dns=(value) if value.is_a?(Hash) value = Dns.new(value) end @dns = value end
Generates a hash value for this object.
# File lib/ovirtsdk4/types.rb, line 9978 def hash super + @dns.hash + @nics.hash end
Returns the value of the `nics` attribute.
@return [Array<Nic>]
# File lib/ovirtsdk4/types.rb, line 9927 def nics @nics end
Sets the value of the `nics` attribute.
@param list [Array<Nic>]
# File lib/ovirtsdk4/types.rb, line 9936 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