Creates a new instance of the {VnicProfileMapping} 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 [String] :source_network_name The value of attribute `source_network_name`.
@option opts [String] :source_network_profile_name The value of attribute `source_network_profile_name`.
@option opts [VnicProfile, Hash] :target_vnic_profile The value of attribute `target_vnic_profile`.
# File lib/ovirtsdk4/types.rb, line 24653 def initialize(opts = {}) super(opts) self.source_network_name = opts[:source_network_name] self.source_network_profile_name = opts[:source_network_profile_name] self.target_vnic_profile = opts[:target_vnic_profile] end
Returns `true` if `self` and `other` have the same attributes and values.
# File lib/ovirtsdk4/types.rb, line 24663 def ==(other) super && @source_network_name == other.source_network_name && @source_network_profile_name == other.source_network_profile_name && @target_vnic_profile == other.target_vnic_profile end
Generates a hash value for this object.
# File lib/ovirtsdk4/types.rb, line 24673 def hash super + @source_network_name.hash + @source_network_profile_name.hash + @target_vnic_profile.hash end
Returns the value of the `source_network_name` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 24583 def source_network_name @source_network_name end
Sets the value of the `source_network_name` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 24592 def source_network_name=(value) @source_network_name = value end
Returns the value of the `source_network_profile_name` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 24601 def source_network_profile_name @source_network_profile_name end
Sets the value of the `source_network_profile_name` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 24610 def source_network_profile_name=(value) @source_network_profile_name = value end
Returns the value of the `target_vnic_profile` attribute.
@return [VnicProfile]
# File lib/ovirtsdk4/types.rb, line 24619 def target_vnic_profile @target_vnic_profile end
Sets the value of the `target_vnic_profile` attribute.
@param value [VnicProfile, Hash]
The `value` parameter can be an instance of {OvirtSDK4::VnicProfile} 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 24632 def target_vnic_profile=(value) if value.is_a?(Hash) value = VnicProfile.new(value) end @target_vnic_profile = value end