Class: OvirtSDK4::VnicProfileMapping
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
true
ifself
andother
have the same attributes and values. -
#hash ⇒ Object
Generates a hash value for this object.
-
#initialize(opts = {}) ⇒ VnicProfileMapping
constructor
Creates a new instance of the VnicProfileMapping class.
-
#source_network_name ⇒ String
Returns the value of the
source_network_name
attribute. -
#source_network_name=(value) ⇒ Object
Sets the value of the
source_network_name
attribute. -
#source_network_profile_name ⇒ String
Returns the value of the
source_network_profile_name
attribute. -
#source_network_profile_name=(value) ⇒ Object
Sets the value of the
source_network_profile_name
attribute. -
#target_vnic_profile ⇒ VnicProfile
Returns the value of the
target_vnic_profile
attribute. -
#target_vnic_profile=(value) ⇒ Object
Sets the value of the
target_vnic_profile
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ VnicProfileMapping
Creates a new instance of the OvirtSDK4::VnicProfileMapping class.
27507 27508 27509 27510 27511 27512 |
# File 'lib/ovirtsdk4/types.rb', line 27507 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 |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
27517 27518 27519 27520 27521 27522 |
# File 'lib/ovirtsdk4/types.rb', line 27517 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 |
#hash ⇒ Object
Generates a hash value for this object.
27527 27528 27529 27530 27531 27532 |
# File 'lib/ovirtsdk4/types.rb', line 27527 def hash super + @source_network_name.hash + @source_network_profile_name.hash + @target_vnic_profile.hash end |
#source_network_name ⇒ String
Returns the value of the source_network_name
attribute.
27437 27438 27439 |
# File 'lib/ovirtsdk4/types.rb', line 27437 def source_network_name @source_network_name end |
#source_network_name=(value) ⇒ Object
Sets the value of the source_network_name
attribute.
27446 27447 27448 |
# File 'lib/ovirtsdk4/types.rb', line 27446 def source_network_name=(value) @source_network_name = value end |
#source_network_profile_name ⇒ String
Returns the value of the source_network_profile_name
attribute.
27455 27456 27457 |
# File 'lib/ovirtsdk4/types.rb', line 27455 def source_network_profile_name @source_network_profile_name end |
#source_network_profile_name=(value) ⇒ Object
Sets the value of the source_network_profile_name
attribute.
27464 27465 27466 |
# File 'lib/ovirtsdk4/types.rb', line 27464 def source_network_profile_name=(value) @source_network_profile_name = value end |
#target_vnic_profile ⇒ VnicProfile
Returns the value of the target_vnic_profile
attribute.
27473 27474 27475 |
# File 'lib/ovirtsdk4/types.rb', line 27473 def target_vnic_profile @target_vnic_profile end |
#target_vnic_profile=(value) ⇒ Object
Sets the value of the target_vnic_profile
attribute.
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.
27486 27487 27488 27489 27490 27491 |
# File 'lib/ovirtsdk4/types.rb', line 27486 def target_vnic_profile=(value) if value.is_a?(Hash) value = VnicProfile.new(value) end @target_vnic_profile = value end |