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 7663 def initialize(opts = {}) super(opts) self.dns = opts[:dns] self.nics = opts[:nics] end
Returns the value of the `dns` attribute.
@return [Dns]
# File lib/ovirtsdk4/types.rb, line 7606 def dns return @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 7619 def dns=(value) if value.is_a?(Hash) value = Dns.new(value) end @dns = value end
Returns the value of the `nics` attribute.
@return [Array<Nic>]
# File lib/ovirtsdk4/types.rb, line 7631 def nics return @nics end
Sets the value of the `nics` attribute.
@param list [Array<Nic>]
# File lib/ovirtsdk4/types.rb, line 7639 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