Creates a new instance of the {HostNic} 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 [Integer] :ad_aggregator_id The value of attribute `ad_aggregator_id`.
@option opts [String] :base_interface The value of attribute `base_interface`.
@option opts [Bonding, Hash] :bonding The value of attribute `bonding`.
@option opts [BootProtocol] :boot_protocol The value of attribute `boot_protocol`.
@option opts [Boolean] :bridged The value of attribute `bridged`.
@option opts [Boolean] :check_connectivity The value of attribute `check_connectivity`.
@option opts [String] :comment The value of attribute `comment`.
@option opts [Boolean] :custom_configuration The value of attribute `custom_configuration`.
@option opts [String] :description The value of attribute `description`.
@option opts [Host, Hash] :host The value of attribute `host`.
@option opts [String] :id The value of attribute `id`.
@option opts [Ip, Hash] :ip The value of attribute `ip`.
@option opts [Ip, Hash] :ipv6 The value of attribute `ipv6`.
@option opts [BootProtocol] :ipv6_boot_protocol The value of attribute `ipv6_boot_protocol`.
@option opts [Mac, Hash] :mac The value of attribute `mac`.
@option opts [Integer] :mtu The value of attribute `mtu`.
@option opts [String] :name The value of attribute `name`.
@option opts [Network, Hash] :network The value of attribute `network`.
@option opts [Array<NetworkLabel>, Array<Hash>] :network_labels The values of attribute `network_labels`.
@option opts [Boolean] :override_configuration The value of attribute `override_configuration`.
@option opts [HostNic, Hash] :physical_function The value of attribute `physical_function`.
@option opts [Array<Property>, Array<Hash>] :properties The values of attribute `properties`.
@option opts [Qos, Hash] :qos The value of attribute `qos`.
@option opts [Integer] :speed The value of attribute `speed`.
@option opts [Array<Statistic>, Array<Hash>] :statistics The values of attribute `statistics`.
@option opts [NicStatus] :status The value of attribute `status`.
@option opts [HostNicVirtualFunctionsConfiguration, Hash] :virtual_functions_configuration The value of attribute `virtual_functions_configuration`.
@option opts [Vlan, Hash] :vlan The value of attribute `vlan`.
# File lib/ovirtsdk4/types.rb, line 40877 def initialize(opts = {}) super(opts) self.ad_aggregator_id = opts[:ad_aggregator_id] self.base_interface = opts[:base_interface] self.bonding = opts[:bonding] self.boot_protocol = opts[:boot_protocol] self.bridged = opts[:bridged] self.check_connectivity = opts[:check_connectivity] self.custom_configuration = opts[:custom_configuration] self.host = opts[:host] self.ip = opts[:ip] self.ipv6 = opts[:ipv6] self.ipv6_boot_protocol = opts[:ipv6_boot_protocol] self.mac = opts[:mac] self.mtu = opts[:mtu] self.network = opts[:network] self.network_labels = opts[:network_labels] self.override_configuration = opts[:override_configuration] self.physical_function = opts[:physical_function] self.properties = opts[:properties] self.qos = opts[:qos] self.speed = opts[:speed] self.statistics = opts[:statistics] self.status = opts[:status] self.virtual_functions_configuration = opts[:virtual_functions_configuration] self.vlan = opts[:vlan] end
Returns `true` if `self` and `other` have the same attributes and values.
# File lib/ovirtsdk4/types.rb, line 40908 def ==(other) super && @ad_aggregator_id == other.ad_aggregator_id && @base_interface == other.base_interface && @bonding == other.bonding && @boot_protocol == other.boot_protocol && @bridged == other.bridged && @check_connectivity == other.check_connectivity && @custom_configuration == other.custom_configuration && @host == other.host && @ip == other.ip && @ipv6 == other.ipv6 && @ipv6_boot_protocol == other.ipv6_boot_protocol && @mac == other.mac && @mtu == other.mtu && @network == other.network && @network_labels == other.network_labels && @override_configuration == other.override_configuration && @physical_function == other.physical_function && @properties == other.properties && @qos == other.qos && @speed == other.speed && @statistics == other.statistics && @status == other.status && @virtual_functions_configuration == other.virtual_functions_configuration && @vlan == other.vlan end
Returns the value of the `ad_aggregator_id` attribute.
@return [Integer]
# File lib/ovirtsdk4/types.rb, line 40220 def ad_aggregator_id @ad_aggregator_id end
Sets the value of the `ad_aggregator_id` attribute.
@param value [Integer]
# File lib/ovirtsdk4/types.rb, line 40229 def ad_aggregator_id=(value) @ad_aggregator_id = value end
Returns the value of the `base_interface` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 40238 def base_interface @base_interface end
Sets the value of the `base_interface` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 40247 def base_interface=(value) @base_interface = value end
Returns the value of the `bonding` attribute.
@return [Bonding]
# File lib/ovirtsdk4/types.rb, line 40256 def bonding @bonding end
Sets the value of the `bonding` attribute.
@param value [Bonding, Hash]
The `value` parameter can be an instance of {OvirtSDK4::Bonding} 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 40269 def bonding=(value) if value.is_a?(Hash) value = Bonding.new(value) end @bonding = value end
Returns the value of the `boot_protocol` attribute.
@return [BootProtocol]
# File lib/ovirtsdk4/types.rb, line 40281 def boot_protocol @boot_protocol end
Sets the value of the `boot_protocol` attribute.
@param value [BootProtocol]
# File lib/ovirtsdk4/types.rb, line 40290 def boot_protocol=(value) @boot_protocol = value end
Returns the value of the `bridged` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 40299 def bridged @bridged end
Sets the value of the `bridged` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 40308 def bridged=(value) @bridged = value end
Returns the value of the `check_connectivity` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 40317 def check_connectivity @check_connectivity end
Sets the value of the `check_connectivity` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 40326 def check_connectivity=(value) @check_connectivity = value end
Returns the value of the `comment` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 40335 def comment @comment end
Sets the value of the `comment` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 40344 def comment=(value) @comment = value end
Returns the value of the `custom_configuration` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 40353 def custom_configuration @custom_configuration end
Sets the value of the `custom_configuration` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 40362 def custom_configuration=(value) @custom_configuration = value end
Returns the value of the `description` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 40371 def description @description end
Sets the value of the `description` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 40380 def description=(value) @description = value end
Generates a hash value for this object.
# File lib/ovirtsdk4/types.rb, line 40939 def hash super + @ad_aggregator_id.hash + @base_interface.hash + @bonding.hash + @boot_protocol.hash + @bridged.hash + @check_connectivity.hash + @custom_configuration.hash + @host.hash + @ip.hash + @ipv6.hash + @ipv6_boot_protocol.hash + @mac.hash + @mtu.hash + @network.hash + @network_labels.hash + @override_configuration.hash + @physical_function.hash + @properties.hash + @qos.hash + @speed.hash + @statistics.hash + @status.hash + @virtual_functions_configuration.hash + @vlan.hash end
Returns the value of the `host` attribute.
@return [Host]
# File lib/ovirtsdk4/types.rb, line 40389 def host @host end
Sets the value of the `host` attribute.
@param value [Host, Hash]
The `value` parameter can be an instance of {OvirtSDK4::Host} 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 40402 def host=(value) if value.is_a?(Hash) value = Host.new(value) end @host = value end
Returns the value of the `id` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 40414 def id @id end
Sets the value of the `id` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 40423 def id=(value) @id = value end
Returns the value of the `ip` attribute.
@return [Ip]
# File lib/ovirtsdk4/types.rb, line 40432 def ip @ip end
Sets the value of the `ip` attribute.
@param value [Ip, Hash]
The `value` parameter can be an instance of {OvirtSDK4::Ip} 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 40445 def ip=(value) if value.is_a?(Hash) value = Ip.new(value) end @ip = value end
Returns the value of the `ipv6` attribute.
@return [Ip]
# File lib/ovirtsdk4/types.rb, line 40457 def ipv6 @ipv6 end
Sets the value of the `ipv6` attribute.
@param value [Ip, Hash]
The `value` parameter can be an instance of {OvirtSDK4::Ip} 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 40470 def ipv6=(value) if value.is_a?(Hash) value = Ip.new(value) end @ipv6 = value end
Returns the value of the `ipv6_boot_protocol` attribute.
@return [BootProtocol]
# File lib/ovirtsdk4/types.rb, line 40482 def ipv6_boot_protocol @ipv6_boot_protocol end
Sets the value of the `ipv6_boot_protocol` attribute.
@param value [BootProtocol]
# File lib/ovirtsdk4/types.rb, line 40491 def ipv6_boot_protocol=(value) @ipv6_boot_protocol = value end
Returns the value of the `mac` attribute.
@return [Mac]
# File lib/ovirtsdk4/types.rb, line 40500 def mac @mac end
Sets the value of the `mac` attribute.
@param value [Mac, Hash]
The `value` parameter can be an instance of {OvirtSDK4::Mac} 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 40513 def mac=(value) if value.is_a?(Hash) value = Mac.new(value) end @mac = value end
Returns the value of the `mtu` attribute.
@return [Integer]
# File lib/ovirtsdk4/types.rb, line 40525 def mtu @mtu end
Sets the value of the `mtu` attribute.
@param value [Integer]
# File lib/ovirtsdk4/types.rb, line 40534 def mtu=(value) @mtu = value end
Returns the value of the `name` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 40543 def name @name end
Sets the value of the `name` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 40552 def name=(value) @name = value end
Returns the value of the `network` attribute.
@return [Network]
# File lib/ovirtsdk4/types.rb, line 40561 def network @network end
Sets the value of the `network` attribute.
@param value [Network, Hash]
The `value` parameter can be an instance of {OvirtSDK4::Network} 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 40574 def network=(value) if value.is_a?(Hash) value = Network.new(value) end @network = value end
Returns the value of the `network_labels` attribute.
@return [Array<NetworkLabel>]
# File lib/ovirtsdk4/types.rb, line 40586 def network_labels @network_labels end
Sets the value of the `network_labels` attribute.
@param list [Array<NetworkLabel>]
# File lib/ovirtsdk4/types.rb, line 40595 def network_labels=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = NetworkLabel.new(value) end end end @network_labels = list end
Returns the value of the `override_configuration` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 40612 def override_configuration @override_configuration end
Sets the value of the `override_configuration` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 40621 def override_configuration=(value) @override_configuration = value end
Returns the value of the `physical_function` attribute.
@return [HostNic]
# File lib/ovirtsdk4/types.rb, line 40630 def physical_function @physical_function end
Sets the value of the `physical_function` attribute.
@param value [HostNic, Hash]
The `value` parameter can be an instance of {OvirtSDK4::HostNic} 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 40643 def physical_function=(value) if value.is_a?(Hash) value = HostNic.new(value) end @physical_function = value end
Returns the value of the `properties` attribute.
@return [Array<Property>]
# File lib/ovirtsdk4/types.rb, line 40655 def properties @properties end
Sets the value of the `properties` attribute.
@param list [Array<Property>]
# File lib/ovirtsdk4/types.rb, line 40664 def properties=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Property.new(value) end end end @properties = list end
Returns the value of the `qos` attribute.
@return [Qos]
# File lib/ovirtsdk4/types.rb, line 40681 def qos @qos end
Sets the value of the `qos` attribute.
@param value [Qos, Hash]
The `value` parameter can be an instance of {OvirtSDK4::Qos} 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 40694 def qos=(value) if value.is_a?(Hash) value = Qos.new(value) end @qos = value end
Returns the value of the `speed` attribute.
@return [Integer]
# File lib/ovirtsdk4/types.rb, line 40706 def speed @speed end
Sets the value of the `speed` attribute.
@param value [Integer]
# File lib/ovirtsdk4/types.rb, line 40715 def speed=(value) @speed = value end
Returns the value of the `statistics` attribute.
@return [Array<Statistic>]
# File lib/ovirtsdk4/types.rb, line 40724 def statistics @statistics end
Sets the value of the `statistics` attribute.
@param list [Array<Statistic>]
# File lib/ovirtsdk4/types.rb, line 40733 def statistics=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Statistic.new(value) end end end @statistics = list end
Returns the value of the `status` attribute.
@return [NicStatus]
# File lib/ovirtsdk4/types.rb, line 40750 def status @status end
Sets the value of the `status` attribute.
@param value [NicStatus]
# File lib/ovirtsdk4/types.rb, line 40759 def status=(value) @status = value end
Returns the value of the `virtual_functions_configuration` attribute.
@return [HostNicVirtualFunctionsConfiguration]
# File lib/ovirtsdk4/types.rb, line 40768 def virtual_functions_configuration @virtual_functions_configuration end
Sets the value of the `virtual_functions_configuration` attribute.
@param value [HostNicVirtualFunctionsConfiguration, Hash]
The `value` parameter can be an instance of {OvirtSDK4::HostNicVirtualFunctionsConfiguration} 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 40781 def virtual_functions_configuration=(value) if value.is_a?(Hash) value = HostNicVirtualFunctionsConfiguration.new(value) end @virtual_functions_configuration = value end
Returns the value of the `vlan` attribute.
@return [Vlan]
# File lib/ovirtsdk4/types.rb, line 40793 def vlan @vlan end
Sets the value of the `vlan` attribute.
@param value [Vlan, Hash]
The `value` parameter can be an instance of {OvirtSDK4::Vlan} 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 40806 def vlan=(value) if value.is_a?(Hash) value = Vlan.new(value) end @vlan = value end