class OvirtSDK4::Dns

Public Class Methods

new(opts = {}) click to toggle source

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`.

Calls superclass method OvirtSDK4::Struct.new
# File lib/ovirtsdk4/types.rb, line 3099
def initialize(opts = {})
  super(opts)
  self.search_domains = opts[:search_domains]
  self.servers = opts[:servers]
end

Public Instance Methods

==(other) click to toggle source

Returns `true` if `self` and `other` have the same attributes and values.

Calls superclass method OvirtSDK4::Struct#==
# File lib/ovirtsdk4/types.rb, line 3108
def ==(other)
  super &&
  @search_domains == other.search_domains &&
  @servers == other.servers
end
hash() click to toggle source

Generates a hash value for this object.

Calls superclass method OvirtSDK4::Struct#hash
# File lib/ovirtsdk4/types.rb, line 3117
def hash
  super +
  @search_domains.hash +
  @servers.hash
end
search_domains() click to toggle source

Returns the value of the `search_domains` attribute.

@return [Array<Host>]

# File lib/ovirtsdk4/types.rb, line 3040
def search_domains
  @search_domains
end
search_domains=(list) click to toggle source

Sets the value of the `search_domains` attribute.

@param list [Array<Host>]

# File lib/ovirtsdk4/types.rb, line 3049
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
servers() click to toggle source

Returns the value of the `servers` attribute.

@return [Array<Host>]

# File lib/ovirtsdk4/types.rb, line 3066
def servers
  @servers
end
servers=(list) click to toggle source

Sets the value of the `servers` attribute.

@param list [Array<Host>]

# File lib/ovirtsdk4/types.rb, line 3075
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