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 2514
def initialize(opts = {})
  super(opts)
  self.search_domains = opts[:search_domains]
  self.servers = opts[:servers]
end

Public Instance Methods

search_domains() click to toggle source

Returns the value of the `search_domains` attribute.

@return [Array<Host>]

# File lib/ovirtsdk4/types.rb, line 2457
def search_domains
  return @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 2465
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 2482
def servers
  return @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 2490
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