class OvirtSDK4::IpAddressAssignment
Public Class Methods
Creates a new instance of the {IpAddressAssignment} 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 [BootProtocol] :assignment_method The value of attribute `assignment_method`.
@option opts [Ip, Hash] :ip The value of attribute `ip`.
OvirtSDK4::Struct::new
# File lib/ovirtsdk4/types.rb, line 7083 def initialize(opts = {}) super(opts) self.assignment_method = opts[:assignment_method] self.ip = opts[:ip] end
Public Instance Methods
Returns `true` if `self` and `other` have the same attributes and values.
# File lib/ovirtsdk4/types.rb, line 7092 def ==(other) super && @assignment_method == other.assignment_method && @ip == other.ip end
Returns the value of the `assignment_method` attribute.
@return [BootProtocol]
# File lib/ovirtsdk4/types.rb, line 7033 def assignment_method @assignment_method end
Sets the value of the `assignment_method` attribute.
@param value [BootProtocol]
# File lib/ovirtsdk4/types.rb, line 7042 def assignment_method=(value) @assignment_method = value end
Generates a hash value for this object.
OvirtSDK4::Struct#hash
# File lib/ovirtsdk4/types.rb, line 7101 def hash super + @assignment_method.hash + @ip.hash end
Returns the value of the `ip` attribute.
@return [Ip]
# File lib/ovirtsdk4/types.rb, line 7051 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 7064 def ip=(value) if value.is_a?(Hash) value = Ip.new(value) end @ip = value end