Creates a new instance of the {Dns} 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 [Array<Host>, Array<Hash>] :search_domains The values of attribute `search_domains`.
@option opts [Array<Host>, Array<Hash>] :servers The values of attribute `servers`.
# File lib/ovirtsdk4/types.rb, line 3201 def initialize(opts = {}) super(opts) self.search_domains = opts[:search_domains] self.servers = opts[:servers] end
Returns `true` if `self` and `other` have the same attributes and values.
# File lib/ovirtsdk4/types.rb, line 3210 def ==(other) super && @search_domains == other.search_domains && @servers == other.servers end
Generates a hash value for this object.
# File lib/ovirtsdk4/types.rb, line 3219 def hash super + @search_domains.hash + @servers.hash end
Returns the value of the `search_domains` attribute.
@return [Array<Host>]
# File lib/ovirtsdk4/types.rb, line 3142 def search_domains @search_domains end
Sets the value of the `search_domains` attribute.
@param list [Array<Host>]
# File lib/ovirtsdk4/types.rb, line 3151 def search_domains=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Host.new(value) end end end @search_domains = list end
Returns the value of the `servers` attribute.
@return [Array<Host>]
# File lib/ovirtsdk4/types.rb, line 3168 def servers @servers end
Sets the value of the `servers` attribute.
@param list [Array<Host>]
# File lib/ovirtsdk4/types.rb, line 3177 def servers=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Host.new(value) end end end @servers = list end