Class: OvirtSDK4::HostNicVirtualFunctionsConfiguration

Inherits:
Struct
  • Object
show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Instance Method Summary collapse

Methods included from Type

#dig, #href, #href=

Constructor Details

#initialize(opts = {}) ⇒ HostNicVirtualFunctionsConfiguration

Creates a new instance of the OvirtSDK4::HostNicVirtualFunctionsConfiguration class.

Parameters:

  • opts (Hash) (defaults to: {})

    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.

Options Hash (opts):

  • :all_networks_allowed (Boolean)

    The value of attribute all_networks_allowed.

  • :max_number_of_virtual_functions (Integer)

    The value of attribute max_number_of_virtual_functions.

  • :number_of_virtual_functions (Integer)

    The value of attribute number_of_virtual_functions.



4899
4900
4901
4902
4903
4904
# File 'lib/ovirtsdk4/types.rb', line 4899

def initialize(opts = {})
  super(opts)
  self.all_networks_allowed = opts[:all_networks_allowed]
  self.max_number_of_virtual_functions = opts[:max_number_of_virtual_functions]
  self.number_of_virtual_functions = opts[:number_of_virtual_functions]
end

Instance Method Details

#==(other) ⇒ Object

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



4909
4910
4911
4912
4913
4914
# File 'lib/ovirtsdk4/types.rb', line 4909

def ==(other)
  super &&
  @all_networks_allowed == other.all_networks_allowed &&
  @max_number_of_virtual_functions == other.max_number_of_virtual_functions &&
  @number_of_virtual_functions == other.number_of_virtual_functions
end

#all_networks_allowedBoolean

Returns the value of the all_networks_allowed attribute.

Returns:

  • (Boolean)


4836
4837
4838
# File 'lib/ovirtsdk4/types.rb', line 4836

def all_networks_allowed
  @all_networks_allowed
end

#all_networks_allowed=(value) ⇒ Object

Sets the value of the all_networks_allowed attribute.

Parameters:

  • value (Boolean)


4845
4846
4847
# File 'lib/ovirtsdk4/types.rb', line 4845

def all_networks_allowed=(value)
  @all_networks_allowed = value
end

#hashObject

Generates a hash value for this object.



4919
4920
4921
4922
4923
4924
# File 'lib/ovirtsdk4/types.rb', line 4919

def hash
  super +
  @all_networks_allowed.hash +
  @max_number_of_virtual_functions.hash +
  @number_of_virtual_functions.hash
end

#max_number_of_virtual_functionsInteger

Returns the value of the max_number_of_virtual_functions attribute.

Returns:

  • (Integer)


4854
4855
4856
# File 'lib/ovirtsdk4/types.rb', line 4854

def max_number_of_virtual_functions
  @max_number_of_virtual_functions
end

#max_number_of_virtual_functions=(value) ⇒ Object

Sets the value of the max_number_of_virtual_functions attribute.

Parameters:

  • value (Integer)


4863
4864
4865
# File 'lib/ovirtsdk4/types.rb', line 4863

def max_number_of_virtual_functions=(value)
  @max_number_of_virtual_functions = value
end

#number_of_virtual_functionsInteger

Returns the value of the number_of_virtual_functions attribute.

Returns:

  • (Integer)


4872
4873
4874
# File 'lib/ovirtsdk4/types.rb', line 4872

def number_of_virtual_functions
  @number_of_virtual_functions
end

#number_of_virtual_functions=(value) ⇒ Object

Sets the value of the number_of_virtual_functions attribute.

Parameters:

  • value (Integer)


4881
4882
4883
# File 'lib/ovirtsdk4/types.rb', line 4881

def number_of_virtual_functions=(value)
  @number_of_virtual_functions = value
end