Class: OvirtSDK4::IpAddressAssignment
- 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. -
#assignment_method ⇒ BootProtocol
Returns the value of the
assignment_method
attribute. -
#assignment_method=(value) ⇒ Object
Sets the value of the
assignment_method
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#initialize(opts = {}) ⇒ IpAddressAssignment
constructor
Creates a new instance of the IpAddressAssignment class.
-
#ip ⇒ Ip
Returns the value of the
ip
attribute. -
#ip=(value) ⇒ Object
Sets the value of the
ip
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ IpAddressAssignment
Creates a new instance of the OvirtSDK4::IpAddressAssignment class.
6565 6566 6567 6568 6569 |
# File 'lib/ovirtsdk4/types.rb', line 6565 def initialize(opts = {}) super(opts) self.assignment_method = opts[:assignment_method] self.ip = opts[:ip] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
6574 6575 6576 6577 6578 |
# File 'lib/ovirtsdk4/types.rb', line 6574 def ==(other) super && @assignment_method == other.assignment_method && @ip == other.ip end |
#assignment_method ⇒ BootProtocol
Returns the value of the assignment_method
attribute.
6515 6516 6517 |
# File 'lib/ovirtsdk4/types.rb', line 6515 def assignment_method @assignment_method end |
#assignment_method=(value) ⇒ Object
Sets the value of the assignment_method
attribute.
6524 6525 6526 |
# File 'lib/ovirtsdk4/types.rb', line 6524 def assignment_method=(value) @assignment_method = value end |
#hash ⇒ Object
Generates a hash value for this object.
6583 6584 6585 6586 6587 |
# File 'lib/ovirtsdk4/types.rb', line 6583 def hash super + @assignment_method.hash + @ip.hash end |
#ip ⇒ Ip
Returns the value of the ip
attribute.
6533 6534 6535 |
# File 'lib/ovirtsdk4/types.rb', line 6533 def ip @ip end |
#ip=(value) ⇒ Object
Sets the value of the ip
attribute.
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.
6546 6547 6548 6549 6550 6551 |
# File 'lib/ovirtsdk4/types.rb', line 6546 def ip=(value) if value.is_a?(Hash) value = Ip.new(value) end @ip = value end |