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`.
# File lib/ovirtsdk4/types.rb, line 6268 def initialize(opts = {}) super(opts) self.assignment_method = opts[:assignment_method] self.ip = opts[:ip] end
Returns `true` if `self` and `other` have the same attributes and values.
# File lib/ovirtsdk4/types.rb, line 6277 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 6218 def assignment_method @assignment_method end
Sets the value of the `assignment_method` attribute.
@param value [BootProtocol]
# File lib/ovirtsdk4/types.rb, line 6227 def assignment_method=(value) @assignment_method = value end
Generates a hash value for this object.
# File lib/ovirtsdk4/types.rb, line 6286 def hash super + @assignment_method.hash + @ip.hash end
Returns the value of the `ip` attribute.
@return [Ip]
# File lib/ovirtsdk4/types.rb, line 6236 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 6249 def ip=(value) if value.is_a?(Hash) value = Ip.new(value) end @ip = value end